Summarizes (multiple) fitted linear mixed effects models (estimates, std. beta values etc.) as HTML table, or saves them as file. The fitted models may have different predictors, e.g. when comparing different stepwise fitted models.

sjt.lmer(..., pred.labels = NULL, depvar.labels = NULL, remove.estimates = NULL, group.pred = FALSE, p.numeric = TRUE, emph.p = FALSE, p.zero = FALSE, p.kr = TRUE, separate.ci.col = TRUE, newline.ci = TRUE, show.est = TRUE, show.std = NULL, show.ci = TRUE, show.se = FALSE, show.header = FALSE, show.col.header = TRUE, show.r2 = TRUE, show.icc = TRUE, show.re.var = TRUE, show.fstat = FALSE, show.aic = FALSE, show.aicc = FALSE, show.dev = FALSE, string.pred = "Predictors", string.dv = "Dependent Variables", string.interc = "(Intercept)", string.obs = "Observations", string.est = "B", string.std = "std. Beta", string.ci = "CI", string.se = "std. Error", string.p = "p", ci.hyphen = " – ", minus.sign = "-", digits.est = 2, digits.std = 2, digits.p = 3, digits.ci = 2, digits.se = 2, digits.summary = 3, cell.spacing = 0.2, cell.gpr.indent = 0.6, sep.column = TRUE, CSS = NULL, encoding = NULL, file = NULL, use.viewer = TRUE, no.output = FALSE, remove.spaces = TRUE)

... | One or more fitted linear (mixed) models. |
---|---|

pred.labels | Character vector with labels of predictor variables.
If not |

depvar.labels | Character vector with labels of dependent variables of all fitted models. See 'Examples'. |

remove.estimates | Numeric vector with indices (order equals to row index of |

group.pred | Logical, if |

p.numeric | Logical, if |

emph.p | Logical, if |

p.zero | logical, if |

p.kr | logical, if |

separate.ci.col | Logical, if |

newline.ci | Logical, if |

show.est | Logical, if |

show.std | Indicates whether standardized beta-coefficients should also printed, and if yes, which type of standardization is done. See 'Details'. |

show.ci | Logical, if |

show.se | Logical, if |

show.header | Logical, if |

show.col.header | Logical, if |

show.r2 | Logical, if |

show.icc | Logical, if |

show.re.var | Logical, if |

show.fstat | Logical, if |

show.aic | Logical, if |

show.aicc | Logical, if |

show.dev | Logical, if |

string.pred | Character vector,used as headline for the predictor column.
Default is |

string.dv | Character vector, used as headline for the
dependent variable columns. Default is |

string.interc | Character vector, used as headline for the Intercept row.
Default is |

string.obs | character vector, used in the summary row for the count of observation
(cases). Default is |

string.est | Character vector, used for the column heading of estimates. |

string.std | Character vector, used for the column heading of standardized beta coefficients. Default is |

string.ci | Character vector, used for the column heading of confidence interval values. Default is |

string.se | Character vector, used for the column heading of standard error values. Default is |

string.p | Character vector, used for the column heading of p values. Default is |

ci.hyphen | Character vector, indicating the hyphen for confidence interval range. May be an HTML entity. See 'Examples'. |

minus.sign | string, indicating the minus sign for negative numbers. May be an HTML entity. See 'Examples'. |

digits.est | Amount of decimals for estimates |

digits.std | Amount of decimals for standardized beta |

digits.p | Amount of decimals for p-values |

digits.ci | Amount of decimals for confidence intervals |

digits.se | Amount of decimals for standard error |

digits.summary | Amount of decimals for values in model summary |

cell.spacing | Numeric, inner padding of table cells. By default, this value is 0.2 (unit is cm), which is
suitable for viewing the table. Decrease this value (0.05 to 0.1) if you want to import the table
into Office documents. This is a convenient argument for the |

cell.gpr.indent | Indent for table rows with grouped factor predictors. Only applies
if |

sep.column | Logical, if |

CSS | A |

encoding | String, indicating the charset encoding used for variable and
value labels. Default is |

file | Destination file, if the output should be saved as file.
If |

use.viewer | Logical, if |

no.output | Logical, if |

remove.spaces | Logical, if |

Invisibly returns

the web page style sheet (

`page.style`

),the web page content (

`page.content`

),the complete html-output (

`page.complete`

) andthe html-table with inline-css for use with knitr (

`knitr`

)

for further use.

Concerning the `show.std`

argument, `show.std = "std"`

will print normal standardized estimates. For `show.std = "std2"`

,
however, standardization of estimates follows
Gelman's (2008)
suggestion, rescaling the estimates by dividing them by two standard
deviations instead of just one. Resulting coefficients are then
directly comparable for untransformed binary predictors. This type
of standardization uses the `standardize`

-function
from the arm-package.
For backward compatibility reasons, `show.std`

also may be
a logical value; if `TRUE`

, normal standardized estimates are
printed (same effect as `show.std = "std"`

). Use
`show.std = NULL`

(default) or `show.std = FALSE`

,
if standardized estimats should not be printed.

Computation of p-values (if necessary and if `p.kr = TRUE`

) are based
on conditional F-tests with Kenward-Roger approximation for the df, using
the pbkrtest-package. If pbkrtest is not available or
`p.kr = FALSE`

, computation of p-values is based
on normal-distribution assumption, treating the t-statistics as Wald
z-statistics. See 'Details' in `p_value`

.

The confidence intervals stem from broom's
`tidy`

-function. For linear mixed models, the computation
method is "Wald" (`lme4::confint.merMod(fit, method = "Wald")`

).

Furthermore, see 'Details' in `sjt.frq`

.

The variance components of the random parts (see `show.re.var`

) are
denoted like:

within-group variance: sigma-squared

between-group-variance: tau-zero-zero

random-slope-intercept-correlation: rho-zero-one

sjPlot manual: sjt.lmer
and `sjt.lm`

for further examples.

# NOT RUN { library(lme4) library(sjmisc) data(efc) # prepare group variable efc$grp = as.factor(efc$e15relat) levels(x = efc$grp) <- get_labels(efc$e15relat) efc$care.level <- sjmisc::rec(efc$n4pstu, rec = "0=0;1=1;2=2;3:4=3", as.num = FALSE, append = FALSE) levels(x = efc$care.level) <- c("none", "I", "II", "III") # data frame for fitted model mydf <- data.frame(neg_c_7 = efc$neg_c_7, sex = efc$c161sex, c12hour = efc$c12hour, barthel = efc$barthtot, education = to_factor(efc$c172code), grp = efc$grp, carelevel = efc$care.level) # fit three sample models fit1 <- lmer(neg_c_7 ~ sex + c12hour + barthel + (1|grp), data = mydf) fit2 <- lmer(neg_c_7 ~ sex + c12hour + education + barthel + (1|grp), data = mydf) fit3 <- lmer(neg_c_7 ~ sex + c12hour + education + barthel + (1|grp) + (1|carelevel), data = mydf) # print summary table... automatic grouping does not work here, # barthel-index is printed as category of education (values are # correct, however, indentation is wrong) sjt.lmer(fit1, fit2, ci.hyphen = " to ", group.pred = TRUE) # either change order of models sjt.lmer(fit2, fit1, group.pred = TRUE) # or turn off automatic grouping of categorical predictors sjt.lmer(fit1, fit2, group.pred = FALSE) # print table, using vector names as labels sjt.lmer(fit1, fit2, fit3, pred.labels = "") # show other statistics sjt.lmer(fit1, fit2, show.aic = TRUE, show.ci = FALSE, show.se = TRUE, p.numeric = FALSE) sjt.lmer(fit1, fit2, fit3, show.aic = TRUE, separate.ci.col = FALSE, newline.ci = FALSE) # user defined predictor labels sjt.lmer(fit1, fit2, fit3, pred.labels = c("Elder's gender (female)", "Hours of care per week", "Barthel Index", "Educational level (mid)", "Educational level (high)")) # }