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, ...)
See also
Other as_flextable methods:
as_flextable()
,
as_flextable.data.frame()
,
as_flextable.gam()
,
as_flextable.grouped_data()
,
as_flextable.htest()
,
as_flextable.kmeans()
,
as_flextable.lm()
,
as_flextable.merMod()
,
as_flextable.pam()
,
as_flextable.summarizor()
,
as_flextable.table()
,
as_flextable.tabular()
,
as_flextable.tabulator()
,
as_flextable.xtable()
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