全部版块 我的主页
论坛 经济学论坛 三区 区域经济学
2058 0
2015-06-02
[size=13.63636302947998px]在做空间误差模型的检验时,上述两个出错无法输出检验结果,代码如下:
[size=13.63636302947998px]load wmat.dat;
[size=13.63636302947998px]load anselin.dat;
[size=13.63636302947998px]y = anselin(:,1); nobs = length(y);
[size=13.63636302947998px]x = [ones(nobs,1) anselin(:,2:3)];
[size=13.63636302947998px]W = sparse(wmat( :,1),wmat( :,2),wmat( :,3));
[size=13.63636302947998px]vnames = strvcat('crime','const','income','house value');
[size=13.63636302947998px]res1 = moran(y,x,W);
[size=13.63636302947998px]prt(res1);
[size=13.63636302947998px]res2 = lmerror(y,x,W);
[size=13.63636302947998px]prt(res2);
[size=13.63636302947998px]z = speye(49) - 0.1*sparse(W);
[size=13.63636302947998px]p = colmmd(z);
[size=13.63636302947998px]res3 = lratios(y,x,W);
[size=13.63636302947998px]prt(res3);
[size=13.63636302947998px]res4 = walds(y,x,W);
[size=13.63636302947998px]prt(res4);
[size=13.63636302947998px]res5 = lmsar(y,x,W,W);
[size=13.63636302947998px]prt(res5);
[size=13.63636302947998px]res = sem(y,x,W);
[size=13.63636302947998px]prt(res,vnames);
[size=13.63636302947998px]显示:Undefined function 'colmmd' for input arguments of type 'double'.,换成colamd后也还是出错


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群