# Simulate correlation matrix using a given structure

I want to generate correlation matrix such that it follows the below structure $$\Sigma = B \Lambda B^T$$

where $$\Lambda$$ is a diagonal matrix containing positive elements, $$\Sigma \in R^{n \times n}$$ is a correlation matrix and $$B \in R^{n \times k}$$ where $$k$$ is less than $$n$$. Here each column of $$B$$ is a sparse column with a certain sparsity $$\lambda$$ and $$B$$ is not necessarily orthogonal matrix. I am not sure how to generate a correlation matrix given above structure.

• Are you sure that the diagonal elements of $B \Lambda B^T$ = 1? Which one $B$ or $|Lambda$ needs to be simulated? – user158565 Nov 9 '18 at 5:21
• @a_statistician I need to generate both $B$ and $\Lambda$. Yes, the diagonal elements should be 1 such that the final matrix generated is a correlation matrix. – Dushyant Sahoo Nov 9 '18 at 5:42
• Is $k$ an input? – Rodrigo de Azevedo Dec 8 '18 at 16:27