Construct a Wordscores model from reference document scores

classic.wordscores(wfm, scores)

Arguments

wfm

object of class wfm

scores

reference document positions/scores

Value

An old-style Wordscores analysis.

Details

This version of Wordscores is exactly as described in Laver et al. 2003 and is provided for historical interest and continued replicability of older analyses.

scores is a vector of document scores corresponding to the documents in the word frequency matrix wfm. The function computes wordscores and returns a model from which virgin text scores can be predicted.

References

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

See also

Author

Will Lowe

Examples

data(lbg) ref <- getdocs(lbg, 1:5) ws <- classic.wordscores(ref, scores=seq(-1.5,1.5,by=0.75)) summary(ws)
#> Call: #> classic.wordscores(wfm = ref, scores = seq(-1.5, 1.5, by = 0.75)) #> #> Reference Document Statistics: #> #> Total Min Max Mean Median Score #> R1 1000 0 158 27 0 -1.50 #> R2 1000 0 158 27 0 -0.75 #> R3 1000 0 158 27 0 0.00 #> R4 1000 0 158 27 0 0.75 #> R5 1000 0 158 27 0 1.50
vir <- getdocs(lbg, 'V1') predict(ws, newdata=vir)
#> 37 of 37 words (100%) are scorable #> #> Score Std. Err. Rescaled Lower Upper #> V1 -0.448 0.0119 -0.448 -0.459 -0.437