# Prep Data
data <- read.csv("example.csv")
set.seed(145)
ind <- sample(c(rep(TRUE,ceiling(nrow(data)*0.5)),rep(FALSE,floor(nrow(data)*0.5))))
dep.items <- data
dep.evaluation <- dep.items[ind, ]
dep.validation <- dep.items[!ind, ]
# RMSEA = .096, CFI = .972, TLI = .959, SRMR = .027, AIC = 5118.250, BIC = 5202.793
dep.model <- 'dep =~ DEP1+DEP2+DEP3+DEP4+DEP5+DEP6+DEP7'
dep.fit <- cfa(dep.model, data=dep.evaluation, std.lv=TRUE, missing="fiml")
fitMeasures(dep.fit, c("aic","bic","chisq", "df", "pvalue", "cfi","tli","rmsea", "srmr"))
# Mokken
coefH(dep.evaluation) # no items with low H, Scale H = .699
aisp(dep.evaluation) # all items = 1
# IRT
dep.pcm <- mirt(dep.evaluation, model=1, type="graded")
M2(dep.pcm, type = "C2") # RMSEA 0.078, SRMSR 0.039, TLI -1.151, CFI 0.000
--
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
row.names=FALSE
> data <- read.csv("example.csv")
> set.seed(145)
> ind <- sample(c(rep(TRUE,ceiling(nrow(data)*0.5)),rep(FALSE,floor(nrow(data)*0.5))))
> dep.items <- data
> dep.evaluation <- dep.items[ind, ]
> dep.validation <- dep.items[!ind, ]
>
> # RMSEA = .054, CFI = .999, TLI = .999, SRMR = .031
> apply(dep.evaluation,2,table)
DEP1 DEP2 DEP3 DEP4 DEP5 DEP6 DEP7
0 281 168 278 203 248 278 298
1 96 165 84 141 117 90 74
2 26 55 34 49 36 29 27
3 11 26 18 21 13 17 15
> dep.model <- 'dep =~ DEP1+DEP2+DEP3+DEP4+DEP5+DEP6+DEP7'
> dep.fit <- cfa(dep.model, data=dep.evaluation, std.lv=TRUE, ordered=c("DEP1","DEP2","DEP3","DEP4","DEP5","DEP6","DEP6","DEP7"), missing="fiml")
Warning message:
In lav_options_set(opt) :
lavaan WARNING: information will be set to “expected” for estimator = “DWLS”
> fitMeasures(dep.fit, c("chisq", "df", "pvalue", "cfi","tli","rmsea", "srmr"))
chisq df pvalue cfi tli rmsea srmr
30.955 14.000 0.006 0.999 0.999 0.054 0.031
>
> coefH(dep.evaluation) # no items with low H, Scale H = .699
$`Hij`
DEP1 se DEP2 se DEP3 se DEP4 se DEP5 se DEP6 se DEP7 se
DEP1 0.730 (0.043) 0.735 (0.042) 0.750 (0.044) 0.782 (0.034) 0.639 (0.052) 0.695 (0.046)
DEP2 0.730 (0.043) 0.698 (0.043) 0.582 (0.047) 0.727 (0.042) 0.637 (0.050) 0.623 (0.048)
DEP3 0.735 (0.042) 0.698 (0.043) 0.816 (0.028) 0.705 (0.044) 0.675 (0.045) 0.793 (0.040)
DEP4 0.750 (0.044) 0.582 (0.047) 0.816 (0.028) 0.662 (0.049) 0.723 (0.040) 0.788 (0.041)
DEP5 0.782 (0.034) 0.727 (0.042) 0.705 (0.044) 0.662 (0.049) 0.584 (0.052) 0.668 (0.048)
DEP6 0.639 (0.052) 0.637 (0.050) 0.675 (0.045) 0.723 (0.040) 0.584 (0.052) 0.702 (0.046)
DEP7 0.695 (0.046) 0.623 (0.048) 0.793 (0.040) 0.788 (0.041) 0.668 (0.048) 0.702 (0.046)
$Hi
Item H se
DEP1 0.721 (0.031)
DEP2 0.663 (0.033)
DEP3 0.737 (0.026)
DEP4 0.716 (0.029)
DEP5 0.687 (0.034)
DEP6 0.661 (0.035)
DEP7 0.713 (0.032)
$H
Scale H se
0.699 (0.026)
> aisp(dep.evaluation) # all items = 1
0.3
DEP1 1
DEP2 1
DEP3 1
DEP4 1
DEP5 1
DEP6 1
DEP7 1
>
> dep.pcm <- mirt(dep.evaluation, model=1, type="graded")
Iteration: 45, Log-Lik: -2099.638, Max-Change: 0.00009
> M2(dep.pcm, type = "C2") # RMSEA 0.078, SRMSR 0.039, TLI -1.151, CFI 0.000
M2 df p RMSEA RMSEA_5 RMSEA_95 SRMSR TLI CFI
stats 48.84321 14 9.524931e-06 0.07762829 0.05454044 0.1017721 0.0391606 -1.150941 0
Seongho
Hi Dr ChalmersMy apologies. When I first received your response I was very confused because I had never seen that warning message. But now I have realised that when I saved the example data I forgot.Thanks for the tip regardign the CFA.
DEP4 0.750<span style="color:#000" class="m_-8444015118030415444m_-2371304073345106593m_-7592326098837701606m_4520672164120949