View source: R/performance_rmse.R
performance_rmse | R Documentation |
Compute root mean squared error for (mixed effects) models, including Bayesian regression models.
performance_rmse(
model,
normalized = FALSE,
ci = NULL,
iterations = 100,
ci_method = NULL,
verbose = TRUE,
...
)
rmse(
model,
normalized = FALSE,
ci = NULL,
iterations = 100,
ci_method = NULL,
verbose = TRUE,
...
)
model |
A model. |
normalized |
Logical, use |
ci |
Confidence resp. credible interval level. For |
iterations |
Number of bootstrap-replicates when computing confidence intervals for the ICC, R2, RMSE etc. |
ci_method |
Character string, indicating the bootstrap-method. Should
be |
verbose |
Toggle warnings and messages. |
... |
Arguments passed down to |
The RMSE is the square root of the variance of the residuals and indicates the absolute fit of the model to the data (difference between observed data to model's predicted values). It can be interpreted as the standard deviation of the unexplained variance, and is in the same units as the response variable. Lower values indicate better model fit.
The normalized RMSE is the proportion of the RMSE related to the range of the response variable. Hence, lower values indicate less residual variance.
Numeric, the root mean squared error.
data(Orthodont, package = "nlme")
m <- nlme::lme(distance ~ age, data = Orthodont)
# RMSE
performance_rmse(m, normalized = FALSE)
# normalized RMSE
performance_rmse(m, normalized = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.