valplot {CGGP}R Documentation

Plot validation prediction errors

Description

Plot validation prediction errors

Usage

valplot(predmean, predvar, Yval, d = NULL)

Arguments

predmean

Predicted mean

predvar

Predicted variance

Yval

Y validation data

d

If output is multivariate, which column to use. Will do all if left as NULL.

Value

None, makes a plot

Examples

x <- matrix(runif(100*3), ncol=3)
f1 <- function(x){x[1]+x[2]^2}
y <- apply(x, 1, f1)
# Create a linear model on the data
mod <- lm(y ~ ., data.frame(x))
# Predict at validation data
Xval <- matrix(runif(3*100), ncol=3)
mod.pred <- predict.lm(mod, data.frame(Xval), se.fit=TRUE)
# Compare to true results
Yval <- apply(Xval, 1, f1)
valplot(mod.pred$fit, mod.pred$se.fit^2, Yval=Yval)

[Package CGGP version 1.0.3 Index]