Learn R Programming

mmirestriktor (version 0.3.1)

mmir_model: Fit Restriktor Supported Model

Description

mmir_model() is a function for the 'mmirestriktor' package that fits a model to data using one of the specified engines ('lm', 'glm', or 'rlm'). It also provides an option to standardize numeric variables.

Usage

mmir_model(formula, data, engine = "lm", standardize = TRUE, ...)

Value

An object representing the fitted model, of class 'lm', 'glm', or 'rlm' depending on the engine used.

Arguments

formula

An object of class 'formula' (or one that can be coerced to that class): a symbolic description of the model to be fitted.

data

A data frame containing the variables in the model.

engine

A character string indicating which engine to use for model fitting. Can be one of 'lm', 'glm', or 'rlm'. Default is 'lm'.

standardize

Logical. If TRUE, numeric predictor variables in 'data' are standardized before fitting the model. Default is TRUE.

...

Additional arguments to be passed to the model fitting function (lm, glm, or rlm).

Details

The mmir_model() function serves as a utility function for fitting models in the 'mmirestriktor' package. It supports different modeling engines and allows for variable standardization.

See Also

Examples

Run this code
mod <- mmir_model(mpg ~ hp + wt, data = mtcars, engine = "lm")
summary(mod)

Run the code above in your browser using DataLab