Announcement

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

  • Spatial Regression in Stata

    Hi,

    I have a panel data set with some time-invariant variables and want to estimate the effects of those on my dependent variable.
    Also, my dependent variable is likely to be spatially correlated.

    I already calculated the spatial-weighting matrix.

    I know there is spreg and xsmle to estimate a spatial error model.
    However, spreg has problems with repeated id's (which I have in the panel data) and when I use xsmle than I cannot estimate the effect of the time-invariant

    Any ideas?

  • #2
    Hi Christopher,

    I am using the XSMLE command to estimate a model with both time-invariant and time-varying regressors -- and it seems to be working properly.

    How did you calculate the spatial weight matrix and what kind of SPW are you using? How are you importing it into Stata (e.g., have you installed the SPWMATRIX command)?

    Also: Why does your panel have repeated IDs? Is there anyway you can modify your data set to prevent that? Ideally, each unit (state, agent, etc) will have a single ID and a single year variable.

    -nick

    Comment


    • #3
      To know spreg is valid only for cross section data not for panel data
      And spatial Weighted matrix must be at least 20x20
      Emad A. Shehata
      Professor (PhD Economics)
      Agricultural Research Center - Agricultural Economics Research Institute - Egypt
      Email: [email protected]
      IDEAS: http://ideas.repec.org/f/psh494.html
      EconPapers: http://econpapers.repec.org/RAS/psh494.htm
      Google Scholar: http://scholar.google.com/citations?...r=cOXvc94AAAAJ

      Comment


      • #4
        As Emad Shehata points out, my understanding is that spreg can work only with cross-sectional data.

        I haven't used the package so I don't know if it can handle panel data, but you may want to investigate Maurizio Pisati's spatcorr, spatdiag, spatgsa, spatlsa,spatreg or spatwmat commands, from his package sg162 "Tools for spatial data analysis".

        Comment


        • #5
          Read this post

          http://www.statalist.org/forums/foru...ression-models

          To install any package
          Inside stata type

          ssc install package , replace all
          I.e


          ssc install spregcs, replace all

          With best wishes
          Emad A. Shehata
          Professor (PhD Economics)
          Agricultural Research Center - Agricultural Economics Research Institute - Egypt
          Email: [email protected]
          IDEAS: http://ideas.repec.org/f/psh494.html
          EconPapers: http://econpapers.repec.org/RAS/psh494.htm
          Google Scholar: http://scholar.google.com/citations?...r=cOXvc94AAAAJ

          Comment


          • #6
            i have a small spatial data base, 24 obs, when i use the spreg command
            I find non sig results, does exist analogue command to spreg for the small data base? thanks

            Comment

            Working...
            X