Hello, I'm having a problem interpreting the stset results.
I have multiple-record data, that observations were collected over 11 years to 262 persons (the survey started with 262 subjects in the first year)
and down to 158 subjects in the last year.
The failure happens when the subeject exits from medical welfare benefit (exit=1 / remain=0)
and all subjects started as medical welfare recipients in the dataset (medical_final=0).
when I do this: stset tf, failure(medical_final=1) id(h_pid). it says that "390 observations begin on or after (first) failure.
Does it mean that it will exlude those 390 observations for the survival analysis?
and how do i fix the command if I want to include all the observation in the cox regression analysis.
Please, refer beloew.
I have multiple-record data, that observations were collected over 11 years to 262 persons (the survey started with 262 subjects in the first year)
and down to 158 subjects in the last year.
year | Freq. | Percent | Cum. |
2009 | 262 | 11.58 | 11.58 |
2010 | 238 | 10.52 | 22.10 |
2011 | 234 | 10.34 | 32.45 |
2012 | 221 | 9.77 | 42.22 |
2013 | 211 | 9.33 | 51.55 |
2014 | 205 | 9.06 | 60.61 |
2015 | 195 | 8.62 | 69.23 |
2016 | 188 | 8.31 | 77.54 |
2017 | 180 | 7.96 | 85.50 |
2018 | 170 | 7.52 | 93.02 |
2019 | 158 | 6.98 | 100.00 |
Total | 2,262 | 100.00 |
and all subjects started as medical welfare recipients in the dataset (medical_final=0).
when I do this: stset tf, failure(medical_final=1) id(h_pid). it says that "390 observations begin on or after (first) failure.
Does it mean that it will exlude those 390 observations for the survival analysis?
and how do i fix the command if I want to include all the observation in the cox regression analysis.
Please, refer beloew.
. stset tf, failure(medical_final=1) id(h_pid) | ||
id: h_pid | ||
failure event: medical_final == 1 | ||
obs. time interval: (tf[_n-1], tf] | ||
exit on or before: failure | ||
2,262 total observations | ||
390 observations begin on or after (first) failure | ||
1,872 observations remaining, representing | ||
262 subjects | ||
87 failures in single-failure-per-subject data | ||
1,891 total analysis time at risk and under observation | ||
at risk from t | = | 0 |
earliest observed entry t | = | 0 |
last observed exit t | = | 11 |
. | stcox i.sex age i.married householdmembers singleparents | yearsofshooling | i.have_disability | chronic_disease | i.jobtype | totalcos |
> | tofliving, tvc(depression alcoholqualtity) texp(_t) nohr | |||||
failure _d: medical_final == 1 | ||||||
analysis time _t: tf | ||||||
id: h_pid |
No. of subjects = | 262 | Number of obs | = 1,774 |
No. of failures = | 87 | ||
Time at risk = | 1890 | ||
LR chi2(17) | = 48.62 | ||
Log likelihood = | -382.25429 | Prob > chi2 | = 0.0001 |
_t Coef. | Std. Err. | z P>z | [95% Conf. Interval] |
main | |||
2.sex .0031614 | .2867175 | 0.01 0.991 | -.5587946 .5651175 |
age -.0232609 | .0222197 | -1.05 0.295 | -.0668108 .020289 |
1.married -.2825119 | .3589023 | -0.79 0.431 | -.9859475 .4209236 |
householdmembers .0569195 | .1423741 | 0.40 0.689 | -.2221287 .3359677 |
singleparents -.9944535 | .6048414 | -1.64 0.100 | -2.179921 .1910139 |
yearsofshooling .0094515 | .0352446 | 0.27 0.789 | -.0596265 .0785296 |
1.have_disability -.6158704 | .2888035 | -2.13 0.033 | -1.181915 -.049826 |
chronic_disease -.0864599 | .0982721 | -0.88 0.379 | -.2790697 .1061499 |
jobtype | |||
2 .1215283 | 1.081096 | 0.11 0.910 | -1.99738 2.240437 |
3 .342689 | 1.050399 | 0.33 0.744 | -1.716055 2.401433 |
4 -.6550579 | 1.175274 | -0.56 0.577 | -2.958553 1.648437 |
5 .7318831 | 1.052947 | 0.70 0.487 | -1.331855 2.795621 |
6 -37.8177 | 2.77e+08 | -0.00 1.000 | -5.43e+08 5.43e+08 |
7 -.6370897 | 1.042802 | -0.61 0.541 | -2.680944 1.406765 |
totalcostofliving .0008265 | .0012523 | 0.66 0.509 | -.001628 .0032809 |
tvc | |||
depression -.009869 | .0366306 | -0.27 0.788 | -.0816636 .0619256 |
alcoholqualtity -.0026796 | .0162534 | -0.16 0.869 | -.0345356 .0291764 |
Note: Variables in | tvc equation | interacted | with _t. |