Learn R Programming

hbamr (version 2.4.2)

Hierarchical Bayesian Aldrich-McKelvey Scaling via 'Stan'

Description

Perform hierarchical Bayesian Aldrich-McKelvey scaling using Hamiltonian Monte Carlo via 'Stan'. Aldrich-McKelvey ('AM') scaling is a method for estimating the ideological positions of survey respondents and political actors on a common scale using positional survey data. The hierarchical versions of the Bayesian 'AM' model included in this package outperform other versions both in terms of yielding meaningful posterior distributions for respondent positions and in terms of recovering true respondent positions in simulations. The package contains functions for preparing data, fitting models, extracting estimates, plotting key results, and comparing models using cross-validation. The original version of the default model is described in Bølstad (2024) .

Copy Link

Version

Install

install.packages('hbamr')

Monthly Downloads

353

Version

2.4.2

License

GPL (>= 3)

Maintainer

Jørgen Bølstad

Last Published

March 5th, 2025

Functions in hbamr (2.4.2)

hbam

Fit an HBAM model
prep_data

Prepare data to fit an HBAM or FBAM model
plot_over_self

Plot individual parameter estimates over self-placements
plot_respondents

Plot estimated respondent positions
plot_stimuli

Plot estimated stimulus positions
prep_data_cv

Prepare data for a K-fold cross-validation of an HBAM model
LC1980

1980 Liberal-Conservative Scales
hbamr-package

Hierarchical Bayesian Aldrich-McKelvey Scaling via Stan
get_plot_data

Extract data for plotting results from an HBAM model
hbam_cv

Perform K-fold cross-validation
plot_by_group

Plot posterior densities of parameter averages by group
fbam

Fit an FBAM model using optimization
get_est

Extract point estimates or other summaries of marginal posterior distributions
LC2012

2012 Liberal-Conservative Scales