bayesx.bayesx.control(model.name = "bayesx.estim",
family = "gaussian", method = "MCMC", verbose = FALSE,
dir.rm = TRUE, outfile = NULL, replace = FALSE, iterations = 12000L,
burnin = 2000L, maxint = NULL, step = 10L, predict = TRUE,
seed = NULL, hyp.prior = NULL, distopt = NULL, reference = NULL,
zipdistopt = NULL, begin = NULL, level = NULL, eps = 1e-05,
lowerlim = 0.001, maxit = 400L, maxchange = 1e+06, leftint = NULL,
lefttrunc = NULL, state = NULL, algorithm = NULL, criterion = NULL,
proportion = NULL, startmodel = NULL, trace = NULL,
steps = NULL, CI = NULL, bootstrapsamples = NULL, ...)outfile."MCMC", "REML" and "STEP" are: "binomial",
"binomialprobit", "gamma", "gaussian"<"MCMC", "HMCMC" (hierarchical MCMC), "REML" and "STEP".R console
during runtime of bayesx.output files and directory
removed after estimation?bayesx
should store all output files, all output files will be named with model.name as the
base name.TRUE, the files in the output directory specified in argument
outfile will be replaced.step = 50 means, that only every 50th sampled parameter will be stored and used to
compute characteristics of the posterior distribution as means, standard deviatiopredict may be specified to compute
samples of the deviance D, the effective number of parameters pD and the deviance
information criterion DIC of the model. In addition, if set.seed.a
and b for the inverse gamma prior of the overall variance parameter $\sigma^2$, if
the response distribution is Gaussian. numeric, must be a positive readistopt = "nb") or to work withreference is meaningful only if
either family = "multinomial" or family = "multinomialprobit" is specified as the
response distribution. In this case reference defines the zipdistopt = "zip") or to work with the zero inflated negative binomial likelbegin is meaningful only if
family = "cox" is specified as the response distribution. In this case begin specifies
the variable that records when the observation became at risk. This option can be usedeps, the estimation process is assumed to have converged.lefttrunc specifies the name of the
variable containing the left truncation time $T_{tr}$. For observations that are not
truncated, we have to specify $T_{tr} = 0$. If lefttrunc is missing, all observastate specifies the
current state variable of the process."cdescent1" (adaptive algorithms in the methodology manual, see subsection 6.3),
"cdescent2" (adaptive algorithms 1 and 2 with backfitting, see remarks 1criterion = "MSEP" is specified the data are randomly divided into a test- and validation
data set. The test data set is used to estimate the models and the validation data set criterion = "MSEP", see above. In this case the data are randomly divided into a training
and a validation sample. proportion defines the fraction (between 0 and 1) of the "linear", "empty", "full" and "userdefined"."trace_on", "trace_half" and "trace_off".steps iterations the algorithm terminates and a
warning is raised. Setting steps = 0 allows the user to estimate a certCI allows to compute confidence intervals. Options are CI = "none",
confidence intervals conditional on the selected model CI = "MCMCs"CI = MCMCbootstrap".Belitz C, Lang S (2008). Simultaneous selection of variables and smoothing parameters in structured additive regression models. Computational Statistics & Data Analysis, 53, 61--81.
Chambers J. M., Hastie T. J. (eds.) (1992). Statistical Models in S. Chapman & Hall, London.
bayesx.bayesx.control()
set.seed(111)
n <- 500
## regressors
dat <- data.frame(x = runif(n, -3, 3))
## response
dat$y <- with(dat, 10 + sin(x) + rnorm(n, sd = 0.6))
## estimate models with
## bayesx MCMC and REML
b1 <- bayesx(y ~ sx(x), method = "MCMC", data = dat)
b2 <- bayesx(y ~ sx(x), method = "REML", data = dat)
## compare reported output
summary(b1)
summary(b2)Run the code above in your browser using DataLab