Given a set of spatial coordinates this function generates gaussian distributed data whose spatial structure is defined by the user through the specification of a spatial correlation function.

sim_spdata(locations, cov_model = "matern", cov_pars = c(1, 0.16),
  nugget = 0.5, kappa = 0.5)

Arguments

locations

A two column matrix containing the locations (coordinates x and y).

cov_model

A string indicating the type of the correlation function. For the available choices see cov.spatial.

cov_pars

A numeric vector with 2 elements with the covariance parameters. The first element corresponds to the variance parameter \(\sigma^2\). The second element or corresponds to the range parameter \(\phi\) of the correlation function.

nugget

Value of the nugget parameter \(\tau^2\).

kappa

Numerical value for the additional smoothness parameter of the correlation function. Only required by the following correlation functions: "matern", "powered.exponential", "cauchy", "gencauchy" and "gneiting.matern".

Value

A numeric vector containing the simualted spatial data.