全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
2185 3
2015-09-11
完全的matlab菜鸟,用matlab做空间面板时程序出现下面的错误,不知道如何解决,求大神指导!!!
程序:
% dimensions of the problem
T=15; % number of time periods
N=17; % number of regions
% row-normalize W
W=normw(w2); % function of LeSage
y=pc(:,[1]); % column number in the data matrix that corresponds to the dependent variable
x=pc(:,[2]); % column numbers in the data matrix that correspond to the independent variables
xconstant=ones(N*T,1);
[nobs K]=size(x);
% ----------------------------------------------------------------------------------------
% ols estimation
results=ols(y,[xconstant x]);
vnames=strvcat('lngdp','intercept','lnfdi');
prt_reg(results,vnames,1);
sige=results.sige*((nobs-K)/nobs);
loglikols=-nobs/2*log(2*pi*sige)-1/(2*sige)*results.resid'*results.resid
LMsarsem_panel(results,W,y,[xconstant x]); % (Robust) LM tests
%moran 检验
I=eye(T);W1=kron(I,W);
res=moran(y,[xconstant x],W2);
prt(res);



出现的问题:
未定义与 'double' 类型的输入参数相对应的函数 'normw'。

matlab版本是2014a,不知道是不是版本的问题???数据类型是double型。跪求指导。
二维码

扫码加我 拉你入群

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

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

全部回复
2017-9-9 10:15:17
你好,不知道你现在解决了吗,我跟你的编程一样,不过出现的问题是未定义与 'double' 类型的输入参数相对应的函数 'ols'。
二维码

扫码加我 拉你入群

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

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

2017-9-10 08:45:50
主要命令是自己编程吗?
二维码

扫码加我 拉你入群

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

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

2017-9-10 08:48:49
主要命令是自己编程吗?
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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