Hi Gov2001,
Problem set 5 has been graded -- feedback is in your course dropbox. If you
have any questions, let me know.
Best,
Molly
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Hi all,
Do you know how to run regression with fixed effect in R?
In Stata, it is "xi: reg".
Best,
Yanfang
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Hey guys,
I am using the plm package and am lagging variables for time series panel
data. I think I have figured out the move the data one step forward (to an
earlier year) using
lag(variable, 1)
However, i'm not sure how to move the other way (in stata it is the function
F1 as opposed to L1).
Does anyone know how to shift the data one step back (to the later date)
(do the opposite of what lag(variable, 1) does)?
Thanks!
Volha
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Hi everyone --
Happy St. Patrick's Day! In order to match all of you with a group that
will re-replicate your results and give you feedback, we need to know all of
your final choices of replication papers. I know some of you have switched
your papers depending on data availability, so each group *please send me an
e-mail with the final paper you have chosen to replicate by this Saturday*.
Then we can match you with a group that you will give feedback based on
similar interests.
Best,
Molly
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Hey folks,
I have 3 quick questions.
1) What does it mean to say "disturbance terms are allowed to be correlated
within but not across villages"? What are disturbance terms and will this
affect the regression results?
2) This is probably a dumb question, but one of our tables looks at school
enrollment and other characteristics for both the treatment and comparison
group, then gives the difference and a standard error (to show that the two
groups are similar prior to treatment). I can get the correct means of both
groups and the difference, but I can't get the right standard error. I feel
like I should be using the formula sqrt(sd(treatment)^2/n of treatment +
sd(comparison)^2/n of treatment). Below the chart, the author says he's using
OLS to estimate the differences and robust standard errors, but I don't get why
you would need to do that to just take a difference. Nonetheless, using that
formula isn't giving me the answer in the table.
3) My partner and I are having trouble replicating robust standard errors. When
I use "rlm" I get the same standard errors as "lm," but my coefficients are
correct. Any thoughts?
Any thoughts on either of these questions would be super appreciated! Thanks!
-Leslie
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
--
gov2001 mailing list served by Harvard-MIT Data Center
List Address: gov2001(a)lists.gking.harvard.edu
Subscribe/Unsubscribe: http://lists.gking.harvard.edu/?info=gov2001
Hi,
I wonder does any one have problem openning Zelig?
when I did
source("http://gking.harvard.edu/zelig/install.R")
The page can't be found.
Thanks a lot!
Erru
2011/3/15 Jeffrey Javed <jeffrey.javed(a)gmail.com>
> Hello all,
>
> We have run into a problem replicating a two-level logit model in R. We
> used glmmPQL to estimate the model, and our coefficients and standard errors
> are quite similar to those of the author. We talked to the author about this
> slight discrepancy in results, and he noted that he used penalized
> quasi-likelihood with a second order taylor series expansion (PQL2) to
> estimate his model. Unfortunately, he is not familiar with R (he ran his
> model in MLwiN) and suspects that glmmPQL uses a different order expansion
> or something different entirely. Is it possible to use PQL2 in R? We have
> looked all over the place and have found nothing about it. We have attached
> the glmmPQL code to the bottom of this e-mail if that helps at all.
>
> P.S. We successfully replicated the results in Stata using the code
> provided by the author, which used xlmelogit; however, we do not know which
> method xlmelogit uses to find the maximum likelihood.
>
> --Jeff and Noam
>
>
> out <- glmmPQL(rexvote ~ male + age1 + age2 + age4 + mye1 + mye2 +
> farmerown + worker + retired + unemployed + zlrs + euschlecht + zsatisdmo+
> disp + lfed1 + zasylumseekers + zsur + zasylumseekers:zsur +
> zreplacementrate + zsur:zreplacementrate + zasylumseekers:zreplacementrate+
> rmax + salienzmean.c + rvar.c + rvar.c:salienzmean.c + country - 1, random
> =~1|kontext, family=binomial(link="logit"), data=data, verbose=TRUE)
>
> _______________________________________________
> gov2001-l mailing list
> gov2001-l(a)lists.fas.harvard.edu
> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>
>
--
Erru Yang
Global Health and Population
Harvard School of Public Health
631-880-9605
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Hi everyone,
Our group is having some issues with replicating the standard errors for
two-stage least squares regression. In the paper we are replicating, our
authors use two-stage least squares regression with robust standard errors
using the "ivregress" command and robust option in stata. The ivregress
command puts everything into one equation so I'm not sure how they are
calculating the standard errors.
We have been able to get the regression coefficients in R doing two stages
of OLS regressions or using the "twosls" command from the systemfit package
for zelig, but then we can't use robcov() with zelig. Using robcov() and
multiplying the standard errors by sqrt(n/(n-k)) was the only way we got the
robust standard errors to work in the other regressions we had replicated.
Does anyone know if there is way to get robcov() from zelig or if there is
another way to get the robust standard errors that stata uses?
Thanks for any help!
Jackie
On Thu, Mar 10, 2011 at 5:18 PM, Molly Roberts <molly.e.roberts(a)gmail.com>wrote:
> Noah,
>
> You might try the robcov() function in the Design package. You can fit it
> on a lrm model, which is a logistic regression model also in the Design
> package. It's not in Zelig, but it might be worth a shot.
>
> Last year I replicated a paper that used clustered standard errors, so if
> you run into more roadblocks on this, let me know.
>
> Best,
> Molly
>
>
> On Thu, Mar 10, 2011 at 4:39 PM, Brandon Stewart <bstewart(a)fas.harvard.edu
> > wrote:
>
>> It's a survey you said? You might try the logit.survey method in Zelig
>> (see the documentation). Not sure if that's doing the same thing under the
>> hood as Stata.
>>
>> For everyone else- replicating clustered standard errors from Stata is
>> notoriously difficult...if you find good resources, definitely feel free to
>> share them on the list. Your classmates will thank you!
>>
>> Brandon
>>
>>
>> On Thu, Mar 10, 2011 at 4:33 PM, Colin Sullivan <cdsulliv(a)gmail.com>wrote:
>>
>>> Sorry, my mistake - not sure that will work for a logit model.
>>>
>>> On Thu, Mar 10, 2011 at 4:33 PM, Colin Sullivan <cdsulliv(a)gmail.com>wrote:
>>>
>>>> Hey Noah -
>>>> This pdf (http://people.su.se/~ma/clustering.pdf) which you probably
>>>> already found has code for a function that produces clustered standard
>>>> errors. The "clx" function worked for me, after a few tries - you just have
>>>> to be sure you drop observations missing any covariates when you enter the
>>>> id variable. Not sure how to do it in Zelig.
>>>>
>>>> Colin
>>>>
>>>> On Thu, Mar 10, 2011 at 4:29 PM, Noah Nathan <nlnathan(a)fas.harvard.edu>wrote:
>>>>
>>>>> Hi everyone,
>>>>>
>>>>> Julie and I have a quick question for some code we're trying to run in
>>>>> R. How can we cluster standard errors for a logit in Zelig? In stata its
>>>>> just logit Y X1 X2 X3, cluster(variable), where the variable in cluster() is
>>>>> a dummy variable for each survey round we're using, but I'm not sure how to
>>>>> make the equivalent syntax in R. Does anyone know this off the top of their
>>>>> head?
>>>>>
>>>>> Thanks!
>>>>> - Noah
>>>>>
>>>>> _______________________________________________
>>>>> gov2001-l mailing list
>>>>> gov2001-l(a)lists.fas.harvard.edu
>>>>> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> gov2001-l mailing list
>>> gov2001-l(a)lists.fas.harvard.edu
>>> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>>>
>>>
>>
>> _______________________________________________
>> gov2001-l mailing list
>> gov2001-l(a)lists.fas.harvard.edu
>> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>>
>>
>
> _______________________________________________
> gov2001-l mailing list
> gov2001-l(a)lists.fas.harvard.edu
> http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>
>
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Hello all,
We have run into a problem replicating a two-level logit model in R. We used
glmmPQL to estimate the model, and our coefficients and standard errors are
quite similar to those of the author. We talked to the author about this
slight discrepancy in results, and he noted that he used penalized
quasi-likelihood with a second order taylor series expansion (PQL2) to
estimate his model. Unfortunately, he is not familiar with R (he ran his
model in MLwiN) and suspects that glmmPQL uses a different order expansion
or something different entirely. Is it possible to use PQL2 in R? We have
looked all over the place and have found nothing about it. We have attached
the glmmPQL code to the bottom of this e-mail if that helps at all.
P.S. We successfully replicated the results in Stata using the code provided
by the author, which used xlmelogit; however, we do not know which method
xlmelogit uses to find the maximum likelihood.
--Jeff and Noam
out <- glmmPQL(rexvote ~ male + age1 + age2 + age4 + mye1 + mye2 +
farmerown + worker + retired + unemployed + zlrs + euschlecht + zsatisdmo +
disp + lfed1 + zasylumseekers + zsur + zasylumseekers:zsur +
zreplacementrate + zsur:zreplacementrate + zasylumseekers:zreplacementrate +
rmax + salienzmean.c + rvar.c + rvar.c:salienzmean.c + country - 1, random=~
1|kontext, family=binomial(link="logit"), data=data, verbose=TRUE)
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Hi Gov2001,
Thanks all for filling out the poll online about mountain biking. We've
planned a mountain biking trip for April 3rd at Cutler Park (
http://j.mp/glTKjZ). We'll meet at 10 AM in the parking lot at Kendrick St
in Needham (http://goo.gl/maps/PHXA). We'll probably bike for a couple
hours, then have lunch.
If you will be joining us, please e-mail me (not the list) and let me know!
Also, tell me if you have a car that you'd be willing to use for carpooling
purposes. I'm going to try to get a deal for us to rent a bunch of bikes
and helmets for those of you that don't have one -- let me know if you'd
like to be in on this also.
Hope you all are having a great spring break!
Best,
Molly
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Hi Class,
I'm wondering if anyone can help me translate the ksm command in Stata into
R; it appears to be an out of date command, so I'm having trouble finding
documentation. I think it's a kernel smoother, so lowess and loess and
ksmooth all seem to be options in R. Does anyone know these commands, or
how to translate a Stata line like the following:
ksm gm_school vote if vote>50 & year==base, nograph bwidth(0.1)
gen(sw_gm_school) noweight
Thanks in advance,
Colin
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l