全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
3680 3
2013-02-05
利用matlab进行空间计量模型检验中,出现NaN,请问如何解决这个问题?
Ordinary Least-squares Estimates
Dependent Variable =        logTC     
R-squared      =    0.9890
Rbar-squared   =    0.9888
sigma^2        =    0.0729
Durbin-Watson  =    2.0690
Nobs, Nvars    =    480,     7
***************************************************************
Variable       Coefficient      t-statistic    t-probability
intercept        -0.059096        -1.243576         0.214272
logP              0.774525        51.670712         0.000000
logA              0.847940        32.705430         0.000000
logIND           -0.307303        -5.217023         0.000000
logSV            -0.779493       -15.645382         0.000000
logURB           -0.073516        -1.904153         0.057497
logEI             0.564915        17.469041         0.000000

loglikols =
  -49.0345
LM test no spatial lag, probability          =       NaN,      NaN
robust LM test no spatial lag, probability   =       NaN,      NaN
LM test no spatial error, probability        =       NaN,      NaN
robust LM test no spatial error, probability =       NaN,      NaN
Wrong # of variable names in prt_reg -- check vnames argument
will use generic variable names


prt_reg(results,vnames,1); 这里有问题吗
二维码

扫码加我 拉你入群

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

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

全部回复
2013-2-16 17:47:27
还是不清楚
二维码

扫码加我 拉你入群

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

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

2013-2-22 16:36:10
有人知道怎么解决这个问题吗
二维码

扫码加我 拉你入群

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

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

2014-4-16 12:07:35
凹凸平原 发表于 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
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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