s-news
[Top] [All Lists]

Re: random draws from multivariate normal

To: ad@cs.uu.nl
Subject: Re: random draws from multivariate normal
From: Bill.Venables@CMIS.CSIRO.AU
Date: Wed, 29 May 2002 00:37:37 +1000
Cc: s-news@lists.biostat.wustl.edu
Al Feeders asks:

>  -----Original Message-----
> From:         Ad Feelders [mailto:ad@cs.uu.nl] 
> Sent: Wednesday, May 29, 2002 12:17 AM
> To:   s-news@lists.biostat.wustl.edu
> Subject:      [S] random draws from multivariate normal
> 
> Dear list,
> 
> Can anybody give me pointers for the following problem?
> 
> I would like to generate random draws from a high (say 25) dimensional 
> multivariate normal distribution,
> where the covariance/correlation matrix should be generated at random as 
> well. Since the covariance matrix
> should be positive definite, a fully random matrix is not appropriate.
> 
> Is there any possibility if generating a "random" positive definite 
> covariance matrix?
> Any pointers to relevant literature are welcome.
        [WNV]  If your problem really is so unstructured this is very
simple:

        rpdsm <- crossprod(matrix(rnorm(5*5), 5, 5))

        will do it.  This gives you a standard 5x5 Wishart matrix with 5 df.
Variations are clearly possible.

> Thanks for your help.
> 
> -Ad Feelders
> 
> --------------------------------------------------------------------------
> -
> Ad Feelders
> Universiteit Utrecht
> Institute of Information & Computing Sciences
> PO Box 80089
> 3508 TB Utrecht
> The Netherlands
> ad@cs.uu.nl
> Phone: +31 30 2533176
> 
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>