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
Replace with previous value, but just 1 year backPlease excuse this very beginner question, but much help would be appreciated! I want to create a v…
coefplot: how to align y-axis and markers?Hi, I'm using -coefplot- to create a graph showing the balance between covariates for a treatment a…
bar chart dummy percentHey guys, I have a dummy variable (var) for 4 diffrent years. I want to have a bar chart that shows…
tab string variable contains name in Arabic alphabetDear Stata list, I have a dataset which has values of name in Arabic alphabet. It is displaying cor…
String Cleaning - Possibly automate the taskI wish to retain information on a person's grades which is observed in the variable below. The text …
Subscribe to:
Post Comments (Atom)
0 Response to how to calculate dependency ratio in STATA
Post a Comment