全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
6652 3
2014-11-18
如题。Matlab 中所提供的“空间滞后模型+固定效应”的程序模块如下。第三行的粗体部分:“不显示常数项、空间固定效应”。但我想知道常数项、空间固定效应的估计结果的话,如何修改程序。求高手指教,不胜感激!info.lflag=0; % required for exact results
info.model=1;
info.fe=0; % no print intercept and spatial fixed effects
results=sar_panel_FE(y,x,W,T,info);
vnames=strvcat('logcit','logp','logpn','logy');
prt(results,vnames,1);
blagfe=[results.beta;results.rho];
covblagfe=results.cov;
% LR-test for joint significance spatial fixed effects
logliklagfe=results.lik;
info.model=0;
results=sar_panel_FE(y,x,W,T,info);
logliklag=results.lik;
LR=-2*(logliklag-logliklagfe);
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);

二维码

扫码加我 拉你入群

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

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

全部回复
2014-11-19 17:30:51
改成“fe=1”。瞬间脑残短路的结果。
二维码

扫码加我 拉你入群

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

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

2018-1-10 16:17:36
您好,楼主,想咨询您下
blagfe=[results.beta;results.rho];
covblagfe=results.cov;
里面的.beta .rho .cov是怎么解读?什么意思?拜谢
二维码

扫码加我 拉你入群

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

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

2020-9-3 10:32:30
楼主,我像你一样改成info.fe=1,但我是SEM模型,结果报错:

错误使用 sem_panel_FE (line 166)
info.fe=1, but cannot compute fixed effects if info.model is set to 0 or not specified


请问是为什么呢?
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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