Dear all,
I have a balanced panel of children observed for 3 years: 2012, 2014, and 2016. I have information on the stunting status (stunting) and whether or not the child successfully completed a school grade (grade_completed). The children are aged 0 to 14 years: range from 0-10 years in 2012 (wave 1), and 4-14 years in 2016 (wave 3). I want to establish a link between the children's stunting status in 2012, and their grade completion status in 2016. Both stunting and grade completion are binary variables with a value of 1 if the child is stunted or completed the school grade and 0 otherwise. Specifically, I want to know the distribution of grade completion in 2016 by the children's stunting status in 2012. I want to answer the following questions:
1. What proportion of children who were stunted in 2012 completed the school grade in 2016?
2. What proportion of children who were not stunted in 2012 completed the school grade in 2016?
I have tried different codes, but my results are not convincing, and I sometimes get no observation when I do a two-way tabulation: My example data is below:
I have a balanced panel of children observed for 3 years: 2012, 2014, and 2016. I have information on the stunting status (stunting) and whether or not the child successfully completed a school grade (grade_completed). The children are aged 0 to 14 years: range from 0-10 years in 2012 (wave 1), and 4-14 years in 2016 (wave 3). I want to establish a link between the children's stunting status in 2012, and their grade completion status in 2016. Both stunting and grade completion are binary variables with a value of 1 if the child is stunted or completed the school grade and 0 otherwise. Specifically, I want to know the distribution of grade completion in 2016 by the children's stunting status in 2012. I want to answer the following questions:
1. What proportion of children who were stunted in 2012 completed the school grade in 2016?
2. What proportion of children who were not stunted in 2012 completed the school grade in 2016?
I have tried different codes, but my results are not convincing, and I sometimes get no observation when I do a two-way tabulation: My example data is below:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long pid float(wave age stunting grade_completed age_grp) 401014 3 7 0 0 1 401014 4 9 0 0 1 401014 5 11 0 0 2 401016 5 13 0 0 2 401016 3 8 0 0 1 401016 4 11 0 0 2 401018 5 12 0 0 2 401018 3 7 0 0 1 401018 4 10 0 0 1 401020 4 8 0 0 1 401020 5 10 0 0 1 401020 3 6 0 0 1 401023 5 11 0 0 2 401023 3 6 0 0 1 401023 4 9 0 0 1 401024 4 7 0 0 1 401024 5 9 0 0 1 401024 3 4 0 0 1 401028 5 13 0 0 2 401028 4 11 0 0 2 401028 3 9 0 0 1 401030 3 5 1 0 1 401030 5 10 0 0 1 401030 4 7 0 0 1 401032 4 8 1 0 1 401032 3 5 1 0 1 401032 5 10 1 0 1 401036 5 13 0 0 2 401036 3 9 0 0 1 401036 4 11 0 0 2 401037 4 9 0 0 1 401037 3 7 0 0 1 401037 5 12 0 0 2 401038 5 12 0 0 2 401038 4 9 0 0 1 401038 3 7 0 0 1 401040 4 11 0 0 2 401040 3 8 0 0 1 401040 5 13 0 0 2 401043 5 10 0 0 1 401043 4 7 0 0 1 401043 3 5 0 0 1 401044 5 14 0 0 2 401044 4 12 0 0 2 401044 3 10 1 0 1 401045 3 5 0 0 1 401045 5 10 0 0 1 401045 4 7 0 0 1 401048 5 11 0 0 2 401048 4 8 0 0 1 401048 3 6 0 0 1 401050 4 10 0 0 1 401050 3 8 0 0 1 401050 5 12 0 0 2 401052 5 13 0 0 2 401052 4 11 0 0 2 401052 3 9 0 0 1 401056 5 14 0 0 2 401056 3 9 0 0 1 401056 4 12 0 0 2 401064 4 8 0 0 1 401064 3 6 0 0 1 401064 5 11 0 0 2 401065 4 10 0 0 1 401065 3 7 0 0 1 401065 5 12 0 0 2 401066 3 8 1 0 1 401066 4 10 1 0 1 401066 5 13 1 0 2 401068 4 8 0 0 1 401068 3 5 0 0 1 401068 5 10 0 0 1 401070 5 9 0 1 1 401070 4 6 0 1 1 401070 3 4 0 0 1 401073 5 11 0 0 2 401073 4 9 0 0 1 401073 3 7 0 0 1 401084 3 8 0 0 1 401084 5 12 0 0 2 401084 4 10 0 0 1 401091 5 14 1 0 2 401091 4 11 1 0 2 401091 3 9 1 0 1 401095 3 8 1 0 1 401095 5 13 1 0 2 401095 4 11 1 0 2 401097 5 11 0 0 2 401097 4 9 0 0 1 401097 3 6 0 0 1 401106 5 13 0 0 2 401106 4 11 0 0 2 401106 3 8 0 0 1 401111 5 13 0 0 2 401111 3 9 0 0 1 401111 4 11 0 0 2 401112 5 11 0 0 2 401112 3 6 0 0 1 401112 4 8 0 0 1 401120 5 12 0 0 2 end label values stunting stunting_lbl label def stunting_lbl 0 "0. Not Stunted", modify label def stunting_lbl 1 "1. Stunted", modify label values grade_completed grade_completed label def grade_completed 0 "No", modify label def grade_completed 1 "Yes", modify label values age_grp age_grp label def age_grp 1 "0 to 10 years", modify label def age_grp 2 "11 to 14 years", modify
Comment