Description Usage Arguments Details Value Author(s) Examples
Function to plot 2-dimensional data modeled using a single structure matrix.
1 2 3 4 |
objname |
name of output object produced by |
numcols |
number of shades from the color palette to be used |
col |
color palette to be used in plotting; the default plots high values in green and low values in pink. |
cardims |
Two-vector specifying the number of rows and columns in the
CAR1 structure matrix; same as dimension of CAR1 Q matrix provided to
|
rev.inds |
Should the plotting indices on each two-dimensional plot
be reversed? Setting |
title |
Vector of character values; the titles of the two plots. |
sub |
subtitle for plots; vector of length equal to the number of pages of plots to be displayed |
This function plots two two-dimensional plots side-by-side. The left plot is of the raw data input into the CARrampsOcl.fit function, and the right plot is of the estimated means of the of the posterior distributions of the corresponding random effects.
This function plots two two-dimensional plots side-by-side. The left plot is of the raw data input into the CARrampsOcl.fit function, and the right plot is of the estimated means of the of the posterior distributions of the corresponding random effects.
Kate Cowles
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 29 30 31 | # load data
## Not run:
data(iowaSW06)
Q <- list( list(type="CAR1",content=c(33,24)) )
# construct the design matrix with with as many columns as there are
# in null space of kronecker prod of Q's
X <- matrix( rep(1,33*24), ncol=1)
# parameters of gamma prior densities on tausqy, tausqphi[1], tausqphi[2]
alpha2 = beta2 <- c(.1, .1)
# number of samples
nsamp = 100
#random seed
myseed = 314
output <- CARrampsOcl.fit(alpha=alpha2,
beta=beta2, Q=Q, y=iowaSW06, nsamp=nsamp,
seed=myseed,
fixed = FALSE, randeffs=TRUE, coefs=TRUE,designMat=X,
mult= 50)
# plot the raw data and the posterior means of the site-specific random effects
plotCAR1( output, numcols=32, col = rev(terrain.colors(32)),
cardims = c(33 ,24 ), rev.inds = c(FALSE, TRUE))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.