Learn R Programming

nda (version 0.3.0)

predict.ndrlm: Predict from an NDRLM Model

Description

Transforms new independent variables with the fitted NDA model and predicts every fitted response.

Usage

# S3 method for ndrlm
predict(object, newdata = NULL, se.fit = FALSE,
    interval = c("none", "confidence", "prediction"), level = 0.95, ...)

Value

A response-named data frame for ordinary predictions, or a response-named list when standard errors or intervals are requested.

Arguments

object

An ndrlm object.

newdata

New original independent variables. If omitted, fitted values are returned.

se.fit

Request standard errors for ordinary least-squares fits.

interval

No interval, a confidence interval, or a prediction interval. Intervals are available for ordinary least squares only.

level

Confidence level.

...

Additional arguments passed to predict.lm.

Examples

Run this code
X <- as.data.frame(freeny.x); Y <- data.frame(income = freeny.y)
fit <- ndrlm(Y, X, optimize = FALSE)
predict(fit, X[1:3, ])

Run the code above in your browser using DataLab