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
Replace value from different row condtionsHello everyone I have a dataset with observations that have been matched, and I have a sample weight…
Help in programming: Running or replicating a matlab scriptHi, I am using Stata 16 and would need some help in programming. I have a matlab script and would n…
Phi coefficient and Point Bi-Serial*How to calculate the Phi coefficient and Point Bi-Serial for a complex sample after creating a surve…
Modifying x-axis labels in graph boxHi - I was using this following code to generate a box graph. Code: sysuse auto, clear forval y …
Average Real Variability (ARV) and Variability Independent of Mean Blood PressureHi everyone, I'm Med Student and new using STATA. Currently, For a systolic blood pressure visit to…
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