Skip to contents

A dashboard containing the following details for the entered regression model:

  • a tabular summary of parameter estimates

  • a dot-and-whisker plot for parameter estimates

  • a tabular summary of indices for the quality of model fit

  • a collection of models for checking model assumptions

  • a text report

  • a model information table

Usage

model_dashboard(
  model,
  check_model_args = NULL,
  parameters_args = NULL,
  performance_args = NULL,
  output_file = "easydashboard.html",
  output_dir = getwd(),
  rmd_dir = system.file("templates/easydashboard.Rmd", package = "easystats")
)

Arguments

model

A regression model object.

check_model_args

A list of named arguments that are passed down to performance::check_model(). For further documentation and details about the arguments, see this website. See also 'Examples'.

parameters_args

A list of named arguments that are passed down to parameters::model_parameters(). For further documentation and details about the arguments, see this website. See also 'Examples'.

performance_args

A list of named arguments that are passed down to performance::model_performance(). For further documentation and details about the arguments, see this website. See also 'Examples'.

output_file

A string specifying the file name in rmarkdown::render(). Default is "easydashboard.html".

output_dir

A string specifying the path to the output directory for report in rmarkdown::render(). Default is to use the working directory.

rmd_dir

A string specifying the path to the directory containing the RMarkdown template file. By default, package uses the template shipped with the package installation (inst/templates/easydashboard.Rmd).

Value

An HTML dashboard.

Troubleshooting

For models with many observations, or for more complex models in general, generating the model assumptions plot might become very slow. One reason is that the underlying graphic engine becomes slow for plotting many data points. In such cases, setting the argument check_model_args = list(show_dots = FALSE) might help. Furthermore, look at other arguments of ?performance::check_model, which can be set using check_model_args, to increase performance (in particular the check-argument can help, to skip some unnecessary checks).

Examples

if (interactive()) {
  mod <- lm(wt ~ mpg, mtcars)

  # with default options
  model_dashboard(mod)

  # customizing 'parameters' output: standardize coefficients
  model_dashboard(mod, parameters_args = list(standardize = "refit"))

  # customizing 'performance' output: only show selected performance metrics
  model_dashboard(mod, performance_args = list(metrics = c("AIC", "RMSE")))

  # customizing output of model assumptions plot: don't show dots (faster plot)
  model_dashboard(mod, check_model_args = list(show_dots = FALSE))
}