Learn R Programming

⚠️There's a newer version (2.4.2) of this package.Take me there.

hbamr (version 2.3.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.3.2

License

GPL (>= 3)

Maintainer

Jørgen Bølstad

Last Published

September 23rd, 2024

Functions in hbamr (2.3.2)

hbamr-package

Hierarchical Bayesian Aldrich-McKelvey Scaling via Stan
hbam_cv

Perform K-fold cross-validation
prep_data_cv

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

Extract data for plotting results from an HBAM model
plot_by_group

Plot posterior densities of parameter averages by group
hbam

Fit an HBAM model
LC1980

1980 Liberal-Conservative Scales
plot_over_self

Plot individual parameter estimates over self-placements
LC2012

2012 Liberal-Conservative Scales
show_code

Show the code for an HBAM or FBAM model
plot_respondents

Plot estimated respondent positions
fbam

Fit an FBAM model using optimization
plot_stimuli

Plot estimated stimulus positions
get_est

Extract point estimates or other summaries of marginal posterior distributions
prep_data

Prepare data to fit an HBAM or FBAM model