wordfish: Estimate a Wordfish Model

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/wordfish.R

Description

Estimates a Wordfish model using Conditional Maximum Likelihood.

Usage

1
2
wordfish(wfm, dir=c(1, 10), control=list(tol=1e-06,
         sigma=3, startparams=NULL), verbose=FALSE)

Arguments

wfm

a word frequency matrix

dir

set global identification by forcing theta[dir[1]] < theta[dir[2]]

control

list of estimation options

verbose

produce a running commentary

Details

Fits a Wordfish model with document ideal points constrained to mean zero and unit standard deviation.

The control list specifies options for the estimation process. These are: tol, the proportional change in log likelihood sufficient to halt estimatioe, sigma the standard deviation for the beta prior in poisson form, and startparams a previously fitted wordfish model. verbose generates a running commentary during estimation

The model has two equivalent forms: a poisson model with two sets of document and two sets of word parameters, and a multinomial with two sets of word parameters and document ideal points. The first form is used for estimation, the second for summarizing and prediction.

The model is regularized by assuming a prior on beta with mean zero and standard deviation sigma (in poisson form). If you don't want to regularize, set beta to a large number.

Value

An object of class wordfish. This is a list containing:

dir

global identification of the dimension

theta

document positions

alpha

document fixed effects

beta

word slope parameters

psi

word fixed effects

docs

names of the documents

words

names of words

sigma

regularization parameter for betas in poisson form

ll

final log likelihood

se.theta

standard errors for document position

data

the original data

Author(s)

Will Lowe

References

Slapin and Proksch (2008) 'A Scaling Model for Estimating Time-Series Party Positions from Texts.' American Journal of Political Science 52(3):705-772.

See Also

plot.wordfish, summary.wordfish, coef.wordfish, fitted.wordfish, predict.wordfish, sim.wordfish

Examples

1
2
3
dd <- sim.wordfish()
wf <- wordfish(dd$Y)
summary(wf)

austin documentation built on May 2, 2019, 5:48 p.m.