predict.SLOPE {SLOPE} | R Documentation |
Generate predictions from SLOPE models
Description
Return predictions from models fit by SLOPE()
.
Usage
## S3 method for class 'SLOPE'
predict(object, x, alpha = NULL, type = "link", simplify = TRUE, sigma, ...)
## S3 method for class 'GaussianSLOPE'
predict(
object,
x,
sigma = NULL,
type = c("link", "response"),
simplify = TRUE,
...
)
## S3 method for class 'BinomialSLOPE'
predict(
object,
x,
sigma = NULL,
type = c("link", "response", "class"),
simplify = TRUE,
...
)
## S3 method for class 'PoissonSLOPE'
predict(
object,
x,
sigma = NULL,
type = c("link", "response"),
exact = FALSE,
simplify = TRUE,
...
)
## S3 method for class 'MultinomialSLOPE'
predict(
object,
x,
sigma = NULL,
type = c("link", "response", "class"),
exact = FALSE,
simplify = TRUE,
...
)
Arguments
object |
an object of class |
x |
new data |
alpha |
penalty parameter for SLOPE models; if |
type |
type of prediction; |
simplify |
if |
sigma |
deprecated. Please use |
... |
ignored and only here for method consistency |
exact |
if |
Value
Predictions from the model with scale determined by type
.
See Also
stats::predict()
, stats::predict.glm()
, coef.SLOPE()
Other SLOPE-methods:
coef.SLOPE()
,
deviance.SLOPE()
,
plot.SLOPE()
,
print.SLOPE()
,
score()
Examples
fit <- with(mtcars, SLOPE(cbind(mpg, hp), vs, family = "binomial"))
predict(fit, with(mtcars, cbind(mpg, hp)), type = "class")