Learn R Programming

telefit (version 1.0.3)

maternCov: Matern covariance

Description

This function evaluates the Matern covariance function for the elements of a (potentially non-square) spatial distance matrix

Usage

maternCov(d, scale = 1, range = 1, smoothness = 0.5, nugget = 0)

Arguments

d

A numeric vector or matrix of distances at which the Matern correlation function should be evaluated.

scale

Scales correlations to covariances.

range

Matern range parameter. Controls the decay of pointwise correlations as a function of distance.

smoothness

Matern smoothness parameter. Controls the number of process derivatives.

nugget

Spatial covariance nugget.

Examples

Run this code
# NOT RUN {
data("coprecip")
attach(coprecip)

# compute spatial covariance matrix for an exponential covariance function
# using Colorado coordinates
Sigma = maternCov(fields::rdist.earth(coords.s), scale = 1, range = 250,
  smoothness = .5, nugget = 0)

# }

Run the code above in your browser using DataLab