Depending on the model you are trying to fit, zelig allows you to pass
additional arguments to the estimation command that it is calling. If that
command take weights you can pass these for example like:
zelig(y~x1+x2,model="logit", weights=Weightvariable) thsi works because for
logit zelig calls glm(MASS) and glm takes weights.
Important: not all command allow weights and the ones that do usually do not
allow for complex survey designs (only simple observation specific weights
which are not necessarily what you want) are used. if you have a complex
survey design (like stratified or cluster sampling) and want to get the
correct design based variances svyglm is your only choice.
jens
-----Original Message-----
From: gov2001-l-bounces at
lists.fas.harvard.edu [mailto:gov2001-l-
bounces at
lists.fas.harvard.edu] On Behalf Of Keith Schnakenberg
Sent: Thursday, March 27, 2008 10:47 AM
To: gov2001-l at
lists.fas.harvard.edu
Subject: [gov2001-l] sampling weights
I am still trying to work with sampling weights. I found that I can
apply the weights using library(survey); svydesign() and then do
parameter estimates using svymle(). This is fine, but I still wonder
if there is an easier way to do this. Is there some argument that I
can pass to zelig to make it estimate the model with these sampling
weights? I think the likelihood that I will make an error when I try
to simulate things is much smaller if I can do it in zelig.
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l