Hi everybody!!
I have downloaded 32 *.dta files of the Permanent Household Survey of Argentina that is conducted quarterly.
I had generated new variables to calculate the net enrollment rate (NER) for the 4th 2010 quarter. But I will have to do the same 31 times more. The NER is a measure of the proportion of primary school age children who are enrolled in primary school.
I couldn't find the answer in the forum of what to do in this cases.
Only for the 4th 2010 quarter I' have done this:
Code:
gen primary=1 if ch12==2 & ch10==1 replace primary=0 if ch12!=2 replace primary=0 if ch12==2 & ch10==2 ci primary [fw=pondera] if ch06>=6 & ch06<=11 & ch12!=9 & ch10!=0
I know that the solution is a loop, but I'm a begginer.
Thanks!!!
0 Response to How to calculate a confindence interval for multiple *dta file using a loop.
Post a Comment