LM面板程序里头有个检验空间固定和时间固定的程序,前头是LM检验,后面是LR检验空间和时间的联合固定效应,但是两段代码的注释都一样,导致我看不明白结果。代码如下:
% Tests for the joint significance of spatial and/or time-period fixed effects
LR=-2*(logliktfe-loglikstfe);
dof=N;
probability=1-chis_prb(LR,dof);
% Note: probability > 0.05 implies rejection of spatial fixed effects
fprintf(1,'LR-test joint significance spatial fixed effects, degrees of freedom and probability = %9.4f,%6d,%9.4f \n',LR,dof,probability);
LR=-2*(logliksfe-loglikstfe);
dof=T;
probability=1-chis_prb(LR,dof);
% Note: probability > 0.05 implies rejection of spatial fixed effects
fprintf(1,'LR-test joint significance time-periode fixed effects, degrees of freedom and probability = %9.4f,%6d,%9.4f \n',LR,dof,probability);
可以看到两段都是probability > 0.05 implies rejection of spatial fixed effects。我仔细看了下第一段是有关空间固定,第二段是有关时间固定。
我做出来结果LM检验是空间固定显著,但是LR结果里头,第一段代码跟空间相关的prob是0.98,第二段时间相关的是0.001,这样应该是空间固定吧?