View source: R/performance_mse.R

performance_mse | R Documentation |

Compute mean square error of linear models.

```
performance_mse(model, ...)
mse(model, ...)
```

`model` |
A model. |

`...` |
Arguments passed down to |

The mean square error is the mean of the sum of squared residuals, i.e. it measures the average of the squares of the errors. Less technically speaking, the mean square error can be considered as the variance of the residuals, i.e. the variation in the outcome the model doesn't explain. Lower values (closer to zero) indicate better fit.

Numeric, the mean square error of `model`

.

```
data(mtcars)
m <- lm(mpg ~ hp + gear, data = mtcars)
performance_mse(m)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.