Hi everyone,
I have developed a flexible parametric survival model using the stpm2 package. I wish to evaluate its performance on out-of-sample data and compare it to its apparent performance. However, I am unable to get the performance measure for the out-of-sample data as I cannot generate the following variables in the out-of-sample data: _rcs1 _rcs2 _d_rcs1 _d_rcs2.
To my original dataset, I have appended the out-of-sample data and tagged it as _original==0 (where _original==1 is the original dataset, and _original==0 is the out-of-sample data).
In order to first evaluate apparent performance I run:
However, when I then wish to run it on the out-of-sample data...
No results are produced. I suspect this is because the rcs variables have not been generated for the out-of-sample dataset and need to be generated before the stcstat2 command is used.
I would be grateful for your advice on how I can do this.
I have developed a flexible parametric survival model using the stpm2 package. I wish to evaluate its performance on out-of-sample data and compare it to its apparent performance. However, I am unable to get the performance measure for the out-of-sample data as I cannot generate the following variables in the out-of-sample data: _rcs1 _rcs2 _d_rcs1 _d_rcs2.
To my original dataset, I have appended the out-of-sample data and tagged it as _original==0 (where _original==1 is the original dataset, and _original==0 is the out-of-sample data).
In order to first evaluate apparent performance I run:
Code:
stpm2 covariates if _original==1, scale(hazard) df(2) stcstat2 if _original==1
Code:
stcstat2 if _original==0
I would be grateful for your advice on how I can do this.
