matrix.sqrt: Matrix square root.

Description Usage Arguments Details Value Author(s) Examples

View source: R/ApproxLikelihood.R

Description

Matrix square root using singular value decomposition (svd).

Usage

1

Arguments

A

A symmetric, positive definite matrix of size n x n.

Details

Using svd, the matrix A can be written as $$ A = U S V^T, $$ where

The non-zero singular values of $A$ are the square roots of the non-zero eignevalues of both $AA^T$ and $A^T A$. Due to the symmetry and positive definiteness of $A$, without loss of generality we can set $U=V$. Thus $A = V S V^T$, and the columns of $V$ are eignevectors of $A$ with $j-th$ eignevalue begin $s_j$. Define $$ S^1/2 = diag((s_1^1/2,...,s_p^1/2)) $$ and hence we have $$ B = V S^1/2 V^T $$, a symmetric n x n matrix such that $A = BB$.

Value

Return a n x n matrix.

Author(s)

Simone Padoan, simone.padoan@unibocconi.it, http://faculty.unibocconi.it/simonepadoan/; Boris Beranger, borisberanger@gmail.com

Examples

1
2
3
	A <- matrix(c(1,2,2,3),ncol=2,byrow=TRUE)
	print(A)
	B <- matrix.sqrt(A)

ExtremalDep documentation built on May 31, 2017, 5:01 a.m.

Search within the ExtremalDep package
Search all R packages, documentation and source code