Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

decomp.cov

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))

SpatialTools

Tools for Spatial Data Analysis

v1.0.4
GPL (>= 2)
Authors
Joshua French <joshua.french@ucdenver.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.