Description Usage Arguments Value
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.
1 2 | sim_spdata(locations, cov_model = "matern", cov_pars = c(1, 0.16),
nugget = 0.5, kappa = 0.5)
|
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_pars |
A numeric vector with 2 elements with the covariance parameters. The first element corresponds to the variance parameter σ^2. The second element or corresponds to the range parameter φ of the correlation function. |
nugget |
Value of the nugget parameter τ^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". |
A numeric vector containing the simualted spatial data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.