<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WEIGHT MATRIX for PROC SPATIELREG in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/501359#M3385</link>
    <description>I still am stuck with exact same issue you're having here. I wrote to the author Alan da Silva a week ago. He had not gotten back to me yet. Please let me know or post solution if you figure out before I do. Thanks. I'll appreciate that.</description>
    <pubDate>Thu, 04 Oct 2018 07:35:01 GMT</pubDate>
    <dc:creator>Cruise</dc:creator>
    <dc:date>2018-10-04T07:35:01Z</dc:date>
    <item>
      <title>WEIGHT MATRIX for PROC SPATIELREG</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/500113#M3380</link>
      <description>&lt;P&gt;I'm trying to conduct Spatial Autoregressive Regression model using PROC SPATIALREG which requires pre-defined spatial matrix data. The below hash object macro is used from Silva 2018, SUGI paper "Creating a Spatial Weights Matrix for the SPATIALREG Procedure".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2481-2018.pdf" target="_blank"&gt;https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2481-2018.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I defined Tiger shapefile at ZCTA level (1794 unique ZIP codes) for New York in the macro call and it produces 4 datasets below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%Wmatrix(map=uniq_ny_zcta1,id=nctid,lat=y,long=x,out=neighbor, type=contiguity); run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;/*RESULTING MATRIX FILES:&lt;BR /&gt;NEIGHBOR,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N=154, column=2&lt;BR /&gt;Wmatrix,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N=154, column=154&lt;BR /&gt;Wmatrix_compact, N=154, column=3&lt;BR /&gt;Wmatrix_sdr,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N=154, column=154*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the next step with Wmatrix created, i defined my health outcome-exposure data in the PROC SPATIALREG as shown beow. Pancreatic_cancer dataset has incidence rates of pancreatic cancer at each 1606 unique ZIP codes of New York.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run PROC SPATIALREG as shown below, I get an error: Input dataset and spatial matrix do not have equal number of observations. I don't have exact phrase to recreate the error message on my laptop SAS but the meaning was Wmatrix and pancreatic cancer datasets are required to have same number of observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But how? what can i do differently here to make number of observations equal at both datasets?&lt;/P&gt;
&lt;P&gt;Any hints are appreciated !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc spatialreg data=pancreatic_cancer /*N=1606 unique zip-codes*/ 
                Wmat=Wmatrix NONORMALIZE;
   model incidence_rate_cancer = n_benzene_sites_at_zipcodes 
								 n_chemical_sites_at_zipcpdes
                                 n_volatilechemicals_sites_zipcodes/ type=SAR;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*IMPORT TIGER SHAPEFILE AT ZIP-CODE LEVEL FOR NEW YORK*/

proc mapimport out=ny_tiger_zip /*N=1,827,869*/
datafile="...\tl_2010_36_zcta510.shp";
run;

proc sql; /*N=1,794 UNIQUE ZIP CODES IN NEW YORK STATE*/
select count(distinct ctid) as n_ctid
from newyork_ct1;
quit; 

/*DEDUPLICATE CENSUS SHAPEFILE BY UNIQUE ZIP-CODE*/
proc sort nodupkey data=ny_tiger_zip
out=uniq_ny_zcta;
by ZCTA5CE10; 
run;

/*CONVERT CHARACTERS TO NUMERIC*/
data uniq_ny_zcta1;  format ZCTA5CE10 $9.; set uniq_ny_zcta; 
long=input(INTPTLAT10,12.);
lat=input(INTPTLON10,12.);
nctid=input(ZCTA5CE10,9.);
run;

/*CALL FOR MACRO FOR UNIQUE ZIP-CODE LEVEL SHAPEFILE*/

%Wmatrix(map=uniq_ny_zcta1,id=nctid,lat=y,long=x,out=neighbor, type=contiguity); run;

/*RESULTING MATRIX FILES:&lt;BR /&gt;
NEIGHBOR,        N=154, column=2
Wmatrix,         N=154, column=154
Wmatrix_compact, N=154, column=3
Wmatrix_sdr,     N=154, column=154
*/

/*PANCREATIC CANCER-HEALTH OUTCOME DATA*/

proc spatialreg data=pancreatic_cancer /*N=1606 unique zip-codes*/ 
                Wmat=Wmatrix NONORMALIZE;
   model incidence_rate_cancer = n_benzene_sites_at_zipcodes 
								 n_chemical_sites_at_zipcpdes
                                 n_volatilechemicals_sites_zipcodes/ type=SAR;
run;


/*MACRO*/
%macro Wmatrix(map=,id=,lat=,long=,type=contiguity,centroid_lat=,
centroid_long=, distance=,neighbors=,out=neighbor);
%if %upcase(&amp;amp;type)=CONTIGUITY %then %do;
%if &amp;amp;neighbors = %then %do;
/********Defining the Neighborhood for contiguity ***********/
proc sort data=&amp;amp;map out=&amp;amp;map.2 nodupkey; by &amp;amp;long &amp;amp;lat &amp;amp;id;run;
data _hashmap_ (keep=&amp;amp;long &amp;amp;lat z &amp;amp;id);
retain z;
set &amp;amp;map.2(where=(&amp;amp;long NE . and &amp;amp;lat NE .));
by &amp;amp;long &amp;amp;lat;
if first.&amp;amp;long or first.&amp;amp;lat then z=1;
z=z+1;
run;
proc means data=_hashmap_ noprint;
output out=maxz max(z)=mz; run;
/*put the maximum value of z into macro variable maxnb*/
data _null_;
set maxz;
call symputx("maxnb",mz);
run;
%put &amp;amp;maxnb;
proc sort data=&amp;amp;map.2; by &amp;amp;id;run;
data nonb (keep=myid);
/*length &amp;amp;long &amp;amp;lat z 8; format &amp;amp;id 16.;*/
if _n_=1 then do;
/*this hash object holds a second copy of the entire map for comparison*/
declare hash fc(dataset: "_hashmap_");
fc.definekey("&amp;amp;long","&amp;amp;lat","z");
fc.definedata("&amp;amp;long","&amp;amp;lat","z","&amp;amp;id");
fc.definedone();
call missing (&amp;amp;long,&amp;amp;lat,z,&amp;amp;id);
/*this hash object will hold the rook neighbors for each area: they have two
points in common*/
declare hash rook();
rook.definekey("&amp;amp;id","myid");
rook.definedata("&amp;amp;id","myid");
rook.definedone();
end;
/*this hash object holds the bishop neighbors for each area: they have a
point
in common*/
declare hash bishop();
bishop.definekey("&amp;amp;id","myid");
bishop.definedata("&amp;amp;id","myid");
bishop.definedone();
foundnb="N";
do until (last.myid);
set &amp;amp;map.2 (keep=&amp;amp;id &amp;amp;long &amp;amp;lat rename=(&amp;amp;id=myid &amp;amp;long=myx &amp;amp;lat=myy)
where=(myx NE .
and myy NE .)) end=eof;
by myid;
do n=1 to &amp;amp;maxnb.; /*this is max number of points in common =max z*/
rc=fc.find(key:myx, key:myy, key:n);
if rc=0 and myid NE &amp;amp;id then do; 
nbrc=rook.check(key:&amp;amp;id, key:myid);
if nbrc=0 then do;
rc2=rook.add(key:&amp;amp;id, key:myid, data:&amp;amp;id, data:myid);
foundnb="Y";
end;
else rc1=rook.add(key:&amp;amp;id, key:myid, data:&amp;amp;id, data:myid);
end;
end;*do &amp;amp;maxnb.;
end;*end DOW loop;
if foundnb="N" then output nonb;
if eof then rook.output(dataset:"&amp;amp;out");
run;
proc sort data=&amp;amp;out;by &amp;amp;id myid;run;
proc sort data=&amp;amp;out(keep=&amp;amp;id) nodupkey out=_tab_;by &amp;amp;id;run;
data _tab_;set _tab_;idi=_n_;run;
proc sort data=&amp;amp;out;by &amp;amp;id;run;
data _tab2_;merge &amp;amp;out _tab_;by &amp;amp;id;run;
proc sort data=_tab2_;by myid;run;
data _tab2_;merge _tab2_ _tab_(rename=(idi=idj &amp;amp;id=myid));by myid;run;
proc sort data=_tab2_;by &amp;amp;id;run;
proc sql;drop table _tab_,_hashmap_,Nonb,Maxz,&amp;amp;map.2;quit; 
data Wmatrix_compact;set &amp;amp;out(rename=myid=c&amp;amp;id);
value=1;
run;
%end;
%else %do;
%if &amp;amp;centroid_lat= or &amp;amp;centroid_long= %then %do;
%annomac;
proc sort data=&amp;amp;map(keep=&amp;amp;id &amp;amp;lat &amp;amp;long rename=(&amp;amp;long=y &amp;amp;lat=x)) out=_&amp;amp;map;by
&amp;amp;id;run;
%centroid(_&amp;amp;map,&amp;amp;out,&amp;amp;id);
proc sql;drop table _&amp;amp;map;quit;
%end;
%else %do;
data &amp;amp;out;set &amp;amp;map(keep=&amp;amp;id &amp;amp;centroid_lat &amp;amp;centroid_long
rename=(&amp;amp;centroid_long=y &amp;amp;centroid_lat=x));run;
%end;
proc iml;
use &amp;amp;out;
read all var{x y} into COORD;
n=nrow(coord[,1]);
*print n;
d=j(1,3,0);
nome={"idi" "idj" "d"};
create _dist_ from d[colname=nome];
do i=1 to n;
 do j=1 to n;
 d[1]=i;
 d[2]=j;
 d[3]=sqrt((COORD[i,1]-COORD[j,1])**2+(COORD[i,2]-COORD[j,2])**2);
 append from d;
 end;
end;
close _dist_; 
quit;
data _dist_;set _dist_;if d=0 then delete;run;
proc sort data=_dist_;by idi d;run;
data _dist_;retain seq 0;set _dist_;by idi;
if first.idi then seq=1;
else seq+1;
run;
data _tab2_;set _dist_(where=(seq&amp;lt;=&amp;amp;neighbors));run;
data &amp;amp;out;set _tab2_;run;
data Wmatrix_compact;set &amp;amp;out;
rename idi=&amp;amp;id idj=c&amp;amp;id;value=1;
drop seq d;
run;
proc sql;drop table _dist_;quit;
%end;
/********creating W Matrix ***********/
proc iml;
use _tab2_ var{idi idj};
read all;
n=max(idj);
w=j(n,n,0);
do h=1 to nrow(idi);
w[idi[h],idj[h]]=1;
end;
wpdr=j(n,n,0);
soma=j(n,1,0);
do i=1 to n;
do j=1 to n;
soma[i]=soma[i]+w[i,j];
end;
end;
do i=1 to n;
do j=1 to n;
if soma[i]=0 then wpdr[i,j]=0;
else wpdr[i,j]=w[i,j]/soma[i];
end;
end;
create Wmatrix from w; 
append from w;
create Wmatrix_sdr from wpdr;
append from wpdr;
quit;
proc sql;drop table _tab2_;quit;
%end;
%else %if %upcase(&amp;amp;type)=DISTANCE %then %do;
%if &amp;amp;centroid_lat= or &amp;amp;centroid_long= %then %do;
%annomac;
proc sort data=&amp;amp;map(keep=&amp;amp;id &amp;amp;lat &amp;amp;long rename=(&amp;amp;long=y &amp;amp;lat=x)) out=_&amp;amp;map;by
&amp;amp;id;run;
%centroid(_&amp;amp;map,&amp;amp;out,&amp;amp;id);
proc sql;drop table _&amp;amp;map;quit;
%end;
%else %do; 
data &amp;amp;out;set &amp;amp;map(keep=&amp;amp;id &amp;amp;centroid_lat &amp;amp;centroid_long
rename=(&amp;amp;centroid_long=y &amp;amp;centroid_lat=x));run;
%end;
proc iml;
use &amp;amp;out;
read all var{x y} into COORD;
n=nrow(coord[,1]);
*print n;
d=j(1,3,0);
nome={"idi" "idj" "d"};
create _dist_ from d[colname=nome];
do i=1 to n;
 do j=i+1 to n;
 d[1]=i;
 d[2]=j;
 d[3]=sqrt((COORD[i,1]-COORD[j,1])**2+(COORD[i,2]-COORD[j,2])**2);
 append from d;
 end;
end;
close _dist_;
quit;
data &amp;amp;out;set _dist_;run;
proc sql;drop table _dist_;quit;
data Wmatrix_compact;
set &amp;amp;out(rename=(idi=&amp;amp;id idj=c&amp;amp;id)) &amp;amp;out(rename=(idi=c&amp;amp;id idj=&amp;amp;id));
%if &amp;amp;distance= %then %do;
value=1/d;
%end;
%else %do;
if d&amp;lt;=&amp;amp;distance then value=1;
if value=. then delete;
%end;
keep &amp;amp;id c&amp;amp;id value;
run;
proc sort data=Wmatrix_compact;by &amp;amp;id c&amp;amp;id;run; 
/********creating W Matrix ***********/
proc iml;
use &amp;amp;out var{idi idj d};
read all;
n=max(idj);
w=j(n,n,0);
do h=1 to nrow(idi);
%if &amp;amp;distance= %then %do;
w[idi[h],idj[h]]=1/d[h];
w[idj[h],idi[h]]=1/d[h];
%end;
%else %do;
if d[h]&amp;lt;=&amp;amp;distance then do;
w[idi[h],idj[h]]=1;
w[idj[h],idi[h]]=1;
end;
%end;
end; 
wpdr=j(n,n,0);
soma=j(n,1,0);
do i=1 to n;
do j=1 to n;
soma[i]=soma[i]+w[i,j];
end;
end;
do i=1 to n;
do j=1 to n;
if soma[i]=0 then wpdr[i,j]=0;
else wpdr[i,j]=w[i,j]/soma[i];
end;
end;
create Wmatrix from w;
append from w;
create Wmatrix_sdr from wpdr;
append from wpdr;
quit;
%end;
%mend Wmatrix; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Sep 2018 19:22:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/500113#M3380</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-09-29T19:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: WEIGHT MATRIX for PROC SPATIELREG</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/500126#M3381</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;Any hints are appreciated !&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. Reread the paper, paying particular attention&amp;nbsp;to any examples&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. Alan da Silva is a nice guy and wants people to use his macro. Contact&amp;nbsp;him directly if you&amp;nbsp;can't determine the problem from re-reading the paper.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Sep 2018 22:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/500126#M3381</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-09-29T22:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: WEIGHT MATRIX for PROC SPATIELREG</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/500180#M3382</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Rick,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. I studied Getting started example for proc spatial reg here: &lt;A href="https://support.sas.com/documentation/onlinedoc/ets/ex_code/143/sprgs.html" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/ets/ex_code/143/sprgs.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;But it didn'texplain where weight data came from. It was used as pre-defined dataset. Wmatrix dataset has 49 rows as same as in Crimeoh dataset defined in the proc spatialreg. No further justifications or explanations provided.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. I wrote to Alan da Silva and hope he'll respond. He used columbus map in his macro without reference to data source and its contents.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Do you want to move my post to "SAS/IML Software and Matrix Computations"? you know better though.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Sep 2018 16:50:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/500180#M3382</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-09-30T16:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: WEIGHT MATRIX for PROC SPATIELREG</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/501196#M3383</link>
      <description>&lt;P&gt;Did you find a resolution to this problem?&amp;nbsp; I am getting the same error message. I used the %WMATRIX macro and am trying to use the compact form of the W matrix that the macro creates, for use in the SPATIALREG procedure.&amp;nbsp; My Wmatrix has 130 distinct IDS,&amp;nbsp; my data set for the regression is a panel data set with n=130 over 14 years.&amp;nbsp; I have double checked that the 130 ids in each dataset match.&lt;/P&gt;
&lt;P&gt;jm&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 16:03:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/501196#M3383</guid>
      <dc:creator>doylejm</dc:creator>
      <dc:date>2018-10-03T16:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: WEIGHT MATRIX for PROC SPATIELREG</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/501207#M3384</link>
      <description>&lt;P&gt;actually I got it to run using a single year of data. Now I need to figure out how to run this on a panel of data with n=130 counties and t=14 years of data.&amp;nbsp; The error message says that the number of spatial IDS is not the same in the compact W matrix (has n=130 spatial ID values)&amp;nbsp; and in the panel data set (which has the same n=130 counties repeated for each of 14 years).&amp;nbsp; Any suggestions? thank you&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 16:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/501207#M3384</guid>
      <dc:creator>doylejm</dc:creator>
      <dc:date>2018-10-03T16:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: WEIGHT MATRIX for PROC SPATIELREG</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/501359#M3385</link>
      <description>I still am stuck with exact same issue you're having here. I wrote to the author Alan da Silva a week ago. He had not gotten back to me yet. Please let me know or post solution if you figure out before I do. Thanks. I'll appreciate that.</description>
      <pubDate>Thu, 04 Oct 2018 07:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/501359#M3385</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-10-04T07:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: WEIGHT MATRIX for PROC SPATIELREG</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/503821#M3386</link>
      <description>&lt;P&gt;Sorry for the delay.&amp;nbsp; I have not found a solution, and a probably going to switch to stata as it appears to be able to copy the matrix appropriately for use in a balanced panel. I want to import the matrix created by sas into stata. trying to figure that out now.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 18:13:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/503821#M3386</guid>
      <dc:creator>doylejm</dc:creator>
      <dc:date>2018-10-12T18:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: WEIGHT MATRIX for PROC SPATIELREG</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/503826#M3387</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13983"&gt;@doylejm&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for update. I was advised by one of the professors teaching spatial statistics to consider 'sdep' package in R. Just thinking of trying this. Please let me know is STAT works out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://cran.r-project.org/web/packages/spdep/spdep.pdf" target="_blank"&gt;https://cran.r-project.org/web/packages/spdep/spdep.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 18:20:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/WEIGHT-MATRIX-for-PROC-SPATIELREG/m-p/503826#M3387</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-10-12T18:20:34Z</dc:date>
    </item>
  </channel>
</rss>

