checkparam2 {lazy.irt} | R Documentation |
Checking and Subsetting the Parameter Data Frame (New Version)
checkparam2(
param,
type = NULL,
modulename = "checkparam2",
tomat = 1,
printerror = 1
)
param |
Item Parameter Data Frame |
type |
Item type |
modulename |
name of the module which calls this function |
tomat |
= 0 not to convert the result to a matrix. |
printerror |
= 0 to suppress error messages. |
This function checks if the input param is a valid parameter data frame
with name, type, ncat, p1, p2, p3, ..., variables.
When type = (B | B3 | Bn | Bn3 | G | Gn | P | PN | N) is given,
the items with the given types will be selected
and the parameter data frame or matrix (w/o name and type) will be returned.
In the resulting matrix, the item names will be stored as the row names.
Note that type="B"
means both "B" and "B3".
To select 2PLM items, use type="B2"
.
Also, type="Bn"
means both "Bn" and "Bn3".
To select 2PNM items, use type="Bn2"
.
If type="ALL"
, regardless of tomat
, the input data frame
will be returned after validity check.
Note that, when type
contains more than 2 types, the result will be
sorted according to the order of the appearance of the types in type
.
A parameter matrix or data frame.
checkparam2(paramA1, type="B" )
checkparam2(paramA1, type=c("B","P"), tomat=0 )
checkparam2(paramA1, type=c("Bn2","G"), tomat=0 )