Package ICBayes. September 24, 2017

Similar documents
Package ICGOR. January 13, 2017

The nltm Package. July 24, 2006

Package LBLGXE. R topics documented: July 20, Type Package

Package SimSCRPiecewise

Package CoxRidge. February 27, 2015

Package GORCure. January 13, 2017

Package idmtpreg. February 27, 2018

Package darts. February 19, 2015

Package JointModel. R topics documented: June 9, Title Semiparametric Joint Models for Longitudinal and Counting Processes Version 1.

Package sbgcop. May 29, 2018

Package bhrcr. November 12, 2018

Package flexcwm. R topics documented: July 11, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.0.

Package spef. February 26, 2018

Package flexcwm. R topics documented: July 2, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.1.

Package threg. August 10, 2015

Package crrsc. R topics documented: February 19, 2015

Package sklarsomega. May 24, 2018

Package ShrinkCovMat

Package BayesNI. February 19, 2015

Simple techniques for comparing survival functions with interval-censored data

Package BNN. February 2, 2018

Package factorqr. R topics documented: February 19, 2015

Package effectfusion

STATISTICAL ANALYSIS OF MULTIVARIATE INTERVAL-CENSORED FAILURE TIME DATA. A Dissertation Presented. the Faculty of the Graduate School

The sbgcop Package. March 9, 2007

Package anoint. July 19, 2015

Package survidinri. February 20, 2015

Package reinforcedpred

Semiparametric Regression Analysis of Bivariate Interval-Censored Data

Package clogitboost. R topics documented: December 21, 2015

Package Rsurrogate. October 20, 2016

Package pssm. March 1, 2017

Package jmcm. November 25, 2017

Package gtheory. October 30, 2016

Package RcppSMC. March 18, 2018

Package ARCensReg. September 11, 2016

Package icmm. October 12, 2017

Package penalized. February 21, 2018

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy

Luke B Smith and Brian J Reich North Carolina State University May 21, 2013

Package SPreFuGED. July 29, 2016

Package rnmf. February 20, 2015

Package basad. November 20, 2017

Package mixture. R topics documented: February 13, 2018

Package FDRreg. August 29, 2016

Package SimCorMultRes

Package metafuse. October 17, 2016

Package zic. August 22, 2017

Package msir. R topics documented: April 7, Type Package Version Date Title Model-Based Sliced Inverse Regression

Package CPE. R topics documented: February 19, 2015

Package MonoPoly. December 20, 2017

A general mixed model approach for spatio-temporal regression data

Frailty Probit Models for Clustered Interval- Censored Failure Time Data

Package mpmcorrelogram

Package sodavis. May 13, 2018

Package drgee. November 8, 2016

Package IGG. R topics documented: April 9, 2018

Package metansue. July 11, 2018

Package eel. September 1, 2015

STATISTICAL ANALYSIS OF MULTIVARIATE INTERVAL-CENSORED FAILURE TIME DATA

Package ExtremeBounds

Package TruncatedNormal

Package accelmissing

Package LIStest. February 19, 2015

Package codadiags. February 19, 2015

Package weightquant. R topics documented: December 30, Type Package

0.1 normal.bayes: Bayesian Normal Linear Regression

Multivariate Survival Analysis

Lecture 7 Time-dependent Covariates in Cox Regression

Package CovSel. September 25, 2013

Package RTransferEntropy

Package bspmma. R topics documented: February 19, 2015

Package covtest. R topics documented:

Package EMVS. April 24, 2018

Package horseshoe. November 8, 2016

0.1 poisson.bayes: Bayesian Poisson Regression

Package bayeslm. R topics documented: June 18, Type Package

Package scio. February 20, 2015

Package RI2by2. October 21, 2016

Package spatial.gev.bma

Package beam. May 3, 2018

Package IsingFit. September 7, 2016

Semiparametric Regression Analysis of Panel Count Data and Interval-Censored Failure Time Data

Package hot.deck. January 4, 2016

Package penmsm. R topics documented: February 20, Type Package

Package mlmmm. February 20, 2015

Package gma. September 19, 2017

Package mmm. R topics documented: February 20, Type Package

Package TwoStepCLogit

Package netcoh. May 2, 2016

Introduction to lnmle: An R Package for Marginally Specified Logistic-Normal Models for Longitudinal Binary Data

Package mbvs. August 28, 2018

Package msbp. December 13, 2018

Package BayesTreePrior

Package sscor. January 28, 2016

Package r2glmm. August 5, 2017

Package spcov. R topics documented: February 20, 2015

Package face. January 19, 2018

Package ensemblebma. R topics documented: January 18, Version Date

Package lmm. R topics documented: March 19, Version 0.4. Date Title Linear mixed models. Author Joseph L. Schafer

Transcription:

Package ICBayes September 24, 2017 Title Bayesian Semiparametric Models for Interval-Censored Data Version 1.1 Date 2017-9-24 Author Chun Pan, Bo Cai, Lianming Wang, and Xiaoyan Lin Maintainer Chun Pan <chunpan2003@hotmail.com> Contains functions to fit Bayesian semiparametric regression survival models (proportional hazards model, proportional odds model, and probit model) to interval-censored time-to-event data. License GPL (>= 2) LazyLoad yes Depends HI, survival, coda NeedsCompilation no Repository CRAN Date/Publication 2017-09-24 21:00:21 UTC R topics documented: ICBayes-package...................................... 2 bcdata............................................ 2 case1ph........................................... 3 case1po........................................... 5 case2ph........................................... 6 case2probit......................................... 8 coef.icbayes........................................ 9 ICBayes........................................... 10 loglik.icbayes....................................... 12 lungdata........................................... 13 plot.icbayes........................................ 14 summary.icbayes...................................... 14 SurvtoLR.......................................... 15 Index 16 1

2 bcdata ICBayes-package Bayesian Semiparametric Models for Interval-Censored Data Details This package contains functions to fit several survival regression models (including the proportional hazard model, the proportional odds model, and the probit model) for interval-censored data under Bayesian framework. Estimations are available for both regression coefficients and survival functions.the Bayesian model selection criterion log pseudo marginal likelihood (LPML) is computed. Package: ICBayes Type: Package Version: 1.1 Date: 2016-12-24 License: GPL>=2 LazyLoad: yes Author(s) Chun Pan, Bo Cai, Lianming Wang, and Xiaoyan Lin Maintainer: Chun Pan <chunpan2003@hotmail.com> bcdata Breast Cosmesis Data A general interval-censored data set analyzed in Finkelstein and Wolfe (1985) and can be found in Sun (2006, page 7). Early breast cancer patients treated with radiotheraph alone or radiotherapy with adjuvent chemotherapy were examined periodically for breast retraction. Time was measured in months. data(bcdata)

case1ph 3 Format Source A matrix with 96 rows and 4 columns. Each row (L, R, status, x1) corresponds to a patient in the study. L a numeric vector of left-points of observed time intervals R a numeric vector of right-points of observed time intervals status a vector of censorship indicators: 0=left-censored, 1=interval-censored, and 2=right-censored x1 a vector of treatment indicators: 0=radiotherapy alone, 1=radiotherapy with adjuvent chemotherapy Finkelstein, D. M. and Wolfe, R. A. (1985). A semiparametric model for regression analysis of interval-censored failure time data. Biometrics 41 933-945. Sun, J. (2006). The Statistical Analysis of Interval-censored Failure Time Data. Springer, New York. Examples data(bcdata) case1ph PH model for case 1 interval-censored data Fit proportional hazards model for case 1 interval-censored data. Use MCMC method to estimate regression coefficients, baseline survival, and survival at user-specified covariate values. case1ph(l, R, status, xcov, x_user, order, sig0, coef_range, a_eta, b_eta, knots,, niter, seed) L a numeric vector of left timepoints of observed time intervals. R a numeric vector of right timepoints of observed time intervals. status a vector of censoring indicators: 1=left-censored, 0=right-censored. xcov a matrix of covariates, each column corresponds to one covariate. x_user a user specified vector of covariate values order degree of I-splines (b_l) (see details). Recommended values are 2-4. sig0 standard deviation of normal prior for each regression coefficient beta_r.

4 case1ph coef_range a_eta b_eta knots niter seed specify support domain of target density for beta_r sampled by arms (see details). shape parameter of Gamma prior for gamma_l (see details). rate parameter of Gamma prior for gamma_l (see details). a sequence of points to define I-splines. a sequence of points where baseline survival function is to be estimated. total number of iterations of MCMC chains. a user specified random seed, default is NULL. Details The baseline cumulative hazard is approximated by a linear combination of I-splines: sum_{l=1}^{k}(gamma_l*b_l). Function arms is used to sample each regression coefficient beta_r, and coef_range specifies the support of the indfunc in arms. a list containing the following elements: parbeta a niter by p matrix of MCMC draws of beta_r, r=1,..., p. parsurv0 parsurv parfinv a niter by length() matrix, each row contains the baseline survival at from one iteration. a niter by length()*g matrix, each row contains the survival at from one iteration. G is the number of sets of user-specified covariate values. a niter by n matrix, each row contains the inverse PDF of observed intervalcensored data from one iteration. This is used for computing LPML later. a sequence of points where baseline survival is estimated. Author(s) Bo Cai References Cai, B., Lin, X., and Wang, L. (2011). Bayesian proportional hazards model for current status data with monotone splines. Computational Statistics and Data Analysis, 55 2644-2651.

case1po 5 case1po PO model for case 1 interval-censored data Fit proportional odds model for case 1 interval-censored data. Use MCMC method to estiamte regression coefficients, baseline survival, and survival function at user-specified covariate values. case1po(l, R, status, xcov, x_user, order, sig0, coef_range, a_eta, b_eta, knots,, niter, seed) L R status xcov x_user a numeric vector of left timepoints of observed time intervals. a numeric vector of right timepoints of observed time intervals. a vector of censoring indicators: 1=left-censored, 0=right-censored. a matrix of covariates, each column corresponds to one covariate. a vector of user specified covariate values. order degree of I-splines (b_l) (see details). Recommended values are 2-4. sig0 coef_range a_eta b_eta knots niter seed standard deviation of normal prior for each regression coefficient beta_r. specify support domain of target density for beta_r sampled by arms (see details). shape parameter of Gamma prior for gamma_l (see details). rate parameter of Gamma prior for gamma_l (see details). a sequence of points to define I-splines. a sequence of points where baseline survival function is to be estimated. total number of iterations of MCMC chains. a user specified random seed, default is NULL. Details The baseline odds function is approximated by a linear combination of I-splines: sum_{l=1}^{k}(gamma_l*b_l). Function arms is used to sample each regression coefficient beta_r, and coef_range specifies the support of the indfunc in arms.

6 case2ph a list containing the following elements: parbeta a niter by p matrix of MCMC draws of beta_r, r=1,..., p. parsurv0 parsurv parfinv Author(s) Xiaoyan Lin References a niter by length() matrix, each row contains the baseline survival at from one iteration. a niter by length()*g matrix, each row contains the survival at from one iteration. G is the number of sets of user-specified covariate values. a niter by n matrix, each row contains the inverse PDF of observed intervalcensored data from one iteration. This is used for computing LPML later. 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. case2ph PH model for general interval-censored data Fit proportional hazards model for general interval-censored data. Use MCMC method to estimate regression coefficients, baseline survival, and survival function at user-specified covariate values. case2ph(l, R, status, xcov, x_user, order, sig0, coef_range, a_eta, b_eta, knots,, niter, seed) L R status xcov x_user a numeric vector of left timepoints of observed time intervals. a numeric vector of right timepoints of observed time intervals. a vector of censoring indicators: 1=left-censored, 0=right-censored. a matrix of covariates, each column corresponds to one covariate. a user specified vector of covariate values. order degree of I-splines (b_l) (see details). Recommended values are 2-4. sig0 coef_range standard deviation of normal prior for each regression coefficient beta_r. specify support domain of target density for beta_r sampled by arms (see details).

case2ph 7 a_eta b_eta knots niter seed shape parameter of Gamma prior for gamma_l (see details). rate parameter of Gamma prior for gamma_l (see details). a sequence of points to define I-splines. a sequence of points where baseline survival function is to be estimated. total number of iterations of MCMC chains. a user specified random seed, default is NULL. Details The baseline cumulative hazard is modeled by a linear combination of I-splines: sum_{l=1}^{k}(gamma_l*b_l). Function arms is used to sample each regression coefficient beta_r, and coef_range specifies the support of the indfunc in arms. a list containing the following elements: parbeta a niter by p matrix of MCMC draws of beta_r, r=1,..., p. parsurv0 parsurv parfinv a niter by length() matrix, each row contains the baseline survival at from one iteration. a niter by length()*g matrix, each row contains the survival at from one iteration. G is the number of sets of user-specified covariate values. a niter by n matrix, each row contains the inverse PDF of observed intervalcensored data from one iteration. This is used for computing LPML later. a sequence of points where baseline survival is estimated. Author(s) Bo Cai References Lin, X., Cai, B., Wang, L., and Zhang, Z. (2015). Bayesian proportional hazards model for general interval-censored data. Lifetime Data Analysis, 21 470-490.

8 case2probit case2probit Probit model for general interval-censored data Fit probit model to general interval-censored data. Use MCMC method to estimate regression coefficients, baseline survival, and survival function at user-specified covariate values. case2probit(l, R, status, xcov, x_user, order, v0, a_eta, b_eta, knots,, niter, seed) L R status xcov x_user a numeric vector of left timepoints of observed time intervals. a numeric vector of right timepoints of observed time intervals. a vector of censoring indicators: 0=left-censored, 1=interval-censored, 2=rightcensored. a matrix of covariates, each column corresponds to one covariate. a vector of user specified covariate values. order degree of I-splines (b_l) (see details). Recommended values are 2-4. v0 a_eta b_eta knots niter seed precision of normal prior for gamma_0. shape parameter of Gamma prior for gamma_l (see details). rate parameter of Gamma prior for gamma_l (see details). a sequence of points to define I-splines. a sequence of points where baseline survival function is to be estimated. Default is minimum observed time points. total number of iterations of MCMC chains. a user specified random seed, default is NULL. Details The baseline function is modeled by a linear combination of I-splines: gamma_0+sum_{l=1}^{k}(gamma_l*b_l). Regression coefficient vector beta is sampled from a multivariate normal distribution. For more information, please see reference.

coef.icbayes 9 a list containing the following elements: parbeta a niter by p matrix of MCMC draws of beta_r, r=1,..., p. parsurv0 parsurv parfinv a niter by length() matrix, each row contains the baseline survival at from one iteration. a niter by length()*g matrix, each row contains the survival at from one iteration. G is the number of sets of user-specified covariate values. a niter by n matrix, each row contains the inverse PDF of observed intervalcensored data from one iteration. This is used for computing LPML later. a sequence of points where baseline survival is estimated. Author(s) Lianming Wang and Xiaoyan Lin. R version by Bo Cai. References Lin, X. and Wang, L. (2009). A semiparametric probit model for case 2 interval-censored failure time data. Statistics in Medicine 29 972-981. coef.icbayes coef method for class ICBayes extracts estimated regression coefficient(s) ## S3 method for class 'ICBayes' coef(object,...) object class ICBayes object... other arguments if any a scalar or vector

10 ICBayes ICBayes PH, PO, and Probit Models for Interval-Censored Data Calls the 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,...) ## Default S3 method: 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, =NULL, conf.int=0.95, niter=5000, burnin=1000, thin=1, seed=null,...) ## S3 method for class 'formula' ICBayes(formula, data,...) L R model a column vector of left-points of observed time intervals. a column vector of right-points of observed time intervals. Use NA to denote infinity. a character string specifying the type of model. Possible values are "case1ph", "case2ph", "case2po", and "case2probit". status a vector of censoring indicators. If model="case1ph", then 1=left-censored, 0=right-censored. If model="case2ph", "case2po", or "case2probit", then 0=leftcensored, 1=interval-censored, 2=right-censored. xcov x_user order sig0 coef_range v0 a matrix of covariates, each column corresponds to one covariate. a vector of covariate values, default is NULL. Need to specify for survival estimation. degree of I-splines (b_l) (see details). Recommended values are 2-4. Default is 2. standard deviation of normal prior for each regression coefficient beta_r. Used if model="case1ph", "case1po", or "case2ph". Default is 10. specify support domain of target density for beta_r using arms (see details). Used if model="case1ph", "case1po", or "case2ph". Default is 5. precision of normal prior for gamma_0. Used if model="case2po" or "case2probit". Default is 0.1. a_eta shape parameter of Gamma prior for gamma_l (see details). Default is 1. b_eta rate parameter of Gamma prior for gamma_l (see details). Default is 1.

ICBayes 11 knots a sequence of points to define I-splines. Default is a sequence of time points from min to max with length=10. a sequence of points where survival function is to be estimated. Defalult is a sequence of time points from min to max with length=100. conf.int level for a two-sided credible interval on coefficient estimate(s). Default is 0.95. niter total number of iterations of MCMC chains. Default is 11000. burnin number of iterations to discard at the beginning of an MCMC run. Default is 1000. thin specify thinning of MCMC draws. Default is 1. seed a use-specified random seed. Default is NULL. formula a symbolic description of the model to be fit. data a data frame containing the variables in the model.... values passed to other functions. Details For "case1ph", "case1po", and "case2ph" models, function 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. an object of class ICBayes containing the following elements: coef coef_ssd coef_ci LPML S0_m S_m S_ci mcmc_beta mcmc_surv a vector of regression coefficient estimates a vector of sample standard deviations of regression coefficient estimates credible intervals for regression coefficients log pseudo marginal likelihood for model selection, the larger the better the sequance of points where baseline survival functions is estimated estimated baseline survival probabilities at a length()*g by 2 matrix that contains estimated survival probabilities at for x_user, where G is the number of sets of covariate values credible intervals for survival probablities at for x_user a niter by p matrix of mcmc chains for regression coefficients, where niter is the number of iterations and p is the number of covariates a niter by length{}*g matrix of mcmc chains for survival probabilities at, where niter is the number of iterations and G is the number of sets of covariate values

12 loglik.icbayes Author(s) Chun Pan References Cai, B., Lin, X., and Wang, L. (2011). Bayesian proportional hazards model for current status data with monotone splines. Computational Statistics and Data Analysis, 55 2644-2651. 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. See Also case1ph, case1po, case2ph, case2probit Examples # 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), =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), =seq(0.1,60.1,by=1),niter=500,burnin=100) loglik.icbayes loglik method for class ICBayes log-likelihood of the observed interval-censored data estimated by log pseudo marginal likelihood ## S3 method for class 'ICBayes' loglik(object,...)

lungdata 13 object class ICBayes object... other arguments if any a scalar lungdata Lung cancer data A case 1 interval-censored data set first presented in Hoel and Walberg (1972) and can be found in Sun (2006, page 6). In the study, 144 male RFM mice were raised under two conditions: conventional environment (96 mice) and germfree environment (48 mice). Each mouse was "sacrificed" at a random time to see if it had lung tumors. Time was measured in days. data(lungdata) Format A matrix with 144 rows and 4 columns. Each row (L, R, status, treatment) corresponds to a mouse in the study. L left-points of observed intervals R right-points of observed intervals status censorship indicator: 1=left-censor and 0=right-censor treatment treatment indicator: 1=conventional environment, 2=germfree environment Source Hoel, D. G. and Walberg, H. E. (1972). Statistical analysis of survival experiments. Journal of the National Cancer Institute 49 361-372. Sun, J. (2006). The Statistical Analysis of Interval-censored Failure Time Data. Springer, New York. Examples data(lungdata)

14 summary.icbayes plot.icbayes Plot baseline survival function Plot estimated baseline survival function at, which are stored in the ICBayes object. ## S3 method for class 'ICBayes' plot(x, y,...) x y... other arguments A plot of baseline survival function. Examples a sequence of points where baseline survival probabilities are estimated estiamted baseline survival at data(bcdata) try<-icbayes(surv(l,r,type='interval2')~x1,data=data.frame(bcdata), model='case2ph',status=bcdata[,3],p=1,x_user=c(1), knots=seq(0.1,60.1,length=10),=seq(0.1,60.1,by=1),niter=500,burnin=100) plot.icbayes(try$,try$s0_m) summary.icbayes summary method for class ICBayes present output from function ICBayes ## S3 method for class 'ICBayes' summary(object,...) object class ICBayes object... other arguments if any

SurvtoLR 15 an object of class ICBayes containing the following elements coef coef_ssd coef_ci LPML a named vector of coefficient estimates a named vector of sample standard deviations of coefficient estimates a named matrix of credible intervals for coefficients log pseudo marginal likelihood SurvtoLR Transform Surv object to data matrix with L and R columns Take a Surv object and transforms it into a data matrix with two columns, L and R, representing the left and right points of observed time intervals. For right-censored data, R = NA. SurvtoLR(x) x a Surv object Details The input Surv object should be in the form of Surv(L,R,type='interval2'), where R = NA for right-censored data. A data matrix with two variables: L R left-points of observed time intervals right-points of observed time intervals References Michael P. Fay, Pamela A. Shaw (2010). Exact and Asymptotic Weighted Logrank Tests for Interval Censored Data: The interval R Package. Journal of Statistical Software, 36 1-34. Examples library(survival) L<-c(45,6,0,46) R<-c(NA,10,7,NA) y<-surv(l,r,type='interval2') SurvtoLR(y)

Index Topic case 1 interval-censored data ICBayes, 10 Topic case 2 interval-censored data ICBayes, 10 Topic datasets bcdata, 2 lungdata, 13 arms, 4 7, 10, 11 bcdata, 2 case1ph, 3, 12 case1po, 5, 12 case2ph, 6, 12 case2probit, 8, 12 coef.icbayes, 9 ICBayes, 10, 14 ICBayes-package, 2 loglik.icbayes, 12 lungdata, 13 plot.icbayes, 14 summary.icbayes, 14 Surv, 15 SurvtoLR, 15 16