predict.textmodel_wordfish: Prediction from a textmodel_wordfish method

Description Usage Arguments Value

View source: R/textmodel_wordfish.R

Description

predict.textmodel_wordfish() returns estimated document scores and confidence intervals. The method is provided for consistency with other textmodel_*() methods, but does not currently allow prediction on out-of-sample data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## S3 method for class 'textmodel_wordfish'
predict(
  object,
  se.fit = FALSE,
  interval = c("none", "confidence"),
  level = 0.95,
  ...
)

## S3 method for class 'textmodel_wordfish'
coef(object, margin = c("both", "documents", "features"), ...)

coefficients.textmodel_wordfish(object, ...)

Arguments

object

a fitted wordfish model

se.fit

if TRUE, return standard errors as well

interval

type of confidence interval calculation

level

tolerance/confidence level for intervals

...

not used

margin

which margin of parameter estimates to return: both (in a list), or just document or feature parameters

Value

coef.textmodel_wordfish() returns a matrix of estimated parameters coefficients for the specified margin.


quanteda.textmodels documentation built on April 6, 2021, 9:06 a.m.