Skip to contents

Word scores from reference texts with known positions and the scores, standard errors and LBG-rescaled scores of virgin texts.

Usage

Wordscores(ref_counts, ref_scores, virgin_counts, rescale = TRUE)

Arguments

ref_counts

Reference texts by words count matrix.

ref_scores

Reference positions.

virgin_counts

Virgin texts by words count matrix.

rescale

Apply the LBG rescaling (needs two or more virgin texts).

Value

list(word_scores, raw, se, rescaled).

References

Laver, M., Benoit, K. and Garry, J. (2003). Extracting policy positions from political texts using words as data. American Political Science Review 97, 311-331.

Examples

Wordscores(rbind(c(2, 0, 2), c(0, 2, 2)), c(-1, 1), rbind(c(1, 1, 2)), rescale = FALSE)$raw
#> [1] 0