Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Spline Cox proportional hazard model


From   "Tony Qureshi" <tonqur@comhem.se>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Spline Cox proportional hazard model
Date   Mon, 7 Apr 2008 22:48:38 +0200

I have need help to make a graph to show a  Spline Cox proportional with log
hazard versus a continuous variable. I like to appropriate knots on the
spline curves. I have 2 cohort of patients with similar follow up time. I am
not able to  adjust for age gender other biochemical parameters by the
following codes. I am also unable to make a graph with log hazard ratio with
95% confidence interval  
stset obstime censor
stpm opg, scale(odds) knots(%20 40 60 80)
predict s0, survival zero
predict surv3, survival time(3)           
predict median, centile(50)
predict semedian, centile(50) stdp
predict sem, centile(50) stdp
gen lci = exp(ln(median)-1.96*sem)
gen uci = exp(ln(median)+1.96*sem)
predict h0, hazard zero
predict h1, hazard zero at(opg 1)
predict lnH, cumhazard at(opg 1)
gen hr = h1/h0
predict bz, tvc(opg)
predict sbz, tvc(opg) stdp
twoway scatter lnH opg
I appreciate all help
Thanks 
Tony Qureshi


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index