PrenticeGloeckler: Regression for Grouped Survival Data Function

Description Usage Arguments Details Value Author(s) References Examples

Description

This function calculates the estimated hazard ratio for grouped survival data described in the reference below.

Usage

1

Arguments

time

vector of times to event or censoring. The times are assumed to be integers from 1, 2, .., r corresponding to the discrete time points or the continuous time intervals A1, ..., Ar

event

vector of binary status indicator variables (0 = censored at the start of the interval, 1 = event during the interval)

grp

vector of binary group indicators (0 or 1)

r

number of time points or intervals

Details

The hazard functions and hazard ratio are estimated for grouped survival data.

Value

A list consisting of:

coefficient

The estimated coefficient (log hazard ratio) found by maximizing the likelihood.

indx

vector of time points where the hazard functions are estimated. The subset of 1,...,r-1 with at least one event.

gamma

numeric vector with the same length as indx representing the log(-log(hazard rate)) in the control group for time points in the vector indx

grad1

gradient evaluated at (gamma[indx],ceofficient)

r

number of time points or time intervals

hess1

hessian matrix evaluated at the maximum likelihood estimate.

ll0

log-likelihood evaluated at ceofficient=0. includes attributes "gradient" and "hessian"

ll1

log-likelihood at maximum likeohood estimate. includes attributes "gradient" and "hessian"

score.test

value of the score test statistic for testing coefficient=0 (see reference).

lr.test

value of the likelihood ratio test statistic, 2*(ll0-ll1)

wald.test

value of the Wald test statistic; the estimated coefficient divided by the square root of the estimated variance.

Author(s)

John Lawrence

References

Prentice, R. L. and Gloeckler, L.A. (1978). Regression analysis of grouped survival data with application to breast cancer data. Biometrics, 57 – 67

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
set.seed(1234)
nsim=1
n=250
tn=2*n
k=0.1*tn
betaef=rep(0,nsim)
betapg=rep(0,nsim)
cens=rep(1,2*n)
trt=c(rep(0,n),rep(1,n))

for (i in 1:nsim) {
  x=rexp(tn,1)
  x[(n+1):tn]=x[(n+1):tn]/2
  m1=max(x[(n+1):tn])
  x=ceiling(x*(k-1)/m1)
  x[(n+1):tn]=pmin(x[(n+1):tn],k-1)
  x[1:n]=pmin(x[1:n],k)
  pg1=PrenticeGloeckler.test(x,cens,trt,k)
  betapg[i]=pg1$coefficient
  betaef[i]=survival::coxph(survival::Surv(x,cens)~trt,ties="efron")$coef}
mean(betaef)
mean(betapg)

Example output

[1] 0.70625
[1] 0.709874

SurvDisc documentation built on May 2, 2019, 9:12 a.m.