The dataset is presented below,
insheet using "https://ift.tt/aXA9elG", comma
foreach i of varlist familyhx smokinghx sex cancerstage school {
encode `i', gen(`i'2)
drop `i'
rename `i'2 `i'
}
ssc inst center,all replace
center co2 il6 crp lengthofstay
I want to fit a survival model with the interaction term between the quadratic time variable (canerstage) and a continuous variable (co2) as follows,
xtmelogit remission c.c_il6 c.c_crp c.c_lengthofstay i.sex i.sex#c.cancerstage c.cancerstage c.c_co2 c.cancerstage#c.c_co2 c.cancerstage#c.cancerstage#c.c_co2 c.cancerstage#c.cancerstage#i.sex|| did:, intpoints(10) or
Now, I want to graph the estimated hazard curve showing the effect of co2 in the manner (Mean-1*SD,Mean, Mean+1*SD) while holding all other variables at their mean in Stata.
Thanks for your code or any hint!
Related Posts with Compute Estimated Hazard and Plot Estimated Hazard Curve after Fitting a xtmelogit Survival Model in Stata
Restrict household with children age 7-23Hello all, i am currently doing my thesis using the data from IFLS. i want to estimate the effect of…
Graphing svy tabulation results including 95% confidence intervalsHello all, I frequently find that I want to produce line graphs of times series of categorical vari…
Need to calculate age (in years)Hi All, I hope I explain this clearly and with enough information, please let me know if I can prov…
Margins at the median and all the other variables at zero levelHello people, I have run my LOGIT regression and now I want to obtain the marginal effect at the me…
Referring to the group variable in ml evaluatorAccording to the manual https://www.stata.com/manuals/rml.pdf, ml accepts a model option group(varna…
Subscribe to:
Post Comments (Atom)
0 Response to Compute Estimated Hazard and Plot Estimated Hazard Curve after Fitting a xtmelogit Survival Model in Stata
Post a Comment