| Library: | xplore |
| See also: | inv svd ginv |
| Macro: | 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 | |
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)
generates a sample of size #300 of N_2(0,C) and plots it
| Library: | xplore |
| See also: | inv svd ginv |