# psbcGL: Function to Fit the Penalized Semiparametric Bayesian Cox... In psbcGroup: Penalized Parametric and Semiparametric Bayesian Survival Models with Shrinkage and Grouping Priors

## Description

Penalized semiparametric Bayesian Cox (PSBC) model with group lasso prior is implemented to analyze survival data with high-dimensional covariates.

## Usage

 ```1 2``` ```psbcGL(survObj, priorPara, initial, rw=FALSE, mcmcPara, num.reps, thin, chain = 1, save = 1000) ```

## Arguments

 `survObj` The list containing observed data from `n` subjects; `t`, `di`, `x` `priorPara` The list containing prior parameter values; `eta0`, `kappa0`, `c0`, `r`, `delta`, `s`, `groupInd` `initial` The list containing the starting values of the parameters; `beta.ini`, `lambdaSq`, `sigmaSq`, `tauSq`, `h` `rw` When setting to "TRUE", the conventional random walk Metropolis Hastings algorithm is used. Otherwise, the mean and the variance of the proposal density is updated using the jumping rule described in Lee et al. (2011). `mcmcPara` The list containing the values of options for Metropolis-Hastings step for β; `numBeta`, `beta.prop.var` `num.reps` the number of iterations of the chain `thin` thinning `chain` the numeric name of chain in the case when running multiple chains. `save` frequency of storing the results in .Rdata file. For example, by setting "save = 1000", the algorithm saves the results every 1000 iterations.

## Details

 `t` a vector of `n` times to the event `di` a vector of `n` censoring indicators for the event time (1=event occurred, 0=censored) `x` covariate matrix, `n` observations by `p` variables `eta0` scale parameter of gamma process prior for the cumulative baseline hazard, eta0 > 0 `kappa0` shape parameter of gamma process prior for the cumulative baseline hazard, kappa0 > 0 `c0` the confidence parameter of gamma process prior for the cumulative baseline hazard, c0 > 0 `r` the shape parameter of the gamma prior for λ^2 `delta` the rate parameter of the gamma prior for λ^2 `s` the set of time partitions for specification of the cumulative baseline hazard function `groupInd` a vector of `p` group indicator for each variable `beta.ini` the starting values for β `lambdaSq` the starting value for λ^2 `sigmaSq` the starting value for σ^2 `tauSq` the starting values for τ^2 `h` the starting values for h `numBeta` the number of components in β to be updated at one iteration `beta.prop.var` the variance of the proposal density for β when `rw` is set to "TRUE"

## Value

`psbcGL` returns an object of class `psbcGL`

 `beta.p` posterior samples for β `h.p` posterior samples for h `tauSq.p` posterior samples for τ^2 `mcmcOutcome` The list containing posterior samples for the remaining model parameters

## Note

To fit the PSBC model with the ordinary Bayesian lasso prior (Lee et al., 2011), `groupInd` needs to be set to `1:p`. If the prespecified value of `save` is less than that of `num.reps`, the results are saved as `.Rdata` file under the directory `working directory/mcmcOutcome`.

## Author(s)

Kyu Ha Lee, Sounak Chakraborty, (Tony) Jianguo Sun

## References

Lee, K. H., Chakraborty, S., and Sun, J. (2011). Bayesian Variable Selection in Semiparametric Proportional Hazards Model for High Dimensional Survival Data. The International Journal of Biostatistics, Volume 7, Issue 1, Pages 1-32.

Lee, K. H., Chakraborty, S., and Sun, J. (2015). Survival Prediction and Variable Selection with Simultaneous Shrinkage and Grouping Priors. Statistical Analysis and Data Mining, Volume 8, Issue 2, pages 114-127.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65``` ```## Not run: # generate some survival data set.seed(204542) p = 20 n = 100 beta.true <- c(rep(4, 10), rep(0, (p-10))) CovX<-matrix(0,p,p) for(i in 1:10){ for(j in 1:10){ CovX[i,j] <- 0.5^abs(i-j) } } diag(CovX) <- 1 survObj <- list() survObj\$x <- apply(rmvnorm(n, sigma=CovX, method="chol"), 2, scale) pred <- as.vector(exp(rowSums(scale(survObj\$x, center = FALSE, scale = 1/beta.true)))) t <- rexp(n, rate = pred) cen <- runif(n, 0, 8) survObj\$t <- pmin(t, cen) survObj\$di <- as.numeric(t <= cen) priorPara <- list() priorPara\$eta0 <- 1 priorPara\$kappa0 <- 1 priorPara\$c0 <- 2 priorPara\$r <- 0.5 priorPara\$delta <- 0.0001 priorPara\$s <- sort(survObj\$t[survObj\$di == 1]) priorPara\$s <- c(priorPara\$s, 2*max(survObj\$t) -max(survObj\$t[-which(survObj\$t==max(survObj\$t))])) priorPara\$J <- length(priorPara\$s) priorPara\$groupInd <- c(rep(1,10),2:11) mcmcPara <- list() mcmcPara\$numBeta <- p mcmcPara\$beta.prop.var <- 1 initial <- list() initial\$beta.ini <- rep(0.5, p) initial\$lambdaSq <- 1 initial\$sigmaSq <- runif(1, 0.1, 10) initial\$tauSq <- rexp(length(unique(priorPara\$groupInd)), rate = initial\$lambdaSq/2) initial\$h <- rgamma(priorPara\$J, 1, 1) rw = FALSE num.reps = 20000 chain = 1 thin = 5 save = 5 fitGL <- psbcGL(survObj, priorPara, initial, rw=FALSE, mcmcPara, num.reps, thin, chain, save) ## End(Not run) ```

psbcGroup documentation built on May 2, 2019, 5:39 a.m.