Usage
bsgw(formula, data, formulas=formula, weights, subset, na.action=na.fail, init="survreg" , ordweib=FALSE, scale=0, control=bsgw.control(), print.level=2)
bsgw.control(scalex=TRUE, iter=1000, burnin=round(iter/2), sd.thresh=1e-4 , lambda=0.0, lambdas=lambda, nskip=round(iter/10), alpha.min=0.1, alpha.max=10.0 , beta.max=log(20), betas.max=5.0, memlim.gb=8)
"print"(x, ...)
Arguments
formula
Survival formula expressing the time/status variables as well as covariates used in regression on scale parameter. Currently, only right and left censoring is supported. Must include intercept term.
data
Data frame containing the covariates and response variable.
formulas
Formula expressing the covariates used in regression on shape parameter. No left-hand side is necessary since the response variable information is extracted from formula
. Default value is formula
. Must include intercept term.
weights
Optional vector of case weights. *Not supported yet*
subset
Subset of the observations to be used in the fit. *Not supported yet*
na.action
Missing-data filter function. *Not supported yet (only na.fail behavior works)*
init
Initialization behavior. Currently, three options are supported: 1) If init="survreg"
, an ordinary Weibull regression is performed and coefficients are used to initialize the bsgw MCMC run. 2) If init
is a survreg
object, e.g. from a previous Weibull regression fit, the object can be directly passed as parameter. 3) If init
is any other value, or if survreg
produces error or warning, we simply set all coefficients to zero.
ordweib
If TRUE
, a Bayesian ordinary Weibull model is estimated, in which any covariates in formulas
are stripped away, and the inverse-logit transformation in the shape-parameter regression is replaced with a simple exponential transformation. If shrinkage parameters are kept at 0, the result is a Bayesian equivalent of an ordinary Weibull regression.
scale
If scale>0
, the value of the shape parameter is fixed, i.e. not estimated from data.
control
See bsgw.control
for a description of the parameters inside the control
list.
print.level
Controlling verbosity level.
scalex
If TRUE
, each covariate vector is centered and scaled before model estimation. The scaling parameters are saved in return object, and used in subsequent calls to predict
function. Users are strongly advised against turning this feature off, since the quality of Gibbs sampling MCMC is greatly enhanced by covariate centering and scaling.
iter
Number of MCMC samples to draw.
burnin
Number of initial MCMC samples to discard before calculating summary statistics.
sd.thresh
Threshold for standard deviation of a covariate (after possible centering/scaling). If below the threshold, the corresponding coefficient is removed from sampling, i.e. its value is clamped to zero.
lambda
Bayesian Lasso shrinkage parameter for scale-parameter coefficients.
lambdas
Bayesian Lasso shrinkage parameter for shape-parameter coefficients.
nskip
Controlling how often to print progress report during MCMC run. For example, if nskip=10
, progress will be reported after 10,20,30,... samples.
alpha.min
Lower bound on the shape parameter.
alpha.max
Upper bound on the shape parameter.
beta.max
Upper bound on absolute value of coefficients of scale parameter (with the exception of the intercept).
betas.max
Upper bound on absolute value of coefficients of shape parameter (with the exception of the intercept).
memlim.gb
User-specified limit on total memory (in GB) available during prediction. Hazard, cumulative hazard, and survival prediction objects are all three-dimensional arrays which can quickly grow very large, depending on data length, number of MCMC samples collected, and number of time points along which prediction is made.
x
Object of class 'bsgw', usually the result of a call to the bsgw
.
...
Arguments to be passed to/from other methods.