fitYP41 {ELYP}R Documentation

Compute the Baseline Hazard for the Given Data, given Parameters beta1, beta2. Also, compute the empirical likelihood value.

Description

This function finds the NPMLE of baseline, for the given beta1 and beta2, and then compute the empirical likelihood. The model used is the simple YP model, without alpha.

Usage

fitYP41(Y, d, Z, beta1=1, beta2=-1, maxiter=60)

Arguments

Y

a vector containing the observed survival times.

d

a vector containing the censoring indicators, 1-uncensored; 0-right censored.

Z

a vector of covariates ...

beta1

a scalar. short term

beta2

a scalar. long term

maxiter

an integer.

Details

Similar to the function fitYP4 except using a simple YP model (without alpha).

Value

A list with the following components (may be I should also return the baseline?):

EmpLik

this is actually the log empirical likelihood value.

BaselineH

The baseline hazard estimate.

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

## find NPMLE of beta1 and beta2 in the simple YP model.
data(GastricCancer)
optim(par=c(1.5,-1.5), fn= myffitYP41, 
                       myY=GastricCancer[1,], 
					   myd=GastricCancer[2,], 
					   myZ=GastricCancer[4,])

[Package ELYP version 0.7-5 Index]