Dear all,
I'm doing data analysis on childhood vaccination coverage among vulnerable population. However, I'm having trouble calculating age in months from the interview date to the date of birth. Please find attached a solution to my problem regarding observation change. Firstly, I include the birth cohort from 2020–2021, and then I check duplicate reports and drop duplicate reports. Finally, calculating age in month and segment on target months on 12-23 months, i got a sample when I ran the codes and it's changed when repeated this code again. Furthermore, I need to solve this problem regarding the accuracy of the analyzed sample. Please check it and give me a possible solution. Below, I include my code:
************************************************** **********
****** Data preparation ********
************************************************** *******
gen year_cdob= year(cdob)
ta year_cdob
ta year_cdob if year_cdob>2019 & year_cdob<2022
************************************************** ************
/// Inclusion crateria ///
************************************************** *******
Child date of birth: January 1, 2020, to Dec 31, 2021
keep if year_cdob>2019 & year_cdob<2022
//// Who reported multiple data points regarding vaccination
bysort crid: gen tot_n=_n
bysort crid: gen tot_N=_N
keep if tot_n== tot_N
count
A Child aged 12-23 months were included in study ///
gen age_days = intdt-cdob
gen age_month=int((intdt-cdob)/30.44)
ta age_month
age_month if age_month > 11 & age_month <= 23
Keep if age_month > 11 & age_month <= 23
I'm doing data analysis on childhood vaccination coverage among vulnerable population. However, I'm having trouble calculating age in months from the interview date to the date of birth. Please find attached a solution to my problem regarding observation change. Firstly, I include the birth cohort from 2020–2021, and then I check duplicate reports and drop duplicate reports. Finally, calculating age in month and segment on target months on 12-23 months, i got a sample when I ran the codes and it's changed when repeated this code again. Furthermore, I need to solve this problem regarding the accuracy of the analyzed sample. Please check it and give me a possible solution. Below, I include my code:
************************************************** **********
****** Data preparation ********
************************************************** *******
gen year_cdob= year(cdob)
ta year_cdob
ta year_cdob if year_cdob>2019 & year_cdob<2022
************************************************** ************
/// Inclusion crateria ///
************************************************** *******
Child date of birth: January 1, 2020, to Dec 31, 2021
keep if year_cdob>2019 & year_cdob<2022
//// Who reported multiple data points regarding vaccination
bysort crid: gen tot_n=_n
bysort crid: gen tot_N=_N
keep if tot_n== tot_N
count
A Child aged 12-23 months were included in study ///
gen age_days = intdt-cdob
gen age_month=int((intdt-cdob)/30.44)
ta age_month
age_month if age_month > 11 & age_month <= 23
Keep if age_month > 11 & age_month <= 23
Comment