Warning message: In lav_options_set(opt) : lavaan WARNING: missing will be set to “listwise” for se = “robust.sem”
Does mean I cannot use full information ML to deal with missing values if I want robust standard errors?
If I omit the se argument, and input just the following:
fitFear <- sem(modelFear, data = cabsfull, missing = "fiml")
I get the following message:
Warning message: In lav_data_full(data = data, group = group, cluster = cluster, : lavaan WARNING: 5 cases were deleted due to missing values in exogenous variable(s), while fixed.x = TRUE.
So if I understood correctly, it used listwise deletion even though I asked for full information ML. Is it possible to reproduce what these authors have done - i.e. calculate the parameter estimates using the ML with robust standard errors and use FIML for missing data? If yes, what am I doing wrong?
I am new to R and SEM so any advice is very welcome. Thanks!
fitFear <- sem(modelFear, data = cabsfull, missing = "fiml.x", estimator = "MLR")
fitFear <- sem(modelFear, data = cabsfull, missing = "fiml.x", estimator = "MLR")
That will reproduce everything they did except bootstrapping CIs (bias-corrected) for the indirect effect. I was wondering if there is a possibility to add another function after my fitFear function that will just bootstrap the confidence intervals, or do I have to change my function entirely (and maybe try something like:
fitfear<- sem(ModelFear, data=cabsfull, missing = "fiml.x", estimator = "ML", test = "Yuan.Bentler", se = "bootstrap", bootstrap = 1000)
The overall idea is to provide the best solution that will account for the non-normality of the data. My sample size is N = 487. Thank you!
I was wondering if there is a possibility to add another function after my fitFear function that will just bootstrap the confidence intervals
parameterEstimates(fitFear, boot.ci.type="bca.simple")It works fine, but it doesn't say on how many bootstrap samples it is based on.
Apologies, but I am a bit confused now, because my fitFear model does not include a bootstrapping argument.
It is as you recommended earlier:
Thanks! Just to confirm, it should be like this then?fitFear <- sem(modelfear, data = cabsfull, estimator = "MLR", missing = "fiml.x", bootstrap = 5000) parameterEstimates(fitFear, boot.ci.type="bca.simple")
Hello!I also have a question regarding this. Namely, I followed the example above and specified the following command:fit.<-sem(model, data = data ,orthogonal=TRUE, estimator='ML', missing = "fiml.x", estimator = "ML", test = "Yuan.Bentler", se = "bootstrap", bootstrap = 500)However, after this, I was confused to find that the scaled fit indices (CFI/TLI) have risen substantially (robust ones did not though) in comparison to what is obtained with the following code:fit<-sem(model, data = data,std.lv=TRUE,orthogonal=TRUE, estimator='MLR', missing='fiml')I am not sure if the command also bootstrapped the chi-square statistic or only the SE and CI (the CI is important to me as this is a latent mediation model). The scaled chi-squared after first (bootstrapped) and second code differed only slightly (YB scaling factor differed in third decimal) and it confuses me that CFI is much more favourable after bootstrap.
to obtain bootstrapped CI for the latent path coefficients, i.e. their indirect effects - I want to be safe and only take the se="bootstrap" option (only using default ML, even though I need MLR, however, once I obtain MLR fit indices it remains only to find the CI of the paths). It takes quite some time to do this (setting it to 500 boot takes an hour) and I judge that it really performs boot on all the SEs.
However, I find it confusing that when I chose parameterEstimates function with "boot.ci.type = "bca.simple" argument (as I am trying to follow Heyes on this one and to use bias-corrected percentile bootstrap) - this gets finished in a second.
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/4a962340-269b-434a-afce-6f7ee49a9a12%40googlegroups.com.
the principal reason to use bootstrapped CIs for indirect effects is to allow the CIs to be asymmetric
med <- 'a*c'myParams <- c("a","c")myCoefs <- coef(fit.model.temp.rum)[myParams]myACM <- vcov(fit.model.temp.rum)[myParams, myParams] #This one I did not particularly understandmonteCarloMed(med, myCoefs, ACM = myACM, rep = 2000)
monteCarloMed('a*c', object = fit.model.temp.rum)
So the single line of command that you wrote in your last post is enough? (I was confused with the command that specifies the "Asymptotic covariance matrix" )
can I use this command for total effects too?