predict.other: Calculate prediction from a 'other' object.

Description Usage Arguments Value Examples

View source: R/predict.other.R

Description

Calculate prediction from a other object.

Usage

1
2
## S3 method for class 'other'
predict(object, newdata, ...)

Arguments

object

a fitted other object.

newdata

a design matrix of all the p main effects of some new observations of which predictions are to be made.

...

additional argument (not used here, only for S3 generic/method consistency)

Value

The prediction of newdata by the cv.sprinter fit object.

Examples

1
2
3
4
5
6
n <- 100
p <- 200
x <- matrix(rnorm(n * p), n, p)
y <- x[, 1] + 2 * x[, 2] - 3 * x[, 1] * x[, 2] + rnorm(n)
mod <- cv.sprinter(x = x, y = y)
fitted <- predict(mod, newdata = x)

hugogogo/sprintr documentation built on Dec. 14, 2021, 6:07 p.m.