-----Original Message-----
From: gov2001-l-bounces at
lists.fas.harvard.edu [mailto:gov2001-l-
bounces at
lists.fas.harvard.edu] On Behalf Of Johannes Castner
Sent: Thursday, March 27, 2008 5:54 PM
To: gov2001-l at
lists.fas.harvard.edu
Subject: Re: [gov2001-l] Replication
Hi Jens,
...this is probably a stupid question, but I have problems figuring out
how to
eliminate outliers in Zelig. In Stata you can just say drop if variable
number. How do you do this using Zelig?
Johannes
Quoting Jens Hainmueller <jhainmueller at gmail.com>:
> the closer the better. ideally the results should match exactly.
> From:
Aakanksha Pande [mailto:aaka.pande at
gmail.com]
> Sent: Thursday, March 27, 2008 4:31 PM
> To: Jens Hainmueller
> Subject: Re: Replication
> thanks jens. i was wondering
how close to the published estimates we
have to
> be? i get almost similar estimates but not quite the same numbers.
> aaka
> On Thu, Mar 27, 2008 at 3:26 PM, Jens
Hainmueller
<jhainmueller at gmail.com>
> wrote:
> Aaka,
> It's best to send such
question to the list. No clue why you are
getting
this error (hard to tell from the given
information, maybe a variable
that
is missing in the dataset because the variable
name is miss-spelled).
However, I am also not clear on what you want to do exactly. In this
model
all but what is within the tag() would be a FEs
and all what is
within the
tag() are REs. Take a look at the documentation
on how FE and RE are
specified. Also the Bates book has many examples of models that
combine RE
> and FE.
> Hth,
> Jens
> From: Aakanksha Pande [mailto:aaka.pande at
gmail.com]
> Sent: Thursday, March 27, 2008 3:37 PM
> To: Jens Hainmueller
> Subject: Re: Replication
> hi jens
> following up on your advice i am trying to do a FIXED effects model
now in R
> and keep getting this error. any ideas?
> a<-
zelig(eabs.100~male+years.here+years.here.sq+born.dist+doctor+night.shi
ft
+field.visit+provided.house+inspec.2m+dist.min.health+toilets.avail+wat
er.av
ail+dist.road+round1+round2+Monday.int+Tuesday.int+Wednesday.int+Thursd
ay.in
> t+Friday.int+phc+tag(1|dist), data=data, model="ls.mixed")
> Error in `[.data.frame`(d, , all.vars(as.expression(formula))) :
> undefined columns selected
> the model is say y~x1+x2 with fe at
x3(district level)
> thanks!
> Aaka
> On Wed, Mar 26, 2008 at 10:56 AM,
Jens Hainmueller
<jhainmueller at gmail.com>
> wrote:
> Zelig's ls.mixed does RE models,
drawing from the lm4 package. The
> bibliography in the zelig documentation on this model also has many
helpful
references (ie. the Bates papers and book on this
which many
examples).
> there is plenty of documentation out there.
> you can also use the nlme package. I
think lm4 is the latest version
and
they may have changed the syntax a little bit,
but here is a quick
example
> from nlme:
> library(nlme)
> # FE for age and experience, random
intercept for classroom
summary(lme(fixed=score~age+experience,random=~1|classroom,data=data2))
\par
> # FE for experience, random
coefficient for age and random intercept
for
> classroom
summary(lme(fixed=score~age+experience,random=~age|classroom,data=data2
))
> \par
> hth,
> jens
> From: Aakanksha Pande [mailto:aaka.pande at
gmail.com]
> Sent: Wednesday, March 26, 2008 11:40
AM
> To: Jens Hainmueller
> Cc: larson.jenn at
gmail.com; Gary King
> Subject: Re: Replication
> Thanks Jens.I am trying to replicate my work in STATA in R. I am
trying to
do a hierarchical linear model (with random
effects) and was
wondering how
> to do that in R?
> best
> Aaka
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l