linreg_e: Linear Regression Residuals

Description Usage Arguments Value Author(s)

View source: R/linreg.R

Description

Calculates the residuals

\mathbf{e} = \mathbf{y} - \mathbf{X} \boldsymbol{\hat{β}}

or

e = \mathbf{M} \mathbf{y}

.

Usage

1
linreg_e(beta_hat = NULL, X, y, m = FALSE)

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 residuals.

Author(s)

Ivan Jacob Agaloos Pesigan


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