2

Within the social sciences there is a popular technique called Factor Analysis and I am interested in generating random correlation matrices that uniformly sample all the space parameterized by one specific type of factor-analytic model called the one factor model. Under the one-factor model, data is assumed to follow this structure.

For the responses of person $j$ to item $i$ $X_{ij}$:

$X_{ij} = \lambda_iF + \epsilon_{ij}$

Where $F$ is a standard normal and unboserved (i.e. latent) continuous random variable, $\lambda_i$ is a regression coefficient relating the latent variable $F$ to the observed variable $X_{ij}$ and the covariances between the errors $\epsilon_{ij}$ and the errors with the latent variable $F$ are all 0. Similar to standard linear regression assumptions.

The correlation matrix for the item responses $X_{ij}$ under the one factor model looks like:

$R = \Lambda\Lambda' + \Theta$

Where $\Theta$ is a diagonal matrix containing only the error variances, where error variance is usually defined as $1-\lambda^{2}$.

I would ideally like to find a way to generate random correlation matrices (in the R programming language) in a manner similar to Joe (2006)'s 'Generating random correlation matrices based on partial correlations' because this technique uniformly samples from the space of all possible $d \times d$ correlation matrices.

This is what I've come up with but I'm not sure if I'm right because it seems too simple. Which is basically just following the one-factor model as my data-generating method:

d <- 5 ##matrix of dimensions 5 x 5
l <- runif(d, min=0, max=1) ##I'm only interested in positive correlations for now

## generates the error correlation matrix
dd <- diag(d)
diag(dd) <- diag(l%*%t(l))
psi <- diag(d)-dd


## final correlation matrix
 R <- l%*%t(l) + psi

So my questions would be (a) Does this method sample uniformly from the space of all possible correlation matrices parameterized by the one-factor model? And, if it doesn't, does anyone have any insight/references of where to go to do it?

S. Punky
  • 713
  • 6
  • 14
  • Why do loadings lambdas have to come specifically from uniform distribution for you? – ttnphns Nov 24 '17 at 20:11
  • I'm trying to sample uniformly from the [0,1] space so I thought this would be a good idea. It's a similar logic to the "old" (and inefficient but still valid) way to generate random correlation matrices where you sample from a uniform distribution [-1,+1] and check for positive definiteness (psd) until you get enough psd matrices to run a simulation. – S. Punky Nov 24 '17 at 20:15
  • Remembering I did use that or similar approach [here](https://stats.stackexchange.com/a/123567/3277), see section "Follow up to Update 3", to create a population matrix, then sampled its sample realizations from Wishart. Nobody has told me it's illegal. – ttnphns Nov 24 '17 at 20:36
  • I guess the difference for me is that you're starting for a population and then take sample realizations from it. What I'm trying to see if whether using such method would allow me to uniformly sample form the parameter space of the 1-factor model. Or, in my particular case, the 1-factor model with exclusively positive correlations. – S. Punky Nov 24 '17 at 20:44
  • If I recall correctly, for my "diffuse structure" I was generating all loadings (`p vars by m factors`) just from uniform(0,max) where max was arbitrarily set to 0.8. And was generating `p` uniquenesess from uniform(min,1-max^2) where min was arbitrarily set to 0.3 (0.8 and 0.3 were chosen just for the sake of "to resemble real-life cases"). Then, I rescaled (corrected proportionally) the loadings and the uniqueness so that sum of squared loadings plus uniqueness for each variable sum to 1. Then I randomly set 30% of loadings to negative sign. – ttnphns Nov 24 '17 at 21:07
  • Is there any reason for why you didn't choose to use 1-loadings^2 for the uniquenesses and decided to generate them separately? – S. Punky Nov 24 '17 at 21:14
  • If factors (I.e loadings per row) are many (and I had more than one), 1-their SS will give uniquenesses of all variables roughly same what I might not like, So I generated uniquenesses separately, as one random counterpart to all the loadings in a row. – ttnphns Nov 24 '17 at 21:32
  • Uhm... you have a point. I may need to re-visit how I generate uniquenesses then. – S. Punky Nov 25 '17 at 00:54

0 Answers0