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
Graph dot: General DoubtHello I want to make a comparative graph between the results that I have. There are four variables …
Change order of x-axis categories in marginsplotHello, After the combo margins-marginsplot, I would like to change the order of the categories of m…
Comparing coefficients across logit modelsHi all, I've developed a logit model to be applied to three different sets of cross-sectional data(t…
Graphic layers /twoway): points and linesHello, I want to make a graph that puts lines ("ylines", "xlines") in front of the points produced …
Loop to generate dummies indicating maximum values within each groupDear all, I am trying to generate a loop to create dummy variables for maximum values of a variable…
Subscribe to:
Post Comments (Atom)
0 Response to Moran test and ivreg2
Post a Comment