geoMCMC: MCMC under Rgeoprofile model

Description Usage Arguments Examples

Description

This function carries out the main MCMC under the Rgeoprofile model. Posterior draws are smoothed to produce a posterior surface, and converted into a geoProfile. Outputs include posterior draws of alpha and sigma under the variable-sigma model.

Usage

1
geoMCMC(data, params, lambda = NULL)

Arguments

data

input data in the format defined by geoData().

params

input parameters in the format defined by geoParams().

lambda

bandwidth to use in posterior smoothing. If NULL then optimal bandwidth is chosen automatically by maximum-likelihood.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# John Snow cholera data
d <- geoData(Cholera$longitude, Cholera$latitude)
p <- geoParams(data = d, sigma_mean = 1.0, sigma_squared_shape = 2)
m <- geoMCMC(data = d, params = p, lambda=0.05)

# 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)
p <- geoParams(data = d, sigma_mean = 1.0, sigma_squared_shape = 2)
m <- geoMCMC(data = d, params = p)

bobverity/Rgeoprofile documentation built on May 12, 2019, 11:28 p.m.