myLLfun: Compute Baseline Hazard for the Given Data and Parameters...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/myLLfun.R

Description

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

Usage

1
myLLfun(mle, dataMat, fun)

Arguments

mle

a vector of length 3, containing the parameter values: beta1, beta2 and lam. They do not have to be the 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.

Details

We assume a Y-P model. and with the given parameters (in the input mle) we compute the baseline hazard and compute the (parameter constrained) empirical likelihood value.

Value

A list with the following components:

Mulam

The value of int f(t) d H(t) for corresponding lam. Notice lam, beta1, beta2 determine the baseline H(t).

Loglik

The log empirical likelihood.

Author(s)

Mai Zhou

References

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

Examples

1
2
3
4
5
## 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)

Example output



ELYP documentation built on May 2, 2019, 5:17 a.m.

Related to myLLfun in ELYP...