Hi everyone,
I need help calculating the per capita education expenditure per grade level in Stata. The formula is expenditure per grade level (e.g., teducpreprimary) divided by the number of currently attending students per grade level (e.g. educ_group if ==1 & lc08_cursch==1)
I have three relevant variables:
1. educ_group, where each grade level is classified from 1 to 5 (e.g., 1=preprimary).
2. lc08_cursch, indicating if a student is currently attending school (1=yes, 2=no).
3. teducprimary, teducpreprimary, teducsecondary, teducpostsec, teductertiary. indicating the expenditure per grade level
input long(teducpreprimary teducprimary teducsecondary teducpostsec teductertiary) float educ_group byte lc08_cursch
0 0 0 0 0 1 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 1 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 10000 3 .
0 0 0 0 10000 4 2
0 0 0 0 10000 0 .
0 0 0 0 10000 5 2
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 5 2
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 1 1
0 0 0 0 0 5 .
0 0 0 0 0 5 .
0 0 0 0 0 5 .
0 0 0 0 0 0 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 5 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 2 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 3 .
0 0 0 0 78000 3 .
0 0 0 0 78000 3 .
0 0 0 0 78000 5 1
0 0 0 0 78000 5 1
0 0 0 0 78000 5 1
0 0 0 0 78000 5 2
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 3 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 2
0 0 0 0 0 3 .
0 12000 0 0 0 3 .
0 12000 0 0 0 3 .
0 12000 0 0 0 5 .
0 12000 0 0 0 5 .
0 12000 0 0 0 3 1
0 0 0 0 0 5 .
0 0 0 0 0 3 1
0 0 0 0 0 0 .
0 0 0 0 0 5 .
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 5 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 9980 5 .
0 0 0 0 9980 3 .
0 0 0 0 9980 5 1
0 0 0 0 9980 3 2
0 0 0 0 0 5 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 4 2
0 0 0 0 0 3 2
0 0 0 0 0 5 2
0 0 0 0 0 0 .
0 0 0 0 0 1 .
0 0 0 0 0 5 .
0 0 0 0 0 5 .
0 0 0 0 0 5 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 4 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
end
label values educ_group educ
label def educ 1 "Pre-Primary", modify
label def educ 2 "Primary", modify
label def educ 3 "Secondary", modify
label def educ 4 "Post Secondary & Non-Tertiary", modify
label def educ 5 "Tertiary", modify
label values lc08_cursch LC08_CURSCH
label def LC08_CURSCH 1 "yes", modify
label def LC08_CURSCH 2 "no", modify
How can I compute this in Stata?
Thank you.
I need help calculating the per capita education expenditure per grade level in Stata. The formula is expenditure per grade level (e.g., teducpreprimary) divided by the number of currently attending students per grade level (e.g. educ_group if ==1 & lc08_cursch==1)
I have three relevant variables:
1. educ_group, where each grade level is classified from 1 to 5 (e.g., 1=preprimary).
2. lc08_cursch, indicating if a student is currently attending school (1=yes, 2=no).
3. teducprimary, teducpreprimary, teducsecondary, teducpostsec, teductertiary. indicating the expenditure per grade level
input long(teducpreprimary teducprimary teducsecondary teducpostsec teductertiary) float educ_group byte lc08_cursch
0 0 0 0 0 1 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 1 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 10000 3 .
0 0 0 0 10000 4 2
0 0 0 0 10000 0 .
0 0 0 0 10000 5 2
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 5 2
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 1 1
0 0 0 0 0 5 .
0 0 0 0 0 5 .
0 0 0 0 0 5 .
0 0 0 0 0 0 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 5 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 2 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 3 .
0 0 0 0 78000 3 .
0 0 0 0 78000 3 .
0 0 0 0 78000 5 1
0 0 0 0 78000 5 1
0 0 0 0 78000 5 1
0 0 0 0 78000 5 2
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 3 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 2
0 0 0 0 0 3 .
0 12000 0 0 0 3 .
0 12000 0 0 0 3 .
0 12000 0 0 0 5 .
0 12000 0 0 0 5 .
0 12000 0 0 0 3 1
0 0 0 0 0 5 .
0 0 0 0 0 3 1
0 0 0 0 0 0 .
0 0 0 0 0 5 .
0 0 0 0 0 3 .
0 0 0 0 0 5 .
0 0 0 0 0 3 1
0 0 0 0 0 3 1
0 0 0 0 0 5 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 9980 5 .
0 0 0 0 9980 3 .
0 0 0 0 9980 5 1
0 0 0 0 9980 3 2
0 0 0 0 0 5 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 4 2
0 0 0 0 0 3 2
0 0 0 0 0 5 2
0 0 0 0 0 0 .
0 0 0 0 0 1 .
0 0 0 0 0 5 .
0 0 0 0 0 5 .
0 0 0 0 0 5 .
0 0 0 0 0 3 .
0 0 0 0 0 3 .
0 0 0 0 0 4 .
0 0 0 0 0 3 .
0 0 0 0 0 3 1
end
label values educ_group educ
label def educ 1 "Pre-Primary", modify
label def educ 2 "Primary", modify
label def educ 3 "Secondary", modify
label def educ 4 "Post Secondary & Non-Tertiary", modify
label def educ 5 "Tertiary", modify
label values lc08_cursch LC08_CURSCH
label def LC08_CURSCH 1 "yes", modify
label def LC08_CURSCH 2 "no", modify
How can I compute this in Stata?
Thank you.
Comment