Hi
I am trying to assist a colleague who has conducted a survival analysis using Gompertz regression.
After streg, we can use predict to calculate the survival times for any given individual.
However, we would like to take the regression results, and use a non-Stata tool to provide an estimated survival time for any given individual, even if not in the original sample.For some background, the dataset has 7480 individuals.
There are 20 predictors, which include age (the only numerical variable) and 19 categorical variables (gender, smoker, etc.).
Given that number of categorical predictors, we have 524288 (2^19) possible combinations for each year of age.
This is the output we get from Stata:
Gompertz reg output:
Gompertz regression -- log relative-hazard form
No. of subjects = 7,480 Number of obs = 7,480
No. of failures = 2,456
Time at risk = 85978.26441
LR chi2(21) = 3661.73
Log likelihood = -4994.5731 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
_t | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1.male | .4559516 .0435201 10.48 0.000 .3706538 .5412495
age_wv4a | .0912029 .0279085 3.27 0.001 .0365033 .1459025
agesq | .000071 .0001897 0.37 0.708 -.0003008 .0004428
1.marital2 | .3445814 .1001494 3.44 0.001 .1482922 .5408706
r4hibpe | .1241166 .0418009 2.97 0.003 .0421883 .2060448
r4diabe | .4531136 .0588017 7.71 0.000 .3378644 .5683629
r4cancre | .2513523 .053305 4.72 0.000 .1468765 .3558282
r4lunge | .5372277 .0718719 7.47 0.000 .3963614 .6780941
r4hearte | .2590508 .0491937 5.27 0.000 .1626328 .3554688
chf_p2y | .3213181 .1025171 3.13 0.002 .1203883 .5222478
r4psyche | .1324422 .0758445 1.75 0.081 -.0162103 .2810946
r4memrye | .7246787 .1210191 5.99 0.000 .4874855 .9618718
walksevblk | .302861 .0533489 5.68 0.000 .1982991 .4074228
stairssev | .1633768 .0492362 3.32 0.001 .0668757 .2598779
vigact_no | .1562754 .0454623 3.44 0.001 .0671709 .24538
currsmoker | .6843489 .0645428 10.60 0.000 .5578473 .8108505
bmi_lt25 | .1570624 .0433098 3.63 0.000 .0721768 .2419481
r4hosp | .1700956 .045846 3.71 0.000 .0802391 .259952
r4shlt3 | .2254694 .0516955 4.36 0.000 .1241481 .3267906
r4shlt4 | .3441239 .0635972 5.41 0.000 .2194758 .4687721
r4shlt5 | .7401511 .0826021 8.96 0.000 .578254 .9020482
_cons | -12.39047 1.016682 -12.19 0.000 -14.38313 -10.39781
-------------+----------------------------------------------------------------
/gamma | .1446181 .0056125 25.77 0.000 .1336178 .1556184
------------------------------------------------------------------------------
How do we take those regression coefficients and build an estimating equation to predict survival for any given individual?
Thanks
I am trying to assist a colleague who has conducted a survival analysis using Gompertz regression.
After streg, we can use predict to calculate the survival times for any given individual.
However, we would like to take the regression results, and use a non-Stata tool to provide an estimated survival time for any given individual, even if not in the original sample.For some background, the dataset has 7480 individuals.
There are 20 predictors, which include age (the only numerical variable) and 19 categorical variables (gender, smoker, etc.).
Given that number of categorical predictors, we have 524288 (2^19) possible combinations for each year of age.
This is the output we get from Stata:
Gompertz reg output:
Gompertz regression -- log relative-hazard form
No. of subjects = 7,480 Number of obs = 7,480
No. of failures = 2,456
Time at risk = 85978.26441
LR chi2(21) = 3661.73
Log likelihood = -4994.5731 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
_t | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1.male | .4559516 .0435201 10.48 0.000 .3706538 .5412495
age_wv4a | .0912029 .0279085 3.27 0.001 .0365033 .1459025
agesq | .000071 .0001897 0.37 0.708 -.0003008 .0004428
1.marital2 | .3445814 .1001494 3.44 0.001 .1482922 .5408706
r4hibpe | .1241166 .0418009 2.97 0.003 .0421883 .2060448
r4diabe | .4531136 .0588017 7.71 0.000 .3378644 .5683629
r4cancre | .2513523 .053305 4.72 0.000 .1468765 .3558282
r4lunge | .5372277 .0718719 7.47 0.000 .3963614 .6780941
r4hearte | .2590508 .0491937 5.27 0.000 .1626328 .3554688
chf_p2y | .3213181 .1025171 3.13 0.002 .1203883 .5222478
r4psyche | .1324422 .0758445 1.75 0.081 -.0162103 .2810946
r4memrye | .7246787 .1210191 5.99 0.000 .4874855 .9618718
walksevblk | .302861 .0533489 5.68 0.000 .1982991 .4074228
stairssev | .1633768 .0492362 3.32 0.001 .0668757 .2598779
vigact_no | .1562754 .0454623 3.44 0.001 .0671709 .24538
currsmoker | .6843489 .0645428 10.60 0.000 .5578473 .8108505
bmi_lt25 | .1570624 .0433098 3.63 0.000 .0721768 .2419481
r4hosp | .1700956 .045846 3.71 0.000 .0802391 .259952
r4shlt3 | .2254694 .0516955 4.36 0.000 .1241481 .3267906
r4shlt4 | .3441239 .0635972 5.41 0.000 .2194758 .4687721
r4shlt5 | .7401511 .0826021 8.96 0.000 .578254 .9020482
_cons | -12.39047 1.016682 -12.19 0.000 -14.38313 -10.39781
-------------+----------------------------------------------------------------
/gamma | .1446181 .0056125 25.77 0.000 .1336178 .1556184
------------------------------------------------------------------------------
How do we take those regression coefficients and build an estimating equation to predict survival for any given individual?
Thanks
Comment