
Prediction Method for islasso.path Objects
predict.islasso.path.Rd
Generates predictions from a fitted islasso.path
model at one or more lambda values.
Supports various output types including linear predictors, response scale, class labels, and coefficients.
Arguments
- object
A fitted model object of class
"islasso.path"
.- newdata
Optional data frame containing covariates for prediction. If omitted, returns fitted values from the original model.
- type
Character. Type of prediction:
"link"
(default) - linear predictor scale,"response"
- original response scale,"coefficients"
- estimated coefficients,"class"
- predicted class labels (only for binomial models).
- lambda
Numeric value(s). Specific lambda value(s) at which predictions are required. If missing, predictions are computed for the full lambda sequence.
- ...
Additional arguments passed to lower-level methods.
Author
Gianluca Sottile gianluca.sottile@unipa.it
Examples
if (FALSE) { # \dontrun{
set.seed(1)
n <- 100; p <- 30
beta <- c(runif(10, -3, 3), rep(0, p - 10))
sim <- simulXy(n = n, p = p, beta = beta, seed = 1, family = gaussian())
fit <- islasso.path(y ~ ., data = sim$data, family = gaussian())
optimal <- GoF.islasso.path(fit)
pred <- predict(fit, type = "response", lambda = optimal$lambda.min)
} # }