









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Question #2:
(a) The log-likelihood for exponential, Weibull, lognormal, log-logistic, and gamma distributions are -39.9746, -13.1688, -13.3035, -13.4603, and -12.9846, respectively. For testing
vs.
the test is TS = -2[-39.9746 – (-13.1688)] = 53.6116. The test statistic has a chi-square distribution with degrees of freedom df = 2 -1 = 1. So P-value = P(TS > 53.6116) = 0..
The following table gives the value of test statistic and P-value for each testing other distributions.
Testing Test Statistic Df P-value
Exponential vs. Generalized Gamma 53.9800 2 0. Weibull vs. Generalized Gamma 0.3684 1 0. Lognormal vs. Generalized Gamma 0.6378 1 0. Log-logistic vs. Generalized Gamma 0.9514 1 0.
Since p-value for exponential is very small, there is strong evidence to conclude that the exponential distribution is not an adequate model. Since all other P-values are greater than 0.05, we fail to reject the null hypotheses. Since Weibull distribution has the largest p-value, we choose the Weibull distribution. The Cox-Snell Residual plots are given in the following. The plots imply that Weibull distribution fits the data well. Now, I use backward elimination method to find the significant variables using Weibull distribution. Students may use forward or stepwise selection methods. The model summary when all variables are in the model is given in the following pages after the Cox-Snell residual plots.
0
1
2
3
e
e
e
e
The estimates of parameters of the above model are:
Parameter Estimate β 0 3.
β 1 0.
β 2 -0.
β 3 -0.
Interpretation:
(b) By using SAS, the estimate of the median of life time and its standard error for a car used for a mixed city and highway driving, for four combinations of model year and geographic region, are obtained. The following table gives the 95% confidence intervals of the median of life time for four groups.
Geographic Region Year Southern Northern
1
Question #3:
(a) To find the best model, I used backward elimination method. Students may use forward or stepwise selection methods. The model summary when all variables are in the model is given in the following:
Type III Analysis of Effects
Wald Effect DF Chi-Square Pr > ChiSq
Lbun 1 9.9555 0. Hemo 1 4.8448 0. Age 1 1.7869 0. Sex 1 0.0169 0. SCalcium 1 1.8819 0.
Therefore, variables age, sex, and serum calcium are not significant. Since variable sex has the largest p-value, we dropped this variable from the model. The model summary for new model is given in the following:
Type III Analysis of Effects
Wald Effect DF Chi-Square Pr > ChiSq
Lbun 1 10.1749 0. Hemo 1 4.8218 0. Age 1 1.7762 0. SCalcium 1 1.9914 0.
Variables age and serum calcium are not significant. Since variable age has the largest p-value, I dropped this variable from the model. The model summary for the new model is given in the following:
Interpretation:
(b) Cox-Snell residual plots for Weibull distribution for the final model in part (a) is given in the following. It seems that the model fit the data very well.
0
1
2
3
4
e
(c) By using SAS, the estimate of median survival time and its standard error for a patient with and , using final model in part (a), are 11.691 and 3.10, respectively. Therefore, a 95% confidence interval for the median of survival time is:
(d) By using backward elimination method in Cox’s proportional hazard regression, variables sex, age and serum calcium were eliminated from the model one by one. In forward and stepwise selection methods, variables logarithm of blood urea nitrogen and hemoglobin measurement at diagnosis were entered in the model one by one and all other variables were not significant at level of 0.05 to be entered in to the model. Therefore, the final model, based on all three methods, is exactly the same as the final model in part (a). i.e., the final model is:
1
()= 0 ()+β 1 + β 2
The estimates of parameters of the above model, using Cox’s proportional model, using exact method for ties data, and regression model for Weibull distribution, are given in the following table. The estimates from both methods are very close.
Parameter Estimate using Cox’s Model
Estimate Using Weibull Distribution β 1 1.73581^ 1.5399/0.884 = 1.
β 2 -0.11801^ -0.0976/0.884 = 0.
______________________________________________________________________________
Question #4:
(a) The log-likelihood for exponential, Weibull, lognormal, log-logistic, and gamma distributions are -280.7757, -273.4423, -279.8191, -276.4676, and -273.4416, respectively. For testing
vs.
the test is TS = -2[-280.7757 – (-273.4423)] = 14.6668. The test statistic has a chi-square distribution with degrees of freedom df = 2 -1 = 1. So P-value = P(TS > 14.6668) = 0..
The following table gives the value of test statistic and P-value for each testing other distributions.
0
1
2
3
4
5
e
0
1
2
3
4
e
0 1 2 3 4 5
Therefore, using Weibull distribution, our final model is:
Log Time = (^) β + β Clinic + β Dose + σε 0 1 2
The estimates of parameters of the above model are:
Parameter Estimate β 0 5.
β 1 -0.
β 2 0.
Interpretation:
(b) The following table gives the final model for Backward, forward and stepwise selection methods.
Method Significant Variables in Final Model Forward Dose, Clinic, Prison Backward Dose, Clinic Stepwise Dose, Clinic
In the following, the maximum partial likelihood of estimates of parameters when all variables dose, clinic and prison are in the model are given.
Analysis of Maximum Likelihood Estimates
Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio
Clinic 1 1.00980 0.21488 22.0832 <.0001 2. Prison 1 0.32657 0.16723 3.8135 0.0508 1. Dose 1 -0.03537 0.00638 30.7432 <.0001 0.
The p-value for variable prison is 0.0508, and therefore, variable prison is not significant at 0. and we can remove it from the model. Since the p-value for prison is very close to 0.05, I prefer to include this variable in the model (Recall that in forward, backward, and stepwise selection methods, most people recommend that we take the significant level at least 0.1. In fact, the SAS default in PROC REG is 0.25). So the final model is:
Log ( Time )= (^) β 0 + β 1 Clinic + β 2 Pr ison + β 3 Dose + σε
Interpretation:
In addition, plot of residuals (deviance and Schoenfeld) did not show any pattern and therefore, they did not show the model is inadequate (You can find some of those plots in the following).
Devi ance Resi dual
0
1
2
3
4
Pr i son
Devi ance Resi dual
0
1
2
3
4
Dose
20 30 40 50 60 70 80 90 100 110
Schoenf el d Resi dual f or Pr i son
Ti me
0 200 400 600 800 1000 1200
Schoenf el d Resi dual f or Dose
0
10
20
30
40
50
Ti me
0 200 400 600 800 1000 1200
More over, likelihood displacement and DFBETA statistics are all very small for all observations, and therefore, there is no influential point. To save some pages, I do not bring the likelihood displacement and DFBETA values here. _____________________________________________________________________________
/ ) 1 ]^1 1 1 1 1
0 0
γ β (^) θ λγ − − ⎟⎟ = ⎠
⇒ = , where
β θ
θ β λ
= , and
γ 1
1
γ
(c) In proportional odd models, we have ( ; ) () ()
St^1 X^2 t
S t
, for some functions
but this is not necessary for this part). If we solve the above equation to find S(t), we have
'
St
− = ⇒ =
1
−
1
2 0
0 1 2 0
(^0) t t
t X t t
t
() log () log 0
0 (^0 2) t
t t t
addition, from part (c), for proportional odds model, we have
− −
1 1
'
−
1
−
[exp( ]^0
1 '
If we put , 0 , 0 , , 0 ) log() ( 1
θ
t X
= in the above equation, we have
t S
S S
S t S t
S t S (^) t
t
t
( / )
0
0
0
0
1
0
1 1 ()
1 ()
()
)^1 (^1 ) ( 1 / 1
0
0 [ 1 ] ()
1 () 1 β (^) θ −β θ
−
⎟
⎟ ⎠
⎞ ⎜
⎜ ⎝
− = − ⇒ ⎥ ⎦
⎤ ⎢ ⎣
⎡
⎟ ⎟ ⎠
⎞ ⎜ ⎜ ⎝
⎛ −
0
0 0
( / ) 0 0
(^0 ) t
t t
t
0
0
θ
β γ 1
Therefore,
0 () and this is the survivor function of a log-logistic distribution.
______________________________________________________________________________