el.cen.test {emplik}R Documentation

Empirical likelihood ratio for mean with right censored data

Description

This program computes the maximized (wrt w_i) empirical log likelihood function for right censored data with the MEAN constraint:

sum_i [ d_i w_i f(x_i) ] = int f(t) dF(t) = μ

where w_i = Delta F(x_i) is a probability, d_i is the censoring indicator. It then computes the -2 log empirical likelihood ratio which should be chi-square distributed if the constraint is true. Here F(t) is the (unknown) CDF; f(t) can be any given left continuous function in t. μ is a given constant. The data must contain some right censored observations. If there is no censoring or the only censoring is the largest observation, the code will stop and we should use el.test that is for uncensored data.

Usage

el.cen.test(x,d,fun=function(x){x},mu,error=1e-8,maxit=20)

Arguments

x a vector containing the observed survival times.
d a vector containing the censoring indicators, 1-uncensor; 0-censor.
fun a left continuous (weight) function used to calculate the mean H_0. fun(t) must be able to take a vector input t. Default to the identity function f(t)=t.
mu a real number used in the constraint, sum to this value.
error an optional positive real number specifying the tolerance of iteration error in the QP. This is the L_1 norm of the differnence of two successive weights.
maxit an optional integer, used to control maximum number of iterations.

Details

This function, unlike other functions in this package, can be slow for larger sample sizes. It took about one minute for a sample of size 2000 with 20% censoring on a 1GHz, 256MB PC.

When the given constants μ is too far away from the NPMLE, there will be no distribution satisfy the constraint. In this case the computation will stop. The minus 2 Log empirical likelihood ratio should be infinite.

The constant mu must be inside ( min f(x_i) , max f(x_i) ) for the computation to continue. It is always true that the NPMLE values are feasible. So when the computation stops, try move the mu closer to the NPMLE, or use a different fun.

Value

A list with the following components:

"-2LLR" The -2Log Likelihood ratio.
xtimes the location of the hazard jumps.
weights the jump size of CDF function at those locations.
Pval P-value
error the L_1 norm between the last two wts.
iteration number of iterations carried out

Author(s)

Mai Zhou, Kun Chen

References

Chen and Zhou (2000). Computing censored empirical likelihood ratio using Quadratic Programming. Tech Report, Univ. of Kentucky, Dept of Statistics

Examples

el.cen.test(rexp(100), c(rep(0,25),rep(1,75)), mu=1.5)
## second example with tied observations
x <- c(1, 1.5, 2, 3, 4, 5, 6, 5, 4, 1, 2, 4.5)
d <- c(1,   1, 0, 1, 0, 1, 1, 1, 1, 0, 0,   1)
el.cen.test(x,d,mu=3.5)
# we should get  "-2LLR" = 1.246634  etc. 

[Package Contents]