Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: xplore
See also: inv svd ginv

Quantlet: symroot
Description: Calculates the symmetric root of a symmetric positive semidefinite matrix,(s.p.s.d.) ie. symroot(x)=symroot(x)' and symroot(x)*symroot(x) = x. uesful for simulation of multivariate normal variates with a given Covariance Structure

Usage: ix = symroot(x)
Input:
x p x p matrix , s. p.s.d.
Output:
ix p x p matrix , the symmtric root of x

Example:
library("xplore")
library("plot")
C=#(2,1)~#(1,1)
x   = normal(2,300)
x   =(symroot(C)*x)'
setmaskp(x, 4, 3, 8)
disp = createdisplay(1,1)
show(disp,1,1,x)

Result:
generates a sample of size #300 of N_2(0,C)
      and plots it



Author: P. Ruckdeschel, 19991020
(C) MD*TECH Method and Data Technologies, 05.02.2006