Description Usage Arguments Value Warning See Also
View source: R/fcs2SpatialSummary.R
Summarises the spatial terms in a fitted FCS2 model and attaches the summary to a map of the spatial region used.
1 2 3 4 5 6 7 8 | fcs2SpatialSummary(
map,
fit,
posterior = !is.null(fit$bugsFit),
inla = !posterior,
abundance = TRUE,
prevalence = TRUE
)
|
map |
a |
fit |
an |
posterior |
whether to summarise the posterior estimates of each region (if available). |
inla |
whether to summarise the approximate INLA estimates of each region. |
abundance |
whether the spatial term (with these regions) is in the abundance regression component. |
prevalence |
whether the spatial term (with these regions) is in the prevalence regression component. |
the sp::SpatialPolygonsDataFrame
object map
with additional columns in the data frame component map@data
containing the requested summaries. Each summary is given as two columns,
one for the mean of each variable named mean.
* and another for the
standard deviation named sd.
*, where * is the name of the spatial
variable.
This function requires the additional package
maptools which may also be useful for creating map
from an ESRI
shapefile using the function maptools::readShapePoly
.
plotSpatialTerm
which uses this function to plot the
spatial term summaries on a map.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.