makilabReg: Creates and exports a table of LM models with multiple DVs...

View source: R/makilabReg.R

makilabRegR Documentation

Creates and exports a table of LM models with multiple DVs and IVs.

Description

Creates and exports a table of LM models with multiple DVs and IVs.

Usage

makilabReg(m1, ..., excel_export = FALSE, filename = NULL, sheetname = NULL)

Arguments

m1

An object output from lm() or a list of such objects.

...

More models from lm().

excel_export

A bool for whether not you want an excel export.

filename

String of the filename to export to. Defaults to 'Data_YYYY-MM-DD.xlsx' where YYYY-MM-DD is today's date.

sheetname

String to be used as the sheet name. Defaults to 'LMi' where i is the number of LMs in the file.

Value

The table of model summaries and (optional) an excel sheet added to the file.

Examples

data(iris)
library(makilab)
m1 <- lm(Petal.Length~Petal.Width+Species, data = iris)
m2 <- lm(Sepal.Length~Petal.Width+Sepal.Width, data = iris)
m3 <- lm(Petal.Width~Petal.Length+Sepal.Length+Species, data = iris)
makilabReg(m1, m2, m3, excel_export = TRUE, filename = "data.xlsx")

jvandoorn/makilab documentation built on Oct. 8, 2022, 3:33 a.m.