rsc2: Estimation of the one-parameter RSC model, with latent traits...

Description Usage Arguments Details Value

View source: R/cIRF_functions.R

Description

This function calls optim to estimate the one-parameter RSC model from the (conjunctively-scored) repsonses of dyads to a group assessment.

Usage

1
2
rsc2(resp, parms, theta1, theta2, method = "MAP", obs = F, sigma = 3,
  parallel = F)

Arguments

resp

a matrix or data.frame containing the (conjunctively-scored) binary item responses.

parms

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

theta1

the latent trait of member 1.

theta2

the latent trait of member 2.

method

one of c("ML", "MAP"). The latter isrecommended.

obs

logical: should standard errors be computed using the observed (TRUE) or expected (FALSE) Fisher information?

sigma

prior standard deviation for logit of weight.

parallel

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

Details

Estimation is via either maximum likelihood (ML) or modal a'posteriori (MAP), with the latter being prefered. For MAP, a two-parameter Beta prior is used with the parameter of the RSC model, in which both parameters are equal to 1 + epsilon. Standard errors (or posterior standard deviations) are computed via the inverse of the analytically computed second derivatives of the objective function, at the parameter estimates. The value of the objective function at the estimate is is also provided. If parallel = T, the call to optim is parallelized via parallel::mclapply.

Value

An named nrow(resp) by 3 data.frame containing the estimates, their standard errors, and the value of the log-likelihood of the RSC model at the solution (not the log posterior with MAP).


peterhalpin/cirt documentation built on July 15, 2018, 12:42 p.m.