powered by
Fit several models with different response variables
fit_models(df = NULL, yname = NULL, xname = NULL, modeltype = NULL, ...)
A data.frame object
The outcome variable
The predictor variable(s)
A character specifying the model type e.g lm for linear model
Other arguments to specific model types.
A list of model objects that can be used later.
# NOT RUN { fit_models(df=iris,yname=c("Sepal.Length","Sepal.Width"), xname="Petal.Length + Petal.Width",modeltype="lm") # }
Run the code above in your browser using DataLab