Message-ID: <200304101902.MAA19989@hivnet.ubc.ca>
Date: 2003-04-10T18:57:07Z
From: Jerome Asselin
Subject: R help
In-Reply-To: <20030410181103.50856.qmail@web10902.mail.yahoo.com>
Here is a solution, but it may take several seconds to run.
x <- matrix(rnorm(1050*1000),1050,1000)
mat <- t(x)%*%x
This is the idea behind Wishart random matrices. In theory, that matrix
should be positive definite. This can be verified with
eigen(mat,only.values=T)
Also read ?ninvwish in package "norm". But I am not sure if it was
designed for large matrices.
HTH,
Jerome
On April 10, 2003 11:11 am, Shutnik wrote:
> Dear friends,
> How can I generate (simulate) a large, say 1000x1000, positive definite
> var-covar matrix?
>
> Regards,
>
> Max
>
>
>
>
> ---------------------------------
>
>
> [[alternate HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help