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.

# S3 method for class 'prms'
plot(
  x,
  item_id = NULL,
  dataSrc = NULL,
  predicate = NULL,
  nbins = 5,
  ci = 0.95,
  add = FALSE,
  col = "black",
  col.model = "grey80",
  ...
)

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

add

logical; if TRUE add to an already existing plot

col

color for the observed score average

col.model

color for the expected score based on the model

...

further arguments to plot

Value

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

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.