请问一下这个报错是为什么啊?谢谢
>> demopanelscompare
Warning: WK1READ will be removed in a future release.
> In wk1read at 29
In demopanelscompare at 3
Warning: WK1READ will be removed in a future release.
> In wk1read at 29
In demopanelscompare at 4
Undefined function 'normw' for input arguments of type 'double'.
Error in demopanelscompare (line 23)
W=normw(W1); % function of LeSage
楼主好人,想请教一下:跑程序总是提示错误:未定义函数或变量 'prt_reg',找了一个这个命令做了脚本,运行又出现又出现reg脚本里的其他错误,想请问大神如何解决~~万分感谢~
clc
clear all
close all
load('C:\Users\sony\Desktop\分析\数据\MATLAB\agent30.mat')
load('C:\Users\sony\Desktop\分析\数据\MATLAB\W相邻.mat')
T=8; % number of time periods
N=30; % number of regions
y=agents1(:,4); % column number in the data matrix that corresponds to the dependent variable
x=agents1(:,[8:11,13:15,17,18,20:23]); % 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]);
results.nobs=nobs;
results.nvar=K;
vnames=strvcat('y1','intercept','x1','x2','x3','x4','x51','x6','x7','x9','x11','x13','x114','x16');
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;