case1ph
, case2ph
, or case2probit
function to fit the corresponding model.
Give point estimates and credible intervals for regression coefficients and estimation and plot of survival functions.ICBayes(L, ...)
"ICBayes"(L, R, model, status, xcov, x_user=NULL, order=2,
sig0=10, coef_range=5, v0=0.1, a_eta=1, b_eta=1,
knots=NULL, grids=NULL, conf.int=0.95, plot_S=TRUE, chain.save=FALSE,
dd1, niter=11000, burnin=1000, thin=1, ...)
"ICBayes"(formula, data, ...)
model
="case1ph", then 1=left-censored, 0=right-censored. If model
="case2ph", "case2po", or "case2probit", then 0=left-censored, 1=interval-censored, 2=right-censored.b_l
) (see details). Recommended values are 2-4. Default is 2.beta_r
.
Used if model
="case1ph", "case1po", or "case2ph". Default is 10.beta_r
using arms
(see details).
Used if model
="case1ph", "case1po", or "case2ph". Default is 5.gamma_0
. Used if model
="case2po" or "case2probit". Default is 0.1.gamma_l
(see details). Default is 1.gamma_l
(see details). Default is 1.beta_r
's are saved in dd1
.chain.save=TRUE
; a character string specifying the directory to a local .txt file to save the MCMC chains for beta_r
's.ICBayes
containing at least the following elements:
plot_S
is TRUE, also store:
grids
grids
for x_user
arms
is used to sample regression coefficient beta_r
, and coef_range
specifies the support of the indFunc
in arms
. The baseline cumulative hazard in "case1ph"and "case2ph" models and the baseline odds function in "case1po" are modeled by a linear combination of I-splines:
sum_{l=1}^{k}(gamma_l*b_l)
.For "case2probit" model, baseline function is modeled by a linear combination of I-splines:
gamma_0+sum_{l=1}^{k}(gamma_l*b_l)
.
For "case2probit" model, regression coefficient vector beta
is sampled from a multivariate normal distribution.
For more information, please see reference.
Lin, X. and Wang, L. (2009). A semiparametric probit model for case 2 interval-censored failure time data. Statistics in Medicine, 29 972-981.
Lin, X. and Wang, L. (2011). Bayesian proportional odds model for analyzing current status data: univariate, clustered, and multivariate. Communication in Statistics-Simulation and Computation, 40 1171-1181.
Lin, X., Cai, B., Wang, L., and Zhang, Z. (submitted). Bayesian proportional hazards model for general interval-censored data.
case1ph
, case1po
, case2ph
, case2probit
# To save time in checking package, niter is set to only 500 iterations.
# formula form
data(bcdata)
bcdata<-data.frame(bcdata) # must be a data frame
try<-ICBayes(Surv(L,R,type='interval2')~x1,data=bcdata,
model='case2ph',status=bcdata[,3],x_user=c(0,1),knots=seq(0.1,60.1,length=10),
grids=seq(0.1,60.1,by=1),niter=500,burnin=100)
# general form
try2<-ICBayes(model='case2ph',L=bcdata[,1],R=bcdata[,2],status=bcdata[,3],
xcov=bcdata[,4],x_user=c(0,1),knots=seq(0.1,60.1,length=10),
grids=seq(0.1,60.1,by=1),niter=500,burnin=100)
Run the code above in your browser using DataLab