Scott Desposato's Homepage
Code and Data


Computer Code


  • Permutation Analysis code to compare group and subgoup cohesion. This R code permutes votes within groups (parties) across different subgroups in parties (say, state-party-delegations). It then compares the distribution of permuted subgroup cohesion with observed subgroup cohesion. If the empirical value exceeds the permuted distribution, it provides evidence of subgroup cleavages within groups. The code is HERE.
  • Legislator Ideal Points in WinBUGS from R - simulation code. This R code will randomly generate legislator ideal points, bill yea/nay locations, and roll-call votes. It will then call BUGS using R2WinBUGS and estimate ideal points using a standard item-response model. It them makes some graphs and such in R. This may make your life easier as you start using WinBUGS to model roll-call votes. Steps: 1) Install Winbugs 2) Install R and the R2WinBUGS package 3) create appropriate directories (see code for directory names - change or create identicaly paths) 3.5) Place leg.bug in whatever directory is appropriate 4) Copy and paste the legsim.R code into the R console 5) when it fails, persist or just email me. Files you need: legsim.R - the R code to run WinBUGS and leg.bug a modified version of an example on Simon Jackman's website.

  • An excell spreadsheet for comparing party-switching payoffs as discussed in Desposato, 2005

  • R code to compare equilibrium graphs as discussed in Desposato, 2005

  • R Code for estimating conditional logit with unobserved choice set variation. Crude but it works. Like most things on this page. This is just for simulations but the likelihood function is there and could easily be tweaked for an application - I can do it for you if there are any problems.

  • An xlisp algorithm for 2-dimensional MDS using SWA flight times

  • An xlisp algorithm for simulating Congressional elections

  • SAS/IML Code for estimating legislators ideal points via homogeneity analysis by alternating least squares, with bootstrapping algorithm


    Data


  • Legislative Representation in Brazil, 1991-1998,

  • Election Results, NY, 1898

  • Election Results, NY, 1898, Fixed Colum

  • Representation in Authoritarian Brazil: Roll-call votes from the Chamber of Deputies, 1964-1985.

  • Data from the Michaelson and Morley speed of light experiments, for use in the R tutorials.

  • Data from "Parties for Rent" article on party-switching in Brazil and Stata code to run models

    Homepage: http://swd.ucsd.edu
    Email: swd@ucsd.edu