produce a flextable describing a mixed model. The function is only using package 'broom.mixed' that provides the data presented in the resulting flextable.
You can remove significance stars by setting options
options(show.signif.stars = FALSE)
.
Usage
# S3 method for class 'merMod'
as_flextable(x, add.random = TRUE, ...)
# S3 method for class 'lme'
as_flextable(x, add.random = TRUE, ...)
# S3 method for class 'gls'
as_flextable(x, add.random = TRUE, ...)
# S3 method for class 'nlme'
as_flextable(x, add.random = TRUE, ...)
# S3 method for class 'brmsfit'
as_flextable(x, add.random = TRUE, ...)
# S3 method for class 'glmmTMB'
as_flextable(x, add.random = TRUE, ...)
# S3 method for class 'glmmadmb'
as_flextable(x, add.random = TRUE, ...)
See also
Other as_flextable methods:
as_flextable()
,
as_flextable.data.frame()
,
as_flextable.gam()
,
as_flextable.glm()
,
as_flextable.grouped_data()
,
as_flextable.htest()
,
as_flextable.kmeans()
,
as_flextable.lm()
,
as_flextable.pam()
,
as_flextable.summarizor()
,
as_flextable.table()
,
as_flextable.tabular()
,
as_flextable.tabulator()
,
as_flextable.xtable()
Examples
if (require("broom.mixed") && require("nlme")) {
m1 <- lme(distance ~ age, data = Orthodont)
ft <- as_flextable(m1)
ft
}
#> Loading required package: broom.mixed
group
Estimate
Standard Error
df
statistic
p-value
Fixed effects
(Intercept)
16.761
0.775
80
21.620
0.0000
***
age
0.660
0.071
80
9.265
0.0000
***
Random effects
Subject
sd_(Intercept)
2.327
Subject
cor_age.(Intercept)
-0.609
Subject
sd_age
0.226
Residual
sd_Observation
1.310
Signif. codes: 0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05
square root of the estimated residual variance: 1.3
data's log-likelihood under the model: -221.3
Akaike Information Criterion: 454.6
Bayesian Information Criterion: 470.6