Description Usage Arguments Details Value Author(s) References See Also
Calculates residuals using
\hat{\varepsilon}_{i} = Y_{i} - \hat{Y}_{i} \\ = Y_{i} - ≤ft( \hat{β}_{1} + \hat{β}_{2} X_{2i} + \hat{β}_{3} X_{3i} + … + \hat{β}_{k} X_{ki} \right) \\ = Y_{i} - \hat{β}_{1} - \hat{β}_{2} X_{2i} - \hat{β}_{3} X_{3i} - … - \hat{β}_{k} X_{ki} .
In matrix form
\boldsymbol{\hat{\varepsilon}} = \mathbf{y} - \mathbf{\hat{y}} \\ = \mathbf{y} - \mathbf{X} \boldsymbol{\hat{β}} .
1 |
y |
Numeric vector of length |
yhat |
Numeric vector of length |
X |
|
betahat |
Numeric vector of length |
If yhat = NULL
, the yhat
vector is computed using Xbetahat()
with X
as a required argument and betahat
as an optional argument.
If yhat
is provided, X
and betahat
are not needed.
Returns an n \times 1 matrix of residuals ≤ft( \boldsymbol{\hat{\varepsilon}} \right), that is, the difference between the observed ≤ft( \mathbf{y} \right) and predicted ≤ft( \mathbf{\hat{y}} \right) values of the regressand variable ≤ft( \boldsymbol{\hat{\varepsilon}} = \mathbf{y} - \mathbf{\hat{y}} \right).
Ivan Jacob Agaloos Pesigan
Wikipedia: Errors and Residuals
Other residuals functions:
.My()
,
.tepsilonhat()
,
My()
,
epsilonhat()
,
tepsilonhat()
,
yminusyhat()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.