PrepareChecks: Prepare raw response data for 'ConjointChecks'.

Description Usage Arguments Examples

View source: R/PrepareChecks.R

Description

Takes output from ConjointChecks and produces a matrix showing the percentage of reported violations at each cell.

Usage

1
PrepareChecks(resp,ss.lower=10) 

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#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

ConjointChecks documentation built on May 30, 2017, 12:59 a.m.