Learn R Programming

SpatialTools (version 1.0.5)

simple.cov.sp: Calculates spatial covariance based on distance matrix

Description

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.

Usage

simple.cov.sp(D, sp.type, sp.par, error.var, smoothness, finescale.var)

Value

Returns a covariance matrix.

Arguments

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

Author

Joshua French

See Also

~ cov.sp

Examples

Run this code
	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)

Run the code above in your browser using DataLab