plot.prms: Plot for the extended nominal Response model

View source: R/enorm.R

plot.prmsR Documentation

Plot for the extended nominal Response model

Description

The plot shows 'fit' by comparing the expected score based on the model (grey line) with the average scores based on the data (black line with dots) for groups of students with similar estimated ability.

Usage

## S3 method for class 'prms'
plot(
  x,
  item_id = NULL,
  dataSrc = NULL,
  predicate = NULL,
  nbins = 5,
  ci = 0.95,
  ...
)

Arguments

x

object produced by fit_enorm

item_id

which item to plot, if NULL, one plot for each item is made

dataSrc

data source, see details

predicate

an expression to subset data in dataSrc

nbins

number of ability groups

ci

confidence interval for the error bars, between 0 and 1. Use 0 to suppress the error bars. Default = 0.95 for a 95% confidence interval

...

further arguments to plot

Details

The standard plot shows the fit against the sample on which the parameters were fitted. If dataSrc is provided, the fit is shown against the observed data in dataSrc. This may be useful for plotting the fit in different subgroups as a visual test for item level DIF. The confidence intervals denote the uncertainty about the predicted pvalues within the ability groups for the sample size in dataSrc (if not NULL) or the original data on which the model was fit.

Value

Silently, a data.frame with observed and expected values possibly useful to create a numerical fit measure.


dexter documentation built on May 25, 2022, 9:10 a.m.