Description Usage Arguments Details Value
This function calls optim
to estimate the parameter vector c(u, theta1, theta2)
from the repsonses to a combined assessment, in which the 2PL model is used for the individual component of the assessment and the one-parameter RSC model is used for the group component of the assessment.
1 2 |
resp |
a data.frame containing the binary item responses of both the individual assessment and the (conjunctively scored) group assessment. See details for information on formatting. |
parms |
a data.frame with columns |
starts |
starting values, ordered as triplets of |
method |
one of |
obs |
logical: should standard errors be computed using the observed ( |
sigma |
prior standard deviation for logit of weight. |
parallel |
logical: call |
Esimation is via either maximum likelihood (ML) or modal a'posteriori (MAP), with the latter being prefered. For MAP, a standard normal prior is used for individual ability. A standard normal prior is used for individual ability, and for the logit of the weight of the RSC model a normal prior is used with standard deviation sigma
. Standard errors (or posterior standard deviations) are computed by numerically inverting the analytically computed Hessian 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
.
The response matrix resp
must be formatted to contain one row of binary responses for each respondent (not each dyad). Members of the same dyad must be on adjancent rows, such that resp[odd,]
gives the responses of one member of a dyad and resp[odd + 1, ]
gives the responses of the other member of the dyad, where odd
is any odd integer in c(1, nrow(resp))
. The column names for items on the individual assessment must include "IND"
; those on the (conjunctively-scored) group assessment just include "COL"
– these text-keys are grepped from names(resp)
to obtain the response patterns for the individual assessment and the group assessment.
The same text keys must be used when naming the rows of the data.frame parms
containing the item parameters. Similarly to the procedure described for names(resp)
, row.names(parms)
is grepped for each of c("IND", "COL")
to obtain the item parameters of the individual assessment and the group assessment. The order of items (columns) of resp
is assumed to correpond to that of items (rows) of parms
, for each of c("IND", "COL")
.
Type l_full
for an illustration of how the formatting calls are made.
A named nrow(resp)
by 7 data.frame containing the estimates, their standard errors, and the value of the objective function at the solution.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.