RMSE | R Documentation |
Estimates root mean squared error from predicted and observed values
RMSE(pred, obs)
pred |
Numeric vector of predicted values |
obs |
Numeric vector of observed values |
Returns the RMSE
lm1 <- lm(Petal.Length ~ Sepal.Width + Species, data=iris)
pred1 <- fitted(lm1)
RMSE(pred1, iris$Petal.Length)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.