Description Usage Arguments Value Examples
Optimize kernel parameters
1 | get_em(nburn, priors, s, y, iso_kernel_matrix)
|
nburn |
Number of iterations |
priors |
Prior distributions for gamma (Gaussian) and tau (Gamma) |
s |
Coordinates of observations |
y |
Values of observations |
iso_kernel_matrix |
Isotropic kernel matrix |
List with optimized kernel parameters, as well as corresponding mean values of gamma and tau
1 2 3 4 5 6 7 | s = expand.grid(lat = c(-1:1), lon = c(-1:1))
y = c(1,0,0,0,1,0,0,0,1)
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_em(10, priors, s, y, iso_kernel_matrix)
cbind(get_estimates(s, dpc_grid, fit), obs = y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.