Calculate AIC with not normal distributed items

Hi everyone,
I'm dealing with not normal distributed items so I'm testing my model using USLM estimator like this:

fit <- cfa(model = my_model, data = my_data, meanstructure = TRUE, std.lv = T, estimator= "ULSM")

sum_fit <- summary(fit, standardized = T, rsquare = T, fit.measure = T)

Unfortunately summmary function doesn't give me back AIC values by default. Browsing some site I found the function AIC() but I don't think I'm using it in the right way at all.

Can someone kindly indicate me the correct way to calculate the AIC in my situation?
Thank you so much

library(lavaan)
#> This is lavaan 0.6-5
#> lavaan is BETA software! Please report any bugs.
HS.model <- ' visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 '

fit <- cfa(HS.model, data = HolzingerSwineford1939)
AIC(fit)
#> [1] 7517.49

Created on 2020-02-06 by the reprex package (v0.3.0)

1 Like

Hi, thank you for your answers. I did try that but I get this error: "lavaan WARNING: logLik only available if estimator is ML[1] NA". My estimator is unweighted least square and not maximum likehood.
Thank you again

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.