Description Usage Arguments Details Value Examples
The function predicts the response on target locations where data are not observed using posterior distributions.
1 2 3 | predictionOnAGrid(response, finalmodel, A_mat, spde, mesh,
family = "binomial", raster_stack, nsamp, int.strategy,
write_posterior = TRUE)
|
response |
A data frame containing the response data including number of positive cases (n_positive), number of individuals examined (examined), and point locations (longitude and latitude). |
finalmodel |
An object returned from the function findModelWithSmallestDIC. |
A_mat |
An observation/prediction weight matrix returned from makeMeshSPDE. |
spde |
An inla.spde2 model object for a Matern model returned from makeMeshSPDE, |
mesh |
A triangle mesh created based on initial point locations and returned from makeMeshSPDE. |
family |
A string indicating the likelihood family, Default: ‘binomial’. |
raster_stack |
A collection of RasterLayer objects with the same spatial extent and resolution. |
nsamp |
Number of samples to draw from an approximated posterior of a fitted model. Make nsamp >= 100 in order to compute mean, sd, IQR, and 95% CI of posterior samples. |
int.strategy |
Character. The integration strategy to use; one of ‘auto’, ‘ccd’, ‘grid’, ‘eb’ (empirical bayes), ‘user’ or ‘user.std’. |
write_posterior |
A logical argument indicating if posterior realizations are to be written into raster files, Default: TRUE. |
DETAILS
OUTPUT_DESCRIPTION
1 2 3 4 5 6 | ## Not run:
if(interactive()){
#EXAMPLE1
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.