That's great. I'm glad that you figured it out.
Kosuke
--
Department of Politics
Princeton University
Just realized that converting the clustering variable
pty to a numeric
vector (instead of a factor) solves the problem!
Sorry for the trouble!
Cesar
-----Original Message-----
From: Cesar Zucco [mailto:zucco@princeton.edu]
Sent: Wednesday, April 07, 2010 8:46 PM
To: Kosuke Imai; sayan dasgupta
Cc: zelig(a)lists.gking.harvard.edu; Terry Therneau; Terry Therneau
Subject: Re: [zelig] Re: robust se's in zelig's tobit
Dear Sayan,
Here's a quick follow up to the cluster issue in Zelig that circulated a
few
days back. Sorry to keep you on this.
I was able to run clustering with tobit in Zelig but I'm having some
trouble
with the post-estimation commands. If I ran this without clustering,
post
estimation works fine:
tob4 <-
zelig(mrelideal~relideo+incab+prespty+legis,model="tobit",data=data.set)
x.out <- setx(tob4,incab=0,legis=1995,relideo=mean(data.set$relideo))
x.in <- setx(tob4,incab=1,legis=1995,relideo=mean(data.set$relideo))
x.out
(Intercept) relideo incab presptyTRUE legis1990 legis1995 legis2000
1 1 2.086757 0 0 0 1 0
sims <- sim(tob4, x = x.out, x1 = x.in)
However, if I ran this with the clustering, setx does not treat the
clustering correctly.
tob4 <-
zelig(mrelideal~relideo+incab+prespty+legis,cluster="pty",robust=T,
model="tobit",data=data.set)
x.out <- setx(tob4,incab=0,legis=1995,relideo=mean(data.set$relideo))
x.in <- setx(tob4,incab=1,legis=1995,relideo=mean(data.set$relideo))
x.out
(Intercept) relideo incab presptyTRUE legis1990 legis1995 legis2000
cluster(pty)PC cluster(pty)PN cluster(pty)NE
1 1 2.086757 0 0 0 1 0
0 0 0
sim(tob4, x = x.out, x1 = x.in)
Error in sim.coef %*% t(x) : non-conformable
arguments
I tried getting rid of the extra values in x.out by brute force (by
deleting
any columns with cluster in the name but I think sim is using the wrong
variance-cov matrix to draw the simulations.
Any workarounds?
Thanks,
Cesar Zucco
On 3/19/10 8:54 AM, "Kosuke Imai" <kimai(a)Princeton.Edu> wrote:
Great. Thanks, Sayan!
Kosuke
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options: