michaelhallquist / MplusAutomation

The MplusAutomation package leverages the flexibility of the R language to automate latent variable model estimation and interpretation using Mplus, a powerful latent variable modeling program developed by Muthen and Muthen (www.statmodel.com). Specifically, MplusAutomation provides routines for creating related groups of models, running batches of models, and extracting and tabulating model parameters and fit statistics.
81 stars 46 forks source link

Missing values introduced when running multigroup alignment model on simulated data #202

Open jenniferdguay opened 3 months ago

jenniferdguay commented 3 months ago

Hi,

I'm trying to run a multigroup alignment model with different oblique rotations. However, when running the model on simulated data, I get an error that the data has 1 missing value for each group even though the data has been generated with no missing values.

The simulated data looks something like this: simout$data

The code used to estimate the model is written as:

alignment.mdl <- mplusObject(
  TITLE =     "Run multigroup alignment;",
  VARIABLE =  "USEVARIABLES = group x1-x10; GROUPING =  group(2);",
  MODEL= "F1-F2 BY x1-x10(*1);",
  ANALYSIS =  "ROTATION = oblimin; alignment = fixed;",
  OUTPUT = "align;",
  rdata = simout$data  
)
alignment.fit <- mplusModeler(alignment.mdl, modelout = "alignment.inp", run=T)

The following message is printed in the console:

No PROPORTION OF DATA PRESENT sections found within COVARIANCE COVERAGE OF DATA output. Warning message: In readModels(target = outfile, quiet = quiet) : NAs introduced by coercion

and I get this error in the Mplus output file: Mplus_error

How can I fix this issue?

Many thanks! Jennifer