Skip to contents

produce a flextable describing a generalized linear model produced by function glm.

You can remove significance stars by setting options options(show.signif.stars = FALSE).

Usage

# S3 method for class 'glm'
as_flextable(x, ...)

Arguments

x

glm model

...

unused argument

Examples

if (require("broom")) {
  dat <- attitude
  dat$high.rating <- (dat$rating > 70)
  probit.model <- glm(high.rating ~ learning + critical +
    advance, data = dat, family = binomial(link = "probit"))
  ft <- as_flextable(probit.model)
  ft
}
#> Loading required package: broom

Estimate

Standard Error

z value

Pr(>|z|)

(Intercept)

-7.476

3.570

-2.094

0.0362

*

learning

0.164

0.053

3.079

0.0021

**

critical

-0.001

0.044

-0.013

0.9896

advance

-0.062

0.042

-1.472

0.1410

Signif. codes: 0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 38.19 on 29 degrees of freedom

Residual deviance: 18.17 on 26 degrees of freedom