Learn R Programming

mvdalab (version 1.7)

ap.plot: Actual versus Predicted Plot and Residuals versus Predicted

Description

This function provides the actual versus predicted and actual versus residuals plot as part of a model assessment

Usage

ap.plot(object, ncomp = object$ncomp, verbose = FALSE)

Value

The output of ap.plot is a two facet graph for actual versus predicted and residuals versus predicted plots.

Arguments

object

an object of class mvdareg, i.e., plsFit.

ncomp

number of components used in the model assessment

verbose

output results as a data frame

Author

Nelson Lee Afanador (nelson.afanador@mvdalab.com)

Details

This function provides the actual versus predicted and residuals versus predicted plot as part of model a assessment across the desired number of latent variables. A smooth fit (dashed line) is added in order to detect curvature in the fit.

See Also

plsFit

Examples

Run this code
data(Penta)
mod1 <- plsFit(log.RAI ~., scale = TRUE, data = Penta[, -1],
               ncomp = 2, validation = "loo")
ap.plot(mod1, ncomp = 2)

Run the code above in your browser using DataLab