Learn R Programming

kcirt (version 0.6.0)

ikcirt.Y2data: Convert Y to Rank Data

Description

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

Usage

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.

See Also

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

Examples

Run this code
##### 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)




Run the code above in your browser using DataLab