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