Hello! I am interested in tabbing values for each value of one variable, with thirteen values.
vallist MUNICIPALITY
Dili Bobonaro Covalima Oecusse Liquica Ermera Ainaro Aileu Manufahi Viqueque Lautem Baucau ManatutoMUNICIPALITY is encoded with values 1-13.
I tried the following to no luck...
for num 1/13: svy: tab GAMMUAC if varname == x
levelsof MUNICIPALITY, local(levels)
. foreach l of local levels {
. svy: tab GAMMUAC if varname == `l'
. }
`var' if c_q10==1 & surveyround==1, ci obs deff
}So now I'm going municipality by municipality, which is laborious.
use "$analyses/TLFNS_Analyses.sav"
vallist MUNICIPALITY
drop if MUNICIPALITYst !=4
tab MUNICIPALITY
svyset CLUSTER
*Any children malnourished by MUAC, ALL
svy: tab GAMMUAC, ci obs deff
Related Posts with 'for each' with svyset
Two-way fixed effects and multiple FEs (some questions to clear things up with the models used)Dear Stata Community: I am new to Stata, and have begun gathering information as to how to run fixe…
Weakly balanced panelMy data looks like this. ----------------------- copy starting from the next line ------------------…
Generating variables t-4 to 5Dear Statalisters, I am new to Stata and have been trying to generate the following variable. Varia…
Pooled OLS versus random effects in an extremely unbalanced panelHello. I am currently working with a dataset of 2,949 observations that correspond to individuals su…
Install Unix stata on Ubuntu in Windows Subsystem for Linuxl'm trying to install Stata on a unix kernel (unbuntu 20.10) installed on WSL on Windows 10 and i ge…
Subscribe to:
Post Comments (Atom)
0 Response to 'for each' with svyset
Post a Comment