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
Margins after stcox with multiple records, cluster and time-varied covariatesHi, I have a complex dataset with multiple observations and the Cox model has the cluster option an…
Getting medians for different x variables across yearsHi there Statlist community! I am currently working on summarizing home value appreciation by neigh…
Hybrid model w/ crossed random effectsIs there a stata command that allows one to run a hybrid MLM (i.e. 𝑌𝑖𝑗 = 𝛾00+ 𝛽1 ∗ (𝑋𝑖𝑗 − 𝑋…
Display date format in regression results when using factor variableHello apologies for the probably trivial question - I am running something like regress y i.month …
difference to difference- dependent variable binaryDear all, I am examining the effect of introduction of minimum wage on employment, my dependent var…
Subscribe to:
Post Comments (Atom)
0 Response to Relative survival and relative excess risk (RER) using imputed data
Post a Comment