plot.rater_fit: Plot a 'rater_fit' object

View source: R/rater_fit_class.R

plot.rater_fitR Documentation

Plot a rater_fit object

Description

Plot a rater_fit object

Usage

## S3 method for class 'rater_fit'
plot(
  x,
  pars = "theta",
  prob = 0.9,
  rater_index = NULL,
  item_index = NULL,
  theta_plot_type = "matrix",
  ...
)

Arguments

x

An object of class rater_fit.

pars

A length one character vector specifying the parameter to plot. By default "theta".

prob

The coverage of the credible intervals shown in the "pi" plot. If not plotting pi this argument will be ignored. By default 0.9.

rater_index

The indexes of the raters shown in the ⁠"theta⁠ plot. If not plotting theta this argument will be ignored. By default NULL which means that all raters will be plotted.

item_index

The indexes of the items shown in the class probabilities plot. If not plotting the class probabilities this argument will be ignored. By default NULL which means that all items will be plotted. This argument is particularly useful to focus the subset of items with substantial uncertainty in their class assignments.

theta_plot_type

The type of plot of the "theta" parameter. Can be either "matrix" or "points". If "matrix" (the default) the plot will show the point estimates of the individual rater error matrices, visualised as tile plots. If "points", the elements of the theta parameter will be displayed as points, with associated credible intervals. Overall, the "matrix" type is likely more intuitive, but the "points" type can also visualise the uncertainty in the parameter estimates.

...

Other arguments.

Details

The use of pars to refer to only one parameter is for backwards compatibility and consistency with the rest of the interface.

Value

A ggplot2 object.

Examples



fit <- rater(anesthesia, "dawid_skene")

# By default will just plot the theta plot
plot(fit)

# Select which parameter to plot.
plot(fit, pars = "pi")

# Plot the theta parameter for rater 1, showing uncertainty.
plot(fit, pars = "theta", theta_plot_type = "points", rater_index = 1)




rater documentation built on Sept. 12, 2023, 1:13 a.m.