Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Using the knotstvc option within stpm2


From   "Turnbull, Alison E." <aturnbul@jhsph.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Using the knotstvc option within stpm2
Date   Sun, 9 Sep 2012 15:30:15 -0400

Hello, 

I've been using stpm2 to fit a flexible parametric survival model.   Everything worked quite smoothly until I tried to specific the location of knots for time-dependent effects.  According to the instructions:

"knotstvc(knotslist) defines numlist knotslist as the location of the interior knots for time-dependent effects. If different knots are required for different time-dependent effects the option is specified, for example, as follows:

knotstvc(x1 1 2 3 x2 1.5 3.5)"

I've successfully run models with knots in the baseline distribution function at time = 3, 7, and 21. 
Adding cumfail_10 and sx_trauma as time-dependent effects substantially improves the fit of the model. 
I'd like to specify that cumfail_10 should have an interior knot at time = 21 and sx_trauma should have an interior knot at time = 24. 

However when I run the following model: 

stpm2 x1 x2 x3 x4 x5 x6 x7 cumfail_10 sx_trauma, scale(hazard) knots(3 7 21) tvc(cumfail_10 sx_trauma) knotstvc(cumfail_10 21 sx_trauma 24) eform

I get the following warning: 

"You must give tvc variable names when using knotstvc() option."

Can anyone see what I'm doing wrong?

Thanks, 
alison

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index