Learn R Programming

sommer (version 4.5.27)

sar: Simultaneous autoregressive spatial covariance structure

Description

Simultaneous autoregressive spatial covariance structure. The returned dimensionless covariance shape is intended for use inside vsm, which supplies the single overall variance scale.

Usage

sar(x, W, rho = 0.10, fixed = FALSE)

Value

A list containing the incidence/design matrix in Z and a compiled CovarianceFactor v2 descriptor in covFactor, for use inside vsm.

Arguments

x

Factor or design defining q spatial levels.

W

Square spatial weights matrix aligned to the levels of x. Row/column names are used when available.

rho

Starting SAR dependence parameter.

fixed

Logical indicating whether rho is fixed.

Details

The simultaneous autoregressive covariance is constructed from $$B=I-\rho W,\qquad M=B^{-1}B^{-\mathsf T},\qquad K=M/M_{11}.$$ For a general real weights matrix, rho is restricted to the conservative interval \((-1/r(W),1/r(W))\), where \(r(W)\) is the spectral radius. A bounded-logit working coordinate enforces the interval. The first covariance derivative is supplied analytically to the generic CovarianceFactor engine.

See Also

car, maternm, vsm.

Examples

Run this code
if (FALSE) {
vsm(sar(location, W), ism(genotype))
}

Run the code above in your browser using DataLab