predict.sdr: predict method for sdr objects

Description Usage Arguments Value

View source: R/sdrtools.R

Description

This is a predict function for any of the sdr models in this package. It can project new data onto the lower dimensional space to obtain a set of sufficient predictors for testing data, or it can be used to obtain linear predictions of the sufficient predictors. For nonlinear models note that you might be better off fitting a generalized additive model (GAM) or generalized additive model for location, scale, and shape (GAMLSS) using the sufficient predictors as covariates to the original response variable. After that, this function can be used to project new testing data onto the lower dimensional space, and then using the predict function for the GAM/GAMLSS to obtain the response variable predictions for the new data.

Usage

1
2
## S3 method for class 'sdr'
predict(fit, newdata = NULL, type = c("response", "SP"))

Arguments

fit

model fit

newdata

a data frame of new data. Note that the new data frame must contain observations of the response variable.

type

one of "response" (the default, returns the predicted values) or "SP" (returns the new predictions )

Value

a plot


abnormally-distributed/cvreg documentation built on May 3, 2020, 3:45 p.m.