linreg_mse: Linear Regression Mean Square Error.

Description Usage Arguments Value Author(s)

View source: R/linreg.R

Description

Calculates mean square error (MSE), that is, RSS divided by n.

Usage

1
linreg_mse(beta_hat = NULL, X, y, m = m)

Arguments

beta_hat

Vector of k estimated regression parameters. If NULL, regression coefficients are estimated using ≤ft( \mathbf{X}^{\prime} \mathbf{X} \right)^{-1} ≤ft( \mathbf{X}^{\prime} \mathbf{y} \right) .

X

The data matrix, that is an n \times k matrix of n observations of k regressors, which includes a regressor whose value is 1 for each observation.

y

n \times 1 vector of observations on the regressand variable.

m

Logical. If TRUE, the function uses an alternative formula e = \mathbf{M} \mathbf{y} . See linreg_m for \mathbf{M}.

Value

Returns the mean square error.

Author(s)

Ivan Jacob Agaloos Pesigan


jeksterslabds/jeksterslabRds documentation built on July 16, 2020, 3:41 p.m.