#' mfvb_lm.fit #' #' @param x The x input #' @param y The response #' @param weights weighting #' @param subset subset of data #' @param na.action handling of na #' @param offset Offset term #' @param control Control terms #' #' @return x if all checks pass mfvb_lm.fit <- function( x = stop("no 'x' argument"), y = stop("no 'y' argument"), weights = NULL, subset = NULL, na.action = na.fail, offset = NULL, control = list(), ... ) control <- do.call("mfvb.control", control) x <- check.mfvb.x(x) y <- check.mfvb.y(x, y) mfvb_lm
Source:R/mfvb_lm.R
mfvb_lm.Rd
Fit a linear regression model using mean-field variational Bayes approximation.
Usage
mfvb_lm(
formula,
data,
subset,
weights,
na.action,
prior = NULL,
contrasts = NULL,
x = FALSE,
y = FALSE,
...
)
Arguments
- formula
an object of class [stats::formula].
- data
an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which lm is called.
- subset
subset of data
- weights
weighting
- na.action
handling of na
- prior
a list with elements (mu0, Sigma0, a, b) giving the model prior parameters.
- contrasts
design contrasts
- x
return design matrix
- y
return response vector
- ...
further arguments to `vb_lm`