Skip to contents
loading...

Create a rich-formatted table version of the summary() of a glm object.

Usage

# S3 method for summary.glm
tabularise_default(
  data,
  footer = TRUE,
  lang = getOption("data.io_lang", "en"),
  ...,
  kind = "ft",
  env = parent.frame()
)

Arguments

data

A summary.glm object

footer

If TRUE (by default), add a footer to the table

lang

The natural language to use. The default value can be set with, e.g., options(data.io_lang = "fr") for French.

...

Additional arguments passed to tabularise_coef.summary.glm()

kind

The kind of table to produce: "tt" for tinytable, or "ft" for flextable (default).

env

The environment where to evaluate the model.

Value

A flextable object that you can print in different form or rearrange with the {flextable} functions.

Examples

iris_glm <- glm(data = iris, Petal.Length ~ Sepal.Length)
iris_glm_sum <- summary(iris_glm)
tabularise::tabularise(iris_glm_sum)

Generalized Linear Model

NA

Term

Estimate

Standard Error

t value

p value

\alpha

-7.10

0.5067

-14.0

< 2·10-16

***

\beta_{}

1.86

0.0859

21.6

< 2·10-16

***

0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05

(Dispersion parameter for Gaussian family: 0.7531)

Total deviance: 464.3 on 149 degrees of freedom

Residual deviance: 111.5 on 148 degrees of freedom

AIC: 387.1 - Number of Fisher Scoring iterations: 2