I have built a prognostic model using stpm2 which includes a tvc (all covariates in model are centered, Sb variables are restricted cubic splines). The model is intended for clinical use which will involve generating survival probabilities at 2 and 5 years for individual patients.
Is it possible to calculate/predict survival probabilities in external data for a stpm2 model including a tvc?
I am having problems re-creating the tvc element of the model.
Many thanks in advance.
Kind regards
Anita
stset survtime, failure(iT==1) scale(12) id(ID)
stpm2 Pred_A_cent Sb1 Sb3 Sb2 Sb4 Pred_Hb_cent , tvc(Pred_Hb_cent) knotstvc(Pred_Hb_cent 5) scale(normal) df(3) noorthog
Coefficients from output table -
xb
Pred_A_cent -0.0223022 .
Sb1 -0.0196823
Sb3 0.0813105
Sb2 -0.0655064
Sb4 -0.0227443
Pred_Hb_cent 0 .0171128
_rcs1 0 .247728
_rcs2 0.14239
_rcs3 -0.3269927
_rcs_Pred_Hb_cent1 0. 0021463
_rcs_Pred_Hb_cent2 0.0003087
_cons -2.574488
Related Posts with Problem with predicting survival probabilities from stpm2 model with TVC in external data
Which periods to use as predictors when using synth?Hello, I would like to ask a more general econometric (and not specific Stata code) question. I am …
Converting string datesDear statalist, I have been trying to convert string dates but I got inconsistent results. My data…
Switching data from long to wide view with dates and repeated observationsHi, I have the following data where my outcome of interest is the "foodcategory" variable. I am try…
Exporting results after psmatch2Dear all, I am using the psmatch2 command to estimate treatment effects. I would like to export my …
Interaction plot for a category-continuous interaction termHello, I would like to draw an interaction plot of the moderation effect of belief in a just world …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with predicting survival probabilities from stpm2 model with TVC in external data
Post a Comment