Package: hbamr 2.3.2
Jørgen Bølstad
hbamr: Hierarchical Bayesian Aldrich-McKelvey Scaling via 'Stan'
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) <doi:10.1017/pan.2023.18>.
Authors:
hbamr_2.3.2.tar.gz
hbamr_2.3.2.zip(r-4.5)hbamr_2.3.2.zip(r-4.4)hbamr_2.3.2.zip(r-4.3)
hbamr_2.3.2.tgz(r-4.4-arm64)hbamr_2.3.2.tgz(r-4.3-arm64)
hbamr_2.3.2.tar.gz(r-4.5-noble)hbamr_2.3.2.tar.gz(r-4.4-noble)
hbamr.pdf |hbamr.html✨
hbamr/json (API)
NEWS
# Install 'hbamr' in R: |
install.packages('hbamr', repos = c('https://jbolstad.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/jbolstad/hbamr/issues
bayesianbayesian-inferenceideal-point-estimationstansurvey-analysis
Last updated 5 months agofrom:a3cde61174. Checks:OK: 1 NOTE: 6. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 22 2024 |
R-4.5-win-x86_64 | NOTE | Nov 22 2024 |
R-4.5-linux-x86_64 | NOTE | Nov 22 2024 |
R-4.4-win-x86_64 | NOTE | Nov 22 2024 |
R-4.4-mac-aarch64 | NOTE | Nov 22 2024 |
R-4.3-win-x86_64 | NOTE | Nov 22 2024 |
R-4.3-mac-aarch64 | NOTE | Nov 22 2024 |
Exports:fbamget_estget_plot_datahbamhbam_cvplot_by_groupplot_over_selfplot_respondentsplot_stimuliprep_dataprep_data_cvshow_code
Dependencies:abindbackportsBHcallrcheckmateclicodetoolscolorspacecpp11descdigestdistributionaldplyrfansifarverfuturefuture.applygenericsggplot2globalsgluegridExtragtableinlineisobandlabelinglatticelifecyclelistenvloomagrittrMASSMatrixmatrixStatsmgcvmunsellnlmenumDerivparallellypillarpkgbuildpkgconfigplyrposteriorprocessxprogressrpspurrrQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanrstantoolsscalesStanHeadersstringistringrtensorAtibbletidyrtidyselectutf8vctrsviridisLitewithr
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Hierarchical Bayesian Aldrich-McKelvey Scaling via Stan | hbamr-package hbamr |
Fit an FBAM model using optimization | fbam |
Extract point estimates or other summaries of marginal posterior distributions | get_est |
Extract data for plotting results from an HBAM model | get_plot_data |
Fit an HBAM model | hbam |
Perform K-fold cross-validation | hbam_cv |
1980 Liberal-Conservative Scales | LC1980 |
2012 Liberal-Conservative Scales | LC2012 |
Plot posterior densities of parameter averages by group | plot_by_group |
Plot individual parameter estimates over self-placements | plot_over_self |
Plot estimated respondent positions | plot_respondents |
Plot estimated stimulus positions | plot_stimuli |
Prepare data to fit an HBAM or FBAM model | prep_data |
Prepare data for a K-fold cross-validation of an HBAM model | prep_data_cv |
Show the code for an HBAM or FBAM model | show_code |