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
COURSE using Stata: Causal Inference in Observational Studies and Clinical Trials Affected by Treatment SwitchingCausal Inference in Observational Studies and Clinical Trials Affected by Treatment Switching: A Pra…
Attaching a value label to an integer variable with values greater than Stata’s maximum for long integersI have a CSV file with a field storing SNOMED codes. This is an encoded collection of medical terms,…
Export Summary Statistics of a Loop to Word FileDear Statalisters, I am interested in the summary statistics (specifically, the number of observati…
create loopHello, I am new to stata and I can't figure out how to use loop (if it is the case) for the followi…
nwcommands: handling survey based network data for several hundred respondentsHello there: I'm preparing to process data for a survey of 500 people. Alongside other standard soci…
Subscribe to:
Post Comments (Atom)
0 Response to how to calculate dependency ratio in STATA
Post a Comment