Hello there,
Got a question. I am working on a panel data and I am trying to find the mean of some variables, by village groups. The data ranges from year 2008 to 2018 for each village group. I have tried to use -collapse- but I have not been successful. I have read the reason for this in one of the statalist posts on the same problem. Unfortunately, I am unable to figure out any other way of achieving my goal. Currently, the command is as follows:
xtset gpid year
local name3 "jcissue jc_sc jc_st jc_gen personwrk_allot hh_wrkd person_wrkd schh_wrkd sthh_wrkd persondgen_wrkd scpersond_wrkd stpersond_wrkd wpersond_wrkd persond labexp_disb matexp_disb labexp_dp matexp_dp"
foreach name3 in jcissue jc_sc jc_st jc_gen personwrk_allot hh_wrkd ///
person_wrkd schh_wrkd sthh_wrkd persondgen_wrkd scpersond_wrkd ///
stpersond_wrkd wpersond_wrkd persond labexp_disb matexp_disb ///
labexp_dp matexp_dp {
}
I really don't know how I should continue after this? Kindly help.
Related Posts with Finding mean in a loop
Parallel trends assumption with continuous treatment variable - DiDHi, I have survey data on individual firms from 2008-2017. I want to test how a reform that happene…
ArdlHello STATA users, what technics can be used to fix heteroskedasticity in ARDL model besides droppin…
Identify observations appeared in the previous yearDear All, I find this question here. The data set is Code: * Example generated by -dataex-. To inst…
Generating Probabilities from RangeHi everyone, I have question regarding how to calculate probabilities from data. My idea is to crea…
Dummy for a Criminal to commit a crime again in futureHello everyone, Need help with this. I need to see if a person will commit a crime again after his c…
Subscribe to:
Post Comments (Atom)
0 Response to Finding mean in a loop
Post a Comment