Announcement

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

  • Spatial Panel Data and Large Dataset

    Hi !

    I have a large panel dataset with 33 000 observations every year for 25 years on STATA 14.
    I would like to use command such as xsmle to allow for municipality-specific trends, spatial autocorrelation and other things.

    For that, I first need to compute a spatial weight matrix with a command such as spmap. spmap cannot compute a 33 000x 33 000 matrix, I therefore need to compute a banded matrix but xsmle doesn't allow to use banded matrix.

    My questions are therefore:
    - Is there another command than xsmle that allows to use banded matrix ?
    - Is there another way to allow for municipality-specific trends, spatial autocorrelation, etc. than by computing a spatial weight matrix ?

    Thank you in advance !

  • #2
    You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. There are many relevant entries if you google this:

    https://www.stata.com/statalist/arch.../msg00089.html
    http://econweb.umd.edu/~prucha/Paper...%282013%29.pdf
    http://wlm.userweb.mwn.de/Stata/wstaspwm.htm

    Comment


    • #3
      Hi !
      Thank you for your help. I have checked these references but it does not solve my problem I think.

      I tried these following codes:

      1/
      Code:
      spatwmat, stand name(mat1) xcoord(latitude) ycoord(longitude) band(0 10)
      that return me matsize too small

      2/
      Code:
      spmat idistance mat1 longitude latitude , id(id) norm(row)
      SPMAT_idistance(): 3900 unable to allocate real <tmp>[35646,35646]
      <istmt>: - function returned error

      r(3900);

      3/ I therefore decided to use banded matrix but I therefore cannot use xsmle anymore.
      Code:
      spmat idistance mat1 longitude latitude , id(id2) norm(row) banded btruncate(1 3)
      spmat save name using mat1.dta
      xsmle  depvar [indepvars] , wmatrix(mat1) model(sar)
      xsmle does not support banded matrices
      r(498);


      Do you have any ideas ? Do you know other commands?
      Thanks !


      Comment


      • #4
        Hello Nikhos Ablos, please were you able to find a solution to the "xsmle does not support banded matrices" problem? I face the same problem. If you have found a solution or an alternative, could you kindly share it?

        Thanks.

        Lom.

        Comment

        Working...
        X