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
Question of generationg average variable in certain rangehi, guys I have a problem relating to generate new varible( basic data structual is as follows). I w…
extract year from a variableDear All How can we extract year, month and day from a varibale. Please find attached the example …
Multilevel Modeling with Complex Survey DesignUsing sipp data, I am examining whether those at the lower end of income distribution are more likel…
Labels on categorical variables lost when using esttabHi Statalisters. I am trying to incorporate key results from 5 model runs into a summary table usin…
Why and when is panel data preferrable to pooled cross-sectional?Not sure if non-Stata econometric questions are welcome here, but I've encountered an issue at work.…
Subscribe to:
Post Comments (Atom)
0 Response to Converting a code from Stata to R
Post a Comment