Announcement

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

  • Spatial regression and testparm - is it possible?

    Hello,

    I wonder if it is possible to use testparm or, in some other way, test joint significance of spatially lagged independent variables (with or without spatial lag of error term) in spatial regression.

    For example, if I run simple regression with GDP as dependent variable and TRADE and R&D as independent variables

    regress GDP TRADE R&D

    after regression, I could easily run

    testparm TRADE R&D

    My concern arises when I run SDEM as follows, let's say weight matrix W = C (contiguity):

    spregress GDP TRADE R&D, ml errorlag(C) ivarlag(C: TRADE R&D)

    How can I test the hypothesis that the spatially lagged independent variables are jointly equal to zero? Is it possible somehow with testparm? If not, is there any other way?

    Thank you very much for your help!

  • #2
    Zvonimir:
    have you tried -test-?
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Dear Carlo,

      thank you for your reply. I also tried -test-, however, I'm not sure how to operationalize this in Stata.

      If I just put

      test errorlag(C) ivarlag(C: TRADE R&D)

      it doesn't work. I'm wondering, what command would be to do this in Stata? Thank you a lot

      Comment


      • #4
        I figured it out, well, with help of ChatGPT :-)

        It seems testparm is not possible, but test is

        Command would be, following my example

        test [C]TRADE [C]R&D [C]e.GDP



        Comment


        • #5
          Zvonimir:
          thanks for closing the thread reporting on the way you succeeded.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment

          Working...
          X