hfgolino/EGAnet

lavaan error

Closed this issue · 3 comments

When I carry out the code:
red1 <- EGAnet::UVA(overall, n=NULL, model = "glasso",
uva.method = c("MBR"),corr= "cor_auto", method = "wTO", type = "adapt", reduce = T, reduce.method = "latent", adhoc = F, plot.redundancy = T,auto = FALSE)
After several times of combinations (exactly the seventh time), when I combine two items, there is a warning 'Error in lav_options_set(opt) :
lavaan ERROR: missing = “fiml” not available in the categorical setting'
image
However, there is no missing value in my data, what should I do?

Hi @MaDangyang,

To give more concrete direction, I'm going to need a few things from you:

Reproducible Example
(see reproducible example for more details)

Since you're using your own data in your example, then I will ask that you please send along the minimal data necessary in a .RData file to alexpaulchristensen@gmail.com with a reference to this issue


System Settings

EGAnet version:
Operating system:
OS version:


Based on your error output, I see a few things:

  1. You're using type = "adapt" which is no longer supported or recommended

  2. It seems you'd also like to use the manual selection feature, which is also no longer supported

The argument settings uva.method = "MBR" is incompatible with type = "adapt" and auto = FALSE

The type = "adapt" and auto = FALSE will override uva.method = "MBR" and push to old code that is no longer supported and will not be fixed for bugs.

We've published a paper on UVA with the recommended settings which comes default in the latest package: UVA

These settings are:

red1 <- UVA(overall, cut.off = 0.25, reduce = TRUE, reduce.method = "remove", auto = TRUE)

Thanks for your reply. I've sent my data to your email.

But what if I still want to use reduce.method = "latent", what should I do?

By the way, if I use reduce.method = "remove", should I just iterate the step of removing until there is no wTO value >=0.25?

And when I use reduce.method = "latent", whether combining the redundant items for one time is enough?

Thank you for sending your data along.

The error is due to old code that is no longer supported and won't be fixed. The rest of the error is pasted here:

Error in lav_options_set(opt) : 
  lavaan ERROR: missing = “fiml” not available in the categorical setting
In addition: Warning message:
Manual decisions (`auto = FALSE`) will not be supported in future versions of {EGAnet}.

Use `reduce = FALSE` to perform manual inspection instead

Do not submit error reports. Bugs will not be fixed 

These settings will work:

# Latent variables
red1 <- UVA(overall, reduce.method  = "latent")

# Remove variables
red1 <- UVA(overall)

# No automatic reduction (can be used for manual inspection)
red1 <- UVA(overall, reduce = FALSE)

But what if I still want to use reduce.method = "latent", what should I do?

You can use the first option listed above

By the way, if I use reduce.method = "remove", should I just iterate the step of removing until there is no wTO value >=0.25?

No, you should only perform UVA once unless you have theoretical reason to keep going. You can apply UVA again to determine whether your variables are still redundant but this application should be done with caution. Our simulation evidence demonstrates that the identification of the most problematic local dependence (or redundancy) are picked up in the first run.

And when I use reduce.method = "latent", whether combining the redundant items for one time is enough?

One time is enough

Resolution: Won't fix. Manual inspection is no longer supported and should be handled outside of the UVA function. Warning message is produced when old code is used