mapGLMTables: mapGLMTables: Loop over regression models and extract...

Description Usage Arguments Author(s) Examples

View source: R/mapGLMTables.R

Description

mapGLMTables loops over regression models (linear, logistic, & ordinal logistic) and returns summarised output from getGLMTable. It is possible to include covariates, which are automatically excluded from the output. However, the full output can be obtained as a more complex output by setting simplify=FALSE. Note that a complex model output is returned if predictor variables include factors with >2 levels.

Usage

1
2
3
4
5
6
7
8
9
mapGLMTables(
  data = NULL,
  y = NULL,
  x = NULL,
  z = NULL,
  model.type = "lm",
  format.output = FALSE,
  simplify = TRUE
)

Arguments

data

Data.frame including model variables

y

Vector of outcome variables

x

Vector of predictor variables

z

Vector of covariates if covariates are included

model.type

Specify which statistical model to run. Options are "lm" for linear regression, "glm" for logistic regression, and "polr" for ordinal logistic regression

format.output

Should output be formatted for scientific publications? Default is FALSE.

simplify

Should results be simplified to relevant regression parameters of the predictor? If not, full lm models, GLMTables, and plots to check model assumptions (using the performance package) are included in the output. Default is simplify=TRUE.

Author(s)

Nils Kappelmann

Examples

1
2
data(airquality)
mapGLMTables(data = airquality, y = "Ozone", x = c("Solar.R", "Wind"), z = "Temp")

nkappelmann/PubHelper documentation built on Aug. 7, 2021, 5:09 a.m.