Learn R Programming

MUVR2 (version 0.1.0)

plotPred: Plot predictions for PLS regression

Description

At present, this function only supports predictions for PLS regression type problems.

Usage

plotPred(Ytrue, Ypreds)

Value

A plot, plot the prediction

Arguments

Ytrue

True value of Y, should be a vector

Ypreds

Predicted value of Y can be a vector or data frame with the same number of rows

Examples

Run this code
# \donttest{
data("freelive2")
Ytrue<-YR2
Ypreds<-sampling_from_distribution(YR2)
plotPred(Ytrue,Ypreds)
Ytrue<-YR2
nRep <- 2
nOuter <- 4
varRatio <-0.6
regrModel <- MUVR2(X = XRVIP2,
                   Y = YR2,
                   nRep = nRep,
                   nOuter = nOuter,
                   varRatio = varRatio,
                   method = "PLS",
                   modReturn = TRUE)
Ypreds<-regrModel$yPred
plotPred(Ytrue,Ypreds)
# }

Run the code above in your browser using DataLab