Closed sammerk closed 8 years ago
Please help us reproduce this problem by telling us which help-example(s) produce(s) this message. Judging from the "lavaanStar" class it looks like a problem with the missing-data functions (runMI and auxiliary).
Running example(auxiliary) works fine, but once you try to run a summary() of the fitted object, then the error appears. Hopefully that just means the summary() method needs to be updated. Specifically, it only seems to be the fit measures that are a problem (the fitMeasures and modindices functions, both of which are called by the summary method), but you can still inspect the parameterEstimates(fitaux).
Terry
Hey Terry,
if I use the first example:
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
HSMiss <- HolzingerSwineford1939[,paste("x", 1:9, sep="")]
randomMiss <- rbinom(prod(dim(HSMiss)), 1, 0.1)
randomMiss <- matrix(as.logical(randomMiss), nrow=nrow(HSMiss))
HSMiss[randomMiss] <- NA
out <- cfa.mi(HS.model, data=HSMiss, m = 3, chi="all")
everthing works fine.
But summary(out)
or print(out)` results in
Error in sprintf(" %10.3f", object@test[[1]]$stat) : no slot of name "test" for this object of class "lavaanStar"
.
parameterEstimates(out)
works, as you anticipated.
Cheers - and thank's again for your work! Samuel
Thanks for the additional information. Also, I forgot to mention in my previous discussion that I get the same result on Windows 7, so this has nothing to do with using Mac OS X.
Hmmm, there's something weird with the lavaanStar object and lavaan 0.5-20. Short version: everything works fine with lavaan 0.5-19.
Long version: lavaanStar isn't inheriting all the slots from lavaan it needs (in particular test and vcov, which provide fit statistics and standard errors).
> slotNames("lavaan")
[1] "call" "timing" "Options" "ParTable" "pta" "Data"
[7] "SampleStats" "Model" "Cache" "Fit" "boot" "optim"
[13] "implied" "vcov" "test" "external"
> slotNames("lavaanStar")
[1] "nullfit" "imputed" "auxNames" "call" "timing" "Options"
[7] "ParTable" "pta" "Data" "SampleStats" "Model" "Cache"
[13] "Fit"
I'm working on diagnosing why this is happening...
Please download the 0.4-11 version. This issue has been fixed.
Running the help-examples yields the error message:
Error in sprintf(" %10.3f", object@test[[1]]$stat) : no slot of name "test" for this object of class "lavaanStar"
on following session:
On Windows and Ubuntu everythings works fine - thank´s for the very useful functions!