Posts Tagged ‘ Zelig ’

Calculating distances (across matrices)

October 5, 2012
By
Calculating distances (across matrices)

This Gist is mostly for my future self, as a reminder of how to find distances between each row in two different matrices. To create a distance matrix from a single matrix, the function dist(), from the stats package is sufficient. There are times, ho...

Read more »

Visually-weighted regression plots, with Zelig

September 25, 2012
By
Visually-weighted regression plots, with Zelig

As a follow-up to yesterday’s post on producing visually-weighted regression plots, here is some code which illustrates the production of similar plots, but using Zelig’s convenient modeling and simulation functions. This code was produced...

Read more »

Graphing Predicted Legislative Violence with Zelig & ggplot2

April 25, 2012
By
Graphing Predicted Legislative Violence with Zelig & ggplot2

In my previous post I briefly mentioned an early draft of a working paper (HERE) I've written that looks into the possible causes of violence between legislators (like the violence shown in this picture from the Turkish Parliament).  From The GuardianIn this...

Read more »

Multivariate probit regression using (direct) maximum likelihood estimators

May 11, 2011
By
Multivariate probit regression using (direct) maximum likelihood estimators

Consider a random pair of binary responses, i.e. with taking values 1 or 2. Assume that probability can be function of some covariates . The Gaussian vector latent structureA standard model is based a latent Gaussian structure, i.e. there exi...

Read more »