manifestoR (version 1.4.0)

scale_weighted: Scaling functions

Description

Scaling functions take a data.frame of variables with information about political parties/text and position the cases on a scale, i.e. output a vector of values. For applying scaling functions directly to text documents, refer to mp_scale.

Usage

scale_weighted(
  data,
  vars = grep("per((\\d{3}(_\\d)?)|\\d{4}|(uncod))$", names(data), value = TRUE),
  weights = 1
)

scale_logit(data, pos, neg, N = data[, "total"], zero_offset = 0.5, ...)

scale_bipolar(data, pos, neg, ...)

scale_ratio(data, pos, neg, ...)

Arguments

data

A data.frame with cases to be scaled

vars

variable names that should contribute to the linear combination; defaults to all CMP category percentage variables in the Manifesto Project's Main Dataset

weights

weights of the linear combination in the same order as `vars`.

pos

variable names that should contribute to the numerator ("positively")

neg

variable names that should contribute to the denominator ("negatively")

N

vector of numbers of quasi sentences to convert percentages to counts

zero_offset

Constant to be added to prevent 0/0 and log(0); defaults to 0.5 (smaller than any possible non-zero count)

...

further parameters passed on to scale_weighted

Details

scale_weighted scales the data as a weighted sum of the variable values

If variable names used for the definition of the scale are not present in the data frame they are assumed to be 0. scale_weighted scales the data as a weighted sum of the category percentages

References

Lowe, W., Benoit, K., Mikhaylov, S., & Laver, M. (2011). Scaling Policy Preferences from Coded Political Texts. Legislative Studies Quarterly, 36(1), 123-155.

Kim, H., & Fording, R. C. (1998). Voter ideology in western democracies, 1946-1989. European Journal of Political Research, 33(1), 73-97.

Laver, M., & Garry, J. (2000). Estimating Policy Positions from Political Texts. American Journal of Political Science, 44(3), 619-634.

See Also

mp_scale