tab_model() creates HTML tables from regression models.

tab_model(..., transform, show.intercept = TRUE, show.est = TRUE,
  show.ci = 0.95, show.hdi50 = TRUE, show.se = NULL, show.std = NULL,
  show.p = TRUE, show.stat = FALSE, show.header = FALSE,
  show.col.header = TRUE, show.zeroinf = TRUE, show.r2 = TRUE,
  show.icc = FALSE, show.re.var = FALSE, show.fstat = FALSE,
  show.aic = FALSE, show.aicc = FALSE, show.dev = FALSE,
  show.obs = TRUE, terms = NULL, rm.terms = NULL, group.terms = TRUE,
  order.terms = NULL, title = NULL, pred.labels = NULL,
  dv.labels = NULL, wrap.labels = 25, string.pred = "Predictors",
  string.std = "std. Beta", string.ci = "CI", string.se = "std. Error",
  string.p = "p", ci.hyphen = " – ", minus.sign = "-",
  separate.ci.col = TRUE, separate.se.col = TRUE, digits = 2,
  digits.p = 3, emph.p = TRUE, case = "parsed", auto.label = TRUE,
  bpe = "median")

Arguments

...

One or more regression models, including glm's or mixed models. May also be a list with fitted models. See 'Examples'.

transform

A character vector, naming a function that will be applied on estimates and confidence intervals. By default, transform will automatically use "exp" as transformation for applicable classes of regression models (e.g. logistic or poisson regression). Estimates of linear models remain untransformed. Use NULL if you want the raw, non-transformed estimates.

show.intercept

Logical, if TRUE, the intercepts are printed.

show.est

Logical, if TRUE, the estimates are printed.

show.ci

Logical, if TRUE, the confidence interval is printed to the table.

show.se

Logical, if TRUE, the standard errors are also printed.

show.std

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

show.p

Logical, adds asterisks that indicate the significance level of estimates to the value labels.

show.zeroinf

Logical, if TRUE, shows the zero-inflation part of hurdle- or zero-inflated models.

terms

Character vector with names of those terms (variables) that should be printed in the table. All other terms are removed from the output. If NULL, all terms are printed.

rm.terms

Character vector with names that indicate which terms should be removed from the output Counterpart to terms. rm.terms = "t_name" would remove the term t_name. Default is NULL, i.e. all terms are used.

group.terms

Logical, if TRUE (default), automatically groups table rows with factor levels of same factor, i.e. predictors of type factor will be grouped, if the factor has more than two levels. Grouping means that a separate headline row is inserted to the table just before the predictor values.

order.terms

Numeric vector, indicating in which order the coefficients should be plotted. See examples in this package-vignette.

title

Character vector, used as plot title. By default, get_dv_labels is called to retrieve the label of the dependent variable, which will be used as title. Use title = "" to remove title.

pred.labels

Character vector with labels of predictor variables. If not NULL, pred.labels will be used in the first table column with the predictors' names. By default, if auto.label = TRUE and get_term_labels is called to retrieve the labels of the coefficients, which will be used as predictor labels. If pred.labels = "" or auto.label = FALSE, the raw variable names as used in the model formula are used as predictor labels. If pred.labels is a named vector, predictor labels (by default, the names of the model's coefficients) will be matched with the names of pred.labels. This ensures that labels always match the related predictor in the table, no matter in which way the predictors are sorted. See 'Examples'.

dv.labels

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

wrap.labels

Numeric, determines how many chars of the value, variable or axis labels are displayed in one line and when a line break is inserted.

string.pred

Character vector,used as headline for the predictor column. Default is "Predictors".

string.std

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

string.ci

Character vector, used for the column heading of confidence interval values. Default is "CI".

string.se

Character vector, used for the column heading of standard error values. Default is "std. Error".

string.p

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

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'.

separate.ci.col

Logical, if TRUE, the CI values are shown in a separate table column.

separate.se.col

Logical, if TRUE, the SE values are shown in a separate table column.

digits

Amount of decimals for estimates

digits.p

Amount of decimals for p-values

emph.p

Logical, if TRUE, significant p-values are shown bold faced.

case

Desired target case. Labels will automatically converted into the specified character case. See to_any_case for more details on this argument. By default, if case is not specified, it will be set to "parsed", unless prefix.labels is not "none". If prefix.labels is either "label" (or "l") or "varname" (or "v") and case is not specified, it will be set to NULL - this is a more convenient default when prefixing labels.

auto.label

Logical, if TRUE (the default), plot-labels are based on value and variable labels, if the data is labelled. See get_label and get_term_labels for details. If FALSE, original variable names and value labels (factor levels) are used.

bpe

For Stan-models (fitted with the rstanarm- or brms-package), the Bayesian point estimate is, by default, the median of the posterior distribution. Use bpe to define other functions to calculate the Bayesion point estimate. bpe needs to be a character naming the specific function, which is passed to the fun-argument in typical_value. So, bpe = "mean" would calculate the mean value of the posterior distribution.