I ran a cfa from 40 imputations (had the same result with just 5 imputations). And got an odd result of all my df = inf, as well as warning messages:
1: In if (attr(x, "information") == "observed") { : the condition has length > 1 and only the first element will be used
2: In cbind(c1, c2, deparse.level = 0) :
number of rows of result is not a multiple of vector length (arg 1)
Here are my full results:
lavaan.mi object based on 40 imputed data sets.
See class?lavaan.mi help page for available methods.
Convergence information:
The model converged on 40 imputed data sets
Rubin's (1987) rules were used to pool point and SE estimates across 40 imputed data sets, and to calculate degrees of freedom for each parameter's t test and CI.
Model Test User Model:
Test statistic 697.943
Degrees of freedom 77
P-value 0.000
Model Test Baseline Model:
Test statistic 7210.955
Degrees of freedom 91
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.913
Tucker-Lewis Index (TLI) 0.897
Root Mean Square Error of Approximation:
RMSEA 0.049
90 Percent confidence interval - lower 0.046
90 Percent confidence interval - upper 0.053
P-value RMSEA <= 0.05 0.636
Standardized Root Mean Square Residual:
SRMR 0.036
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Expected
Standard errors Structured
Information Structured
Latent Variables:
Estimate Std.Err t-value df P(>|t|) Std.lv Std.all
AD_W1 =~
AD1_W1 0.302 0.011 26.324 Inf 0.000 0.302 0.481
AD2_W1 0.229 0.009 25.789 Inf 0.000 0.229 0.472
AD3_W1 0.227 0.007 32.219 Inf 0.000 0.227 0.572
AD4_W1 0.258 0.011 23.682 Inf 0.000 0.258 0.438
AD5_W1 0.202 0.011 17.837 Inf 0.000 0.202 0.337
AD6_W1 0.210 0.009 24.049 Inf 0.000 0.210 0.444
AD7_W1 0.219 0.014 15.885 Inf 0.000 0.219 0.302
AD8_W1 0.334 0.010 32.996 Inf 0.000 0.334 0.584
AD9_W1 0.233 0.008 29.981 Inf 0.000 0.233 0.539
AD10_W1 0.207 0.006 32.528 Inf 0.000 0.207 0.577
AD11_W1 0.167 0.006 27.246 Inf 0.000 0.167 0.496
AD12_W1 0.305 0.013 22.755 Inf 0.000 0.305 0.422
AD13_W1 0.259 0.011 22.769 Inf 0.000 0.259 0.422
AD14_W1 0.251 0.009 26.567 Inf 0.000 0.251 0.485
Variances:
Estimate Std.Err t-value df P(>|t|) Std.lv Std.all
AD_W1 1.000 1.000 1.000
.AD1_W1 0.302 0.008 37.467 Inf 0.000 0.302 0.769
.AD2_W1 0.183 0.005 37.598 Inf 0.000 0.183 0.777
.AD3_W1 0.106 0.003 35.698 Inf 0.000 0.106 0.672
.AD4_W1 0.281 0.007 38.074 Inf 0.000 0.281 0.808
.AD5_W1 0.317 0.008 39.104 Inf 0.000 0.317 0.886
.AD6_W1 0.180 0.005 37.996 Inf 0.000 0.180 0.803
.AD7_W1 0.477 0.012 39.366 Inf 0.000 0.477 0.909
.AD8_W1 0.215 0.006 35.414 Inf 0.000 0.215 0.659
.AD9_W1 0.133 0.004 36.447 Inf 0.000 0.133 0.710
.AD10_W1 0.086 0.002 35.587 Inf 0.000 0.086 0.667
.AD11_W1 0.086 0.002 37.231 Inf 0.000 0.086 0.754
.AD12_W1 0.428 0.011 38.264 Inf 0.000 0.428 0.822
.AD13_W1 0.309 0.008 38.261 Inf 0.000 0.309 0.822
.AD14_W1 0.205 0.005 37.406 Inf 0.000 0.205 0.765
Warning messages:
1: In if (attr(x, "information") == "observed") { :
the condition has length > 1 and only the first element will be used
2: In cbind(c1, c2, deparse.level = 0) :
number of rows of result is not a multiple of vector length (arg 1)\
Here is my code:
library(lavaan)
library(semTools)
library(Amelia)
mTBI_SEM_Data <- read.delim("~/Desktop/mTBI_SEM_Data.txt", na.strings="-99")
View(mTBI_SEM_Data)
set.seed = 123456
mTBI_SEM_Data_amelia <- amelia(mTBI_SEM_Data, m = 40, noms = c("Sex", "Ethnicity", "HI_Bi_B21"))
imps <- mTBI_SEM_Data_amelia$imputations
AD_W1 <- 'AD_W1 =~ NA* AD1_W1 + AD2_W1 + AD3_W1 + AD4_W1 + AD5_W1 + AD6_W1 + AD7 _W1 + AD8_W1 + AD9 _W1 + AD10_W1 + AD11_W1 + AD12_W1 + AD13_W1 + AD14_W1
AD_W1 ~~ 1* AD_W1'
fitAD_W1 <- cfa.mi(AD_W1,data=imps)
summary(fitAD_W1,standardized=TRUE,fit.measures=TRUE)