Description Usage Arguments Details Value
This function computes the log-likelihood for 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 | l_full(resp, u, parms, theta1, theta2)
|
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. |
u |
the logit of the weight parameter of the RSC model. |
parms |
a data.frame with columns |
theta1 |
the latent trait of member 1. |
theta2 |
the latent trait of member 2. |
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")
.
Note that only the odd rows of resp[grep("COL", names(resp))]
are used when computing the log-likelihood for the group component.
This description is much longer than the source code – type l_full
for a shorter explanation.
length(u)
-vector of log-likelihoods.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.