Skip to contents

This function performs Bayesian Aldrich-McKelvey (BAM) scaling using JAGS to estimate ideal points and optionally save intermediate parameters.

Usage

BAM(
  data,
  polarity,
  zhatSave = TRUE,
  abSave = FALSE,
  resp.idealpts = FALSE,
  n.sample = 2500,
  ...
)

Arguments

data

A dataset prepared using the bamPrep function.

polarity

Integer specifying the column number of the stimulus used to set the polarity.

zhatSave

Logical, whether to save the posterior samples of zhat (default is TRUE).

abSave

Logical, whether to save the posterior samples of a and b parameters (default is FALSE).

resp.idealpts

Logical, whether to compute and save respondent ideal points (default is FALSE).

n.sample

Integer, the number of MCMC samples to draw (default is 2500).

...

Additional arguments passed to jags.model.

Value

A list containing posterior samples and summaries for the estimated parameters.

Examples

if (FALSE) { # \dontrun{
data(bamdata)
bam.france <- BAM(bamdata, polarity=2, n.adapt=2500, n.sample=5000,
                  zhatSave=TRUE, abSave=TRUE, resp.idealpts=TRUE)
} # }