Learn R Programming

PHInfiniteEstimates (version 2.9.5)

pllk: Partial likelihood for proportional hazards

Description

Partial likelihood for proportional hazards

Usage

pllk(beta, xmat, ind, cc = NULL)

Value

a list with components

  • d0 partial likelihood

  • d1 first derivative vector

  • d2 second derivative matrix

Arguments

beta

parameter vector

xmat

regression matrix

ind

censoring indicator, 1 for event and any other value otherwise.

cc

Continuity correction for sum of x vectors with multiple occurrences in risk set. For binary covariates is half. Default a vector of zeros.

Examples

Run this code
#Uses data set breast from package coxphf.
data(breast)
 xmat<-as.matrix(breast)[order(breast$TIME),c("T","N")]
 ind<-breast$CENS[order(breast$TIME)]
 short<-coxph(Surv(TIME,CENS)~ T+ N,data=breast)
 pllk(as.vector(coef(short)),xmat,ind)

Run the code above in your browser using DataLab