search for: rmvlogis

Displaying 2 results from an estimated 2 matches for "rmvlogis".

Did you mean: rlogis
2010 Mar 11
2
about IRT simulation
hello R: we have a two-parameter IRT simulation code. The goal is to generate a response matrix.But the "for" part doesn't run. we don't know what is wrong with it. Thanks so much~~~ I <- 10 J <- 5 response <- matrix(0, 10, 5) pij <- function(a,b,theta) { a <- rnorm(J, 0.8, 0.04) a b <- rnorm(J, 0, 1) b theta <- rnorm(I, 0,1) theta for( i in 1:I ) { for(
2011 Nov 20
2
ltm: Simplified approach to bootstrapping 2PL-Models?
...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 fitt...