ikcirt.Y2data: Convert Y to Rank Data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ikcirt.Y2data.R

Description

Converts a dichotomous response matrix, Y, to rank data. Probably no need for user to call; called by kcirt.model.

Usage

1
ikcirt.Y2data(Y, mxDelta, ns)

Arguments

Y

Response matrix.

mxDelta

System Delta matrix. A q x m matrix with elements in {-1,0,1}.

ns

Response dimensions. A vector of length equal to the number of questions, each element giving the number of items in the question.

Value

Ranked Data matrix.

Author(s)

Dave Zes, Korn/Ferry International

See Also

For the inverse of this function, see ikcirt.data2Y.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
##### here's an itty-bitty example
	
constructMap.ls <- list(
c(1,1,2,2),
c(2,2,3,3),
c(1,1,3,3)
)

qTypes <- rep("M", length(constructMap.ls))

model <- kcirt.model(constructMap.ls=constructMap.ls, qTypes=qTypes, mxLambda=NULL)

#### fake data, two cases (cases run column-wise)
mxData <- t(
rbind(
c( c(1, NA, NA, 4), c(4, NA, NA, 1), c(NA, 4, NA, 1) ),
c( c(1, 4, NA, NA), c(NA, NA, 1, 4), c(NA, 4, 1, NA) )
)
)

#### convert data to Y
Y <- ikcirt.data2Y(mxData=mxData, mxDelta=model$mxDelta)

#### convert Y back to data
ikcirt.Y2data(Y=Y, mxDelta=model$mxDelta, ns=model$ns)

kcirt documentation built on May 2, 2019, 4:16 a.m.