Hi everyone,
Does anyone know how I can calculate relative survival (strs) and relative excess risk (RER) with imputed data (mi set) in Stata version 12.1? When I use the following command I get the error "strs requires that the data are stset with only one observation per individual":
mi stset fup, failure(vit==1) id(id)
strs using nedmort, br(0(1)10) mergeby(_year sex _age) by(agecat graad hr) diagage(age) diagyear(incj) attage(_age) attyear(_year) survprob(prob) save(replace)
use grouped, replace
xi: mi estimate, hr: glm d i.end i.agecat, family (pois) link (rs d_star) lnoffset (y) eform
When I try the next command (mi before strs) I get the error "unrecognized subcommand: mi strs"
mi stset fup, failure(vit==1) id(id)
mi strs using nedmort, br(0(1)10) mergeby(_year sex _age) by(agecat graad hr) diagage(age) diagyear(incj) attage(_age) attyear(_year) survprob(prob) save(replace)
use grouped, replace
xi: mi estimate, hr: glm d i.end i.agecat, family (pois) link (rs d_star) lnoffset (y) eform
Thanks in advance,
Anna
Related Posts with Relative survival and relative excess risk (RER) using imputed data
Long to wide with continuous timeHi everyone, I am looking for a way to convert a dataset from the long format to a wide format. How…
variable not found Code: * Example generated by -dataex-. To install: ssc install dataex clear input str3 countrycode …
How to convert Fairness in Financial Contribution index (FFC) to codeGreeting, I am trying to convert the following formula to STATA code, but I could not. Array The FF…
Instrumental Variables (as Two Stage Least Squares 2SLS)Hello guys, Please I need help, I have questions about Instrumental Variables (Two Stage Least Squa…
Moderation effect Graph in StataHi everyone, I have been trying to plot interaction graphs for one of my research works, but I have…
Subscribe to:
Post Comments (Atom)
0 Response to Relative survival and relative excess risk (RER) using imputed data
Post a Comment