as.regexport: Coerce a model to class regexport

Description Usage Arguments Details Examples

View source: R/as.regexport.R

Description

Coerce a model to class regexport

Usage

1
as.regexport(model, ...)

Arguments

model

A regression model or output from a regression function that can be coerced to regexport format

...

Other arguments to be passed to methods

Details

The regexport package uses the classes regexcel and reglist to store all regression outputs needed to make the standard tables in a convenient format that avoids all of the complexity of the standard regression output classes (such as lm or glm). Coercing a model to this class will eliminate much of the complexity of the original model and simplifies the object down to what is needed to output the table.

The regexport package currently includes methods for models of class lm, glm, coeftest (for use with the lmtest package). Output from other packages can easily be used with regexport by creating a list with the required elements and using as.regexport to coerce the list into class regexport.

The regexcel class is a named list with at least three elements:

Examples

1
2
reg <- lm(mpg ~ cyl + disp, data = mtcars)
regx <- as.regexport(reg)

philbastian/regexport documentation built on July 23, 2020, 11:24 p.m.