Please let me know how to calculate dependency ration in STATA.. is the command below correct
bys ScheduleNo: egen Age_Working = count(B2Q1) if Age>=15 & Age<=64
bys ScheduleNo: egen count_Age_Working= max(Age_Working)
recode count_Age_Working (.=0)
bys ScheduleNo: egen Age_Dep = count(B2Q1) if Age<=14 | Age>=65
bys ScheduleNo: egen count_Age_Dep= max(Age_Dep)
recode count_Age_Dep(.=0)
gen DRatio = (count_Age_Dep/count_Age_Working)*100
recode DRatio(.=0)
Related Posts with how to calculate dependency ratio in STATA
Pseudo Panel Data and Mediation AnalysisDear Stata Experts I'm a PhD student, and I'd like to know how to use the codes to perform the Medi…
Please help cant work out how to t-test. Im new to stataHi guys I'm struggling to compare 2 different regions with a t-test. As seen from the screenshots I…
Writing a formula in which stata chooses a value or 1Hi! I'm trying to use this formula to calculate eGFR: eGFR = 142*min(standardized Scr/K, 1)^α *max(…
Adding rows under a variableStata command for adding rows lets say 10 rows under a variable which has fixed observations like 40…
please help. making bar graph more simple with "over" optionsHi, guys. I'm a newcomers with stata, and there is some trouble in making bar graph. My data has 4…
Subscribe to:
Post Comments (Atom)
0 Response to how to calculate dependency ratio in STATA
Post a Comment