Learn R Programming

PerFit (version 1.2)

flagged.resp: Find (potentially) aberrant response patterns

Description

Find which respondents in the sample were flagged by the specified person-fit statistic.

Usage

flagged.resp(matrix, scores = TRUE, ord = TRUE, x, method = "Quantile", 
 Qlvl = 0.05, Blvl = 0.05, Breps = 1000, UDlvl = NA)

Arguments

matrix
A data matrix of item scores (persons as rows, items as columns). This is the same data matrix used to compute the PerFit object x.
scores
Logical: Should item scores of flagged respondents be shown in the output? Default is TRUE.
ord
Logical: Should items be ordered in increasing order of difficulty (i.e., in decreasing proportion-correct order)? Default is TRUE. Only used if scores=TRUE.
x
Object of class "PerFit".
method
Method required to compute the cutoff score: "Quantile", "Bootstrap", "UserDefined". Default is "Quantile".
Qlvl
Quantile level (value between 0 and 1), only used when method="Quantile". Default is 0.05.
Blvl
Bootstrap level (value between 0 and 1), only used when method="Bootstrap". Default is 0.05.
Breps
Number of bootstrap resamples, only used when method="Bootstrap". Default is 1000.
UDlvl
User-defined level, only used when method="UserDefined".

Value

  • If scores=FALSE the output is a matrix with two columns:
  • FlaggedIDRow index identifying the flagged respondents.
  • PFscoresThe values of the person-fit statistic.
  • If scores=TRUE the output is a list with two elements:
  • ScoresMatrix with columns: FlaggedID, item scores (It**), and PFscores.
  • MeanItemValueThe items' mean value (which is nothing more than the proportion-correct for dichotomous items).

Details

This function finds the respondents in the dataset that were flagged by the person-fit statistic. This statistic is specified by means of the "PerFit" class object x. The cutoff score is internally computed, for which the user may define method, Qlvl, Blvl, Breps, and UDlvl accordingly (see cutoff). If scores=TRUE then the respondents' item scores will be shown in the output, either in the original item order (ord=FALSE) or in increasing difficulty order (ord=TRUE).

See Also

cutoff, plot.PerFit, PRFplot

Examples

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

# As an example, compute the Ht person-fit scores:
Ht.PF <- Ht(InadequacyData);
Ht.PF$PFscores

# Determine which respondents were flagged by Ht for the quantile-based 1% cutoff:
flagged.resp(InadequacyData,x=Ht.PF,Qlvl=.01);

Run the code above in your browser using DataLab