Hi,
I am running a Moran’s test of residual correlation with nearby residuals.
I know that Moran runs on regress but if i run it after ivreg2 doesn't work
this is a snipped of my code:
foreach y of numlist 2013 2018 {
sum vote_fdi`y'
*** 2SLS
ivreg2 vote_fdi`y' (opp_rate = iv_jmeansent), robust
ivreg2 vote_fdi`y' (opp_rate = iv_jmeansent) $covars, robust
}
spmatrix create contiguity W, replace
estat moran, errorlag(W)
After running the test I get this error:
estat moran not valid
r(321);
How can I solve this?
Thanks everyone
Related Posts with Moran test and ivreg2
Systems of equationsDear all, I want to estimate a system of equations where the dependent variable is the same but the…
Now how do I make a joint test (Post estimation) after using Mixed?Array Hello! So I want to see if there is any correlation between ZCREDTA and freq. I want a joint t…
Destringing and Dropping.Hello, How would I go about telling stata to drop the observations of variable nace_r2, when the fi…
Intersection of two matricesThis feels like a super basic question, but how do I find the intersection of two matrices in mata? …
Lag in Regression with Newey–West standard errorsPlease help resolve some confusion regarding newey (the command to run NW SE regression in Stata): …
Subscribe to:
Post Comments (Atom)
0 Response to Moran test and ivreg2
Post a Comment