PrepareChecks {ConjointChecks} | R Documentation |
Prepare raw response data for ConjointChecks
.
Description
Takes output from ConjointChecks
and produces a matrix showing
the percentage of reported violations at each cell.
Usage
PrepareChecks(resp,ss.lower=10, collapse.columns = FALSE)
Arguments
resp |
Raw dichotomously coded response data. Columns represent items and rows represent individuals. |
ss.lower |
Only sum scores that have at least this many distinct individuals with that sum score will be used. |
collapse.columns |
Sum over columns. |
Value
Returns n
and N
, respectively, containing the number of
correct responses and the number of total responses for each cell.
Examples
#simulated Rasch example
n.items<-20
n.respondents<-2000
#simulate data
rnorm(n.items)->diff
rnorm(n.respondents)->abil
matrix(abil,n.respondents,n.items,byrow=FALSE)->m1
matrix(diff,n.respondents,n.items,byrow=TRUE)->m2
m1-m2 -> kern
exp(kern)/(1+exp(kern))->pv
runif(n.items*n.respondents)->test
ifelse(pv>test,1,0)->resp
#now check
PrepareChecks(resp)->obj
[Package ConjointChecks version 0.2.0 Index]