VS | R Documentation |
Perform variable selection using the 95 neighborhood criterion (SNC), median probability model (MPM) or Bayesian false discovery rate (FDR). Note that the Bayesian FDR only applies for each subgroup if there are subgroups.
VS(x, method = "FDR", threshold = NA, subgroup = 1)
x |
fitted object obtained with |
method |
variable selection method to choose from
|
threshold |
SNC threshold value (default 0.5) or the Bayesian expected false discovery rate threshold (default 0.05) |
subgroup |
index(es) of subgroup(s) for visualizing variable selection |
A boolean vector of selected (= TRUE) and rejected (= FALSE) variables for one group or a list for multiple groups
Lee KH, Chakraborty S, Sun J (2015). Survival prediction and variable selection with simultaneous shrinkage and grouping priors. Statistical Analysis and Data Mining, 8:114-127
Newton MA, Noueiry A, Sarkar D, Ahlquist P (2004). Detecting differential gene expression with a semiparametric hierarchical mixture method. Biostatistics, 5(2), 155-76
library("BayesSurvive")
set.seed(123)
# Load the example dataset
data("simData", package = "BayesSurvive")
dataset <- list(
"X" = simData[[1]]$X,
"t" = simData[[1]]$time,
"di" = simData[[1]]$status
)
# Initial value: null model without covariates
initial <- list("gamma.ini" = rep(0, ncol(dataset$X)))
# Hyperparameters
hyperparPooled <- list(
"c0" = 2, # prior of baseline hazard
"tau" = 0.0375, # sd for coefficient prior
"cb" = 20, # sd for coefficient prior
"pi.ga" = 0.02, # prior variable selection probability for standard Cox models
"a" = -4, # hyperparameter in MRF prior
"b" = 0.1, # hyperparameter in MRF prior
"G" = simData$G # hyperparameter in MRF prior
)
# run Bayesian Cox with graph-structured priors
fit <- BayesSurvive(
survObj = dataset, hyperpar = hyperparPooled,
initial = initial, nIter = 50, burnin = 30
)
# show variable selection
VS(fit, method = "FDR")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.