Predict Method for Wordfish

Description

Predicts positions of new documents using a fitted Wordfish model

Usage

1
2
3
4
## S3 method for class 'wordfish'
predict(object, newdata=NULL, se.fit=FALSE,
                 interval=c("none", "confidence"),
                 level=0.95, ...)

Arguments

object

A fitted wordfish model

newdata

An optional data frame or object of class wfm in which to look for word counts to predict document ideal points which to predict. If omitted, the fitted values are used.

se.fit

A switch indicating if standard errors are required.

interval

Type of interval calculation

level

Tolerance/confidence level

...

further arguments passed to or from other methods.

Details

Standard errors for document positions are generated by numerically inverting the relevant Hessians from the profile likelihood of the multinomial form of the model.

Value

predict.wordfish produces a vector of predictions or a matrix of predictions and bounds with column names ‘fit’ and ‘se.fit’, and with ‘lwr’, and ‘upr’ if ‘interval’ is also set.

Author(s)

Will Lowe

See Also

wordfish

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.