##load data
data(mesa.data.model)
data(mesa.data.res)
##############
## plotCV ##
##############
##Extract pre-computed cross-validated predictions
pred.cv <- mesa.data.res$pred.cv
##Plot observations with CV-predictions and
##95\% prediction intervals
par(mfcol=c(4,1),mar=c(2.5,2.5,2,.5))
plotCV(pred.cv, 1, mesa.data.model)
##different colours
plotCV(pred.cv, 10, mesa.data.model,
col=c("blue","magenta","light blue"))
##points and lines for the observations
plotCV(pred.cv, 17, mesa.data.model, lty=1, pch=c(NA,19), cex=.5)
##location by name
plotCV(pred.cv, "L002", mesa.data.model)
######################
## plotPrediction ##
######################
##Extract pre-computed conditional expectations
EX <- mesa.data.res$EX
##plot predictions and observations for 4 locations
par(mfrow=c(4,1),mar=c(2.5,2.5,2,.5))
plotPrediction(EX, 1, mesa.data.model)
##different colours
plotPrediction(EX, 10, mesa.data.model,
col=c("blue","black","light blue"))
##points for the observations
plotPrediction(EX, 17, mesa.data.model, lty=c(1,NA),
pch=c(NA,19), cex=.5)
##location by name
plotPrediction(EX, "L002", mesa.data.model)
Run the code above in your browser using DataLab