decomp.cov: Calculates decomposition of covariance matrix

View source: R/cov.R

decomp.covR Documentation

Calculates decomposition of covariance matrix

Description

Calculates a decomposition of the provided covariance matrix, V, using the chosen method.

Usage

	decomp.cov(V, method = "eigen")

Arguments

V

A (symmetric, positive-definite) covariance matrix.

method

A character vector specifying the method used to decompose V. Options are "eigen", "chol", or "svd" (Eigen decomposition, Cholesky decomposition, or Singular value decomposition, respectively).

Details

The matrix V is assumed to be symmetric and positive definite. Symmetry is checked, but the positive definiteness of the matrix is not. Returns a decomposition matrix U such that V = U %*% t(U).

Value

Returns a decomposition matrix U such that V = U %*% t(U).

Author(s)

Joshua French

See Also

cov.sp

Examples

	data(toydata)
	U <- decomp.cov(toydata$V, method = "chol")
	#range(toydata$V - U %*% t(U))

jpfrench81/SpatialTools documentation built on July 29, 2023, 8:01 a.m.