Description Usage Arguments Examples
Plots persp plot of geoprofile or posterior surface (coloured according to height), reducing matrix dimensions if necessary to avoid grid lines being too close together. NB Only works with square matrix
1 2 3 |
surface |
surface to plot; either the geoprofile or posteriorSurface output by geoMCMC(). |
aggregate_size |
the number of cells to aggregate to smooth the surface. |
surface_type |
type of surface; should be either "gp" for geoprofile or "prob" for posteriorSurface. |
perspCol |
colour palette. Defaults to red/orange/yellow/white. |
phiGP |
value of phi to pass to persp(). |
thetaGP |
value of theta to pass to persp(). |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # John Snow cholera data
d <- geoData(Cholera$longitude, Cholera$latitude)
s <- geoDataSource(WaterPumps$longitude, WaterPumps$latitude)
p <- geoParams(data = d, sigma_mean = 1.0, sigma_squared_shape = 2)
m <- geoMCMC(data = d, params = p, lambda=0.05)
# raw probabilities
geoPersp(m$posteriorSurface, surface_type = "prob")
# geoprofile
geoPersp(m$geoProfile, aggregate_size = 3, surface_type = "gp")
# simulated data
sim <-rDPM(50, priorMean_longitude = -0.04217491, priorMean_latitude =
51.5235505, alpha=1, sigma=1, tau=3)
d <- geoData(sim$longitude, sim $latitude)
s <- geoDataSource(sim$source_lon, sim$source_lat)
p <- geoParams(data = d, sigma_mean = 1.0, sigma_squared_shape = 2)
m <- geoMCMC(data = d, params = p)
# raw probabilities
geoPersp(m$posteriorSurface, surface_type = "prob")
# geoprofile
geoPersp(surface = m$geoProfile, aggregate_size = 3, surface_type = "gp")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.