- formula
A formula specifying the model.
- data
A data frame in which the variables specified in the formula
will be found. If missing, the variables are searched for in the standard way.
However, it is strongly recommended that you use this argument so that other
generics for bayesics objects work correctly.
- family
A description of the error distribution and link function
to be used in the model. See ?glm for more information.
Currently implemented families are binomial(), poisson(),
negbinom(), and gaussian() (this last acts as a wrapper for
- loss
Either "selfinformation",
or a function that takes in two arguments, the first of which should
be the vector of outcomes and the second should be the expected value of y;
The outcome of the function should be the loss evaluated for each observation.
By default, the self-information loss is used (i.e., the negative log-likelihood).
Note: I really do mean the expected value of y, even for binomial (i.e., n*p).
If family = negbinom(), then a user-supplied loss function should
take three arguments: y, mu, and phi, where phi is the dispersion
parameter (i.e., \(\text{Var}(y) = \mu + \mu^2/\phi\)).
- loss_gradient
If loss is a user-defined function (as opposed to
"selfinformation"), supplying the gradient to the loss will
speed up the algorithm.
- trials
Integer vector giving the number of trials for each
observation if family = binomial().
- n_draws
integer. Number of posterior draws to obtain. If left missing,
the large sample approximation will be used.
- ask_before_full_sampling
logical. If TRUE, the user will be asked
to specify whether they wish to commit to getting the full number of
posterior draws to obtain precise credible interval bounds. Defaults to
TRUE because the bootstrap is computationally intensive. Also,
parallelization via future::plan is highly recommended for full sample.
- CI_level
numeric. Credible interval level.
- ROPE
vector of positive values giving ROPE boundaries for each regression
coefficient. Optionally, you can not include a ROPE boundary for the intercept.
If missing, defaults go to those suggested by Kruchke (2018).
- seed
integer. Always set your seed!!!
- mc_error
If large sample approximation is not used, the number of
posterior draws will ensure that with 99% probability the bounds of the
credible intervals will be within \(\pm\) mc_error.