PIC {PICBayes} | R Documentation |
PH model for partly interval-censored data
Description
Fit a Bayesian semiparametric PH model to partly interval-censored data.
Usage
PIC(L, R, y, xcov, IC, scale.designX, scaled, binary, order, knots, grids,
a_eta, b_eta, a_ga, b_ga, beta_iter, beta_cand, beta_sig0, x_user,
total, burnin, thin, conf.int, seed)
Arguments
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
binary |
The vector indicating whether each covariate is binary: 1=binary, 0=not. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
Details
The baseline cumulative hazard is approximated by a linear combination of I-splines:
sum_{l=1}^{K}(gamma_l*b_l(t))
.
The baseline hazard is approximated by a linear combination of basis M-splines:
sum_{l=1}^{K}(gamma_l*M_l(t))
.
For a binary prdictor, we sample e^{beta_r}
, with Gamma prior.
The regression coefficient beta_r
for a continuous predictor is sampled
using MH algorithm. During the initial beta_iter
iterations, sd of the
proposal distribution is beta_cand
. Afterwards, proposal sd is set to be
the sd of available MCMC draws.
Value
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival functions is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Author(s)
Chun Pan
References
Pan, C., Cai, B., and Wang, L. (2020). A Bayesian approach for analyzing partly interval-censored data under the proportional hazards model. Statistical Methods in Medical Research,
DOI: 10.1177/0962280220921552.
Examples
# Number of iterations set to very small for CRAN automatic testing
data(da1)
try1<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da1),
model='PIC',IC=da1[,6],scale.designX=TRUE,scale=c(1,0),binary=c(0,1),
order=3,knots=c(0,2,6,max(da1[,1:2],na.rm=TRUE)+1),grids=seq(0.1,10.1,by=0.1),
a_eta=1,b_eta=1,a_ga=1,b_ga=1,beta_iter=11,beta_cand=1,beta_sig0=10,
x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)