⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fneighbors2.m

📁 空间统计工具箱
💻 M
字号:
function fneighbors2(d, xcoord, ycoord, nnmax, delorder)
%
% fneighbors2(d, xcoord, ycoord, nnmax, delorder)
%
%This function finds the nnmax nearest neighbors to each observation. Users
%should set mmax to be equal or higher to the number of neighbors they will
%need in the future. 
%%INPUT:
%
%A weight matrix d, such as coming from Delaunay triangles (e.g., fdelw2).
%This is n by n, and can be symmetric or asymmetric.
%
%The n by 1 locational vectors xcoord, ycoord
%
%The scalar nnmax which is the largest number of neighbors needed in future
%spatial regressions.
%
%The optional scalar delorder equals 1, 2, 3, or 4. This limits the extent to search for neighbors
%to the sum of the delaunay orders. In other words, delorder=2 limits the search to the delaunay
%neighbors and the neighbors of neighbors while delorder=4 limits the search to neighbors, neighbors
%neighbors, neighbors of neighbors of neighbors, and neighbors of neighbors of neighbors of neighbors!
%Lower values of delorder speed computation and reduce memory. The default is 2.
%
%OUTPUT:
%
%The disk file smats.mat which contains a sequence of nnmax sparse matrices each
%containing at most a single element 1 in each row. These are labeled s1,
%s2, s3, .... snnmax. The functions fsym_neighbors2 and fasym_neighbors2
%work with smat and its component files.
%
%NOTES:
%
%One can optimize the likelihood over neighbors and weighting of neighbors
%as in:
%
%Pace, R. Kelley and Ronald Barry, O.W. Gilley, C.F. Sirmans, 
%揂 Method for Spatial-temporal Forecasting with an Application to Real Estate Prices,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -