boxplot.estCVSTmodel: Boxplots for 'estCVSTmodel' object

Description Usage Arguments Value Author(s) See Also Examples

Description

boxplot method for class estCVSTmodel.

Usage

1
2
## S3 method for class 'estCVSTmodel'
boxplot(x, plot.type = c("cov", "reg", "all"), ...)

Arguments

x

estCVSTmodel/STmodel object to boxplot.

plot.type

One of "cov", "reg", "all"; should we boxplot covariance, regression or all parameter estimates.

...

Additional parameters passed to boxplot.

Value

Nothing

Author(s)

Johan Lindstrom

See Also

Other estCVSTmodel methods: coef.estCVSTmodel, estimateCV.STmodel, print.estCVSTmodel, print.summary.estCVSTmodel, summary.estCVSTmodel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
##cross-validation load data
data(est.cv.mesa)
##...and old estimates
data(est.mesa.model)
##estimated parameters
par.cov <- coef(est.mesa.model, "cov")
par.all <- coef(est.mesa.model)
 
##boxplot of the different estimates from the CV
par(mfrow=c(1,1), mar=c(13,2.5,2,.5), las=2)
boxplot( est.cv.mesa, plot.type="cov", boxwex=.5)
##compare with estimates for all data
points((1:length(par.cov$par))+.35, par.cov$par, pch=19, col=2)
##and uncertainties
for(i in 1:length(par.cov$par)){
  lines(c(i,i)+.35, par.cov$par[i]+c(-1,1)*1.96*par.cov$sd[i], col=2, lwd=2)
}

##For all the parameters but with offset lines
par(mfrow=c(1,1), mar=c(13,2.5,2,.5), las=2)
boxplot(est.cv.mesa, plot.type="all", boxwex=.4, col="grey",
        main="Cross-validation estimates")
##compare with estimates for all data
points((1:length(par.all$par))+.35, par.all$par, pch=19, col=2)
##and uncertainties
for(i in 1:length(par.all$par)){
  lines(c(i,i)+.35, par.all$par[i]+c(-1,1)*1.96*par.all$sd[i], col=2, lwd=2)
}

Example output

Loading required package: Matrix

SpatioTemporal documentation built on May 2, 2019, 8:49 a.m.