chrisadolph/tile-simcf — Issue #30: Zelig/tile-simcf interoperability
Author: aserlich
Created: 2012-03-04 08:38:40+00:00
State: open
Labels: simcf, tile

**Scenario 1**
Zelig has a simulator that simcf does not have. Generally this means you will run your model in Zelig, but not necessarily as seen in this code. You could simply want to use the Zelig simulator. In such a situations, you want to be able to send a set of counterfactuals to Zelig, as Zelig's 1 by 1 calculation of simulations is clunky and return the point estimates and upper and lower bounds to plot in tile.

```R
library(Zelig)
data(turnout)
z.out <- zelig(vote ~ race + age, model = "logit", data = turnout)

class(z.out)
#the class of Zelig z.out is simply "glm" "lm"

z.outNotZelig <- glm(vote ~ race + age, data = turnout, binomial(link = "logit"))

#This works the same way even when you don't use Zelig because the underlying call is to glm
x.out <- setx(z.outNotZelig, race = "white")
```

**Scenario 2**
Like the last situation, you have used Zelig to run the model, but you have also used Zelig's simulator and not used simcf, and you want to pass those results to tile to plot. A simple function needs to be in place to extract the quantities of interest.