Stata-分组折线图

求分组均值,然后画折线图,整个过程可以在preserve restore中

gcollapse (mean) mean_xx=xx,by(treat_fcm_new year)  //求分组均值

twoway (line mean_xx year if treat_fcm_new == 0)   ///
(line mean_xx year if treat_fcm_new == 1) //画折线图

你可能感兴趣的:(Stata-分组折线图)