How can I get standardized factor loadings with the semopy package in python?

637 views Asked by At

I'm using the semopy python package to do confirmatory factor analysis, and have a couple of questions:

  1. How do I get standardised factor loadings?
  2. Is there a way to get modification indices (to help adapt the model step by step)?
  3. How do I get the correlations between the factors?
1

There are 1 answers

1
Jeor On
  1. There is a boolean argument std_est for the inspect method that adds a standardized estimates column to the returned DataFrame with parameters estimates.
  2. See Fit Indices at the semopy website
  3. Do you mean that you seek to "standardize" covariances by latent factor variances? If so, you can use this code snippet:
cov = model.inspect('mx')['Psi']
stds = np.diagonal(cov) ** (-0.5)
corr = std * cov * std