SIMILAR TO GEODA SOFTWARE, FIRST MAKE GEOSPATIAL WEIGHTS FOR THE MAP, AND THEN ADD DATA TO DIRECTLY CALCULATE MORAN'S I AND LOCAL MORAN, I WANT TO DO THE SAME IN PROC VARIOGRAM, BUT I CAN'T FIND THE RELEVANT OPTIONS AND SETTINGS, WHAT SHOULD I DO? PLEASE!!!
Usage Note 22944: Computing Moran's I and Geary's c spatial autocorrelation coefficients
https://support.sas.com/kb/22/944.html
Koen
/*Write a binary neighbor queen space weight matrix*/
DATA WEIGHT;
LENGTH CITY $10.;
INFILE DATALINES DLM=',';
INPUT CITY Nanning Liuzhou Guilin Wuzhou Beihai Fangchen Qinzhou
Guigang Yulin Baise Hezhou Hechi Laibin Congzuo @@
;
DATALINES;
Nanning,0,0,0,0,0,1,1,1,0,1,0,1,1,1
Liuzhou,0,0,1,0,0,0,0,0,0,0,0,1,1,0
Guilin,0,1,0,1,0,0,0,0,0,0,1,0,1,0
Wuzhou,0,0,1,0,0,0,0,1,1,0,1,0,1,0
Beihai,0,0,0,0,0,0,1,0,1,0,0,0,0,0
Fangcheng,1,0,0,0,0,0,1,0,0,0,0,0,0,1
Qinzhou,1,0,0,0,1,1,0,1,1,0,0,0,0,0
Guigang,1,0,0,1,0,0,1,0,1,0,0,0,1,0
Yulin,0,0,0,1,1,0,1,1,0,0,0,0,0,0
Baise,1,0,0,0,0,0,0,0,0,0,0,1,0,1
Hezhou,0,0,1,1,0,0,0,0,0,0,0,0,0,0
Hechi,1,1,0,0,0,0,0,0,0,1,0,0,1,0
Laibin,1,1,1,1,0,0,0,1,0,0,0,1,0,0
Congzuo,1,0,0,0,0,1,0,0,0,1,0,0,0,0
;
如何将此空间权重矩阵中的数据添加到PROC变异函数以计算MORAN'S I以验证空间自相关
Usage Note 22944: Computing Moran's I and Geary's c spatial autocorrelation coefficients
https://support.sas.com/kb/22/944.html
Koen
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.