BEMM.1PLG | R Documentation |
This function can estimate the item parameters of the 1PLG model via Bayesian Expectation-Maximization-Maximization (BEMM) algorithm proposed by Guo, Wu, Zheng, & Wang (2018, April). Both Bayesan modal estimates and maximum likelihood estimates are available. In addition, the examinees' ability and a few model fits information can be also obtained through this function.
BEMM.1PLG(data, PriorBeta = c(0, 4), PriorGamma = c(-1.39, 0.25),
InitialBeta = NA, InitialGamma = NA,
Tol = 0.0001, max.ECycle = 2000L, max.MCycle = 100L,
n.decimal = 3L, n.Quadpts = 31L, Theta.lim = c(-6, 6),
Missing = -9, ParConstraint = FALSE, BiasSE=FALSE)
data |
A |
PriorBeta |
The user specified normal distribution prior for item difficulty (beta) parameters in the 1PLAG and 1PLG model. Can be:
|
PriorGamma |
The user specified normal distribution prior for item guessing (gamma) parameters in the 1PLAG and 1PLG model. Can be:
|
InitialBeta |
The user specified starting values for item difficulty (beta) parameters in the 1PLAG and 1PLG models. Can be:
|
InitialGamma |
The user specified starting values for item guessing (gamma) parameters in the 1PLAG and 1PLG models. Can be:
|
Tol |
A single number ( |
max.ECycle |
A single |
max.MCycle |
A single |
n.Quadpts |
A single |
n.decimal |
A single |
Theta.lim |
A |
Missing |
A single number ( |
ParConstraint |
A logical value to indicate whether estimates parametes in a reasonable range; default is FALSE. If ParConstraint=TRUE: beta in [-6, 6], gamma in [-7, 0]. |
BiasSE |
A logical value to determine whether directly estimating SEs from inversed Hession matrix rather than USEM method, default is FALSE. |
One parameter logsitc guessing (1PLG) model proposed by San Martín et al.(2006). Let invlogit(x)=1 / (1 + exp(-x)):
P(x = 1|\theta, \beta, \gamma) = invlogit(\theta - \beta) + (1 - invlogit(\theta - \beta)) * invlogit(\gamma)
where x=1 is the correct response, theta is examinne's ability; beta and gamma are the item difficulty and guessing parameter, respectively. These parameter labels are capitalized in program for emphasis.
This function will return a list includes following:
A dataframe
consists of the estimates of beta and gamma parameters and corresponding estimated standard errors.
A dataframe
consists of the estimates of theta and corresponding estimated standard errors (EAP method).
The loglikelihood.
The number of iterations.
The parameter estimation history of iterations.
The model fits information includes G2 test, AIC, BIC and RMSEA.
The running time of the program.
The initial values of item parameters.
Guo, S., Wu, T., Zheng, C., & Wang, W.-C. (2018, April). Bayesian Expectation-Maximization-Maximization for 1PL-AG Model. Paper presented at the 80th NCME Annual Meeting, New York, NY.
San Martín, E., Del Pino, G., & De Boeck, P. (2006). IRT models for ability-based guessing. Applied Psychological Measurement, 30(3), 183-203. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/0146621605282773")}
###Example: A brief simulation study###
#generate true values and response matrix
set.seed(10)
library(IRTBEMM)
I=500 #set the number of examinees is 500
J=10 #set the number of items is 10
true.beta=rnorm(J,0,1) #simulate true difficulty parameters
true.gamma=rnorm(J,-1.39,0.5) #simulate true guessing parameters
true.th=rnorm(I,0,1) #simulate true theta parameters
true.par=list(Beta=true.beta, Gamma=true.gamma) #make a list
response=matrix(NA,I,J) #Create a array to save response data
for (i in 1:I){
#calucate the probability of 1PLG
P=Prob.model(X=true.th[i], Model='1PLG', Par.est0=true.par)
response[i,]=rbinom(J,1,P) #simulate the response
}
#To save example running time, we set the Tol to 0.1
#Obtain the Bayesian modal estimation (BME) using default priors
#Estimate model via BEMM algorithm
bme.res=BEMM.1PLG(response, Tol=0.1)
bme.res$Est.ItemPars #show item estimates
bme.res$Est.Theta #show ability estimates
bme.res$Loglikelihood #show log-likelihood
bme.res$EM.Map #show EM iteration history
bme.res$fits.test #show model fits information
#Obtain the maximum likelihood estimation (MLE) by setting Prior=NA
#Estimate model via EMM algorithm
mle.res=BEMM.1PLG(response, PriorBeta=NA, PriorGamma=NA, Tol=0.1)
mle.res$Est.ItemPars #show item estimates
mle.res$Est.Theta #show ability estimates
mle.res$Loglikelihood #show log-likelihood
mle.res$EM.Map #show EM iteration history
mle.res$fits.test #show model fits information
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.