predict.l1ce

0th

Percentile

Predict Method for `l1ce' Objects

This is a method for the generic function predict for class "l1ce", typically produced from l1ce(). When newdata is missing, the fitted values are extracted, otherwise returns new predictions.

Keywords
models
Usage
## S3 method for class 'l1ce':
predict(object, newdata,
           type = c("response"), se.fit = FALSE, ...)
Value

a vector of predictions.

Warning

predict can produce incorrect predictions when the newdata argument is used if the formula in object involves transformations, such as poly(Age, 3) or sqrt(Age - min(Age)).

MM: Not sure this is true for R....

Aliases
Examples
data(Iowa)
l1c.I <- l1ce(Yield ~ ., Iowa, bound = 10, absolute.t=TRUE)
p10 <- predict(l1c.I, newdata =   Iowa[10:19,])
stopifnot(all.equal(p10, fitted(l1c.I)[10:19]))
Documentation reproduced from package lasso2, version 1.2-9, License: GPL version 2 or later

Community examples

Looks like there are no examples yet.