Error when run a mediation analysis
When I do a mediation analysis, using Bootstrap (Percentile) with two predictors, one mediator, one dependent, I get the following Error message.
Does this error reside in JASP, or the underlying lavaan?
-----------------------------------
This analysis terminated unexpectedly.
Error in validObject(.Object): invalid class 'Fit' object: invalid object for slot 'fx.group' in class 'Fit': got class 'NULL', should be or extend class 'numeric'
Stack trace
lavaan:::bootstrap.internal(object = fit, R = samples, FUN = coef_with_callback)
lapply(seq_len(RR), fn)
FUN(X[[i]], ...)
lavaan(slotOptions = lavoptions, slotParTable = lavpartable, slotModel = model.boot, slotSampleStats = bootSampleStats, slotData = lavdata)
lav_model_fit(lavpartable = lavpartable, lavmodel = lavmodel, x = x, VCOV = VCOV, TEST = TEST)
new('Fit', npar = max(lavpartable$free), x = x.copy, partrace = PARTRACE, start = lavpartable$start, est = est, se = se, fx = fx, fx.group = fx.group, logl = logl, logl.group = logl.group, iterations = iterations, converged = converged, control = control, Sigma.hat = if (lavmodel@conditional.x) implied$res.cov else implied$cov, Mu.hat = if (lavmodel@conditional.x) implied$res.int else implied$mean, TH = if (lavmodel@conditional.x) implied$res.th else implied$th, test = test)
initialize(value, ...)
initialize(value, ...)
validObject(.Object)
stop(msg, ': ', errors, domain = NA)
To receive assistance with this problem, please report the message above at: https://jasp-stats.org/bug-reports
-------------------------
Comments
Hello @Michael_Jasper,
I would say this error has something to do with lavaan. In the lavaan community, I could find one post that has the same error message (see https://groups.google.com/g/lavaan/c/IUU553_L0qE). So, I suggest posting your syntax there and ask for help. You might also get modeling tips.
Hope this helps.
Cheers,
Ihnwhi