Pairwise deletion option not working for CFA, WLSMV

250 views
Skip to first unread message

curti...@gmail.com

unread,
Jun 30, 2018, 5:22:20 PM6/30/18
to lavaan
Hi everyone,

I'm trying to fit a CFA right now with WLSMV, and wanted to use the pairwise deletion method of handling missing values.

Unfortunately, it hasn't been working for me. Might anyone be able to diagnose the error source?
I've included the code snippet and error message below.

From what I understand back in 2013 (http://lavaan.ugent.be/history/dot5.html), pairwise deletion was implemented.

Thanks for your help in advance.

# Case B: trying missing="pairwise"
resultsPwise <- cfa(ctlModel, dataset, estimator = "WLSMV", missing="pairwise")
summary(resultsPwise, fit.measures = TRUE)
summary(resultsPwise, fit.measures = TRUE, standardized = TRUE)

Error output
> resultsPwise <- cfa(ctlModel, dataset, estimator = "WLSMV", missing="pairwise")
Error in nlminb(start = start.x, objective = minimize.this.function, gradient = GRADIENT,  : 
  NA/NaN gradient evaluation
In addition: Warning message:
In lav_samplestats_from_data(lavdata = lavdata, missing = lavoptions$missing,  :
  lavaan WARNING: number of observations (219) too small to compute Gamma

Yves Rosseel

unread,
Jul 1, 2018, 5:20:28 AM7/1/18
to lav...@googlegroups.com, curti...@gmail.com
On 06/30/2018 11:22 PM, curti...@gmail.com wrote:
> Error in nlminb(start = start.x, objective = minimize.this.function,
> gradient = GRADIENT,  :
>   NA/NaN gradient evaluation

Oh dear. The optimizer was lost in (parameter) space. This is most
likely due to this:

>   lavaan WARNING: number of observations (219) too small to compute Gamma

It looks like Gamma is unstable. I have recently found a way to
'stabilize' Gamma in such cases, that may or may not help in this case.
Could you send me your data + script? It would help me to test this.

Yves.

Tim Cadman

unread,
Dec 6, 2018, 12:11:45 PM12/6/18
to lavaan
Hi Yves,

I've had exactly the same error message trying to use pairwise deletion with WLSMV:

> pairwise.fit <- cfa(model, data = data, estimator="WLSMV", missing="pairwise")

Error in nlminb(start = start.x, objective = objective_function, gradient = GRADIENT,  : 
  NA/NaN gradient evaluation
In addition: Warning message:
In lav_samplestats_from_data(lavdata = lavdata, missing = lavoptions$missing,  :
  lavaan WARNING: number of observations (523) too small to compute Gamma


Did you make any progress with this?

best,

Tim
Reply all
Reply to author
Forward
0 new messages