sjPlot_tab_model | R Documentation |
tab_model()
creates HTML tables from regression models.
sjPlot_tab_model(
...,
show.omnibus.f = FALSE,
show.auc = FALSE,
show.hosmer_lemeshow = FALSE,
show.deviance_test = FALSE,
footnote = NULL,
digits = 2,
digits.p = 3,
digits.rsq = 3,
file = NULL,
use.viewer = TRUE,
print = TRUE
)
... |
arguments passed on to tab_model; notably one or more regression models to summarize |
show.omnibus.f |
Logical, if TRUE, the omnibus F-test is computed and printed |
show.auc |
Logical, if TRUE, the AUC is calculated and printed |
show.hosmer_lemeshow |
Logical, if TRUE, a Hosmer-Lemeshow goodness of fit test is calculated and printed |
show.deviance_test |
Logical, if TRUE, a deviance-test comparing to the null model is calculated and printed |
footnote |
optional footnote for table |
digits |
Amount of decimals for estimates |
digits.p |
Amount of decimals for p-values |
digits.rsq |
Amount of decimals for r-squared values |
file |
Destination file, if the output should be saved as file.
If |
use.viewer |
Logical, if |
print |
Logical, if TRUE in non-interactive mode, the html table code is inserted into the document |
Default standardization is done by completely refitting the model on the
standardized data. Hence, this approach is equal to standardizing the
variables before fitting the model, which is particularly recommended for
complex models that include interactions or transformations (e.g., polynomial
or spline terms). When show.std = "std2"
, 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. 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 no standardization
is required.
CSS
-argument?With the CSS
-argument, the visual appearance of the tables
can be modified. To get an overview of all style-sheet-classnames
that are used in this function, see return value page.style
for details.
Arguments for this list have following syntax:
the class-names with "css."
-prefix as argument name and
each style-definition must end with a semicolon
You can add style information to the default styles by using a + (plus-sign) as initial character for the argument attributes. Examples:
css.table = 'border:2px solid red;'
for a solid 2-pixel table border in red.
css.summary = 'font-weight:bold;'
for a bold fontweight in the summary row.
css.lasttablerow = 'border-bottom: 1px dotted blue;'
for a blue dotted border of the last table row.
css.colnames = '+color:green'
to add green color formatting to column names.
css.arc = 'color:blue;'
for a blue text color each 2nd row.
css.caption = '+color:red;'
to add red font-color to the default table caption style.
Invisibly returns
the web page style sheet (page.style
),
the web page content (page.content
),
the complete html-output (page.complete
) and
the html-table with inline-css for use with knitr (knitr
)
for further use.
The HTML tables can either be saved as file and manually opened (use argument file
) or
they can be saved as temporary files and will be displayed in the RStudio Viewer pane (if working with RStudio)
or opened with the default web browser. Displaying resp. opening a temporary file is the
default behaviour (i.e. file = NULL
).
Examples are shown in these three vignettes:
Summary of Regression Models as HTML Table,
Summary of Mixed Models as HTML Table and
Summary of Bayesian Models as HTML Table.
Hosmer, David W.; Lemeshow, Stanley (2013). Applied Logistic Regression. New York: Wiley.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.