ridgetrace {GCEstim} | R Documentation |
Function to obtain the ridge trace and choose the support limits given a formula
Description
Function to obtain the ridge trace and choose the support limits given a formula
Usage
ridgetrace(
formula,
data,
subset,
na.action,
offset,
contrasts = NULL,
lambda = NULL,
lambda.min = 0.001,
lambda.max = 1,
lambda.n = 100,
penalize.intercept = TRUE,
errormeasure = c("RMSE", "MSE", "MAE", "MAPE", "sMAPE", "MASE"),
cv = TRUE,
cv.nfolds = 5,
seed = 230676
)
Arguments
formula |
An object of class |
data |
A data frame (or object coercible by
|
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen when the data
contain |
offset |
this can be used to specify an a priori known component to be
included in the linear predictor during fitting. This should be |
contrasts |
An optional list. See the |
lambda |
The default is |
lambda.min |
Minimum value for the |
lambda.max |
Maximum value for the |
lambda.n |
The number of lambda values. The default is
|
penalize.intercept |
Boolean value. if |
errormeasure |
Loss function (error) to be used for the selection
of the support spaces. One of c("RMSE","MSE", "MAE", "MAPE", "sMAPE", "MASE").
The default is |
cv |
Boolean value. If |
cv.nfolds |
number of folds used for cross-validation when
|
seed |
A single value, interpreted as an integer, for reproducibility
or |
Value
An object of class
ridgetrace
is a list containing
at least the following components:
lambda |
the lambda sequence used |
max.abs.coef |
a named vector of coefficients (maximum absolute coefficients) |
max.abs.residual |
the maximum absolute residual |
coef.lambda |
a data.frame with the coefficients for each lambda tested |
error.lambda |
a vector with the in sample error |
error.lambda.cv |
a data.frame with cross-validation errors |
call |
the matched call |
Author(s)
Jorge Cabral, jorgecabral@ua.pt
Examples
res.ridgetrace <-
ridgetrace(
formula = y ~ X001 + X002 + X003 + X004 + X005,
data = dataGCE)
res.ridgetrace