[R] ltm: Simplified approach to bootstrapping 2PL-Models?

Christian Montel christian.montel at eligo.de
Sun Nov 20 13:33:14 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))
}

fit <- ltm(Abortion ~ z1, control = list(GHk = 20, iter.em = 20))
GoF.ltm(fit)

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, best regards, 
Christian



More information about the R-help mailing list