Calculates spatial covariance based on distance matrix
Calculates a spatial covariance using a (Euclidean) distance matrix D
. Not intended to be used directly by user (though it may be helpful to some). It is strongly recommended that you use the cov.sp
function. No argument or error checking is provided for this function.
simple.cov.sp(D, sp.type, sp.par, error.var, smoothness, finescale.var)
D |
A distance matrix between locations |
sp.type |
A character vector specifying the spatial covariance type. Valid types are currently exponential, gaussian, matern, and spherical. |
sp.par |
A vector of length 2 specifying the scale and dependence of the covariance function. The first element refers to the variance of the hidden process (sometimes this is called the partial sill) while the second elements determines the strength of dependence between locations. |
error.var |
A non-negative number indicating the variance of the error term. |
smoothness |
A positive number indicating the variance of the error term. |
finescale.var |
A non-negative positive number indicating the finescale variability. The is also called the microscale variance |
Returns a covariance matrix.
Joshua French
~ cov.sp
coords <- matrix(rnorm(30), ncol = 3) D <- dist1(coords) simple.cov.sp(D = D, sp.type = "exponential", sp.par = c(2, 1), error.var = 1, smoothness = 0.5, finescale.var = 0)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.