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
Numbering a variable based on previous observationDear all I want to make a moderating variable called M&A active and give firms (identified by v…
Higher significance levelDeal all, I am running an OLS regression analysis and the significance level is set by default at 1…
input a number contained in macroI would like to input a number that is contained in (global) macro. The following code doesn't work.…
Multinominal logistic regression marginal effectsI am running a multinominal logit regression with five dependent variable categories: "I disagree fu…
interpolate between two decades using expandHi All, I have two unbalanced panel dataset with different variables in different frequencies. The…
Subscribe to:
Post Comments (Atom)
0 Response to Converting a code from Stata to R
Post a Comment