I am working on spatialreg, however everytime I run the sample code of spatialreg, sas program is just turned off. I was wondering whether anyone had same problem as mine. My SAS program version is SAS 9.4 TS Level 1M5 Computer specification is as follow; - CPU: AMD Ryzen 7 3700X 8-Core Processor - Ram: 32GB I guess the desktop is good enough to run spatialreg. The sample code I used is SAS/ETS sample which is below. Getting Started Example for PROC SPATIALREG /*-------------------------------------------------------------- SAS Sample Library Name: sprgs.sas Description: Example program from SAS/ETS User's Guide, The SPATIALREG Procedure Title: Getting Started Example for PROC SPATIALREG Product: SAS/ETS Software Keys: spatial regression data analysis PROC: SPATIALREG Notes: --------------------------------------------------------------*/ data crimeoh; input crime income hvalue lat lon; datalines; 18.802 21.232 44.567 35.62 42.38 32.388 4.477 33.200 36.50 40.52 38.426 11.337 37.125 36.71 38.71 0.178 8.438 75.000 33.36 38.41 15.726 19.531 80.467 38.80 44.07 30.627 15.956 26.350 39.82 41.18 50.732 11.252 23.225 40.01 38.00 26.067 16.029 28.750 43.75 39.28 48.585 9.873 18.000 39.61 34.91 34.001 13.598 96.400 47.61 36.42 36.869 9.798 41.750 48.58 34.46 20.049 21.155 47.733 49.61 32.65 19.146 18.942 40.300 50.11 29.91 18.905 22.207 42.100 51.24 27.80 27.823 18.950 42.500 50.89 25.24 16.241 29.833 61.950 48.44 27.93 0.224 31.070 81.267 46.73 31.91 30.516 17.586 52.600 43.44 35.92 33.705 11.709 30.450 43.37 33.46 40.970 8.085 20.300 41.13 33.14 52.794 10.822 34.100 43.95 31.61 41.968 9.918 23.600 44.10 30.40 39.175 12.814 27.000 43.70 29.18 53.711 11.107 22.700 41.04 28.78 25.962 16.961 33.500 43.23 27.31 22.541 18.796 35.800 42.67 24.96 26.645 11.813 26.800 41.21 25.90 29.028 14.135 27.733 39.32 25.85 36.664 13.380 25.700 41.09 27.49 42.445 17.017 43.300 38.32 28.82 56.920 7.856 22.850 41.31 30.90 61.299 8.461 17.900 39.36 32.88 60.750 8.681 32.500 39.72 30.64 68.892 13.906 22.500 38.29 30.35 38.298 14.236 53.200 36.60 32.09 54.839 7.625 18.800 37.60 34.08 56.706 10.048 19.900 37.13 36.12 62.275 7.467 19.700 37.85 36.30 46.716 9.549 41.700 35.95 36.40 57.066 9.963 42.900 35.72 35.60 54.522 11.618 30.600 35.76 34.66 43.962 13.185 60.000 36.15 33.92 40.074 10.655 19.975 34.08 30.42 23.974 14.948 28.450 30.32 28.26 17.677 16.940 31.800 27.94 29.85 14.306 18.739 36.300 27.27 28.21 19.101 18.477 39.600 24.25 26.69 16.531 18.324 76.100 25.47 25.71 16.492 25.873 44.333 29.02 26.58 ; data Weight; input rowid colid wgt; datalines; 2.0000 1.0000 0.2500 5.0000 1.0000 0.5000 6.0000 1.0000 0.2500 1.0000 2.0000 0.3333 3.0000 2.0000 0.1667 6.0000 2.0000 0.2500 7.0000 2.0000 0.1250 2.0000 3.0000 0.2500 4.0000 3.0000 0.2500 7.0000 3.0000 0.1250 37.0000 3.0000 0.1429 38.0000 3.0000 0.2000 39.0000 3.0000 0.2500 3.0000 4.0000 0.1667 37.0000 4.0000 0.1429 39.0000 4.0000 0.2500 40.0000 4.0000 0.1667 1.0000 5.0000 0.3333 6.0000 5.0000 0.2500 1.0000 6.0000 0.3333 2.0000 6.0000 0.2500 5.0000 6.0000 0.5000 7.0000 6.0000 0.1250 2.0000 7.0000 0.2500 3.0000 7.0000 0.1667 6.0000 7.0000 0.2500 8.0000 7.0000 0.5000 9.0000 7.0000 0.1667 18.0000 7.0000 0.1429 36.0000 7.0000 0.1250 38.0000 7.0000 0.2000 7.0000 8.0000 0.1250 18.0000 8.0000 0.1429 7.0000 9.0000 0.1250 18.0000 9.0000 0.1429 20.0000 9.0000 0.2000 32.0000 9.0000 0.1429 36.0000 9.0000 0.1250 38.0000 9.0000 0.2000 11.0000 10.0000 0.3333 17.0000 10.0000 0.1000 18.0000 10.0000 0.1429 19.0000 10.0000 0.1667 10.0000 11.0000 0.2500 12.0000 11.0000 0.3333 17.0000 11.0000 0.1000 11.0000 12.0000 0.3333 13.0000 12.0000 0.2500 17.0000 12.0000 0.1000 12.0000 13.0000 0.3333 14.0000 13.0000 0.3333 16.0000 13.0000 0.2000 17.0000 13.0000 0.1000 13.0000 14.0000 0.2500 15.0000 14.0000 0.5000 16.0000 14.0000 0.2000 14.0000 15.0000 0.3333 16.0000 15.0000 0.2000 13.0000 16.0000 0.2500 14.0000 16.0000 0.3333 15.0000 16.0000 0.5000 17.0000 16.0000 0.1000 23.0000 16.0000 0.1429 10.0000 17.0000 0.2500 11.0000 17.0000 0.3333 12.0000 17.0000 0.3333 13.0000 17.0000 0.2500 16.0000 17.0000 0.2000 18.0000 17.0000 0.1429 19.0000 17.0000 0.1667 21.0000 17.0000 0.2500 22.0000 17.0000 0.2500 23.0000 17.0000 0.1429 7.0000 18.0000 0.1250 8.0000 18.0000 0.5000 9.0000 18.0000 0.1667 10.0000 18.0000 0.2500 17.0000 18.0000 0.1000 19.0000 18.0000 0.1667 20.0000 18.0000 0.2000 10.0000 19.0000 0.2500 17.0000 19.0000 0.1000 18.0000 19.0000 0.1429 20.0000 19.0000 0.2000 21.0000 19.0000 0.2500 31.0000 19.0000 0.1111 9.0000 20.0000 0.1667 18.0000 20.0000 0.1429 19.0000 20.0000 0.1667 31.0000 20.0000 0.1111 32.0000 20.0000 0.1429 17.0000 21.0000 0.1000 19.0000 21.0000 0.1667 22.0000 21.0000 0.2500 31.0000 21.0000 0.1111 17.0000 22.0000 0.1000 21.0000 22.0000 0.2500 23.0000 22.0000 0.1429 31.0000 22.0000 0.1111 16.0000 23.0000 0.2000 17.0000 23.0000 0.1000 22.0000 23.0000 0.2500 24.0000 23.0000 0.1667 25.0000 23.0000 0.2000 29.0000 23.0000 0.1667 31.0000 23.0000 0.1111 23.0000 24.0000 0.1429 25.0000 24.0000 0.2000 29.0000 24.0000 0.1667 30.0000 24.0000 0.1667 31.0000 24.0000 0.1111 33.0000 24.0000 0.1667 23.0000 25.0000 0.1429 24.0000 25.0000 0.1667 26.0000 25.0000 0.3333 27.0000 25.0000 0.2500 29.0000 25.0000 0.1667 25.0000 26.0000 0.2000 27.0000 26.0000 0.2500 28.0000 26.0000 0.2500 25.0000 27.0000 0.2000 26.0000 27.0000 0.3333 28.0000 27.0000 0.2500 29.0000 27.0000 0.1667 26.0000 28.0000 0.3333 27.0000 28.0000 0.2500 29.0000 28.0000 0.1667 30.0000 28.0000 0.1667 23.0000 29.0000 0.1429 24.0000 29.0000 0.1667 25.0000 29.0000 0.2000 27.0000 29.0000 0.2500 28.0000 29.0000 0.2500 30.0000 29.0000 0.1667 24.0000 30.0000 0.1667 28.0000 30.0000 0.2500 29.0000 30.0000 0.1667 31.0000 30.0000 0.1111 33.0000 30.0000 0.1667 34.0000 30.0000 0.2000 19.0000 31.0000 0.1667 20.0000 31.0000 0.2000 21.0000 31.0000 0.2500 22.0000 31.0000 0.2500 23.0000 31.0000 0.1429 24.0000 31.0000 0.1667 30.0000 31.0000 0.1667 32.0000 31.0000 0.1429 33.0000 31.0000 0.1667 9.0000 32.0000 0.1667 20.0000 32.0000 0.2000 31.0000 32.0000 0.1111 33.0000 32.0000 0.1667 34.0000 32.0000 0.2000 35.0000 32.0000 0.1429 36.0000 32.0000 0.1250 24.0000 33.0000 0.1667 30.0000 33.0000 0.1667 31.0000 33.0000 0.1111 32.0000 33.0000 0.1429 34.0000 33.0000 0.2000 35.0000 33.0000 0.1429 30.0000 34.0000 0.1667 32.0000 34.0000 0.1429 33.0000 34.0000 0.1667 35.0000 34.0000 0.1429 43.0000 34.0000 0.3333 32.0000 35.0000 0.1429 33.0000 35.0000 0.1667 34.0000 35.0000 0.2000 36.0000 35.0000 0.1250 41.0000 35.0000 0.3333 42.0000 35.0000 0.2000 43.0000 35.0000 0.3333 7.0000 36.0000 0.1250 9.0000 36.0000 0.1667 32.0000 36.0000 0.1429 35.0000 36.0000 0.1429 37.0000 36.0000 0.1429 38.0000 36.0000 0.2000 40.0000 36.0000 0.1667 42.0000 36.0000 0.2000 3.0000 37.0000 0.1667 4.0000 37.0000 0.2500 36.0000 37.0000 0.1250 38.0000 37.0000 0.2000 39.0000 37.0000 0.2500 40.0000 37.0000 0.1667 42.0000 37.0000 0.2000 3.0000 38.0000 0.1667 7.0000 38.0000 0.1250 9.0000 38.0000 0.1667 36.0000 38.0000 0.1250 37.0000 38.0000 0.1429 3.0000 39.0000 0.1667 4.0000 39.0000 0.2500 37.0000 39.0000 0.1429 40.0000 39.0000 0.1667 4.0000 40.0000 0.2500 36.0000 40.0000 0.1250 37.0000 40.0000 0.1429 39.0000 40.0000 0.2500 41.0000 40.0000 0.3333 42.0000 40.0000 0.2000 35.0000 41.0000 0.1429 40.0000 41.0000 0.1667 42.0000 41.0000 0.2000 35.0000 42.0000 0.1429 36.0000 42.0000 0.1250 37.0000 42.0000 0.1429 40.0000 42.0000 0.1667 41.0000 42.0000 0.3333 34.0000 43.0000 0.2000 35.0000 43.0000 0.1429 44.0000 43.0000 0.2500 43.0000 44.0000 0.3333 45.0000 44.0000 0.5000 46.0000 44.0000 0.2000 49.0000 44.0000 0.5000 44.0000 45.0000 0.2500 46.0000 45.0000 0.2000 44.0000 46.0000 0.2500 45.0000 46.0000 0.5000 47.0000 46.0000 0.5000 48.0000 46.0000 0.5000 49.0000 46.0000 0.5000 46.0000 47.0000 0.2000 48.0000 47.0000 0.5000 46.0000 48.0000 0.2000 47.0000 48.0000 0.5000 44.0000 49.0000 0.2500 46.0000 49.0000 0.2000 ; proc iml; use Weight nobs nobs; read all; nloc=49; W=repeat(0,nloc,nloc); do i=1 to nobs; rid=rowid[i]; cid=colid[i]; val=wgt[i]; W[rid,cid]=val; end; create crimeWmat from W; append from W; close crimeWmat; quit; proc print data=crimeoh(obs=10); var crime income hvalue lat lon ; run; /*-- Linear Model --*/ proc spatialreg data=crimeoh; model crime = income hvalue / type=LINEAR; run; /*-- SAR Model --*/ proc spatialreg data=crimeoh Wmat=crimeWmat NONORMALIZE; model crime = income hvalue / type=SAR; run; /*-- SDM --*/ proc spatialreg data=crimeoh Wmat=crimeWmat NONORMALIZE; model crime = income hvalue / type=SAR; spatialeffects income hvalue; run; Hope someone could give me an answer. Thank you.
... View more