Description Usage Arguments Value Examples
View source: R/postprocessing.R
Plot gridded posterior predictive means
1 | get_gridded_estimates(obs_coord, dpc_grid, fit, fineness)
|
obs_coord |
Coordinates of original observation locations |
dpc_grid |
Discrete Process Convolution grid |
fit |
Fitted model |
fineness |
Resolution of gridded means (1 = coarse, 10 = fine) |
Gridded estimates within the domain defined by the observation locations (extapolation is dangerous)
1 2 3 4 5 6 7 8 9 10 | set.seed(5)
s = data.frame(lat = runif(3, min = 0, max = 1), lon = runif(3, -1, 1))
y = c(1,1,0)
dpc_grid = get_grid(c(-1,1), c(-1,1), spacing = 2)
priors = get_priors(dpc_grid)
iso_kernel_matrix = get_kernel_matrix(s, dpc_grid)
fit = get_mcmc(s, dpc_grid, y, 10, 1000, priors, 100, 1)
gr = get_gridded_estimates(obs_coord = s, dpc_grid = dpc_grid, fit = fit, fineness = 10)
plot(gr$lon, gr$lat, cex = 0.1 + 4 * gr$z, xlim = c(-1, 1), ylim = c(0, 1))
points(s$lon, s$lat, pch = 19, cex = 0.1 + 4 * y, col = 'red')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.