Learn R Programming

DAMisc (version 1.7.2)

balsos: Bayesian Alternating Least Squares Optimal Scaling

Description

Estimates a Bayesian analog to the the Alternating Least Squares Optimal Scaling (ALSOS) solution for qualitative dependent variables.

Usage

balsos(
  formula,
  data,
  iter = 2500,
  chains = 1,
  alg = c("NUTS", "HMC", "Fixed_param"),
  ...
)

Arguments

formula

A formula with a dependent variable that will be optimally scaled

data

A data frame.

iter

Number of samples for the MCMC sampler.

chains

Number of parallel chains to be run.

alg

Algorithm used to do sampling. See stan for more details.

...

Other arguments to be passed down to stanfit.

Value

A list with the following elements:

fit

The fitted stan output

y

The dependent variable values used in the regression.

X

The design matrix for the regression

Details

balsos estimates a Bayesian analog to the Alternating Least Squares Optimal Scaling solution on the dependent variable. This permits testing linearity assumptions on the original scale of the dependent variable.

References

Jacoby, William G. 1999. ‘Levels of Measurement and Political Research: An Optimistic View’ American Journal of Political Science 43(1): 271-301.

Young, Forrest. 1981. ‘Quantitative Analysis of Qualitative Data’ Psychometrika, 46: 357-388.

Young, Forrest, Jan de Leeuw and Yoshio Takane. 1976. ‘Regression with Qualitative and Quantitative Variables: An Alternating Least Squares Method with Optimal Scaling Features’ Psychometrika, 41:502-529.