Beautiful table-outputs: Summarizing mixed effects models #rstats

The current version 1.8.1 of my sjPlot package has two new functions to easily summarize mixed effects models as HTML-table: sjt.lmer and sjt.glmer. Both are very similar, so I focus on showing how to use sjt.lmer here.

The simplest way of producing the table output is by passing the fitted models as parameter. By default, estimates (B), confidence intervals (CI) and p-values (p) are reported. The models are named Model 1 and Model 2. The resulting table is divided into three parts:

Models with different random intercepts

When models have different random intercepts, the sjt.lmer function tries to detect these information from each model. In the Random parts section of the table, information on multiple grouping levels and ICC’s are printed then.

sjt.lmer(fit1, fit2, fit3)

Model 1

Model 2

Model 3

B

CI

p

B

CI

p

B

CI

p

Fixed Parts

(Intercept)

14.14

13.15 – 15.12

13.75

12.63 – 14.87

13.76

12.63 – 14.88

sex2

0.48

-0.07 – 1.03

.087

0.67

0.10 – 1.25

.020

0.65

0.08 – 1.22

.026

c12hour

0.00

-0.00 – 0.01

.233

0.00

-0.00 – 0.01

.214

0.00

-0.00 – 0.01

.205

barthel

-0.05

-0.06 – -0.04

-0.05

-0.06 – -0.04

-0.05

-0.06 – -0.04

education2

0.19

-0.43 – 0.80

.098

0.16

-0.46 – 0.79

.103

education3

0.80

0.03 – 1.58

.098

0.79

0.01 – 1.57

.103

Random Parts

Ngrp

8

8

8

Ncarelevel

4

ICCgrp

0.022

0.021

0.021

ICCcarelevel

0.000

Observations

872

815

807

Note that in certain cases, depending on the order of fitted models with several random intercepts, the group label might be incorrect.