Hi, I have a question for my simulation problem: I would like to generate a positive (or semi def positive) covariance matrix, non singular, in wich the spectral decomposition returns me the same values for all dimensions but differs only in eigenvectors.
Ex. sigma [,1] [,2] [1,] 5.05 4.95 [2,] 4.95 5.05 > eigen(sigma) $values [1] 10.0 0.1 $vectors [,1] [,2] [1,] 0.7071068 -0.7071068 [2,] 0.7071068 0.7071068 (In theory: Using the spectral decomposition, the matrix Σ can be re-written as Σ = 5 ( 1, 1) 1 + 0.05 (1, -1) 1 1 -1 ) This because I would generate another covariance matrix in wich variables are more than 2. Thank you -- View this message in context: http://r.789695.n4.nabble.com/Generate-positive-definite-matrix-with-constraints-tp4667449.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.