Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Test for heteroskedasticity after spxtregress

    The spatial Stata manual (https://www.stata.com/manuals/sp.pdf) makes clear that heteroskedasticity is a problem in spatial analyses. It causes estimates to be inconsistent. Yet, I can't figure out a way to test for heteroskedasticity after specifying a model with spxtregress. Predict, resid and predict, xb don't work. Nor do rvfplot (to plot residuals vs. fitted values) and estat hettest (for the Breusch-Pagan Test).

    Any idea how I can check for heteroskedasticity? Please let me know.


  • #2
    Is clustering your standard errors for heteroskedasticity on the menu? I presume it is, even though I've never used spxtregress.

    If you're already working with panel data, don't test for heteroskedasticity; assume it is there. It's almost certain that the errors are not normally distributed/spherical because unobserved confounding will make certain observations/units more alike than other ones. Thus, unless you need to do some formal test, I would jut add clustered robust standard errors and get on with it, if that's an option anyways.

    Comment


    • #3
      Hi Jared,

      Clustering for heteroskedasticity is not on the menu unfortunately. vce(robust) and vce(cluster) are not options when using spxtregress. Do you have any other suggestions?

      Comment


      • #4
        You seem to want

        Code:
        spregress y x1 x2, gs2sls heteroskedastic dvarlag(W) errorlag(W) ///
        ivarlag(M: x1 x2)
        But be warned, I've never used GMM and wouldn't know how to properly advise one on how to use it

        Comment


        • #5
          Hi Jared. Thanks for the replys. gs2sls heteroskedastic is a good way to deal with heteroskedasticity when data are cross-sectional. But when data are panel (necessitating the use of spxtregress, fe or spxtregress, re), there is no heteroskedastic option. This is because spatial panel models are estimated via quasi maximum likelihood rather than gs2sls. So as far as I can tell there is: 1) No way to test for heteroskedasticity in a panel context and 2) No way to correct for it if it exists.

          This seems to be a problem, so I wonder how others are dealing with it.

          Comment


          • #6
            My recommendation is to use the user-written command -acreg-, which computes standard errors robust to heteroskedasticity, serial correlation, and spatial correlation. If you want lags of the covariates in your specification then you need to create them, but that's fairly easy given Stata's built-in spatial stuff. The spatial estimation commands seem too restrictive to me. The estimators are not even consistent if there's heteroskedasticity or serial correlation. If you use acreg, you can have that robustness.

            Comment


            • #7
              Thank you Jeff. Your suggestion was incredibly helpful. Best, Doug

              Comment

              Working...
              X