simgc | R Documentation |
Simulate geostatistical data from Gaussian copula model at given locations. This function can simulate multiple datasets simultaneously.
simgc(locs, sim.n = 1, marginal, corr, longlat = FALSE)
locs |
a numeric matrix or data frame of n-D points with row denoting points. First column is x or longitude, second column is y or latitude. The number of locations is equal to the number of rows. |
sim.n |
the number of simulation samples required. |
marginal |
an object of class |
corr |
an object of class |
longlat |
if FALSE, use Euclidean distance, if TRUE use great circle distance. Default is FALSE. |
A list of two elements:
data |
a numeric matrix with each row denoting a simulated data. |
locs |
the location of the simulated data, same as the input locs. |
Zifei Han hanzifei1@gmail.com
grid <- seq(0.05, 0.95, by = 0.1) xloc <- expand.grid(x = grid, y = grid)[,1] yloc <- expand.grid(x = grid, y = grid)[,2] set.seed(12345) sim1 <- simgc(locs = cbind(xloc,yloc), sim.n = 10, marginal = negbin.gc(mu = 5, od = 1), corr = matern.gc(range = 0.3, kappa = 0.5, nugget = 0.1)) #plot(sim1, index = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.