Below is what I used but I am uncertain about. Can anyone tell me whether I am right? What is the type of trend test here (it said score test but I need more info such as whether it tries to fit to a linear trend)? What is the degree of freedom of the chi2? Is there other command to conduct a trend test?
Many thanks!
set up data
To calculate incidence rate by age group:
To test for trend of incidence rate over time
Below is the result of stmh. I take that the trend is small (RR=1.028 increase per year) but highly significant (chi2=58.16, p<0.0001).
Many thanks!
set up data
Code:
stset follow_up, failure(disease) id(study_id)
Code:
stptime, at (20(20)60)
Code:
stsplit age_group_by10, at(10 20 30 40 50) stmh age_group_by10
Code:
. stmh age_group_by10 failure _d: disease analysis time _t: follow_up id: study_id Score test for trend of rates with age_group_by10 with an approximate estimate of the rate ratio for a one unit increase in age_group_by10 RR estimate, and lower and upper 95% confidence limits ---------------------------------------------------------- RR chi2 P>chi2 [95% Conf. Interval] ---------------------------------------------------------- 1.028 58.16 0.0000 1.021 1.036 ----------------------------------------------------------
Comment