PH.ICsurv.EM: EM algorithm for general interval-censored data under the...

Description Usage Arguments Details Value References Examples

View source: R/PH.ICsurv.EM.R

Description

Fits the semiparametric proportional hazards model (PH), proposed in Wang et al. (2014+), to interval censored data via an EM algorithm.

Usage

1
PH.ICsurv.EM(d1, d2, d3, Li, Ri, Xp, n.int, order, g0, b0,  tol, t.seq, equal = TRUE)

Arguments

d1

vector indicating whether an observation is left-censored (1) or not (0).

d2

vector indicating whether an observation is interval-censored (1) or not (0).

d3

vector indicating whether an observation is right-censored (1) or not (0).

Li

the left endpoint of the observed interval, if an observation is left-censored its corresponding entry should be 0.

Ri

the right endpoint of the observed interval, if an observation is right-censored its corresponding entry should be Inf.

Xp

design matrix of predictor variables (in columns), should be specified without an intercept term.

n.int

the number of interior knots to be used.

order

the order of the basis functions.

g0

initial estimate of the spline coefficients; should be of length n.int+order.

b0

initial estimate of regression coefficients; should be of length dim(Xp)[2].

tol

the convergence criterion of the EM algorithm, see details for further description.

t.seq

an increasing sequence of points at which the cumulative baseline hazard function is evaluated.

equal

logical, if TRUE knots are spaced evenly across the range of the endpoints of the observed intervals and if FALSE knots are placed at quantiles.

Details

The above function fits the semiparametric proportional hazards model (PH), proposed in Wang et al. (2014+), to interval censored data via an EM algorithm. For a discussion of starting values, number of interior knots, order, and further details please see Wang et al. (2014+). The EM algorithm converges when the maximum of the absolute difference in the parameter estimates (to include the regression and spline coefficients) is less than tol. The Hessian matrix of the observed likelihood is given in the output. The variance-covariance matrix of the estimated regression and spline coefficients can be obtained by taking the inverse of the Hessian matrix. When the Hessian matrix is singular, the variance matrix of the regression parameters is obtained by using the inverse of blocked matrix, which only involves taking inverse of lower dimensional matrices. To further provide robustness, the generalized inverse function "ginv" in the supporting package "MASS" is used in this case. A function in the supporting R package "matrixcalc" is used to check whether the Hessian matrix is singular.

Value

b

estimates of the regression coefficients.

g

estimates of the spline coefficients.

hz

estimated cumulative baseline hazard function evaluated at the points t.seq.

Hessian

the Hessian matrix. Its inverse is the variance covariance matrix of b and g.

var.b

the variance covariance matrix of b

flag

the indicator whether the Hessian matrix is non-singular. When flag=0, the variance estimate may not be accurate.

AIC

the Akaike information criterion.

BIC

the Bayesian information/Schwarz criterion.

ll

the value of the maximized log-likelihood.

References

Wang, L., McMahan, C., and Hudgens, M. (2014+). A flexible and computationally efficient method for fitting the proportional hazards model to interval censored data. Submitted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(Hemophilia)

d1<-Hemophilia[,1]
d2<-Hemophilia[,2]
d3<-Hemophilia[,3]
Li<-Hemophilia[,4]
Ri<-Hemophilia[,5]
Xp<-as.matrix(Hemophilia[,c(6,7,8)])

fit <- PH.ICsurv.EM(d1, d2, d3, Li, Ri, Xp, n.int=8, order=3, g0=rep(1,11), b0=rep(0,3),  tol=0.001,
 t.seq=seq(0,57,1), equal = TRUE)

fit$b  

# [1] 1.837590 3.018500 3.418981

fit$var.b

#             [,1]        [,2]        [,3]
#  [1,]  0.008526765 -0.01090578  0.01199610
#  [2,] -0.010905780  0.01265952 -0.01462116
#  [3,]  0.011996095 -0.01462116  0.08624411

ICsurv documentation built on May 1, 2019, 10:17 p.m.