Hello,
I have been using Stata 12.1 for an analysis of potential predictors of breast cancer using a Cox PH model. I have used purposeful selection of covariates to do this with the removal of one covariate form the model at a time, checking if the restricted model fits the data better than the unrestricted model using the likelihood ratio test.
For one particular binary variable, I get an error message indicating that df(unrestricted) = df(restricted) = 11. I am not sure why this occurs when other binary variables do not produce the same error message. I have included the syntax and output below. I can't seem to find any information on this in the Stata manual or elsewhere on the web.
I have two questions:
1. Why does this error occur?
2. What can I do to stop this happening?
Thanks for any replies in advance.
stcox i.base_seifa age_55 famhistory HRT_everscr i.radclass1
failure _d: brcanc == 1
analysis time _t: survival/365.25
Iteration 0: log likelihood = -95.00942
Some output omitted
Iteration 39: log likelihood = -84.849624
Refining estimates:
Iteration 0: log likelihood = -84.849624
Cox regression -- no ties
No. of subjects = 472 Number of obs = 472
No. of failures = 16
Time at risk = 4925.859001
LR chi2(11) = 20.32
Log likelihood = -84.849624 Prob > chi2 = 0.0411
------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
base_seifa |
2 | .602133 .5143759 -0.59 0.553 .1128621 3.212453
3 | .2810784 .2696956 -1.32 0.186 .0428644 1.843139
4 | 1.069854 .8350335 0.09 0.931 .2317137 4.939662
5 | .0854596 .1069236 -1.97 0.049 .0073582 .9925427
|
age_55 | 1.660884 .9346858 0.90 0.367 .5512056 5.004549
famhistory | 9.448359 6.712555 3.16 0.002 2.347594 38.02679
HRT_everscr | .5645403 .3188802 -1.01 0.311 .1865926 1.70803
|
radclass1 |
2 | 1.034481 .7990494 0.04 0.965 .2276361 4.701148
3 | 2.530385 1.955077 1.20 0.230 .5565623 11.50428
5 | 3.595913 4.191761 1.10 0.272 .3660685 35.32287
6 | 1.865725 2.135031 0.54 0.586 .1980524 17.5758
8 | 4.78e-18 . . . . .
------------------------------------------------------------------------------
. est store A
.
. stcox i.base_seifa famhistory HRT_everscr i.radclass1
failure _d: brcanc == 1
analysis time _t: survival/365.25
Iteration 0: log likelihood = -95.00942
Some output omitted
Refining estimates:
Iteration 0: log likelihood = -85.253933
Iteration 1: log likelihood = -85.253933
Iteration 2: log likelihood = -85.253933
Cox regression -- no ties
No. of subjects = 472 Number of obs = 472
No. of failures = 16
Time at risk = 4925.859001
LR chi2(11) = 19.51
Log likelihood = -85.253933 Prob > chi2 = 0.0525
------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
base_seifa |
2 | .5719933 .4931877 -0.65 0.517 .1055511 3.099697
3 | .2410395 .2312196 -1.48 0.138 .036776 1.579836
4 | 1.007801 .7853858 0.01 0.992 .21879 4.642177
5 | .0896936 .1118262 -1.93 0.053 .0077897 1.03277
|
famhistory | 11.36945 7.834723 3.53 0.000 2.9456 43.88389
HRT_everscr | .5960093 .3345016 -0.92 0.356 .198394 1.790514
|
radclass1 |
2 | 1.036799 .8036443 0.05 0.963 .22694 4.736727
3 | 2.941625 2.216995 1.43 0.152 .6715337 12.88566
5 | 3.066081 3.527115 0.97 0.330 .3216551 29.2265
6 | 2.319431 2.624937 0.74 0.457 .2523848 21.31571
8 | 2.35e-14 1.55e-06 -0.00 1.000 0 .
------------------------------------------------------------------------------
. lrtest A //fits better without age_55
df(unrestricted) = df(restricted) = 11
r(498);
Liz
I have been using Stata 12.1 for an analysis of potential predictors of breast cancer using a Cox PH model. I have used purposeful selection of covariates to do this with the removal of one covariate form the model at a time, checking if the restricted model fits the data better than the unrestricted model using the likelihood ratio test.
For one particular binary variable, I get an error message indicating that df(unrestricted) = df(restricted) = 11. I am not sure why this occurs when other binary variables do not produce the same error message. I have included the syntax and output below. I can't seem to find any information on this in the Stata manual or elsewhere on the web.
I have two questions:
1. Why does this error occur?
2. What can I do to stop this happening?
Thanks for any replies in advance.
stcox i.base_seifa age_55 famhistory HRT_everscr i.radclass1
failure _d: brcanc == 1
analysis time _t: survival/365.25
Iteration 0: log likelihood = -95.00942
Some output omitted
Iteration 39: log likelihood = -84.849624
Refining estimates:
Iteration 0: log likelihood = -84.849624
Cox regression -- no ties
No. of subjects = 472 Number of obs = 472
No. of failures = 16
Time at risk = 4925.859001
LR chi2(11) = 20.32
Log likelihood = -84.849624 Prob > chi2 = 0.0411
------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
base_seifa |
2 | .602133 .5143759 -0.59 0.553 .1128621 3.212453
3 | .2810784 .2696956 -1.32 0.186 .0428644 1.843139
4 | 1.069854 .8350335 0.09 0.931 .2317137 4.939662
5 | .0854596 .1069236 -1.97 0.049 .0073582 .9925427
|
age_55 | 1.660884 .9346858 0.90 0.367 .5512056 5.004549
famhistory | 9.448359 6.712555 3.16 0.002 2.347594 38.02679
HRT_everscr | .5645403 .3188802 -1.01 0.311 .1865926 1.70803
|
radclass1 |
2 | 1.034481 .7990494 0.04 0.965 .2276361 4.701148
3 | 2.530385 1.955077 1.20 0.230 .5565623 11.50428
5 | 3.595913 4.191761 1.10 0.272 .3660685 35.32287
6 | 1.865725 2.135031 0.54 0.586 .1980524 17.5758
8 | 4.78e-18 . . . . .
------------------------------------------------------------------------------
. est store A
.
. stcox i.base_seifa famhistory HRT_everscr i.radclass1
failure _d: brcanc == 1
analysis time _t: survival/365.25
Iteration 0: log likelihood = -95.00942
Some output omitted
Refining estimates:
Iteration 0: log likelihood = -85.253933
Iteration 1: log likelihood = -85.253933
Iteration 2: log likelihood = -85.253933
Cox regression -- no ties
No. of subjects = 472 Number of obs = 472
No. of failures = 16
Time at risk = 4925.859001
LR chi2(11) = 19.51
Log likelihood = -85.253933 Prob > chi2 = 0.0525
------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
base_seifa |
2 | .5719933 .4931877 -0.65 0.517 .1055511 3.099697
3 | .2410395 .2312196 -1.48 0.138 .036776 1.579836
4 | 1.007801 .7853858 0.01 0.992 .21879 4.642177
5 | .0896936 .1118262 -1.93 0.053 .0077897 1.03277
|
famhistory | 11.36945 7.834723 3.53 0.000 2.9456 43.88389
HRT_everscr | .5960093 .3345016 -0.92 0.356 .198394 1.790514
|
radclass1 |
2 | 1.036799 .8036443 0.05 0.963 .22694 4.736727
3 | 2.941625 2.216995 1.43 0.152 .6715337 12.88566
5 | 3.066081 3.527115 0.97 0.330 .3216551 29.2265
6 | 2.319431 2.624937 0.74 0.457 .2523848 21.31571
8 | 2.35e-14 1.55e-06 -0.00 1.000 0 .
------------------------------------------------------------------------------
. lrtest A //fits better without age_55
df(unrestricted) = df(restricted) = 11
r(498);
Liz
Comment