Can someone help me in fixing this error? Thanks
Debug
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"
private$.run()
private$.compute(data)
suppressWarnings({
fit <- lavaan::cfa(model = model, data = data,
std.lv =
std.lv, missing = missing, meanstructure = TRUE)
estimates <- lavaan::parameterestimates(fit, standardized = TRUE, level = self$options$ciWidth/100)
fitMeasures <- lavaan::fitMeasures(fit)
residuals <- lavaan::residuals(fit, type = "cor")[[2]]
modIndices <- lavaan::modificationIndices(fit, sort. = FALSE, minimum.value = 0)
})
withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
lavaan::modificationIndices(fit, sort. = FALSE, minimum.value = 0)
lav_object_extended(object, add = FULL, all.free = TRUE)
lavaan(LIST, slotOptions = lavoptions, slotSampleStats = object@SampleStats, slotData = object@Data, slotCache = object@Cache, sloth1 = lavh1)
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)