[R] ltm: Simplified approach to bootstrapping 2PL-Models?
Christian Montel
christian.montel at eligo.de
Sun Nov 20 13:16:21 CET 2011
Dear R-List,
to assess the model fit for 2PL-models, I tried to mimic the
bootstrap-approach chosen in the GoF.rasch()-function. Not being a
statistician, I was wondering whether the following simplification
(omit the "chi-squared-expressed model fit-step") would be appropriate:
GoF.ltm <- function(object, B = 50, ...){
liFits <- list()
for(i in 1:B){
rndDat <- rmvlogis(nrow(object$X), coef(object))
liFits[[i]] <- ltm(rndDat ~ z1)
}
distr <- sort(sapply(liFits, function(x)return(x$log.Lik)))
return(max(which(distr <= object$log.Lik))/length(distr))
}
The rationale behind was to directly use the sorted sequence of
(log)likelihoods of models fitted to 2PL-fitting-datasets where the
parameters of <object> hold. The return value was intented to roughly
mirror how many 2PL-Datasets which demonstrably fit the model fit
worse or better than the model in question.
Any comments which may help me figure out whether I'm on the right
track are greatly appreciated.
Thank you in advance,
best regards,
Christian
Dr. Christian Montel
E-Mail: christian.montel at eligo.de
eligo GmbH -- Büro Berlin
Tel.: +49 (0) 30 695 399 95-2
Arndtstr. 34
Fax: +49 (0) 30 695 399 95-1
10965 Berlin
More information about the R-help
mailing list