summary-idealstan-method: Posterior Summaries for fitted 'idealstan' object

summary,idealstan-methodR Documentation

Posterior Summaries for fitted idealstan object

Description

This function produces quantiles and standard deviations for the posterior samples of idealstan objects.

Usage

## S4 method for signature 'idealstan'
summary(
  object,
  pars = "ideal_pts",
  high_limit = 0.95,
  low_limit = 0.05,
  aggregated = TRUE,
  use_chain = NULL,
  cores = 1
)

Arguments

object

An idealstan object fitted by id_estimate

pars

Either 'ideal_pts' for person ideal points, 'items' for items/bills difficulty and discrimination parameters (with more than one dimension, both get a Dimension column), 'discrim_corr' for the correlation of observed and missingness discriminations (models fit with discrim_corr=TRUE in id_estimate), and 'all' for all parameters in the model, including incidental parameters.

high_limit

A number between 0 and 1 reflecting the upper limit of the uncertainty interval (defaults to 0.95).

low_limit

A number between 0 and 1 reflecting the lower limit of the uncertainty interval (defaults to 0.05).

aggregated

Whether to return summaries of the posterior values or the full posterior samples. Defaults to TRUE.

use_chain

ID of a specific MCMC chain to use. Default (NULL) is all the chains and is recommended.

cores

Number of cores to use for parallel processing when summarizing item parameters, which can help with many items. Defaults to 1 (no parallelization). The work runs in parallel through the future package: with more than one core and no plan set, a future::multisession plan with that many workers (separate R sessions, which work everywhere, including Windows, RStudio and Positron). To use another backend, set it with future::plan() before calling, for example future::plan(future::multicore, workers = 4); that plan is then used whatever the number of cores.

Value

A tibble data frame with parameters as rows and descriptive statistics as columns

Examples



data('senate114')
senate114$cast_code <- ifelse(senate114$cast_code=="Absent", NA,
                              as.integer(senate114$cast_code) - 1L)
sen_data <- id_make(senate114, outcome_disc='cast_code',
                    person_id='bioname', item_id='rollnumber',
                    group_id='party_code')
sen_est <- id_estimate(sen_data, model_type=1, fixtype='vb_full', use_method="pathfinder", ncores=4)
summary(sen_est, pars='ideal_pts')
summary(sen_est, pars='items')



idealstan documentation built on Dec. 2, 2026, 5:07 p.m.