Learn R Programming

kmc (version 0.2-2)

kmc.bjtest: Calculate NPMLE with constriants for accelerated failure time model with given coefficients.

Description

Use the empirical likelihood ratio and Wilks theorem to test if the regression coefficient is equal to beta. $$El(F)=\prod_{i=1}^{n}(\Delta F(T_i))^{\delta_i}(1-F(T_i))^{1-\delta_i}$$ with constraints $$\sum_i g(T_i)\Delta F(T_i)=0,\quad,i=1,2,\ldots$$ Instead of EM algorithm, this function calculate the Kaplan-Meier estimator with mean constraints recursively to test $H_0:~\beta=\beta_0$ in accelerated failure time model: $$\log(T_i) = y_i = x_i\beta^\top + \epsilon_i,$$ where $\epsilon$ is distribution free.

Usage

kmc.bjtest(y, d, x, beta,init.st="naive")

Arguments

y
Response variable vector (length n).
d
Status vector (length n), 0: right censored; 1 uncensored.
x
n by p explanatory variable matrix.
beta
The value of the regression coeffiecnt vector (length p) to be tested.
init.st
Type of methods to initialize the algorithm. Default uses 1/n

Value

  • a list with the following components:
  • probthe probabilities that max the empirical likelihood under estimating equation.
  • logel1the log empirical likelihood without constraints, i.e. under Kaplan-Merier of residuals'
  • logel2the log empirical likelihood with constraints, i.e. under null hypotheses or estimation equations.
  • "-2LLR"the -2 loglikelihood ratio; have approximate chisq distribution under null hypotheses

Details

The empirical likelihood is the likelihood of the error term when the coefficients are specified. Model assumptions are the same as requirements of a standard Buckley-James estimator.

References

Buckley, J. and James, I. (1979). Linear regression with censored data. Biometrika, 66 429-36 Zhou, M., & Li, G. (2008). Empirical likelihood analysis of the Buckley-James estimator. Journal of multivariate analysis, 99(4), 649-664. Zhou, M. and Yang, Y. (2015). A recursive formula for the Kaplan-Meier estimator with mean constraints and its application to empirical likelihood Computational Statistics. Online ISSN 1613-9658.

See Also

plotkmc2D, print.kmcS3 bjtest.

Examples

Run this code
x <- c( 1, 1.5, 2, 3, 4.2, 5.0, 6.1, 5.3, 4.5, 0.9, 2.1, 4.3) # positive time
d <- c( 1,   1, 0, 1, 0, 1, 1, 1, 1, 0, 0,   1)               # status censored/uncensored

Run the code above in your browser using DataLab