simgc {gcKrig}R Documentation

Simulate Geostatistical Data from Gaussian Copula Model at Given Locations

Description

Simulate geostatistical data from Gaussian copula model at given locations. This function can simulate multiple datasets simultaneously.

Usage

simgc(locs, sim.n = 1, marginal, corr, longlat = FALSE)

Arguments

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 marginal.gc specifying the marginal distribution.

corr

an object of class corr.gc specifying the correlation function.

longlat

if FALSE, use Euclidean distance, if TRUE use great circle distance. Default is FALSE.

Value

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.

Author(s)

Zifei Han hanzifei1@gmail.com

Examples

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)

[Package gcKrig version 1.1.8 Index]