Docsity

MLE of Parameters for Distributions in Survival Analysis, Exercises of Mathematical Statistics

Toggle sidebar
bg1
Solution of Assignment #3
______________________________________________________________________________
Question #1:
(a) The maximum likelihood estimators of parameters for each group are:
0829.0
4900.2
==
−
e
I
λ
5880.2
3864.0
11 === Scale
I
γ
1458.0
9256.1
==
−
e
II
λ
3202.2
4310.0
11 === Scale
II
γ
1033.0
2705.2
==
−
e
III
λ
1328.3
3192.0
11 === Scale
III
γ
0897.0
4105.2
==
−
e
IV
λ
9391.1
5157.0
11 === Scale
IV
γ
0612.0
7943.2
==
−
e
V
λ
6523.3
2738.0
11 === Scale
V
γ
By definition is the pth quantile (or 100pth percentile) of . The tenth
percentile,
)(
1
p
F
t
p
−
=
)(1)( tStF −=
t
10.0
, is sued as a rating life. For Weibull distribution, we have
⇒−=⇒=−⇒=⇒= 90.0log
10.0
90.0]
10.0
exp[90.0)(10.0)(
)()(
10.010.0
tt
tt
SF
λλ
γγ
)90.0loglog()90.0loglog(
1
)log())90.0loglog()log(
0
10.0
10.0
log(
−+=−+−=⇒−=
σ
γ
λλγ
β
t
t
We should find the maximum likelihood estimate of
t
10.0
and its standard error. Note that
t
10.0
is
not a linear function of
β
0and
σ
. The formula to find standard error of the estimate of
t
10.0
is
complicated since
t
10.0
is a function of two parameters instead of one parameter. SAS find the
standard error of
t
10.0
by using that formula.
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download MLE of Parameters for Distributions in Survival Analysis and more Exercises Mathematical Statistics in PDF only on Docsity!

Solution of Assignment

______________________________________________________________________________

Question #1:

(a) The maximum likelihood estimators of parameters for each group are:

  1. 4900 = =

− λ (^) I e 0. 3864 2.^5880

I Scale γ

  1. 9256 = = − λ (^) II e 0. 4310 2.^3202

II Scale γ

  1. 2705 = = − λ (^) III e 0. 3192 3.^1328

III Scale γ

  1. 4105 = = − λ (^) IV e 0. 5157 1.^9391

IV Scale γ

  1. 7943 = = − λ (^) V e 0. 2738 3.^6523

V Scale γ

By definition is the pth quantile (or 100pth percentile) of. The tenth

percentile,

1

t p F p

− = F ( t )= 1 − S ( t )

t 0. 10 , is sued as a rating life. For Weibull distribution, we have

F ( t (^) (^) 0. 10 )= 0. 10 ⇒ S ( t 0. 10 )= 0. 90 ⇒exp[−(λ t 0. 10 )]= 0. 90 ⇒( λ t 0. 10 ) =−log 0. 90 ⇒

γ γ

log( log 0. 90 ) log( log 0. 90 )

log( ) log( log 0. 90 ) ) log( ) 0

0. 10 log(^0. 10

= − ⇒ =− + − = +σ − γ

γ λ t t λ β

We should find the maximum likelihood estimate of t 0. 10 and its standard error. Note that t 0. 10 is

not a linear function of β 0

and σ. The formula to find standard error of the estimate of t 0. 10 is

complicated since t 0. 10 is a function of two parameters instead of one parameter. SAS find the

standard error of t 0. 10 by using that formula.

Since log( (^) t (^) 0. 10 ) is a linear function of β 0

and σ , it is easier to find a confidence interval for

log( t 0 . 10 ) first and then find a confidence interval for t 0. 10. In the following, I will use this

method to find confidence intervals. I will also show you how to find the standard error of

t 0. 10 using SAS at the end of this part ad then I will find confidence intervals. Note that the

confidence intervals by the first method are different from the confidence intervals obtained based on SAS results directly.

Group I: An estimate of t 0. 10 is

= exp[ + log(−log 0. 90 )]=exp[ 2. 4900 +( 0. 3864 )log(−log 0. 90 )] ⇒

  1. (^100) β σ

t

t 0. 10 =exp(^1.^62045 )=^5.^0554



. Note that an estimate of log(^ t 0 . 10 )is 1.

Put a =log( −log( 0. 90 )=− 2. 2504. Then the standard error of the estimate oflog( t 0. 10 )is

var[ + log(−log 0. 90 )]= )+ var( )+ 2 ( , ) = 0

2

0 var( 0

β σ β σ β^ σ

a aCov

2

Hence a 95% confidence interval for log( t 0. 10 )is

Estimate ± Z 0. 025 S.E.(Estimate) = 1.62045 ± 1.96 (0.29663) (1.0390, 2.2018). A 95%

confidence interval for

t 0. 10 is^ (^.^ Similarly,^ we^ can^ find

confidence intervals for other groups.

  1. 0390 2. 2018

e e^ =

Group II: An estimate of t 0. 10 is

t 0. 10 =exp[^1.^9256 +(^0.^4310 )log(−log^0.^90 )]=exp(^0.^9557 )=^2.^6005

. An estimate of log( t 0. 10 ) is

0.9557. Then the standard error of the estimate of log( t^ 0. 10 )is

2

Hence a 95% confidence interval for log( t 0. 10 )is:

0.9557 ± 1.96 (0.30171) ⇒ (0.3643, 1.5470). A 95% confidence interval for t 0. 10

is ( , ) ( 1. 4395 , 4. 6973 ).

  1. 3643 1. 5470

e e^ =

Note that percentiles and their standard errors can be obtained in SAS easily and you do not have to do this long process. You should write

Proc lifereg data=B; By Type; Model Time*Status(0)=/covb d=weibull; Output out=a p=t10 quantile=0.10 std=s; Run; quit;

Proc print data=a; BY Type; Var Time Status Prob t10 s; Run; quit;

The P = t10 in the output statement requests percentiles. By defaults, PROC LIFEREG calculates the 50th^ percentile, which is the median. I requested tenth percentile with the QUANTILE keyword, as described in the PROC LIFEREG documentation. The word t10 in the OUTPUT statement is just the variable name that I chose for tenth percentile. The STD keyword requests the standard error of the percentile. In the OUTPUT, PROB is the requested quantile (0.10).

The estimate of tenth percentile and its standard deviation, and a 95% confidence interval for tenth percentile for each group, using SAS, are given in the following table.

Group Estimate Standard Error Confidence Interval I 5.055 1.49955 5.055 ± 1.96(1.49955) II 2.600 0.78461 2.600 ± 1.96(0.78461) III 4.721 1.13805 4.721 ± 1.96(1.13805) IV 3.490 1.21907 3.490 ± 1.96(1.21907) V 8.829 1.81328 8.829 ± 1.96(1.81328)

These confidence intervals are different from the confidence intervals obtained by using log transformation.

(b) The plot of survivor functions of failure time for five different compounds is given in the

next page. If S i ( t ), i = 1 ,…, 5 , is survivor function of compound I, then

S 2 ( t^^ )< S 3 ( t )< S 1 ( t )< S 5 ( t^ )

The survivor function of compound 4 is greater than survivor function of compound 2. Survivor function of compound 4 is less than survivor function of compound 3 most of the time. The p- values for long-rank test and Wilcoxon test for testing equality of survivor functions are 0. and 0.0003, respectively. Therefore, we strongly reject the equality of survivor functions.

Title: The Plot of Survivor Functions of Failure Time for Five Different Compounds

Par t b - Sur vi vor f unct i on

  1. 00
  2. 25
  3. 50
  4. 75
  5. 00

Ti me

0 5 10 15 20 25 30

STRATA: TYpe=I TYpe=I I TYpe=I I I TYpe=I V TYpe=V

For Weibull distribution, testing versus

, for some

H 0 : Si ( t )^ =^ Sj ( t ), i ≠ j , i =^1 ,…^ ,^5 , j =^1 ,…,^5

H (^) 1 : Si ( t^ )≠^ Sj ( t^ ) i^ ≠^ j is equivalent to testing λ λ^ γ^ γ

H i j i j

0 : =^ , = for all i ≠ j , i = 1 ,… , 5 , j = 1 ,…, 5 versus λ λ γ γ i j i j

H 0 : ≠ or ≠ for some^. The log--likelihood

for

i ≠ j

H 0 (all data) is -39.8296. The log-likelihoods for data for Types I, II, III, IV, and type V are

-6.7670, -6.4549, -4.5925, -7.8387 and -3.0217, respectively. Therefore, the value of the test

statistic for testing H 0 is

TS =− 2 [ − 39. 8296 −(-6.7670-6.4549-4.5925-7.8387-3.0217)] = 22. 3096

The test statistic has an asymptotic chi-square distribution with degrees of freedom of 10-2=8.

P-value = P(TS > 22.3096) = 0.0044< 0.05 and we reject H 0 strongly. Therefore, there is

strong evidence to conclude that there is a difference in the survivor functions of the failure time of five compounds.

Title: Probability plots of FailureTime

Part c - Lognor mal Di st r i but i on

l nor m

  • 3
  • 2
  • 1

0

1

2

3

l ogTi me

1 2 3 4

Par t b - Wei bul l Di st r i but i on

  • 3
  • 2
  • 1

0

1

Log of Ti me

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

STRATA: TYpe=I TYpe=I I TYpe=I I I TYpe=I V TYpe=V

Since Log T has normal distribution with mean μ and standard deviation σ , the 10th^ quantile is

obtaining by solving ( 0. 10 ) -1.

log( 0. 10 = =

− σ

t μ

, where Φ is the standard normal

distribution function. Let a =-1.281552.Thenlog( t 0. 10 )=μ + a σ. SAS gives the estimates of

μ and^ σ^. We can use the same method in part (a) to find a confidence interval for log(^ t 0. 10 ) and

then find a confidence interval for t 0. 10. Since this is similar to what we did in part (a), I leave it

to you to complete it and, in the following; I only give you SAS results. Note that the estimates from above method are the same as the SAS results, but the standard errors and confidence intervals are different.

The estimate of tenth percentile and its standard deviation, and a 95% confidence interval for tenth percentile for each group, using SAS for lognormal distribution, are given in the following table. As we expect, the confidence intervals based on lognormal distribution are narrower.

Group Estimate Standard Error Confidence Interval I 4.75996 1.08927 4.75996± 1.96(1.08927) II 3.36783 0.56237 3.36783 ± 1.96(0.56237) III 4.71182 0.82937 4.71182 ± 1.96(0.82937) IV 5.26383 0.91076 5.26383 ± 1.96(0.91076) V 8.80268 1.33558 8.80268 ± 1.96(1.33558)

Question #2:

(a) Probability plots for exponential; Weibull, lognormal, and log-logistic distribution are given in the next page. It is clear that exponential and Weibull distributions are inadequate. Although the probability plots for lognormal and log-logistic distribution are very similar, but they are not identical. (Compare Y-axes to see the differences.) It seems that lognormal distribution fit the data better.

Title: Probability plots of Survival Time

(c) The following table gives the log-likelihoods for exponential, Weibull, lognormal, and generalized gamma distribution.

Distribution Exponential Weibull Lognormal Generalized Gamma Log-likelihood -41.8597 -41.8571 -40.6769 -40.

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 value of the test statistic is TS = -2[-41.8597 – (-41.8571)] = 0.0052. The test statistic has a chi-square distribution with degrees of freedom df = 2 -1 = 1. So P-value = P(TS > 0.0052) =

0.9425136. Therefore, we fail to reject H 0 and hence Exponential distribution is 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 3.098 2 0. Weibull vs. Generalized Gamma 3.093 1 0. Lognormal vs. Generalized Gamma 0.7324 1 0.

Since all P-values are greater than 0.05, we fail to reject the null hypotheses. Therefore, with likelihood ratio test, we choose exponential distribution.

(d) The log-likelihood, BIC, and AIC for exponential, Weibull, lognormal, log-logistic, and generalized gamma distribution are given in the following table.

Distribution Log-Likelihhod (LL) BIC = LL – (p/2)log(n) AIC = LL – 2p Exponential -41.8597 -43.5767 -43. Weibull -41.8571 -45.2911 -45. Lognormal -40.6769 -44.1109 -44. Log-logistic -41.4858 -44.9198 -45. Generalized Gamma -40.3107 -45.4517 -46.

Since exponential distribution has largest value of BIC and AIC, we choose exponential distribution as the model that fit the data best.

(e) The following table gives selected distribution for parts (a) to (d).

Part (a) (b) (c) (d) Selected distribution Lognormal Generalized Gamma Exponential Exponential

It is clear that the results are not consistent. For example, the probability plots and Cox-Snell residual plots shows that exponential and Weibull distribution are not adequate while we choose exponential distribution by likelihood ratio test, BIC, and AIC. For this problem, the sample size is 31 with 11 censored observations. Since likelihood ratio test, BIC, and AIC are based on large sample properties, we should rely more on graphical methods. So, lognormal distribution should be a good model for data (It should be mentioned that, in part (b), lognormal distribution could be chosen instead of generalized gamma distribution).

Question #3:

(a) For Weibull distribution, testing H 0 : SI ( t )= SII ( t )versus H 1 : SI ( t )≠ SII ( t ) is

equivalent to testing H (^) 0 : λ (^) I = (^) λ II , γ I = γ II versus H (^) 0 : λ (^) I ≠ λ IIor γ I ≠ γ II. The log--

likelihood for H 0 (all data) is -24.0310. The log-likelihoods for data for Type I and Type II are -

12.7418 and -10.0454, respectively. Therefore, the value of the test statistic for testing H 0 is

TS =− 2 [ − 24. 0310 −(− 12. 7418 − 10. 0454 )] = 2. 4876

The test statistic has an asymptotic chi-square distribution with degrees of freedom of 4-2=2.

Therefore, P-value = P(TS > 2.4876) > 0.05 and we fail to reject H 0. (Note that likelihood

ratio test is not very reliable for this problem since we have only 10 observations in each group. We should use non-parametric method.)

(b) Note that 1. 3508

  1. 7403

I Scale γ

and 1. 8734

  1. 5338

II Scale γ

. These values

are estimate of “Weibull Shape” in SAS results. Hence, by using SAS results, we have

. .( γ )= 0. 3477

S E I and. .( γ )= 0. 5041

S E II. Therefore, the value of the test statistic for testing

H (^) 0 :^ γ^ I =^ γ II versus H (^) 0 :^ γ^ I ≠^ γ II is

γ γ

γ γ

I II

I II Var Var

TS

P-value = 2P(TS >0.8534) = 0.3934, using normal distribution. Therefore, we fail to reject H 0.

Since γ (^) I = (^) γ II , testing (^) H 0 : SI ( t )= (^) SII ( t )versus (^) H 1 : SI ( t )< (^) SII ( t ) is equivalent to

testing H (^) 0 : λ (^) I = λ II versus H (^) 0 : λ (^) I > λ II. Note that

  1. 2398 = = − λ I^ e

and 0. 02466

  1. 7025 = = − λ II^ e

We can find standard errors of λ

I and^ λ

II by using maximum likelihood properties, but it is

easier to write the null hypothesis in terms of λ

θ I

I

= and λ

θ II

II

=. Note that the estimate

and standard error of θ (^) I and θ (^) II are given in SAS output. (The estimate is called “Weibull

Scale”.) Testing H (^) 0 : λ (^) I = λ II versus H (^) 0 : λ (^) I > λ II is equivalent to testing

H 0 :^ θ^ I =^ θ II versus H 0 :^ θ^ I <^ θ II. Using SAS results, the value of the test statistic is:

θ θ

θ θ

I II

I II Var Var

TS

P-value =P(TS <-1.5342) = 0.0625, using normal distribution. Therefore, we fail to reject H 0.

There is not enough evidence to conclude that Type II insulation is superior.

______________________________________________________________________________

Question #4:

(a) The plot of survivor function is given in the following. The Kaplan-Meier estimate of survivor function can be obtained by SAS. I do not copy the estimate to save pages.

Note that the gaps between steps in the above plot are increasing after 2000. This implies that the data are mixture of two distributions.

Question #5:

Treatment R: The log-likelihood for exponential, Weibull, lognormal, log-logistic, and gamma distributions are -68.1284, -67.9342, -67.8430, -67.9618, and -67.9618, 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 value of the test statistic is TS = -2[-68.1284 – (-67.9432)] = 0.3704. The test statistic has a chi-square distribution with degrees of freedom df = 2 -1 = 1. So P-value = P(TS > 0.3704) =

0.5427863. Therefore, we fail to reject H 0 and hence Exponential distribution is 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 0.5852 2 0. Weibull vs. Generalized Gamma 0.2148 1 0. Lognormal vs. Generalized Gamma 0.0144 1 0. Log-logistic vs. Generalized Gamma 0.2520 1 0.

Since all P-values are greater than 0.05, we fail to reject the null hypotheses. Therefore, with likelihood ratio test, we choose exponential distribution for group R.

Treatment RC: The log-likelihood for exponential, Weibull, lognormal, and log-logistic distributions are -82.1864, -73.2674, -74.2923, and -73.6248, 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[-82.1864 – (-73.2674)] = 17.838. The test statistic has a chi-square distribution with degrees of freedom df = 2 -1 = 1. So P-value = P(TS > 17.838) = 0.00002. Therefore, we

strongly reject H 0 and hence Exponential distribution is not an adequate model. If we compare

other distributions, we find that lognormal distribution is an adequate model for data. Since the lognormal was not rejected for the treatment R, we choose log-normal for both groups. I chose lognormal distribution since it is very simple. (Log T has a normal distribution.) Students might choose Weibull distribution or log-logistic distribution. It is a good idea to find Cox-Snell residual plots to see how well distributions fit the data, and then choose the best distribution.

For Lognormal distribution, testing H 0 : SR ( t )= SRC ( t )versus H 1 : SR ( t )≠ SRC ( t ) is

equivalent to testing H (^) 0 : μ (^) R =^ μ RC , σ R = σ RC versus H (^) 0 : μ (^) R ≠ μ RCor σ R ≠ σ RC. The log--

likelihood for H 0 (all data) is -148.7927. The log-likelihoods for data for Treatments R and RC

are -67.8430 and -74.2923, respectively. Therefore, the test statistic for testing H 0 is

TS =− 2 [ − 148. 7927 −(− 67. 8430 − 74. 2923 )] = 13. 3148

The test statistic has an asymptotic chi-square distribution with degrees of freedom of 4-2=2.

Therefore, P-value = P(TS > 13.3148) =0.00128< 0.05 and we strongly reject H 0. Therefore,

there is strong evidence to conclude that two survival functions are not equal. The estimated parameters are:

= Intercept = 3. 7052 μ R

, = Intercept = 1. 2718 μ RC

, (^) σ R = Scale = 1. 2718

, (^) σ = 0. 6392

RC

Note that PROC LIFETEST cannot handle interval censoring. Therefore, we cannot use nonparametric methods, probability plots.

______________________________________________________________________________

Question #6: For simplicity, assume that the distribution function of T is continuous. The distribution function of R is:

F (^ ) ( ) ( log ( ) ) (log ( ) ) ( ( ) e^ )

r R r^ P R r P ST r P ST r P ST

− = ≤ = − ≤ = ≥− = ≥

Since S(T) is a continuous decreasing function, we have.

Hence,

( ( ) ) [ ( )]

1

e S e

r r P ST PT − − − ≥ = ≤

F e S e PT S e S^ ( S^ e )^ e

r r r r R r PST PT r

− − − − − −

( )= ( ( )≥ )= [ ≤ ( )]= 1 [ −^1 ( − )] 1 ( ) = 1

1 1

The probability density function of R is f F e

r R R r r − ( )= ' ( )=. Therefore, R has an exponential

distribution with parameter λ = 1 , and this completes the proof.

______________________________________________________________________________