Description Usage Arguments Value Author(s) References See Also Examples
Model Assessment
1 | model(X, y)
|
X |
|
y |
Numeric vector of length |
Returns a vector with the following elements
Residual sum of squares.
Mean squared error.
Root mean squared error.
R-squared ≤ft( R^2 \right).
Adjusted R-squared ≤ft( \bar{R}^2 \right) .
Ivan Jacob Agaloos Pesigan
Wikipedia: Residual Sum of Squares
Wikipedia: Explained Sum of Squares
Wikipedia: Total Sum of Squares
Wikipedia: Coefficient of Determination
Other assessment of model quality functions:
.MSE()
,
.R2fromESS()
,
.R2fromRSS()
,
.RMSE()
,
.Rbar2()
,
.model()
,
MSE()
,
R2()
,
RMSE()
,
Rbar2()
1 2 3 4 5 6 7 8 9 10 11 | # Simple regression------------------------------------------------
X <- jeksterslabRdatarepo::wages.matrix[["X"]]
X <- X[, c(1, ncol(X))]
y <- jeksterslabRdatarepo::wages.matrix[["y"]]
model(X = X, y = y)
# Multiple regression----------------------------------------------
X <- jeksterslabRdatarepo::wages.matrix[["X"]]
# age is removed
X <- X[, -ncol(X)]
model(X = X, y = y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.