Docsity

Log Likelihood - Survival Analysis - Solved Assignment, Exercises of Mathematical Statistics

Toggle sidebar
bg1
Solution of Assignment #4
______________________________________________________________________________
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
H
0
: Exponential distribution is an adequate model for the data
vs.
H
1
: Weibull distribution is a better model than exponential distribution.
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.000 .
Therefore, we strongly reject
H
0
and hence Exponential distribution is not an adequate model.
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.0000000
Weibull vs. Generalized Gamma 0.3684 1 0.5438777
Lognormal vs. Generalized Gamma 0.6378 1 0.4245086
Log-logistic vs. Generalized Gamm
a
0.9514 1 0.3293632
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.
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Log Likelihood - Survival Analysis - Solved Assignment and more Exercises Mathematical Statistics in PDF only on Docsity!

Solution of Assignment

______________________________________________________________________________

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

H 0 : Exponential distribution is an adequate model for the data

vs.

H 1 : Weibull distribution is a better model than exponential distribution.

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..

Therefore, we strongly reject H 0 and hence Exponential distribution is not an adequate model.

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

  1. 0 0. 5 1. 0 1. 5 2. 0 2. 5 3. 0 3. 5
    1. 0
    2. 5
    3. 0
    4. 5
    5. 0
    6. 5

e

  1. 0 0. 5 1. 0 1. 5 2. 0 2. 5
  2. 0
  3. 5
  4. 0
  5. 5
  6. 0
  7. 5
  8. 0

e

  1. 0 0. 5 1. 0 1. 5 2. 0 2. 5
    1. 0
    2. 5
    3. 0
    4. 5
    5. 0
    6. 5
    7. 0

e

  1. 0 0. 5 1. 0 1. 5 2. 0 2. 5 3. 0

The estimates of parameters of the above model are:

Parameter Estimate β 0 3.

β 1 0.

β 2 -0.

β 3 -0.

Interpretation:

  • Year: 100(exp(0.2389) -1) = 26.98. According to the model, controlling for all other variables, a unit increase in model year is associated with a 26.98 percent increase in the mean of life time. This does not look correct. I think the data was not a real data.
  • Geographic Region: 100(exp(-0.2338)-1) = -20.85. According to the model, controlling for all other variables, the mean of life time for a car used in northern area is 20. percent smaller than the mean life time for a car used in southern area.
  • Driving Condition: 100(exp(-0.4609) -1) = -36.92. According to the model, controlling for all other variables, the mean life time for cars used predominately in cities is 36. percent smaller than those cars which were not used predominately in cities.

(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:

  • Blood Urea Nitrogen: 100(exp(-1.53399) -1) = -78.43. According to the model, controlling for hemoglobin, a unit increase in logarithm of blood urea nitrogen is associated with a 78.43 percent decrease in the mean of survival time. Note that a unit increase in logarithm of blood urea nitrogen is associated with multiplicative change in blood urea nitrogen by a factor e= 2.718. Therefore, according to the model, when hemoglobin is constant, it is estimated that a multiplicative change in blood urea nitrogen by a factor 2.718 is associated with a 78.43 percent decrease in the mean of survival time. We can write our results in term of hazard function. Since exp(1.5399/0.8844) =5.67, it is estimated that a multiplicative change in blood urea nitrogen by a factor 2.718 is associated with a multiplicative change of 5.67 in the hazard of survival time given that the hemoglobin is constant.
  • Hemoglobin Measurement at Diagnosis: 100(exp(0.0976) -1) = 10.25. According to the model, controlling for blood urea nitrogen, a unit increase in hemoglobin measurement at diagnosis is associated with a 10.25 percent increase in the mean of survival time. Since 100(exp(-0.0976/0.8844)-1) =-10.45, it is estimated that for each one unit increase in hemoglobin measurement at diagnosis, the hazard of survival time goes down by 10.45 percent, assuming blood urea nitrogen is constant.

(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

  1. 0 0. 5 1. 0 1. 5 2. 0 2. 5 3. 0 3. 5 4. 0

(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:

x 1 =^1.^5 x 2 =^5.^5

(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:

Logh t Logh t X X 2

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

H 0 : Exponential distribution is an adequate model for the data

vs.

H 1 : Weibull distribution is a better model than exponential distribution.

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..

Therefore, we strongly reject H 0 and hence Exponential distribution is not an adequate model.

The following table gives the value of test statistic and P-value for each testing other distributions.

0

1

2

3

4

5

e

  1. 0 0. 5 1. 0 1. 5 2. 0 2. 5 3. 0 3. 5 4. 0

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:

  • Clinic: 100(exp(-0.6821) -1) = -49.44. According to the model, controlling for dose, the mean of days spent in clinic 1 is 49.44 percent smaller than the mean time of days spent in clinic 2.
  • Dose: 100(exp(0.0240) -1) = 2.43. According to the model, controlling for clinic, a unit increase in dose is associated with a 2.43 percent increase in the mean of days spent in clinic.

(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:

  • Clinic: exp(1.0098) = 2.75. According to the model, controlling for prison record and dose, the hazard of release from clinic 1 is about 2.75 times the hazard of release from clinic 2.
  • Prison Record: exp(0.32657) = 1.386. Controlling for clinic and dose, it is estimated that the hazard of release from clinic for people have prison records is about 1.386 times the hazard of release from clinic for those people who do not have prison record.
  • Dose: 100(exp(-0.03537)-1) = -3.475. Controlling for clinic and prison record, for each one unit increase in the dose, the hazard of release from clinic goes down by an estimate of 3.475 percent.

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

  • 3
  • 2
  • 1

0

1

2

3

4

Pr i son

  1. 0 0. 1 0. 2 0. 3 0. 4 0. 5 0. 6 0. 7 0. 8 0. 9 1. 0

Devi ance Resi dual

  • 3
  • 2
  • 1

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

    1. 6
    1. 5
    1. 4
    1. 3
    1. 2
    1. 1
    2. 0
    3. 1
    4. 2
    5. 3
    6. 4
    7. 5
    8. 6
    9. 7

Ti me

0 200 400 600 800 1000 1200

Schoenf el d Resi dual f or Dose

  • 40
  • 30
  • 20
  • 10

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

/ [(^11

h (^ t ) h β θ t^ λ t

γ β (^) θ λγ − − ⎟⎟ = ⎠

⇒ = , where

( 1 /^1 )

β θ

θ β λ

h

= , and

γ 1

=^1

( )^ is the hazard function of a Weibull distribution and this completes the proof.

1

h 0 (^ t )^ λ t^

γ

−

(c) In proportional odd models, we have ( ; ) () ()

St^1 X^2 t

S t

= W β W

, for some functions

and W with (For simplicity, we can use

but this is not necessary for this part). If we solve the above equation to find S(t), we have

W 1 2 W 1 ( X ,β=^0 )=^1 (^ , ) exp( )

'

W 1 X β^ =^ β X

( ; ) () () [ 1 1 ( ; ) 2 ( )]

1 ()^1

St W^^1 X W^2 t St W X W t

St

− = ⇒ =

( ) ( 1 exp[log 1 ( ; ) log 2 ( )])

1

S t + W X + W t

−

( 1 exp[ 0 () 1 ( ; )])

1

+ A t + A X β

−

where A 0 ( t )= log W 2 ( t )and A 1 ( X ;β )= log W 1 ( X , β). Recall that the baseline

survivor function, S 0 ( t ), is obtained for β = 0. So

2 0

0 1 2 0

(^0) t t

t X t t

t

W

S

S

W W

S

− S = β = ⇒ − = since ( , 0 ) 1. So

W 1 X β= =

() log () log 0

0 (^0 2) t

t t t

S

S

A W and this completes the proof.

(d) From part (a), for accelerated failure time model, we have S ( t )= S 0 [ t exp( θ' X )]. In

addition, from part (c), for proportional odds model, we have

− −

( 1 exp[ () ( ; )]) 11

1 1

β W X β

S t

S t

S t A t A X

For ( , ) exp( ), we have

'

W 1 X β^ =^ β X ⎥

−

== exp( )

()^0

1

X

S t

S t

St β. So

−

== exp( )

[exp( ]^0

1 '

0 X

S t

S t

S t θ X^ β

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

S

S

t

S

S

t

S

⇒ − S^ β^ θ = − ⇒α γ= − where

0

0

S

α = − S and

θ

β γ 1

Therefore,

t

S t γ

0 () and this is the survivor function of a log-logistic distribution.

______________________________________________________________________________