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
When to use pweightHi, I am using cmxtmixlogit to check the relationship between Y (action chosen by subject) and X (p…
Making quarterly variable from separate day , month and year variableIn BRFSS data the interview date variable is suppressed though the the day , month and year variable…
Wrangling date plus time variableI have some data where the date and time is all together in one string variable. I originally tried …
MediationHello Stata community ! I am new on stata and for my mastre thesis I want to do a mediation model w…
Constructing a Panel form entry and exit variablesHi, I currently have a database of all Australian legislators since the 20th century. The data is f…
Subscribe to:
Post Comments (Atom)
0 Response to 'for each' with svyset
Post a Comment