Hello guys,
I'm new to both Satata and R. I'm trying to do a regression to find the causal effect between the use of pesticides and birds' population, and i'm now using a Arellano-Bond estimator, i have this code for Satata and i want to convert it to R. I tried different versions but i don't even get the same sign of effect of the lagged dependant variable, in Satata its positive, while my versions in R give me a negative sign which doesn't make much of a sense since an increase in bird's population of the past period should have a positive impact on the bird population in the current period. Can you guys tell me how the correct code in R should be written?
Here's the Stata code
xtabond2 sum_grass_no L.sum_grass_no crop_acre total_neon develop_acre mtemp1 mtemp4 mtemp5 mtemp6 lag_mtemp12 pcpn1 pcpn4 pcpn5 pcpn6 lag_pcpn12 pop_den, gmm(L.( sum_grass_no ),lag(1 2)) iv(lag_fertp pest_price develop_acre mtemp1 mtemp4 mtemp5 mtemp6 lag_mtemp12 pcpn1 pcpn4 pcpn5 pcpn6 lag_pcpn12 pop_den, eq(diff) ) robust twostep
Also, i'm using the plm package on R and the the command is pgmm.
Thanks for the help!
Related Posts with Converting a code from Stata to R
output coeffs and CI from looped cox regressionHi there, I need to run a cox regression over 21 pollutants (many times) and I want to then output H…
Merging two data sets: weighting help?Hi All, I am working to merge two separate data sets, each with their own sampling method and weight…
Is there an arbitrary scaling factor in logistic regression in Stata?Hi, Norton et al state in a recent JAMA guide that the magnitude of the odds ratio from a logistic …
New package -checkipaddresses- on SSC : identify IP addresses behind VPN/VPSThanks to Kit Baum, my checkipaddresses is available from SSC. checkipaddresses queries an IP addre…
2SLS estimationHello, I would like to estimate the following 2SLS panel regression: First stage: Zit = α Wit*Fit +…
Subscribe to:
Post Comments (Atom)
0 Response to Converting a code from Stata to R
Post a Comment