Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Using the predictnl command following a model containing restricted cubic splines and time-dependent effects
From
"Turnbull, Alison E." <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Using the predictnl command following a model containing restricted cubic splines and time-dependent effects
Date
Wed, 3 Oct 2012 22:35:22 -0400
Hello,
I'm working with a model developed using the stpm2 package from SCC.
The baseline hazard has 4 degrees of freedom with knots at time = 3, 7 and 21.
Variable x1 is a continuous variable with a time-dependent effect and a knot at time=21.
Variables x2 is a dichotomous variable with a time-dependent effect and a knot at time= 21.
The 4 derived spline variables for the baseline log cumulative hazard are
_rcs1
_rcs2
_rcs3
_rcs4
And the spline variables for the time-dependent effects of x1 and x2 are
_rcs_x11
_rcs_x12
and
_rcs_x21
_rcs_x22
I would like calculate the hazard ratios and associated 95% CIs for individuals with x1=1 relative to those with x1=0 at time = 2, 7, 10 and 30 as well as the hazard ratios for individuals with varying levels of x2 at the same time points. I realize that these hazard ratios are non-linear functions of the model parameters and will require use of the predictnl command but I am struggling to figure out the right equation.
I would be greatly appreciative if someone could write out the command for one of these desired hazard ratios to help get me started.
Thank you,
alison
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/