lavaan WARNING: estimation polyserial correlation did not converge

175 views
Skip to first unread message

Kirsty Bowman

unread,
Jun 29, 2020, 8:39:41 AM6/29/20
to lavaan

Hi there,


I am fairly new to SEM and seeking some advice. I am running a SEM using the lavaan package to do mediation analysis and repeating the process on multiple imputed datasets. I have five latent variables (each made up of a number of ordered factor items), an exposure, and an outcome. I am using the latent variables as my mediators. I am interested in the direct and indirect effects. The estimator used was DWLS and I have a sample size of ~ 3,000. Each time I run the SEM (either with all five latent variables or with one latent variable) I get a number of warning messages as detailed below. Note that “my outcome variable”, “one of the items used for the latent variables” and “different item used for the latent variables” below are the variables that I am interested in.

 

In lav_bvmix_cor_twostep_fit(fit.y1 = UNI[[i]], fit.y2 = UNI[[j]],  :

  lavaan WARNING: estimation polyserial correlation did not converge for

                    variables [my outcome variable] and [one of the items used for the latent variables]


In lav_bvmix_cor_twostep_fit(fit.y1 = UNI[[i]], fit.y2 = UNI[[j]],  :

  lavaan WARNING: estimation polyserial correlation did not converge for

                    variables [my outcome variable] and [different item used for the latent variables]


etc.

 

The warning message above (i.e. “estimation polyserial correlation did not converge”) is only raised for a subset of my items making up the different latent variables and the outcome. 


I should note that my models do converge even with these warning estimates and seem to provide sensible estimates. I would just like to understand what is causing these warnings and if I need to be concerned and/or address them.


Please could someone advice whether:

  1. Do these warnings would affect the estimates?
  2. Is it ok to use the estimates with these warnings?
  3. A possible solution to these warning messages?

Many thanks


Kirsty

 

Terrence Jorgensen

unread,
Jun 30, 2020, 6:18:50 PM6/30/20
to lavaan
  1. Do these warnings would affect the estimates?
Yes.  DWLS fits your model to the estimated polychoric correlation matrix. 
  1. Is it ok to use the estimates with these warnings?
 If an earlier step not converge, you can't trust the later step.  
  1. A possible solution to these warning messages?
What does the contingency table look like for the pairs of variables that generate errors?  Perhaps there is something odd about them, like perfect correspondence.

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Kirsty Bowman

unread,
Jul 1, 2020, 9:56:18 AM7/1/20
to lavaan
Dear Terrence, 

Many thanks for your responses to my questions. The polyserial correlation warning crops up between my outcome variable which is continuous and some of the items that are making up my latent variables (these are either binary or ordered factor items). I ran polyserial correlations using the polycor package and this gave me correlations between my outcome and each item. I am unsure why the polyserial correlation is unable to converge between my continuous outcome and the items using the lavaan package. Do you have any ideas what my causing this problem and/or any solutions?

Many thanks
Kirsty 

Yves Rosseel

unread,
Jul 2, 2020, 10:11:39 AM7/2/20
to lav...@googlegroups.com
I would like to investigate this. Could you send me the data (or a
snippet of the data)? I only need the variables for which the polyserial
correlation fails. You may send it to Yves dot Rosseel at UGent do be.

Yves

On 7/1/20 3:56 PM, Kirsty Bowman wrote:
> Dear Terrence,
>
> Many thanks for your responses to my questions. The polyserial
> correlation warning crops up between my outcome variable which is
> continuous and some of the items that are making up my latent variables
> (these are either binary or ordered factor items). I ran polyserial
> correlations using the polycor package and this gave me correlations
> between my outcome and each item. I am unsure why the polyserial
> correlation is unable to converge between my continuous outcome and the
> items using the lavaan package. Do you have any ideas what my causing
> this problem and/or any solutions?
>
> Many thanks
> Kirsty
>
> On Tuesday, June 30, 2020 at 11:18:50 PM UTC+1, Terrence Jorgensen wrote:
>
> 1. Do these warnings would affect the estimates?
>
> Yes.  DWLS fits your model to the estimated polychoric correlation
> matrix.
>
> 1. Is it ok to use the estimates with these warnings?
>
>  If an earlier step not converge, you can't trust the later step.
>
> 1. A possible solution to these warning messages?
>
> What does the contingency table look like for the pairs of variables
> that generate errors?  Perhaps there is something odd about them,
> like perfect correspondence.
>
> Terrence D. Jorgensen
> Assistant Professor, Methods and Statistics
> Research Institute for Child Development and Education, the
> University of Amsterdam
> http://www.uva.nl/profile/t.d.jorgensen
> <http://www.uva.nl/profile/t.d.jorgensen>
>
> --
> You received this message because you are subscribed to the Google
> Groups "lavaan" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lavaan+un...@googlegroups.com
> <mailto:lavaan+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lavaan/12fdd322-1a12-463e-96ba-dddfefc5873ao%40googlegroups.com
> <https://groups.google.com/d/msgid/lavaan/12fdd322-1a12-463e-96ba-dddfefc5873ao%40googlegroups.com?utm_medium=email&utm_source=footer>.

Robert Miller

unread,
Dec 31, 2020, 7:54:36 AM12/31/20
to lavaan
Dear Yves,

do you still require such data?
I encountered the same issue with 1 out of 20 imputed datasets consisting of ~630k observations, which i'd gladly contribute:

lavaan:::lav_bvmix_cor_twostep_fit() throws warning; estimation did not always converge

polycor::polyserial does not throw any warning.

The estimates returned by both routines are very close.

Anyway - in the context of multiple imputation, the problem can easily be bypassed by manually excluding the specific dataset(s) that throw the warning. For future releases of the semtools-package it might be worthwhile to automatize this procedure. Currently, all datasets seems to be used for pooling irrespective of this warning.

Cheers, Robert

Terrence Jorgensen

unread,
Jan 5, 2021, 10:24:16 PM1/5/21
to lavaan
in the context of multiple imputation, the problem can easily be bypassed by manually excluding the specific dataset(s) that throw the warning. For future releases of the semtools-package it might be worthwhile to automatize this procedure. 
 
There are myriad exclusion criteria one might justifiably rationalize, but I cannot possible automate (or even guess) them all.  However, I included a mechanism for users to be able to exclude whatever imputations (using whatever rule) with the omit.imps= argument to all lavaan.mi methods and dedicated functions.  
See the description on the class?lavaan.mi help page:

Specific imputation numbers can also be included in this argument, in case users want to apply their own custom omission criteria (or simulations can use different numbers of imputations without redundantly refitting the model).

Automatically or manually selecting imputation numbers is up to the user, but automation could possibly be facilitated by the FUN= argument that runMI() passes to lavaanList()
Reply all
Reply to author
Forward
0 new messages