Dear Stata Users,
I use the command stpm2 by Royston/Lambert that is designed to estimate flexible parametric survival models (see link below). The procedure requires to specify a number of knots for the baseline hazard function. Their locations are set by default but the user may also specify knot positions. I tried some analysis and encountered a problem. When I set a number of knots greater than 1, I receive an error message "You have duplicate knots positions for the baseline. Try using fewer degrees of freedom or specifying the knots yourself." I really would like to try at least two knots. I tried specifying knot locations by using the option knots(20 50 80) knscale(centile) However, this didn't help. I suppose it's got something to do with the data: transitions are observed on a monthly time scale - first, transitions happen very quickly: about 2 thirds of all transitions take place in the second month, further transitions occur slower, i.e. transition rate decreases gradually. Maybe this shape causes troubles for knot locations. If anyone is more familiar with stpm2 or flexible proportional hazard models I would be glad for a confirmation of this guess or further ideas about possible causes of the error message.
Thank you,
Oliver
I use the command stpm2 by Royston/Lambert that is designed to estimate flexible parametric survival models (see link below). The procedure requires to specify a number of knots for the baseline hazard function. Their locations are set by default but the user may also specify knot positions. I tried some analysis and encountered a problem. When I set a number of knots greater than 1, I receive an error message "You have duplicate knots positions for the baseline. Try using fewer degrees of freedom or specifying the knots yourself." I really would like to try at least two knots. I tried specifying knot locations by using the option knots(20 50 80) knscale(centile) However, this didn't help. I suppose it's got something to do with the data: transitions are observed on a monthly time scale - first, transitions happen very quickly: about 2 thirds of all transitions take place in the second month, further transitions occur slower, i.e. transition rate decreases gradually. Maybe this shape causes troubles for knot locations. If anyone is more familiar with stpm2 or flexible proportional hazard models I would be glad for a confirmation of this guess or further ideas about possible causes of the error message.
Thank you,
Oliver
Comment