id_plot_all_hist: Density plots of Posterior Parameters

View source: R/Plot.R

id_plot_all_histR Documentation

Density plots of Posterior Parameters

Description

This function produces density plots of the different types of parameters in an idealstan model: item (bill) difficulty and discrimination parameters, and person (legislator) ideal points.

Usage

id_plot_all_hist(
  object,
  params = "person",
  param_labels = NULL,
  dens_type = "all",
  return_data = FALSE,
  func = median,
  ...
)

Arguments

object

A fitted idealstan object

params

Select the type of parameter from the model to plot. 'person' for person/legislator ideal points, 'miss_diff' and 'miss_discrim' for difficulty and discrimination parameters from the missing/inflated item/bill parameters, and 'obs_diff' and 'obs_discrim' for difficulty and discrimination parameters from the non-missing/non-inflated item/bill parameters.

param_labels

A vector of labels equal to the number of parameters. Primarily useful if return_data is TRUE.

dens_type

Can be 'all' for showing 90 Or to show one of those posterior estimates at a time, use 'high' for 90 'low' for 10 in func (median by default).

return_data

Whether or not to return the plot as a ggplot2 object and the data together in a list instead of plotting.

func

The function to use if 'dens_type' is set to 'function'.

...

Other options passed on to the plotting function, currently ignored.


saudiwin/idealstan documentation built on Sept. 2, 2023, 1:29 a.m.