Hello, I've managed to plot a per 1000 death rate using -stpm2-
Is it possible to obtain the death rate (per 1000 population) per year by age and sex using -streg-
In this case the per(1000) is not allowed, nor is the if function allowed to review the death rates by gender and age grp
Any advice would be appreciated
Here's some dummy data
Code:
stset diedt, failure(ptdied==1) ///Limits up to 1 year range timevar 0 1 200 stpm2 treatment i.agegrp gender, scale(hr) df(5) standsurv, at1(gender 0) at2(gender 1) timevar(timevar) hazard ci contrast(ratio) per(1000)
Code:
streg treatment gender, distribution(llog) nolog
Any advice would be appreciated
Here's some dummy data
Code:
clear input float(treatment agegrp gender ptdied diedt) 1 1 1 1 2 1 2 1 0 12 1 1 0 0 12 0 1 1 0 12 0 2 0 1 4 1 2 1 0 12 1 2 0 0 12 end label values agegrp q2 label def q2 1 "80-90", modify label def q2 2 "70-80", modify label values gender q label def q 0 "female", modify label def q 1 "male", modify
Comment