Announcement

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

  • λ and ρ parameters outside [-1;1] with spreg command

    Hello to all,

    I'm running a spatial autoregressive model with Stata and command -spreg-.
    I'm confused by getting λ and ρ parameters outside [-1;1].

    Weight matrix has been created with -spmat idistance- command, and I use it as both the spatial-autoregressive term and the spatial-error term (notified by dlmat and elmat options in -spreg- command).
    I've tried three different normalization methods (row, spectral and minmax) and I've runned spreg with both max likelihood and GS2SLS estimators.
    λ and ρ are really different out of each of these six cases. And on half cases, λ or/and ρ are outside [-1;1] (from -1.73 for rho to 2.95 for lambda).

    Can someone help me understanding these results?
    Many thanks in advance.

    Regards,
    Yann

  • #2
    Hi Yann. I am having the same issue. Did you ever figure out your problem?

    Comment


    • #3
      Hi Aria, Yann,
      Did either of you have any luck with your co-efficients outside the range?
      I have the same issue myself. PSB
      Best
      Harry



      Originally posted by Harry O'Rahilly View Post
      Hello all,

      I am using Stata 15.1

      I have created a Spectrally Normalized Spatially Weighted Inverse-distance Cross-Sectional Matrix - using proprietary distance data - by means of spmatrix fromdata, i.e. not using methods employing a shapefile or co-ordinate variables.

      The Matrix is 66x66, non-symmetric, and hollow (diagonal elements = 0).

      spregress run on this Matrix with a gs2sls (generalized spatial two-stage least-squares) estimate produces an errorlag co-efficient greater than 1. [1.586804]

      As discussed on page 147 of the Stata Spatial Autoregressive Models Ref Manual the errorlag co-efficient (rho [hat] )



      To note, the Stata example for Spatial autoregressive models provided also appears to have an errorlag co-efficient greater than 1 [3.247298]

      I have two questions please.
      1. Given the steps taken below, is an errorlag co-efficient [rho hat] greater than 1 problematic?*
      2. If so, is there a remedy for this?
      *By which I mean the results cannot be used to reject H0

      Happy to PM matrix data/provide clarity. Regards,

      Harry

      PS Following spregress I have run estat impact for completeness.
      PPS dataex linesize limit exceeded by matrix

      Code:
      . clear
      
      . use "C:\Users\Atlan\OneDrive\PC\UCD\Matrix\STATA\2020 08 19 matrix.dta"
      
      . spset catnumber
      Sp dataset 2020 08 19 matrix.dta
      data: cross sectional
      spatial-unit id: _ID (equal to catnumber)
      coordinates: none
      linked shapefile: none
      
      . spmatrix fromdata WmeM = stats_22050-stats_18454, normalize(spectral) idistance replace
      
      . spmatrix export WmeM using WmeM.txt
      (matrix WmeM saved in file WmeM.txt)
      
      . save "C:\Users\Atlan\OneDrive\PC\UCD\Matrix\STATA\2020 09 02 matrix.dta", replace
      
      file C:\Users\Atlan\OneDrive\PC\UCD\Matrix\STATA\2020 09 02 matrix.dta saved
      
      . clear
      
      . use "C:\Users\Atlan\OneDrive\PC\UCD\Matrix\STATA\2019 12 27 Analysis_2015_2019_5.dta"
      
      . regress LE_1 SUMBC660sSQ
      
      Source | SS df MS Number of obs = 66
      -------------+---------------------------------- F(1, 64) = 28.13
      Model | .005390905 1 .005390905 Prob > F = 0.0000
      Residual | .012265551 64 .000191649 R-squared = 0.3053
      -------------+---------------------------------- Adj R-squared = 0.2945
      Total | .017656456 65 .000271638 Root MSE = .01384
      
      ------------------------------------------------------------------------------
      LE_1 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      SUMBC660sSQ | -.0001403 .0000265 -5.30 0.000 -.0001932 -.0000875
      _cons | .0746009 .0035903 20.78 0.000 .0674285 .0817732
      ------------------------------------------------------------------------------
      
      . spset catnumber
      Sp dataset 2019 12 27 Analysis_2015_2019_5.dta
      data: cross sectional
      spatial-unit id: _ID (equal to catnumber)
      coordinates: none
      linked shapefile: none
      
      . estat moran, errorlag(WmeM)
      
      Moran test for spatial dependence
      Ho: error is i.i.d.
      Errorlags: WmeM
      
      chi2(1) = 10.22
      Prob > chi2 = 0.0014
      
      . spregress LE_1 SUMBC660sSQ, gs2sls errorlag(WmeM) 
      (66 observations)
      (66 observations (places) used)
      (weighting matrix defines 66 places)
      
      Estimating rho using 2SLS residuals:
      
      initial: GMM criterion = 6.965e-10
      alternative: GMM criterion = 1.179e-10
      rescale: GMM criterion = 3.067e-12
      Iteration 0: GMM criterion = 3.067e-12
      Iteration 1: GMM criterion = 2.534e-13
      
      Estimating rho using GS2SLS residuals:
      
      Iteration 0: GMM criterion = .01728762
      Iteration 1: GMM criterion = .01186374
      Iteration 2: GMM criterion = .01175648
      Iteration 3: GMM criterion = .01175648
      
      Spatial autoregressive model Number of obs = 66
      GS2SLS estimates Wald chi2(1) = 10.00
      Prob > chi2 = 0.0016
      Pseudo R2 = 0.3053
      
      --------------------------------------------------------------------------------
      LE_1 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      ---------------+----------------------------------------------------------------
      LE_1 |
      SUMBC660sSQ | -.000081 .0000256 -3.16 0.002 -.0001312 -.0000308
      _cons | .0679234 .0042821 15.86 0.000 .0595307 .0763162
      ---------------+----------------------------------------------------------------
      WmeM |
      e.LE_1 | 1.586804 .554908 2.86 0.004 .499204 2.674403
      --------------------------------------------------------------------------------
      Wald test of spatial terms: chi2(1) = 8.18 Prob > chi2 = 0.0042
      
      . estat impact 
      
      progress :100%
      
      Average impacts Number of obs = 66
      
      ------------------------------------------------------------------------------
      | Delta-Method
      | dy/dx Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      direct |
      SUMBC660sSQ | -.000081 .0000256 -3.16 0.002 -.0001312 -.0000308
      -------------+----------------------------------------------------------------
      indirect |
      SUMBC660sSQ | 0 (omitted)
      -------------+----------------------------------------------------------------
      total |
      SUMBC660sSQ | -.000081 .0000256 -3.16 0.002 -.0001312 -.0000308
      ------------------------------------------------------------------------------
      .
      end of do-file
      .
      Tags: errorlag, spatial regression, spregress, weighted_spatial_lag

      Comment

      Working...
      X