{
  "_id": "6a216782cd65a98ecbd35eda",
  "Package": "hbamr",
  "Title": "Hierarchical Bayesian Aldrich-McKelvey Scaling via 'Stan'",
  "Version": "2.4.6",
  "Authors@R": "person(\"Jørgen\", \"Bølstad\", , \"jorgen.bolstad@stv.uio.no\", role = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0002-7623-5741\"))",
  "Description": "Perform hierarchical Bayesian Aldrich-McKelvey scaling\nusing Hamiltonian Monte Carlo via 'Stan'. Aldrich-McKelvey\n('AM') scaling is a method for estimating the ideological\npositions of survey respondents and political actors on a\ncommon scale using positional survey data. The hierarchical\nversions of the Bayesian 'AM' model included in this package\noutperform other versions both in terms of yielding meaningful\nposterior distributions for respondent positions and in terms\nof recovering true respondent positions in simulations. The\npackage contains functions for preparing data, fitting models,\nextracting estimates, plotting key results, and comparing\nmodels using cross-validation. The original version of the\ndefault model is described in Bølstad (2024)\n<doi:10.1017/pan.2023.18>.",
  "License": "GPL (>= 3)",
  "URL": "https://jbolstad.github.io/hbamr/",
  "BugReports": "https://github.com/jbolstad/hbamr/issues",
  "Biarch": "true",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "SystemRequirements": "GNU make",
  "VignetteBuilder": "knitr",
  "Config/pak/sysreqs": "make libicu-dev",
  "Repository": "https://jbolstad.r-universe.dev",
  "Date/Publication": "2026-04-30 19:25:23 UTC",
  "RemoteUrl": "https://github.com/jbolstad/hbamr",
  "RemoteRef": "HEAD",
  "RemoteSha": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-06-04 11:24:50 UTC",
    "User": "root"
  },
  "Author": "Jørgen Bølstad [aut, cre] (ORCID:\n<https://orcid.org/0000-0002-7623-5741>)",
  "Maintainer": "Jørgen Bølstad <jorgen.bolstad@stv.uio.no>",
  "MD5sum": "5823d6816f0aa7395430d59e16f6c733",
  "_user": "jbolstad",
  "_type": "src",
  "_file": "hbamr_2.4.6.tar.gz",
  "_fileid": "20321b5f9a717076418ae6ca501a08f7356930b6cba320da51f2b7bab9ff2722",
  "_filesize": 942164,
  "_sha256": "20321b5f9a717076418ae6ca501a08f7356930b6cba320da51f2b7bab9ff2722",
  "_created": "2026-06-04T11:24:50.000Z",
  "_published": "2026-06-04T11:54:42.025Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79508515677,
      "time": 294,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "7410289579"
    },
    {
      "job": 79508515719,
      "time": 259,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "7410277717"
    },
    {
      "job": 79508515786,
      "time": 299,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7410291765"
    },
    {
      "job": 79508515742,
      "time": 303,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7410291319"
    },
    {
      "job": 79508515740,
      "time": 407,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "7410536841"
    },
    {
      "job": 79508515751,
      "time": 741,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "7410701096"
    },
    {
      "job": 79508515697,
      "time": 312,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7410510003"
    },
    {
      "job": 79508515725,
      "time": 467,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7410524948"
    },
    {
      "job": 79507598847,
      "time": 354,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7410196926"
    },
    {
      "job": 79508515635,
      "time": 162,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "FAIL",
      "artifact": ""
    },
    {
      "job": 79508515806,
      "time": 334,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "7410302509"
    },
    {
      "job": 79508515698,
      "time": 315,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "7410295740"
    },
    {
      "job": 79508515693,
      "time": 331,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7410301811"
    }
  ],
  "_buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/jbolstad/hbamr",
  "_commit": {
    "id": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
    "author": "Jørgen B <boelstad@Jrgens-Mac-mini.lan>",
    "committer": "Jørgen B <boelstad@Jrgens-Mac-mini.lan>",
    "message": "Clean commented lines\n",
    "time": 1777577123
  },
  "_maintainer": {
    "name": "Jørgen Bølstad",
    "email": "jorgen.bolstad@stv.uio.no",
    "orcid": "0000-0002-7623-5741"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.4.0",
      "role": "Depends"
    },
    {
      "package": "BH",
      "version": ">= 1.66.0",
      "role": "LinkingTo"
    },
    {
      "package": "Rcpp",
      "version": ">= 1.0.7",
      "role": "LinkingTo"
    },
    {
      "package": "RcppEigen",
      "version": ">= 0.3.3.9.1",
      "role": "LinkingTo"
    },
    {
      "package": "RcppParallel",
      "version": ">= 5.1.4",
      "role": "LinkingTo"
    },
    {
      "package": "rstan",
      "version": ">= 2.26.1",
      "role": "LinkingTo"
    },
    {
      "package": "StanHeaders",
      "version": ">= 2.26.22",
      "role": "LinkingTo"
    },
    {
      "package": "colorspace",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "future",
      "role": "Imports"
    },
    {
      "package": "future.apply",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "loo",
      "role": "Imports"
    },
    {
      "package": "matrixStats",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "parallel",
      "role": "Imports"
    },
    {
      "package": "plyr",
      "role": "Imports"
    },
    {
      "package": "progressr",
      "role": "Imports"
    },
    {
      "package": "RColorBrewer",
      "role": "Imports"
    },
    {
      "package": "Rcpp",
      "version": ">= 1.0.7",
      "role": "Imports"
    },
    {
      "package": "RcppParallel",
      "version": ">= 5.1.4",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "rstan",
      "version": ">= 2.26.1",
      "role": "Imports"
    },
    {
      "package": "rstantools",
      "version": ">= 2.2.0",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "tidyr",
      "role": "Imports"
    },
    {
      "package": "data.table",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    }
  ],
  "_owner": "jbolstad",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-32",
      "n": 1
    },
    {
      "week": "2026-07",
      "n": 1
    },
    {
      "week": "2026-18",
      "n": 10
    }
  ],
  "_tags": [],
  "_topics": [
    "bayesian",
    "bayesian-inference",
    "ideal-point-estimation",
    "stan",
    "survey-analysis",
    "cpp"
  ],
  "_stars": 4,
  "_contributors": [
    {
      "user": "jbolstad",
      "count": 301,
      "uuid": 83926777
    },
    {
      "user": "andrjohns",
      "count": 1,
      "uuid": 27717896
    }
  ],
  "_userbio": {
    "uuid": 83926777,
    "type": "user",
    "name": "Jørgen Bølstad",
    "description": "Professor of Political Science. Doing causal inference & Bayesian stats."
  },
  "_downloads": {
    "count": 521,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/hbamr"
  },
  "_devurl": "https://github.com/jbolstad/hbamr",
  "_pkgdown": "https://jbolstad.github.io/hbamr/",
  "_searchresults": 0,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/hbamr.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/jbolstad/hbamr",
  "_realowner": "jbolstad",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.5",
      "date": "2023-03-14"
    },
    {
      "version": "1.1.1",
      "date": "2023-04-24"
    },
    {
      "version": "1.1.3",
      "date": "2023-06-07"
    },
    {
      "version": "1.1.6",
      "date": "2023-06-09"
    },
    {
      "version": "1.2.0",
      "date": "2023-09-25"
    },
    {
      "version": "2.0.1",
      "date": "2024-01-08"
    },
    {
      "version": "2.1.0",
      "date": "2024-01-17"
    },
    {
      "version": "2.1.1",
      "date": "2024-01-25"
    },
    {
      "version": "2.1.2",
      "date": "2024-02-07"
    },
    {
      "version": "2.2.0",
      "date": "2024-02-14"
    },
    {
      "version": "2.2.1",
      "date": "2024-02-23"
    },
    {
      "version": "2.3.0",
      "date": "2024-03-31"
    },
    {
      "version": "2.3.1",
      "date": "2024-06-04"
    },
    {
      "version": "2.3.2",
      "date": "2024-09-23"
    },
    {
      "version": "2.4.0",
      "date": "2025-01-26"
    },
    {
      "version": "2.4.1",
      "date": "2025-02-13"
    },
    {
      "version": "2.4.2",
      "date": "2025-03-05"
    },
    {
      "version": "2.4.4",
      "date": "2025-08-18"
    },
    {
      "version": "2.4.5",
      "date": "2026-02-16"
    },
    {
      "version": "2.4.6",
      "date": "2026-04-28"
    }
  ],
  "_exports": [
    "fbam",
    "get_est",
    "get_plot_data",
    "hbam",
    "hbam_cv",
    "plot_by_group",
    "plot_over_self",
    "plot_respondents",
    "plot_stimuli",
    "prep_data",
    "prep_data_cv"
  ],
  "_datasets": [
    {
      "name": "LC1980",
      "title": "1980 Liberal-Conservative Scales",
      "object": "LC1980",
      "class": [
        "matrix",
        "array"
      ],
      "fields": [
        "Self",
        "Carter",
        "Reagan",
        "Kennedy",
        "Anderson",
        "Republicans",
        "Democrats"
      ],
      "rows": 888,
      "table": true,
      "tojson": true
    },
    {
      "name": "LC2012",
      "title": "2012 Liberal-Conservative Scales",
      "object": "LC2012",
      "class": [
        "data.frame"
      ],
      "fields": [
        "caseid",
        "Self",
        "Obama",
        "Romney",
        "Democrats",
        "Republicans"
      ],
      "rows": 5914,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "hbamr-package",
      "title": "Hierarchical Bayesian Aldrich-McKelvey Scaling via Stan",
      "topics": [
        "hbamr-package",
        "hbamr"
      ]
    },
    {
      "page": "fbam",
      "title": "Fit an FBAM model using optimization",
      "topics": [
        "fbam"
      ]
    },
    {
      "page": "get_est",
      "title": "Extract point estimates or other summaries of marginal posterior distributions",
      "topics": [
        "get_est"
      ]
    },
    {
      "page": "get_plot_data",
      "title": "Extract data for plotting results from an HBAM model",
      "topics": [
        "get_plot_data"
      ]
    },
    {
      "page": "hbam",
      "title": "Fit an HBAM model",
      "topics": [
        "hbam"
      ]
    },
    {
      "page": "hbam_cv",
      "title": "Perform K-fold cross-validation",
      "topics": [
        "hbam_cv"
      ]
    },
    {
      "page": "LC1980",
      "title": "1980 Liberal-Conservative Scales",
      "topics": [
        "LC1980"
      ]
    },
    {
      "page": "LC2012",
      "title": "2012 Liberal-Conservative Scales",
      "topics": [
        "LC2012"
      ]
    },
    {
      "page": "plot_by_group",
      "title": "Plot posterior densities of parameter averages by group",
      "topics": [
        "plot_by_group"
      ]
    },
    {
      "page": "plot_over_self",
      "title": "Plot individual parameter estimates over self-placements",
      "topics": [
        "plot_over_self"
      ]
    },
    {
      "page": "plot_respondents",
      "title": "Plot estimated respondent positions",
      "topics": [
        "plot_respondents"
      ]
    },
    {
      "page": "plot_stimuli",
      "title": "Plot estimated stimulus positions",
      "topics": [
        "plot_stimuli"
      ]
    },
    {
      "page": "prep_data",
      "title": "Prepare data to fit an HBAM or FBAM model",
      "topics": [
        "prep_data"
      ]
    },
    {
      "page": "prep_data_cv",
      "title": "Prepare data for a K-fold cross-validation of an HBAM model",
      "topics": [
        "prep_data_cv"
      ]
    }
  ],
  "_pkglogo": "https://github.com/jbolstad/hbamr/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/jbolstad/hbamr/raw/HEAD/README.md",
  "_rundeps": [
    "abind",
    "backports",
    "BH",
    "callr",
    "checkmate",
    "cli",
    "codetools",
    "colorspace",
    "cpp11",
    "desc",
    "digest",
    "distributional",
    "dplyr",
    "farver",
    "future",
    "future.apply",
    "generics",
    "ggplot2",
    "globals",
    "glue",
    "gridExtra",
    "gtable",
    "inline",
    "isoband",
    "labeling",
    "lifecycle",
    "listenv",
    "loo",
    "magrittr",
    "matrixStats",
    "numDeriv",
    "parallelly",
    "pillar",
    "pkgbuild",
    "pkgconfig",
    "plyr",
    "posterior",
    "processx",
    "progressr",
    "ps",
    "purrr",
    "QuickJSR",
    "R6",
    "RColorBrewer",
    "Rcpp",
    "RcppEigen",
    "RcppParallel",
    "rlang",
    "rstan",
    "rstantools",
    "S7",
    "scales",
    "StanHeaders",
    "stringi",
    "stringr",
    "tensorA",
    "tibble",
    "tidyr",
    "tidyselect",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_sysdeps": [
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "14.2.0-4ubuntu2~24.04.1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "hbamr.Rmd",
      "filename": "hbamr.html",
      "title": "Hierarchical Bayesian Aldrich-McKelvey Scaling in R via Stan",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Example Data",
        "Preparing the Data",
        "Models",
        "Summary of Model Features",
        "Fitting",
        "Fitting via Optimization",
        "Execution Times",
        "Plotting",
        "Stimuli Positions",
        "Respondent Positions",
        "Individual Parameters over Self-Placements",
        "Shifting",
        "Stretching",
        "Flipping",
        "Additional Parameters",
        "Posterior Summaries",
        "Cross-Validation",
        "Diagnostics",
        "Limits to Exact Replication",
        "References"
      ],
      "created": "2023-02-05 13:53:11",
      "modified": "2026-04-29 19:05:12",
      "commits": 54
    }
  ],
  "_score": 4.778151250383644,
  "_indexed": true,
  "_nocasepkg": "hbamr",
  "_universes": [
    "jbolstad"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.4.6",
      "date": "2026-06-04T11:28:56.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "a323620241fa1de44d1eb3f0bf78f6b2545ee5c522fdad49afba0406ac4dbf26",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.4.6",
      "date": "2026-06-04T11:28:18.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "333f175cf88ab067d39a29126296920bd6c4a700ef0d86aa1473936e580bdcde",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2.4.6",
      "date": "2026-06-04T11:28:59.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "22bf16ae0ae229a98e605d9aa4bb835ad17c9d9b9afe7d2e12177ae212d46b4a",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2.4.6",
      "date": "2026-06-04T11:28:55.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "7a95be0c5432e1bb545ad5ddeaf45f123d8777a9103577576b6a5b782281299c",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.4.6",
      "date": "2026-06-04T11:41:23.000Z",
      "arch": "aarch64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "5317a1d010eb67efb4e4edf6c6035a54e949a45a6475c23d3724248bf394396f",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.4.6",
      "date": "2026-06-04T11:46:48.000Z",
      "arch": "x86_64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "66df942a6b263b38d3a6d3e33d807d7b312a1cbb7ccbc10887b28a35df07a218",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "2.4.6",
      "date": "2026-06-04T11:40:23.000Z",
      "arch": "aarch64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "c201517077fbaff03b8ada17fd5ab182b2d134b3057ef6981147339144c066c0",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "2.4.6",
      "date": "2026-06-04T11:39:57.000Z",
      "arch": "x86_64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "4a0d0090fb022d57d5d6a5343e5414ca012d7b5a563004e4ed98797cf13e52cc",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2.4.6",
      "date": "2026-06-04T11:27:52.000Z",
      "arch": "x86_64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "66f693374e05f826aadc5a1ebb0a608d7aad9eaea151468c2227e76eadf0176f",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2.4.6",
      "date": "2026-06-04T11:27:44.000Z",
      "arch": "x86_64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "355f75c9c56e8745b9e6c9d0d3d78f82da05668ed034d76185d48e057ae8dffd",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "2.4.6",
      "date": "2026-06-04T11:27:55.000Z",
      "arch": "x86_64",
      "commit": "dcbe036b2a596c4b7400a0b054f4685cd5f96d5a",
      "fileid": "9e2ca4c8ead73cb7fcbca72cfccf9e3c141f7ec598bec145fee7e8a51717e31c",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/jbolstad/actions/runs/26948537331"
    }
  ]
}