emplikH1.test {emplik}R Documentation

Empirical likelihood for hazard with right censored, left truncated data

Description

Use empirical likelihood ratio and Wilks theorem to test the null hypothesis that

int f(t) dH(t) = theta

with right censored data. Where H(t) is the unknown cumulative hazard function; f(t) can be any given left continuous function and theta a given constant. In fact, f(t) can even be data dependent, just have to be `predictable'.

Usage

emplikH1.test(x, d, y= -Inf, theta, fun, tola=.Machine$double.eps^.25)

Arguments

x a vector of the observed survival times.
d a vector of the censoring indicators, 1-uncensor; 0-censor.
y a vector of the observed left truncation times.
theta a real number used in the H_0 to set the hazard to this value.
fun a left continuous (weight) function used to calculate the weighted hazard in H_0. fun must be able to take a vector input. See example below.
tola an optional positive real number specifying the tolerance of iteration error in solve the non-linear equation needed in constrained maximization.

Details

This function is designed for the case where the true distributions are all continuous. So there should be no tie in the data.

The log empirical likelihood used here is the `Poisson' version likelihood:

sum_{i=1}^n delta_i log (dH(x_i)) - [ H(x_i) - H(y_i) ] ~.

Value

A list with the following components:

times the location of the hazard jumps.
wts the jump size of hazard function at those locations.
lambda the Lagrange multiplier.
"-2LLR" the -2Log Likelihood ratio.
Pval P-value
niters number of iterations used

Author(s)

Mai Zhou

References

Pan, X. and Zhou, M. (2002), ``Empirical likelihood in terms of hazard for censored data''. Journal of Multivariate Analysis 80, 166-188.

Examples

fun <- function(x) { as.numeric(x <= 6.5) }
emplikH1.test( x=c(1,2,3,4,5), d=c(1,1,0,1,1), theta=2, fun=fun) 

fun2 <- function(x) {exp(-x)}  
emplikH1.test( x=c(1,2,3,4,5), d=c(1,1,0,1,1), theta=0.2, fun=fun2) 

[Package Contents]