Learn R Programming

ELYP (version 0.7-1)

myLLfun: Compute Baseline Hazard for the Given Data and Parameters beta1, beta2, lam. Also Compute the empirical likelihood value.

Description

This function is similar to fitYP3. Just streamline input and output.

Usage

myLLfun(mle, dataMat, fun)

Arguments

mle
a vector of length 3, containing the parameter values: beta1, beta2 and lam. Do not have to be MLE.
dataMat
a matrix of 4 by n. But the 4th row do not matter, since alpha=0 here always.
fun
a function, used in the definition of int f(t)dH(t)= Mulam.

Value

  • A list with the following components:
  • MulamThe value of int f(t) d H(t) for corresponding lam. Notice lam, beta1, beta2 determine the baseline H(t).
  • LoglikThe log empirical likelihood.

Details

Say something.

References

Zhou, M. (2002). Computing censored empirical likelihood ratio by EM algorithm. Tech Report, Univ. of Kentucky, Dept of Statistics

Examples

Run this code
## censored regression with one right censored observation.
## we check the estimation equation, with the MLE inside myfun7. 
y <- c(3, 5.3, 6.4, 9.1, 14.1, 15.4, 18.1, 15.3, 14, 5.8, 7.3, 14.4)
x <- c(1, 1.5, 2,   3,   4,    5,    6,    5,    4,  1,   2,   4.5)
d <- c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)

Run the code above in your browser using DataLab