getOutputTable: Get coefficient and performance tables for regressions.

View source: R/getOutput.R

getOutputTableR Documentation

Get coefficient and performance tables for regressions.

Description

Extract the coefficients and various performance measures from a regression model, and returns a list containing each table. See getOutput for the function that combines these tables and copies them to the clipboard.

Usage

getOutputTable(mod,...)
## S3 method for class 'lm'
getOutputTable(mod, tolerance = TRUE,...)
## S3 method for class 'glm'
getOutputTable(mod, tolerance = TRUE,...)
## S3 method for class 'mlogit'
getOutputTable(mod,...)
## S3 method for class 'polr'
getOutputTable(mod,...)
## Default S3 method:
getOutputTable(mod,...)

Arguments

mod

A model object. Support types include lm, glm, polr, mlogit.

tolerance

(optional) parameter. For lm and glm models the tolerance column is added by default but can be removed by setting tolerance = FALSE.

...

(optional) additional arguments

Details

Coefficient tables are relatively easy to extract from a fitted model, but this function aims to combine this table with various performance statistics e.g. AIC.

For some models, additional columns are added to the coefficient table. For linear regressions, standardised betas are included. For lm and glm models, tolerance (1/VIF) is added (but can be removed by setting the tolerance parameter to FALSE. For ordinal logit models (polr) a column of p-values is added.

See Also

For extracting regression results, use the more user friendly getOutput function.

Examples

    m1_lm = lm( mpg ~ cyl + disp + hp+ gear + carb + gear*carb,data=mtcars)
    outputTables = getOutputTable(m1_lm)
    # outputTables now contains two tables, a coefficent table and a performance table
    names(outputTables)


Dectech/DectechR documentation built on Feb. 15, 2024, 9:17 a.m.