Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201894

Different estimates for fixed effect model in STATA and R

$
0
0

I have an unbalanced panel of T=28 years and N=91. I am estimating what I believe to be the same fixed effects(Country/Year FE) model with STATA and R, but my estimates are different. Can someone help me understand what explains the difference between the two models? The data is the same and so are the variable included.

This is the model estimated with STATA:

xtreg Mx_LPs l.Mx_LPs dp_C_US_PTA ///
l.exp_share_gdp l.FDI_stock_gdp l.log_pop l.log_GDPxC l.GDP_growth l.TotalLRightsINGOs l.left l.polity2 l.total_viol l.US_PTA l.EU_PTA ///
i.Year,fe robust cluster(cid)

that gives the following estimates enter image description here and this is the model estimated with R:

us1<- plm(Mx_LPs ~ lag(dp_C_US_PTA,k=1) + lag(Mx_LPs, k = 1) + lag(exp_share_gdp, k = 1) + 
            lag(FDI_stock_gdp, k = 1) + lag(log_pop, k = 1) + lag(log_GDPxC, k = 1) + 
            lag(GDP_growth, k = 1) + lag(TotalLRightsINGOs, k = 1)+ lag(left, k = 1) +
            lag(polity2, k = 1)+lag(total_viol, k = 1)+lag(US_PTA, k = 1)+lag(EU_PTA, k = 1), data = data, effect = "twoways", 
          model = "within")
# and se
ss1<-list(round(coeftest(us1,vcovSCC(us1, method="arellano", type="HC1", cluster=c("group" ))),3)[, 4])
stargazer(us1, type= "text", 
          se = ss1)

With the followig results

To note that not only standard errors are different(why is this?) but also the estimated coefficient differ. I am really not very sure about why this is the case. It may be something trivial for more experienced people but it would be of great help if you could help


Viewing all articles
Browse latest Browse all 201894

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>