inst/EAPMAP/global.R

require(fGarch)
# define probability or likelihood function for 2PL model
PLfun <- function(theta, alpha, delta, D=1, u=1){
  z = D*alpha*(theta-delta)
  P = exp(u*z) / (1 + exp(z))
  return(P)
}

alphas <- c(1,1,1,1,1) # discriminations
deltas <- c(-2.155, -.245, .206, .984, 1.211) # de Ayala difficulty estimates (Table 4.4)
n <- length(deltas)

Try the irtDemo package in your browser

Any scripts or data that you put into this service are public.

irtDemo documentation built on June 8, 2025, 11:39 a.m.