BMDS: Bayesian Multidimensional Scaling

View source: R/asmcjr.r

BMDSR Documentation

Bayesian Multidimensional Scaling

Description

Wrapper to rjags to estimate the Bayesian Multidimensional Scaling model.

Usage

BMDS(data, posStims, negStims, z, fname=NULL, n.sample = 2500, ...)

Arguments

data

A numeric data.frame or matrix containing values to be scaled.

posStims

A vector of two integer values identifying the row numbers of observations on the first and second dimension, respectively, which are to be constrained to be positive.

negStims

A vector of two integer values identifying the row numbers of observations on the first and second dimension, respectively, which are to be constrained to be negative.

z

A matrix with the same number of rows as the data and two columns giving the constraints to be imposed on the point configuration. All unconstrained points should be missing (NA). All constrained points should take non-missing values.

fname

A string giving the file name where the JAGS code for the model will be written.

n.sample

Number of posterior samples to save.

...

Other arguments to be passed down to the jags.model function. In particular, you may want to specify n.chains (which defaults to 2), n.adapt (which defaults to 10000) and/or inits which, by dfeault, uses the point configuration from the original AM scaling run.

Value

A list that will include some of the following:

zhat

An object of class mcmc.list containing the sampled values of the stimulus ideal point parameters.

zhat.ci

An object of class aldmck_ci containing summary information (mean, sd, lower and upper credible intervals) of the stimulus points

a

An object of class mcmc.list containing the sampled individual intercept values.

b

An object of class mcmc.list containing the sampled individual slope values.

resp.samples

A matrix containing the implied MCMC samples of the respondent ideal points.

resp.sum

A data.frame containing mean, sd, lower and upper credible intervals of the individual ideal points.

References

Hare, Christopher, David A. Armstrong II., Ryan Bakker, Royce Carroll and Keith Poole. 2015. ‘Using Bayesian Aldrich-McKelvey Scaling to Study Citizens Ideological Prefer- ences and Perceptions’ American Journal of Political Science 59(3): 759-774.

See Also

aldmck


davidaarmstrong/asmcjr documentation built on June 29, 2024, 12:07 p.m.