mse: Compute the Mean Squared Error

View source: R/operations.R

mseR Documentation

Compute the Mean Squared Error

Description

Compute the Mean Squared Error

Usage

mse(Y, Y_hat, n = NROW(Y), p)

Arguments

Y

Response vector.

Y_hat

Vector of predictions.

n

Number of rows in design matrix.

p

Number of columns in design matrix.

Details

This function computes the mean squared error, given coefficient and prediction vectors and the parameters for computing degrees of freedom.

Value

Estimated mean squared error.


ryan-heslin/RegLesson documentation built on Aug. 5, 2022, 9:03 p.m.