凹凸平原 发表于 2013-2-22 16:36 
有人知道怎么解决这个问题吗
你这个问题解决了吗,我现在碰到和你一样的问题,愁啊
T=13;N=11;y=log(ss(:,[1]));x=log(ss(:,2:5));xconstant=ones(N*T,1);[nobs K]=size(x);
results=ols(y, [xconstant x]);
vnames=strvcat('cons','x1','x2','x3','x4');
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
I=eye(T);W1=kron(I,dd);
res=moran(y,[ xconstant x],W1);
prt(res);
Wrong # of variable names in prt_reg -- check vnames argument
will use generic variable names
Ordinary Least-squares Estimates
R-squared = 0.4483
Rbar-squared = 0.4323
sigma^2 = 0.0338
Durbin-Watson = 2.2329
Nobs, Nvars = 143, 5
***************************************************************
Variable Coefficient t-statistic t-probability
variable 1 3.458572 6.686364 0.000000
variable 2 -0.056446 -3.452232 0.000738
variable 3 0.141382 8.495703 0.000000
variable 4 -0.392556 -6.554149 0.000000
variable 5 0.209887 3.988067 0.000108
loglikols =
41.8904