makilabHLM: Creates and exports a table of heirarchical LM models.

View source: R/makilabHLM.R

makilabHLMR Documentation

Creates and exports a table of heirarchical LM models.

Description

Creates and exports a table of heirarchical LM models.

Usage

makilabHLM(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 use as the sheet name. Defaults to HLMi, where i is the number of HLMs 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(Sepal.Length~Petal.Length, data = iris)
m2 <- lm(Sepal.Length~Petal.Length+Petal.Width, data = iris)
m3 <- lm(Sepal.Length~Petal.Length+Petal.Width+Species, data = iris)
makilabHLM(m1, m2, m3, excel_export = TRUE, filename = "data.xlsx")

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