checkparam2 {lazy.irt}R Documentation

Checking and Subsetting the Parameter Data Frame (New Version)

Description

Checking and Subsetting the Parameter Data Frame (New Version)

Usage

checkparam2(
  param,
  type = NULL,
  modulename = "checkparam2",
  tomat = 1,
  printerror = 1
)

Arguments

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.

Details

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.

Value

A parameter matrix or data frame.

Examples

checkparam2(paramA1, type="B" )
checkparam2(paramA1, type=c("B","P"), tomat=0 )
checkparam2(paramA1, type=c("Bn2","G"), tomat=0 )


[Package lazy.irt version 0.1.6 ]