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

📄 sarmap_d.m

📁 计量工具箱
💻 M
字号:
% PURPOSE: An example using sarmap
%          to examine the sar models
%          by selecting sub-samples using a map
%---------------------------------------------------
% USAGE: sarmap_d
%---------------------------------------------------



load countyg.data;
y1 = countyg(:,4); % county employment growth rate
y2 = countyg(:,5); % county population growth rate

latt = countyg(:,2);
long = countyg(:,3);

[j W j] = xy2cont(-latt,-long);

n = length(y1);
countyg(:,16) = countyg(:,16)/1000;
xmat = [ones(n,1) countyg(:,8) countyg(:,10:end-1)];
xmat(:,2:end) = studentize(xmat(:,2:end));
vnames = strvcat('y=empgr80-90','constant','logy80','empdensity','popdensity','log area', ...
    'college','manufemp','unemploy','y-percapita','education spending','highway spending','police spending', ...
    'non-white','urban dummy');

sarmap(-latt,-long,xmat,y1*10,W,vnames);

⌨️ 快捷键说明

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