cov_spatial: Calculate spatial covariance.

Description Usage Arguments Value Examples

View source: R/convoSPAT_paramEst.R

Description

This function replaces the geoR function cov.spatial, which is now defunct. Options available in this package are: "exponential", "matern", and "gaussian".

Usage

1
2
3
4
5
6
cov_spatial(
  Dist.mat,
  cov.model = "exponential",
  cov.pars = c(1, 1),
  kappa = 0.5
)

Arguments

Dist.mat

A matrix of scaled distances.

cov.model

A string specifying the model for the correlation function; defaults to "exponential". Options available in this package are: "exponential", "matern", and "gaussian".

cov.pars

Fixed values; not used in the function.

kappa

Scalar; value of the smoothness parameter.

Value

This function returns a correlation matrix.

Examples

1
2
Distmat <- as.matrix(dist(matrix(runif(20), ncol = 2), diag = TRUE, upper = TRUE))
C <- cov_spatial( Dist.mat = Distmat )

convoSPAT documentation built on Jan. 16, 2021, 5:31 p.m.