I tried this but for some reason got a "NULL" result.
check <- zelig(Incident ~ Temperature + Pressure,
model="logit",
+ data=data.frame)
How to cite this model in Zelig:
Kosuke Imai, Gary King, and Oliva Lau. 2008. "logit: Logistic Regression for
Dichotomous Dependent Variables" in Kosuke Imai, Gary King, and Olivia Lau,
"Zelig: Everyone's Statistical Software,"
http://gking.harvard.edu/zelig
check
Call: zelig(formula = Incident ~ Temperature + Pressure, model = "logit",
data = data.frame)
Coefficients:
(Intercept) Temperature Pressure
13.2924 -0.2287 0.0104
Degrees of Freedom: 22 Total (i.e. Null); 20 Residual
Null Deviance: 28.3
Residual Deviance: 18.8 AIC: 24.8
x.out.53 <- setx(object = check, Temperature = 53)
x.out.53
(Intercept) Temperature Pressure
1 1 53 152.2
x.out.31 <- setx(object = check, Temperature = 31)
x.out.31
(Intercept) Temperature Pressure
1 1 31 152.2
s.out <- sim(object = check, x = x.out.53, x1 =
x.out.31)
s.out$ev
NULL
Quoting Patrick Lam <plam at fas.harvard.edu>:
> it might help to look at the Zelig manual, particularly the setx and sim
> functions:
>
http://gking.harvard.edu/zelig/docs/index.html
> On Thu, Mar 12, 2009 at 2:23 AM, Lee,
Clarence <clee at hbs.edu> wrote:
> > Hi,
>
>
>
> > Maybe I?m
missing something in my understanding, but how do you evaluated
> > the difference in the expected probability in the data when checking for
> > Zelig? Do you mind describing how you specified the inputs y and X?
>
>
>
> > Thanks!
>
>
> > Clarence
>
>
>
> > *From:*
gov2001-l-bounces at
lists.fas.harvard.edu [mailto:
> > gov2001-l-bounces at
lists.fas.harvard.edu] *On Behalf Of *Z. A. Townsend
> > *Sent:* Thursday, March 12, 2009 2:14 AM
> > *To:* gov2001-l at
lists.fas.harvard.edu
> > *Subject:* Re: [gov2001-l] Using Zelig to check our results in 2.3-2.5
>
>
>
> > for 2.3,
for example, something like
>
> > data <- as.data.frame(cbind(y,X))
%which I defined earlier to be the vector
> > and matrix of interest
> > names(data) <- c("incident", "intercept",
"temperature", "pressure")
> > output <- zelig(incident ~ temperature +
> > pressure, data = data, model = "logit")
>
>
>
> > Should
confirm your results.
>
>
>
> > On Thu, Mar
12, 2009 at 12:33 AM, Lee, Clarence <clee at hbs.edu> wrote:
>
> > Does anyone know the commands in Zelig
to quickly check our results for
> > 2.3-2.5?
>
>
>
> > Thanks,
>
>
>
> > Clarence
>
>
> > _______________________________________________
> > gov2001-l mailing list
> > gov2001-l at
lists.fas.harvard.edu
> >
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>
>
>
> >
_______________________________________________
> > gov2001-l mailing list
> > gov2001-l at
lists.fas.harvard.edu
> >
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>
>
> --
> Patrick Lam
> Department of Government and Institute for Quantitative Social Science,
> Harvard University
>
http://www.people.fas.harvard.edu/~plam