plot.predCVSTmodel {SpatioTemporal} | R Documentation |
predictSTmodel
and predCVSTmodel
Objectsplot
method for classes predictSTmodel
and predCVSTmodel
. Provides several different plots of the
data.
## S3 method for class 'predCVSTmodel' plot(x, y = "time", ID = colnames(x$pred.all$EX)[1], col = c("black", "red", "grey"), pch = c(NA, NA), cex = c(1, 1), lty = c(1, 1), lwd = c(1, 1), p = 0.95, pred.type = "EX", pred.var = TRUE, add = FALSE, ...) ## S3 method for class 'predictSTmodel' plot(x, y = "time", STmodel = NULL, ID = x$I$ID[1], col = c("black", "red", "grey"), pch = c(NA, NA), cex = c(1, 1), lty = c(1, 1), lwd = c(1, 1), p = 0.95, pred.type = "EX", pred.var = FALSE, add = FALSE, ...)
x |
|
y |
Plot predictions as a function of either |
ID |
The location for which we want to plot predictions. A
string matching names in |
col |
A vector of three colours: The first is the colour of the
predictions, second for the observations and third for the polygon
illustrating the confidence bands. |
pch, cex, lty, lwd |
Vectors with two elements giving the point type,
size, line type and line width to use when plotting the predictions and
observations respectively. Setting a value to |
p |
Width of the plotted confidence bands (as coverage percentage, used to find appropriate two-sided normal quantiles). |
pred.type |
Which type of prediction to plot, one of
|
pred.var |
Should we plot confidence bands based on prediction (TRUE)
or confidence intrevalls (FALSE), see |
add |
Add to existing plot? |
... |
Additional parameters passed to
|
STmodel |
|
Nothing
Johan Lindstrom
Other predCVSTmodel methods: estimateCV.STmodel
,
print.predCVSTmodel
,
print.summary.predCVSTmodel
,
qqnorm.predCVSTmodel
,
scatterPlot.predCVSTmodel
,
summary.predCVSTmodel
Other predictSTmodel methods: predict.STmodel
,
print.predictSTmodel
####################################### ## plot predictions for a given site ## ####################################### ##load data data(mesa.model) ##load predictions data(pred.mesa.model) par(mfrow=c(2,1)) plot(pred.mesa.model) ##different site with data and prediction variances plot(pred.mesa.model, STmodel=mesa.model, ID="L001", pred.var=TRUE) ##compare the different contributions to the predictions plot(pred.mesa.model) plot(pred.mesa.model, pred.type="EX.mu", col="red", add=TRUE) plot(pred.mesa.model, pred.type="EX.mu.beta", col="green", add=TRUE) ##compare the two confidence and prediction intervalls plot(pred.mesa.model, ID=3, pred.var=TRUE, col=c(0,0,"darkgrey")) plot(pred.mesa.model, ID=3, STmodel=mesa.model, col=c("black","red","lightgrey"), add=TRUE) ##plot predictions as function of observations par(mfrow=c(2,2)) plot(pred.mesa.model, y="obs", STmodel=mesa.model, pred.var=TRUE) ##all data, using points and colour coded by site plot(pred.mesa.model, y="obs", STmodel=mesa.model, ID="all", lty=c(NA,1), pch=c(19,NA), col=c("ID", "red", "grey"), cex=.25, pred.var=TRUE) ##compare prediction methods, for one site only plot(pred.mesa.model, y="obs", STmodel=mesa.model, lty=c(NA,1), pch=c(19,NA), cex=.25, pred.var=TRUE) plot(pred.mesa.model, y="obs", STmodel=mesa.model, col="red", lty=NA, pch=c(19,NA), cex=.25, pred.type="EX.mu", add=TRUE) plot(pred.mesa.model, y="obs", STmodel=mesa.model, col="green", lty=NA, pch=c(19,NA), cex=.25, pred.type="EX.mu.beta", add=TRUE) #################################### ## plot CV-pred. for a given site ## #################################### ##load CV-predictions data(pred.cv.mesa) par(mfcol=c(3,1),mar=c(2.5,2.5,2,.5)) plot(pred.cv.mesa, ID=1) plot(pred.cv.mesa, ID=1, pred.type="EX.mu", col="green", add=TRUE) plot(pred.cv.mesa, ID=1, pred.type="EX.mu.beta", col="blue", add=TRUE) ##different colours plot(pred.cv.mesa, ID=10, col=c("blue","magenta","light blue")) ##points and lines for the observations plot(pred.cv.mesa, ID=17, lty=c(1,NA), pch=c(NA,19), cex=.5) ##plot predictions as function of observations par(mfrow=c(2,2)) plot(pred.cv.mesa, y="obs") ##all data, using points and colour coded by site plot(pred.cv.mesa, y="obs", ID="all", lty=c(NA,1), pch=c(19,NA), cex=.25, col=c("ID", "red", "grey")) ##compare prediction methods, for one site only plot(pred.cv.mesa, y="obs", lty=c(NA,1), pch=c(19,NA), cex=.25) plot(pred.cv.mesa, y="obs", col="red", lty=NA, pch=c(19,NA), cex=.25, pred.type="EX.mu", add=TRUE) plot(pred.cv.mesa, y="obs", col="green", lty=NA, pch=c(19,NA), cex=.25, pred.type="EX.mu.beta", add=TRUE)