psbcSpeedUp {psbcSpeedUp}R Documentation

Function to Fit the Bayesian Cox Lasso Model

Description

This a speed-up and extended version of the function psbcGL() in the R package psbcGrouup

Usage

psbcSpeedUp(
  survObj = NULL,
  p = 0,
  q = 0,
  hyperpar = list(),
  nIter = 1,
  burnin = 0,
  thin = 1,
  rw = FALSE,
  outFilePath,
  tmpFolder = "tmp/"
)

Arguments

survObj

a list containing observed data from n subjects; t, di, x. See details for more information

p

number of covariates for variable selection

q

number of mandatory covariates

hyperpar

a list containing prior parameter values; among c('groupInd', 'beta.ini', 'eta0', 'kappa0', 'c0', 'r', 'delta', 'lambdaSq', 'sigmaSq', 'tauSq', 's', 'h', 'beta.prop.var', 'beta.clin.var'). See details for more information

nIter

the number of iterations of the chain

burnin

number of iterations to discard at the start of the chain. Default is 0

thin

thinning MCMC intermediate results to be stored

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)

outFilePath

path to where the output files are to be written

tmpFolder

the path to a temporary folder where intermediate data files are stored (will be erased at the end of the chain). It is specified relative to outFilePath

Details

psbcSpeedUp

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
groupInd a vector of p group indicator for each variable
beta.ini the starting values for coefficients \beta
eta0 scale parameter of gamma process prior for the cumulative baseline hazard, \eta_0 > 0
kappa0 shape parameter of gamma process prior for the cumulative baseline hazard, \kappa_0 > 0
c0 the confidence parameter of gamma process prior for the cumulative baseline hazard, c_0 > 0
r the shape parameter of the gamma prior for \lambda^2
delta the rate parameter of the gamma prior for \lambda^2
lambdaSq the starting value for \lambda^2
sigmaSq the starting value for \sigma^2
tauSq the starting values for \tau^2
s the set of time partitions for specification of the cumulative baseline hazard function
h the starting values for h
beta.prop.var the variance of the proposal density for \beta in a random walk M-H sampler
beta.clin.var the starting value for the variance of \beta

Value

An object of class psbcSpeedUp is saved as obj_psbcSpeedUp.rda in the output file, including the following components:

References

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

Zucknick M, Saadati M, and Benner A (2015). Nonidentical twins: Comparison of frequentist and Bayesian lasso for Cox models. Biometrical Journal, 57(6):959–81.

Examples


# Load the example dataset
data("exampleData", package = "psbcSpeedUp")
p <- exampleData$p
q <- exampleData$q
survObj <- exampleData[1:3]

# Set hyperparameters
mypriorPara <- list(
  "groupInd" = 1:p, "eta0" = 0.02, "kappa0" = 1, "c0" = 2, "r" = 10 / 9,
  "delta" = 1e-05, "lambdaSq" = 1, "sigmaSq" = runif(1, 0.1, 10),
  "beta.prop.var" = 1, "beta.clin.var" = 1
)


# run Bayesian Lasso Cox
library("psbcSpeedUp")
set.seed(123)
fitBayesCox <- psbcSpeedUp(survObj,
  p = p, q = q, hyperpar = mypriorPara,
  nIter = 10, burnin = 0, outFilePath = tempdir()
)
plot(fitBayesCox, color = "blue")



[Package psbcSpeedUp version 2.0.7 Index]