Learn R Programming

quanteda (version 0.9.9-3)

textmodel-internal: internal functions for textmodel objects

Description

Internal function documentation for textmodel objects.

Usage

"print"(x, n = 30L, ...)
"show"(object)
"show"(object)
"predict"(object, newdata = NULL, rescaling = "none", level = 0.95, verbose = TRUE, ...)
"print"(x, n = 30L, digits = 2, ...)
"show"(object)
"show"(object)
"print"(x, ...)
"show"(object)
"show"(object)

Arguments

x
for print method, the object to be printed
n
max rows of dfm to print
...
additional arguments passed to print
object
wordfish fitted or predicted object to be shown
newdata
dfm on which prediction should be made
rescaling
none for "raw" scores; lbg for LBG (2003) rescaling; or mv for the rescaling proposed by Martin and Vanberg (2007). (Note to authors: Provide full details here in documentation.)
level
probability level for confidence interval width
verbose
If TRUE, output status messages
digits
number of decimal places to print for print methods
object
a fitted Wordscores textmodel
...
additional arguments passed to other functions
x
for print method, the object to be printed
n
max rows of dfm to print
x
for print method, the object to be printed
...
additional arguments passed to print

Value

The predict method for a wordscores fitted object returns a data.frame whose rows are the documents fitted and whose columns contain the scored textvalues, with the number of columns depending on the options called (for instance, how many rescaled scores, and whether standard errors were requested.) (Note: We may very well change this soon so that it is a list similar to other existing fitted objects.)

References

Laver, Michael, Kenneth R Benoit, and John Garry. 2003. "Extracting Policy Positions From Political Texts Using Words as Data." American Political Science Review 97(02): 311-31.

Martin, L W, and G Vanberg. 2007. "A Robust Transformation Procedure for Interpreting Political Text." Political Analysis 16(1): 93-100.