想请教一下 这个莫兰指数检验的程序各步骤代表什么含义呀?小白表示看不懂/(ㄒoㄒ)/~~还有,可以通过修改那些地方来计算自己的数据,求指教
% PURPOSE: An example of using moran()
% to test for spatial error correlation
% on a small data set
%---------------------------------------------------
% USAGE: moran_d
%---------------------------------------------------
load anselin.dat;
y = anselin(:,1);
n = length(y);
x = [ones(n,1) anselin(:,2:3)];
xc = anselin(:,4);
yc = anselin(:,5);
[j W j] = xy2cont(xc,yc);
result = moran(y,x,W);
prt(result);
% demo non-standardized weight matrix
Wns = zeros(n,n);
for i=1:n
for j=1:n
if W(i,j) ~= 0
Wns(i,j) = 1.0;
end;
end;
end;
result = moran(y,x,Wns);
prt(result);


雷达卡






京公网安备 11010802022788号







