checkparam {lazy.irt}R Documentation

Checking and Subsetting the Parameter Data Frame

Description

Checking and Subsetting the Parameter Data Frame

Usage

checkparam(
  param,
  type = NULL,
  modulename = "checkparam",
  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 type 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.

Value

A parameter matrix or data frame.

Examples

checkparam(paramA1, type="B" )
checkparam(paramA1, type="B2", tomat=0 )
checkparam(paramA1, type="G" )


[Package lazy.irt version 0.1.6 ]