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
How to adjust restricted cubic spline curve for custom references?Hi, I am currently learning on how to conduct a dose-response meta-analysis. Following estimations …
using not allowed stata imputation hotdeckvarHi, I have a problem with my imputing syntaxs. hotdeckvar pasajeros1 using p, store by(marca clase2…
How to make of use loop in this caseDear all, I would like to seek your advice on the use of loop or other equivalent functions. My dat…
Travel cost method combining RP and SPHi I have a dataset with info on #trips for each individual (a total of 200) to a particular recreat…
Determine the appropriate lag of independent variable panel data fixed effect modelHi, I am doing a fixed effect panel data regression (T=40 N=1087). Theoretically my independent va…
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