On Mon, 15 Nov 2004, Harry Millwater wrote:
> Anyone know of source code that can generate correlated samples for a
> uniform distribution? In particular, we need to generate about 1000 samples
> for 2000 random variables with a specified correlation matrix for the 2000
> random variables.
>
> A Fortran routine would be great! A Matlab solution would be ok too, or even
> Mathematica.
>
> (we are simulating periodic inspections on a gas turbine engine. The
> inspections will be most likely highly correlated from inspection to
> Inspection)
1. Find the matrix U which diagonalizes your covariance matrix V, i.e.,
MatMul(U,Matmul(V,Transpose(U))) is diagonal.
2. This U transforms the correlated random variables to uncorrelated ones.
x_uncorrelated = U x_correlated. The inverse of U will do the
opposite.
Good luck, Wes
--
Dr. W. J. Metzger Experimental High Energy Physics Group
tel. +31-24-3653127 Faculty of Natural Sciences
+31-24-3652099 (secr.) Radboud University Nijmegen (**)
fax. +31-24-3652191 Toernooiveld 1
6525 ED Nijmegen, The Netherlands
e-mail: [log in to unmask] or [log in to unmask]
http://home.cern.ch/metzger/ or http://www.hef.ru.nl/~wes
(**) On 1 Sept. 2004 the University of Nijmegen changed its name,
displaying a dismaying lack of knowledge of English grammar.
|