[R] R help

Jerome Asselin jerome at hivnet.ubc.ca
Thu Apr 10 20:57:07 CEST 2003


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



More information about the R-help mailing list