Internal function documentation for textmodel objects.

Internal function documentation for textmodel objects.

# S4 method for textmodel_ca_fitted
coef(object, doc_dim = 1, feat_dim = 1, ...)

# S4 method for textmodel_ca_fitted
coefficients(object, ...)

# S3 method for textmodel_wordfish_fitted
print(x, n = 30L, ...)

# S4 method for textmodel_wordfish_fitted
show(object)

# S4 method for textmodel_wordfish_predicted
show(object)

# S4 method for textmodel_wordfish_fitted
coef(object, ...)

# S4 method for textmodel_wordfish_fitted
coefficients(object, ...)

# S3 method for textmodel_wordscores_fitted
predict(object, newdata = NULL,
  rescaling = c("none", "lbg", "mv"), level = 0.95,
  verbose = quanteda_options("verbose"), ...)

# S3 method for textmodel_wordscores_fitted
print(x, n = 30L, digits = 2, ...)

# S4 method for textmodel_wordscores_fitted
show(object)

# S4 method for textmodel_wordscores_predicted
show(object)

# S4 method for textmodel_wordscores_fitted
coef(object, ...)

# S4 method for textmodel_wordscores_fitted
coefficients(object, ...)

# S4 method for textmodel_wordscores_predicted
coef(object, ...)

# S4 method for textmodel_wordscores_predicted
coefficients(object, ...)

# S3 method for textmodel_wordshoal_fitted
print(x, ...)

# S4 method for textmodel_wordshoal_fitted
show(object)

# S4 method for textmodel_wordshoal_predicted
show(object)

Arguments

object

wordfish fitted or predicted object to be shown

doc_dim, feat_dim

the document and feature dimension scores to be extracted as coefficients

...

additional arguments passed to print

x

for print method, the object to be printed

n

max rows of dfm to print

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.