I would like to compare the slope of the linear regression in each age group.
First, I would like to perform trend analysis.
Second, I'd like to compare the slope of each group in the entire group followed by comparing specific pair.
The data are like following.
twoway line death year if agegroup==4, lcolor("50 136 189*3") ///
|| line death year if agegroup==5, lcolor("50 136 189*1.5") ///
|| line death year if agegroup==6, lcolor("50 136 189") ///
|| line death year if agegroup==7, lcolor("50 136 189*.6") ///
|| line death year if agegroup==8, lcolor("50 136 189*.30") ///
|| line death year if agegroup==9, lcolor("50 136 189*.15")

Do I have to manually pick up the coefficient data after performing the following command?
foreach i in 4 5 6 7 8 9 {
regress death year if agegroup== `i' ,noheader
}
Any good command to perform trend analysis in a smarter way?
Also, how can I compare coefficients only with their mean, standard error and 95%CI ?
First, I would like to perform trend analysis.
Second, I'd like to compare the slope of each group in the entire group followed by comparing specific pair.
The data are like following.
twoway line death year if agegroup==4, lcolor("50 136 189*3") ///
|| line death year if agegroup==5, lcolor("50 136 189*1.5") ///
|| line death year if agegroup==6, lcolor("50 136 189") ///
|| line death year if agegroup==7, lcolor("50 136 189*.6") ///
|| line death year if agegroup==8, lcolor("50 136 189*.30") ///
|| line death year if agegroup==9, lcolor("50 136 189*.15")
Do I have to manually pick up the coefficient data after performing the following command?
foreach i in 4 5 6 7 8 9 {
regress death year if agegroup== `i' ,noheader
}
Any good command to perform trend analysis in a smarter way?
Also, how can I compare coefficients only with their mean, standard error and 95%CI ?
Comment