clusterPIC_trt_DP {PICBayes}R Documentation

PH model with random intercept and random treatment for clustered partly interval-censored data

Description

Fit a Bayesian semiparametric PH model with random intercept and random treatment for clustered partly interval-censored data. Each random effect follows a Dirichlet process mixture distribution N(0, tau^{-1}).

Usage

clusterPIC_trt_DP(L, R, y, xcov, IC, scale.designX, scaled, xtrt, area, binary, 
I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, 
a_tau_star, b_tau_star, a_alpha_trt, b_alpha_trt, H_trt, a_tau_trt_star, 
b_tau_trt_star, beta_iter, phi_iter, beta_cand, phi_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.

xtrt

The covariate that has a random effect.

area

The vector of cluster ID.

binary

The vector indicating whether each covariate is binary.

I

The number of clusters.

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 gamma_l.

b_eta

The rate parameter of Gamma prior for gamma_l.

a_ga

The shape parameter of Gamma prior for e^{beta_r}.

b_ga

The rate parameter of Gamma prior for e^{beta_r}.

a_alpha

The shape parameter of Gamma prior for alpha.

b_alpha

The rate parameter of Gamma prior for alpha.

H

The number of distinct components in DP mixture prior under blocked Gibbs sampler.

a_tau_star

The shape parameter of G_0 in DP mixture prior.

b_tau_star

The rate parameter of G_0 in DP mixture prior.

a_alpha_trt

The shape parameter of Gamma prior for alpha_trt.

b_alpha_trt

The rate parameter of Gamma prior for alpha_trt.

H_trt

The number of distinct components in DP mixture prior under blocked Gibbs sampler for random treatment.

a_tau_trt_star

The shape parameter of G_0 in DP mixture prior for random treatment.

b_tau_trt_star

The rate parameter of G_0 in DP mixture prior for random treatment.

beta_iter

The number of initial iterations in the Metropolis-Hastings sampling for beta_r.

phi_iter

The number of initial iterations in the Metropolis-Hastings sampling for phi_i.

beta_cand

The sd of the proposal normal distribution in the initial MH sampling for beta_r.

phi_cand

The sd of the proposal normal distribution in the initial MH sampling for phi_i.

beta_sig0

The sd of the prior normal distribution for beta_r.

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 beta_r.

seed

A user-specified random seed.

Details

Both random intercept and random treatment follow its own DP mixture prior. DP mixture prior:

phi_i~N(0,tau_{i}^{-1})

tau_{i}~G

G~DP(alpha,G_{0})

G_{0}=Gamma(a_tau_star,b_tau_star)

tau_{h}^{*}~G_{0}, h=1,...,H

The blocked Gibbs sampler proposed by Ishwaran and James (2001) is used to sample from the posteriors under the DP mixture prior.

Value

a list containing the following elements:

N

The sample size.

parbeta

A total by p matrix of MCMC draws of beta_r, r=1, ..., p.

parsurv0

A total by length(grids) matrix, each row contains the baseline survival at grids from one iteration.

parsurv

A total by length(grids)*G matrix, each row contains the survival at grids from one iteration. G is the number of sets of user-specified covariate values.

paralpha

A total by 1 vector of MCMC draws of alpha.

paralpha_trt

A total by 1 vector of MCMC draws of alpha_trt.

parphi

A total by I matrix of MCMC draws of phi_i, i=1,...,I.

parphi_trt

A total by I matrix of MCMC draws of phi_trt_i, i=1,...,I.

partau_star

A total by H matrix of MCMC draws of tau_star.

partau_trt_star

A total by H_trt matrix of MCMC draws of tau_trt_star.

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 grids.

S_m

The estimated survival at grids with user-specified covariate values x_user.

grids

The sequance of points where baseline survival function is estimated.

DIC

Deviance information criterion.

NLLK

Negative log pseudo-marginal likelihood.

Author(s)

Chun Pan

Examples

# Number of iterations set to very small for CRAN automatic testing
data(da4)
try2<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da4),
model='clusterPIC_trt_DP', scale.designX=TRUE,scaled=c(1,0),IC=da4[,7],xtrt=da4[,5],
area=da4[,6],binary=c(0,1),I=25,order=3,knots=c(0,2,6,max(da4[,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,
a_alpha=1,b_alpha=1,H=5,a_alpha_trt=1,b_alpha_trt=1,H_trt=5,
a_tau_star=1,b_tau_star=1,a_tau_trt_star=1,b_tau_trt_star=1,
beta_iter=11,phi_iter=11,beta_cand=rep(1,2),phi_cand=1,beta_sig0=10,
x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)

[Package PICBayes version 1.0 Index]