I try to calculate the average of some variables for each observation.
My code is:
Code:
egen laporta_ave = mean(con_of_corr rul_of_law reg_qua gov_eff poli_stab voice_acc), by(obsnum) /*The "by(obsnum)" option tells Stata to calculate the average for each observation.*/
Code:
. egen laporta_ave = mean(con_of_corr rul_of_law reg_qua gov_eff poli_stab voice_acc), by(obsnum) /*The "by(obsnum)" option tells Stata to calculate the average for each observation.*/ con_of_corrrul_of_lawreg_quagov_effpoli_stabvoice_acc invalid name r(198);
0 Response to Why the program does not recognize my variables in egen syntax?
Post a Comment