Learn R Programming

wnominate (version 1.2)

qnprob: Qudaratic Normal Probability Matrix Generator

Description

qnprob takes estimates from the Quadratic Normal model and returns a matrix of yeah choice probabilities. It is used to generate a test rollcall object using generateTestData. The function is set up to take identical arguments to nomprob, which explains why many of the arguments do not do anything.

Usage

qnprob(yea,nay,ideal,Beta,dimweight,normal=1)

Arguments

yea
m x d matrix of yeah locations.
nay
m x d matrix of no locations.
ideal
n x d matrix of legislator ideal points.
Beta
Ignored.
dimweight
Ignored.
normal
integer, '1' generates data using normal probabilities, any other value generates data using logistic probabilities.

Value

An n x m matrix of probabilities giving the probability of yea for each of n legislators on each of m votes

See Also

'generateTestData' and 'wnominate'.

Examples

Run this code

    yp <- matrix(rep(0,10),nrow=10)
    np <- matrix(rep(0.1,10),nrow=10)
    ideal <- matrix(rep(0,10),nrow=10)
    qnprob(yp,np,ideal,15,0.5)    #a matrix of yea probabilities

Run the code above in your browser using DataLab