Learn R Programming

report (version 0.4.0)

report.lm: Reporting (General) Linear Models

Description

Create reports for (general) linear models.

Usage

# S3 method for lm
report(x, include_effectsize = TRUE, effectsize_method = "refit", ...)

# S3 method for lm report_effectsize(x, effectsize_method = "refit", ...)

# S3 method for lm report_table(x, include_effectsize = TRUE, ...)

# S3 method for lm report_statistics( x, table = NULL, include_effectsize = TRUE, include_diagnostic = TRUE, ... )

# S3 method for lm report_parameters( x, table = NULL, include_effectsize = TRUE, include_intercept = TRUE, ... )

# S3 method for lm report_intercept(x, table = NULL, ...)

# S3 method for lm report_model(x, table = NULL, ...)

# S3 method for lm report_performance(x, table = NULL, ...)

# S3 method for lm report_info( x, effectsize = NULL, include_effectsize = FALSE, parameters = NULL, ... )

# S3 method for lm report_text(x, table = NULL, ...)

# S3 method for merMod report_random(x, ...)

Arguments

x

Object of class lm or glm.

include_effectsize

If FALSE, won't include effect-size related indices (standardized coefficients, etc.).

effectsize_method

See documentation for effectsize::effectsize().

...

Arguments passed to or from other methods.

table

Provide the output of report_table() to avoid its re-computation.

include_diagnostic

If FALSE, won't include diagnostic related indices for Bayesian models (ESS, Rhat).

include_intercept

If FALSE, won't include the intercept.

effectsize

Provide the output of report_effectsize() to avoid its re-computation.

parameters

Provide the output of report_parameters() to avoid its re-computation.

Value

An object of class report().

See Also

Specific components of reports (especially for stats models):

Other types of reports:

Methods:

Template file for supporting new models:

Examples

Run this code
# NOT RUN {
library(report)

# Linear models
model <- lm(Sepal.Length ~ Petal.Length * Species, data = iris)
r <- report(model)
r
summary(r)
as.data.frame(r)
summary(as.data.frame(r))

# Logistic models
model <- glm(vs ~ disp, data = mtcars, family = "binomial")
r <- report(model)
r
summary(r)
as.data.frame(r)
summary(as.data.frame(r))

# Mixed models
if (require("lme4")) {
  model <- lme4::lmer(Sepal.Length ~ Petal.Length + (1 | Species), data = iris)
  r <- report(model)
  r
  summary(r)
  as.data.frame(r)
  summary(as.data.frame(r))
}
# }

Run the code above in your browser using DataLab