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, is already up and running.

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

st: RE: Using the knotstvc option within stpm2

From   "Lambert, Paul C. (Dr.)" <>
To   "" <>
Subject   st: RE: Using the knotstvc option within stpm2
Date   Sun, 9 Sep 2012 23:48:55 +0100


This is a bug that I think was introduced in the last update. I will fix this for the next update, which I am currently working on. In the meantime I will send you a working version privately.


Dr Paul C Lambert
Reader in Medical Statistics
Centre for Biostatistics & Genetic Epidemiology
Department of Health Sciences
University of Leicester
2nd Floor, Adrian Building
University Road
Leicester LE1 7RH
Tel: +44 (0)116 229 7265, Fax: +44 (0)116 229 7250
From: [] On Behalf Of Turnbull, Alison E. []
Sent: Sunday, September 09, 2012 9:30 PM
Subject: st: Using the knotstvc option within stpm2


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?


*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index