Learn R Programming

PerFit (version 1.3.1)

PerFit.PFS: Compute several person-fit statistics

Description

Compute several person-fit statistics.

Usage

PerFit.PFS(matrix, method=NULL, simplified=TRUE, 
       NA.method = "NPModel", Save.MatImp = FALSE,
       IP = NULL, IRT.PModel = NULL, Ability = NULL, Ability.PModel = NULL,
       mu = 0, sigma = 1)

Arguments

matrix
Data matrix of dichotomous item scores: Persons as rows, items as columns, item scores are either 0 or 1, missing values allowed.
method
Vector of person-fit statistics to be computed.
simplified
Logical. If FALSE, a list of PerFit objects is returned. If TRUE (default), a matrix with person-fit scores per respondent (one column per statistic) is reported.
NA.method
Simple imputation method to use in case missing values exist. The options available are "Hotdeck", "NPModel" (default), and "PModel".
Save.MatImp
Logical. Save (imputted) data matrix to file? Default is FALSE.
IP
Matrix with previously estimated item parameters: One row per item, and three columns ([,1] item discrimination; [,2] item difficulty; [,3] lower-asymptote, also referred to as pseudo-guessing parameter). In case no item parameters are available th
IRT.PModel
Specify the IRT model to use in order to estimate the item parameters (only if IP=NULL).
Ability
Vector with previoulsy estimated latent ability parameters, one per respondent, following the order of the row index of matrix. In case no ability parameters are available then Ability=NULL.
Ability.PModel
Specify the method to use in order to estimate the latent ability parameters (only if Ability=NULL).
mu
Mean of the apriori distribution. Only used when method="BM". Default is 0.
sigma
Standard deviation of the apriori distribution. Only used when method="BM". Default is 1.

Value

  • If simplified=TRUE, a N-by-m data frame is returned, where N is the number of respondents and m is the number of methods. If simplified=FALSE a list of m PerFit objects is returned.

Details

Function PerFit.PFS is a wrapper allowing to compute more than one person-fit statistic simultaneously.

Examples

Run this code
# Load the inadequacy scale data (dichotomous item scores):
data(InadequacyData)

# Compute the lzstar, U3, and Ht scores:
PerFit.PFS(InadequacyData, method=c("lzstar", "U3", "Ht"))

Run the code above in your browser using DataLab