set.seed(6819)
mTBI_SEM_Data_Amelia <- amelia(mTBI_SEM_Data, m = 40, noms = c("Ethnicity", "HI_Bi_B21", "Sex"), sqrts = c("NV1", "NV2", "NV3", "NV4", "NV5", "NV6", "NV7", "NV8", "NV9", "NV10", "NV11", "NV12", "NV13", "NV15", "NV16", "NV17", "NV18", "NV19", "NV20", "NV21", "VO1", "VO2", "VO3", "VO4", "VO5", "VO6", "VO7", "VO8", "VO9", "VO10", "VO11"), empri = .01*nrow(mTBI_SEM_Data))
mTBI_SEM_Data_Amelia <- transform(mTBI_SEM_Data_Amelia, NVtot = NV1 + NV2 + NV3 + NV4 + NV5 + NV6 + NV7 + NV8 + NV9 + NV10 + NV11 + NV12 + NV13 + NV15 + NV16 + NV17 + NV18 + NV19 + NV20 + NV21)
mTBI_SEM_Data_Amelia <- transform(mTBI_SEM_Data_Amelia, VOtot = VO1 + VO2 + VO3 + VO4 + VO5 + VO6 + VO7 + VO8 + VO9 + VO10 + VO11)
mTBI_SEM_Data_Amelia <- transform(mTBI_SEM_Data_Amelia, VOtot_log = log(VOtot +1))
mTBI_SEM_Data_Amelia <- transform(mTBI_SEM_Data_Amelia, NVtot_log = log(NVtot +1))
mTBI_SEM_Data_Imps <- mTBI_SEM_Data_Amelia$imputations
I posted previously about an error in the summary function
I am thinking it is a problem with the size of the lavaan.mi object (about 250 MB).
--
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/8832757d-de2e-40d4-8d6a-21b79f77a77fo%40googlegroups.com.
On Jun 4, 2020, at 5:53 PM, David Simmonds <davidms...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/CAMxdSn-JC7oioXf3ZJ%2BMRJ0hV2dT_vqVkvoULhnva0AxG83%2Bgg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/E60FA62C-6D90-4B44-BE11-D7504E958386%40gmail.com.
Error in dimnames(W) <- dimnames(B) : 'dimnames' applied to non-array
--
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/f85c30f8-f3aa-49b6-8391-98f6d5a5406fo%40googlegroups.com.
Brandon McCormick
Doctoral Student
Clinical Psychology - Psychology and Law
The University of Alabama
101 McMillan
Tuscaloosa, AL 35401
Phone 205-460-8678
b.mccorm...@gmail.com
Error in UseMethod("vcov") :no applicable method for 'vcov' applied to an object of class "c('lavaan.mi', 'lavaanList')"
On Jun 5, 2020, at 5:14 AM, Terrence Jorgensen <tjorge...@gmail.com> wrote:
--
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/04f3d3fa-36ef-47e2-ba5e-95dc569952bdo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/CAF4pV9zvqk4aetQhD6i61ya5DjG%3DM5-J1ApS%2B%3DmEfcKXncYmBg%40mail.gmail.com.
I created a new workspace, and re-ran everything. I still received these errors:
--
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/124316e4-3ae1-43ba-814b-095bb65cc6f1o%40googlegroups.com.
attached base packages:[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.0 emmeans_1.4.7 estimability_1.3 tools_4.0.0[5] coda_0.19-3 lavaan_0.6-6 mvtnorm_1.1-0 mnormt_1.5-7[9] grid_4.0.0 pbivnorm_0.6.0 xtable_1.8-4 stats4_4.0.0[13] semTools_0.5-3.906 lattice_0.20-41
loaded via a namespace (and not attached):
[1] compiler_4.0.0 tools_4.0.0
saveRDS(fitmTBI_Off_Med2, "lavMI.rds")
library(semTools)
fit <- readRDS("lavMI.rds")
summary(fit)
vcov(fit, type = "within") # Error in dimnames(W) <- dimnames(B) : 'dimnames' applied to non-array
vcov(fit, type = "between") # no problem, because this is calculated before W (within)
fit@vcovList[[1]]
$se[1] "standard"$information[1] "expected" "expected"$vcovNULL
str(lapply(fit@vcovList, "[[", i = "vcov"))
List of 40$ : NULL$ : NULL... (all 40)$ : NULL$ : NULL
library(semTools)
fit <- readRDS("lavMI.rds")
fit2 <- lavaan.mi(model = parTable(fit),
data = lapply(fit@DataList[1:3], head, n = 500), # subset already takes several minutes
show.progress = TRUE)
fit2@vcovList
fitList <- lapply(lapply(fit@DataList[1:3], head, n = 500),
function(dat) lavaan(model = parTable(fit), data = dat))
lapply(fitList, function(x) vcov(x)[1:5, 1:5])
hist(fit@DataList[[1]]$CU1_W2) # for example
On Jun 14, 2020, at 4:59 AM, Terrence Jorgensen <tjorge...@gmail.com> wrote:
<Auto Generated Inline Image 1>
Terrence D. JorgensenAssistant Professor, Methods and StatisticsResearch Institute for Child Development and Education, the University of Amsterdam
--
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/88a632be-fe29-428f-a324-683560d18bf1o%40googlegroups.com.
<Auto Generated Inline Image 1>