est_2PL: Estimation of latent trait for 2PL model.

Description Usage Arguments Details Value

Description

The latent trait (theta) is estimated by calling uniroot on q = dlogL + C, where dlogL is the first derivative of the log-likelihood, in theta, and C is a function of theta that depends on the method selected. For method = "ML", C = 0. For method = "WML", C is given by equation 9 of Warm (1989). For method = "MAP", C = - theta. Standard errors (or posterior standard deviations) are computed analytically via the test information of each estimator. The value of logL (not the value of q) at the estimate is also provided. If parallel = T, the call to uniroot is parallelized via parallel::mclapply, but the decrease in runtime is negligible for dim(resp) < c(1000, 100)

Usage

1
est_2PL(resp, parms, method = "ML", parallel = T)

Arguments

resp

a matrix or data.frame containing the binary item responses.

parms

a list or data.frame with elements parms$alpha and parms$beta corresponding to the discrimination and difficulty parameters of the 2PL model, respectively.

method

one of "ML", "WML", "MAP".

logical:

call parallel:mclapply instead of looping over nrow(resp)?

Details

ToDo: 1. Remove and index duplicate response patterns. 2. Find a better way of setting the range of x in uniroot.

Value

An nrow(resp) by 3 matrix of loglikleihoods, theta estimates, analytic SEs for each response pattern in resp.


peterhalpin/cirt documentation built on May 25, 2019, 1:50 a.m.