Hi,
I am trying to find a way to use 'putexcel' in combination with the stptime command (or strate), specifically when event rates are calculated for the categories within a categorical variable (with 2 or more categories). For example, event rates by deprivation category, of which there are 5.
putexcel set [filename]
stset time2event, failure(event==1) id(id)
stptime, per(100) by(depcat)
putexcel A1=(r(rate)) B1=(r(lb)) C1=(r(ub))
Using the above code exports the overall event rate and confidence intervals (the scalars stored are for the overall cohort), but I would like to export either the event rate for a single category of the depcat variable, or the whole output table.
Thank you in advance for any advice.
I am trying to find a way to use 'putexcel' in combination with the stptime command (or strate), specifically when event rates are calculated for the categories within a categorical variable (with 2 or more categories). For example, event rates by deprivation category, of which there are 5.
putexcel set [filename]
stset time2event, failure(event==1) id(id)
stptime, per(100) by(depcat)
putexcel A1=(r(rate)) B1=(r(lb)) C1=(r(ub))
Using the above code exports the overall event rate and confidence intervals (the scalars stored are for the overall cohort), but I would like to export either the event rate for a single category of the depcat variable, or the whole output table.
Thank you in advance for any advice.
Comment