spcovariance: Spatial variance-covariance matrix

spcovarianceR Documentation

Spatial variance-covariance matrix

Description

Calculates the spatial variance-covariance matrix for a selection of correlation functions.

Usage

spcovariance(...)

## S3 method for class 'formula'
spcovariance(
  formula,
  data,
  subset,
  corrfcn,
  ssq,
  phi,
  omg,
  kappa,
  longlat = FALSE,
  ...
)

## S3 method for class 'numeric'
spcovariance(x, corrfcn, ssq, phi, omg, kappa, ...)

## S3 method for class 'dist'
spcovariance(x, corrfcn, ssq, phi, omg, kappa, ...)

Arguments

...

Further arguments. Not currently in use.

formula

A formula of the form ~ Xcoord + Ycoord specifying the sampled locations.

data

An optional data frame containing the variables in the model.

subset

An optional set of indices. The covariance will be calculated for those coordinates only.

corrfcn

The correlation function to use.

ssq

The partial sill parameter.

phi

The spatial range parameter.

omg

The relative nugget parameter.

kappa

The spatial smoothness parameter.

longlat

How to compute the distance between locations. If FALSE, Euclidean distance, if TRUE Great Circle distance. See spDists.

x

A numerical object of distances.

Value

For a formula input, a variance-covariance matrix. For a numeric input, an object of the the same dimensions as its first input.


geoBayes documentation built on Aug. 21, 2023, 9:08 a.m.