bayesx.bayesx.control(model.name = "bayesx.estim",
family = "gaussian", method = "MCMC", verbose = TRUE,
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, ...)character, specify a base name model output files are named
with in outfile.character, specify the distribution used for the model, options
for all methods, "MCMC", "REML" and "STEP" are: "binomial",
"binomialcharacter, which method should be used for estimation, options
are "MCMC", "HMCMC" (hierarchical MCMC), "REML" and "STEP".logical, should the the output files and directory
removed after estimation?TRUE, the files in the output directory specified in argument
outfile will be replaced.integer, sets the number of iterations for the sampler.integer, sets the burn-in period of the sampler.integer, if first or second order random walk priors are
specified, in some cases the data will be slightly grouped: The range between the minimal and
maximal observed covariate values will beinteger, defines the thinning parameter for MCMC simulation.
E.g., step = 50 means, that only every 50th sampled parameter will be stored and used to
compute characteristics of tlogical, option predict may be specified to compute
samples of the deviance D, the effective number of parameters pD and the deviance
information criterinumeric, defines the value of the hyper-parameters a
and b for the inverse gamma prior of the overall variance parameter $\sigma^2$, if
the response distribution is Gcharacter, defines the implemented formulation for the negative
binomial model if the response distribution is negative binomial. The two possibilities are to
work with a negative binomial lcharacter, option reference is meaningful only if
either family = "multinomial" or family = "multinomialprobit" is specified as the
response distributicharacter, defines the zero inflated distribution for the
regression analysis. The two possibilities are to work with a zero infated Poisson distribution
(zipdistopt = "zip") orcharacter, option begin is meaningful only if
family = "cox" is specified as the response distribution. In this case begin specifies
the variable that records when integer, besides the posterior means and medians, numeric, defines the termination criterion of the estimation
process. If both the relative changes in the regression coefficients and the variance parameters
are less than eps, thnumeric, since small variances are close to the boundary of
their parameter space, the usual fisher-scoring algorithm for their determination has to be
modified. If the fraction of the penalizinteger, defines the maximum number of iterations to be used in
estimation. Since the estimation process will not necessarily converge, it may be useful to
define an upper bound for the numbernumeric, defines the maximum value that is allowed for
relative changes in parameters in one iteration to prevent the program from crashing because of
numerical problems. Note, that character, gives the name of the variable that contains the
lower (left) boundary $T_{lo}$ of the interval $[T_{lo}, T_{up}]$ for an interval
censored observation. for right censored or uncecharacter, option 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} character, for multi-state models, state specifies the
current state variable of the process.character, specifies the selection algorithm. Possible values
are "cdescent1" (adaptive algorithms in the methodology manual, see subsection 6.3),
"cdescent2" (adapcharacter, specifies the goodness of fit criterion. If
criterion = "MSEP" is specified the data are randomly divided into a test- and validation
data set. The test data set is unumeric, this option may be used in combination with option
criterion = "MSEP", see above. In this case the data are randomly divided into a training
and a validation sample. propcharacter, defines the start model for variable selection.
Options are "linear", "empty", "full" and "userdefined".character, specifies how detailed the output in the output window
will be. Options are "trace_on", "trace_half" and "trace_off".integer, defines the maximum number of iterations. If the
selection process has not converged after steps iterations the algorithm terminates and a
warning is raised. Setting character, compute confidence intervals for linear and nonlinear
terms. Option CI allows to compute confidence intervals. Options are CI = "none",
confidence intervinteger, defines the number of bootstrap samples used
for "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