matlab likelihood,Matlab做空间面板模型log-likelihood为NAN怎么办
初学者,程序完全照抄,求大神纠错
,SAR固定效应是程序包弄的不知道哪里出了问题。。。
load 'pc.mat' pc;
load 'wl.mat' wl;
load 'pc1.mat' pc1;
T=6;
N=30;
W=normw(wl);
y=pc1(:,[1]);
x=pc(:,[1:7]);
xconstant=ones(N*T,1);
[nobs K]=size(x);
% ols estimation
results=ols(y,[xconstant,x]);
vnames=strvcat('gy','intercept','y0','pc','gpc','emp','edu','inv','fir');
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;
LMsarsem_panel(results,W,y,[xconstant,x]);%LM tests
%双向固定效应模型
info.lflag=0;
info.model=3;
results=sar_panel_FE(y,x,W,T,info);
vnames=strvcat('gy','y0','pc','gpc','emp','edu','inv','fir');
prt_spnew(results,vnames,1);
%地区固定效应
info.lflag=0;
info.model=0;
results=sar_panel_FE(y,x,W,T,info);
vnames=strvcat('gy','y0','pc','gpc','emp','edu','inv','fir');
prt_spnew(results,vnames,1);
运行结果如下:
Ordinary Least-squares Estimates
Dependent Variable = gy
R-squared = 0.7978
Rbar-squared = 0.7896
sigma^2 = 388.7788
Durbin-Watson = 1.3944
Nobs, Nvars = 180, 8
***************************************************************
Variable Coefficient t-statistic t-probability
intercept 246.416677 14.575915 0.000000
y0 20.637595 3.966290 0.000107
pc 22.662274 2.327235 0.021118
gpc -11.417734 -1.514625 0.131703
emp -11.945173 -1.633294 0.104236
edu 15.424211 2.189925 0.029876
inv -21.340470 -2.401367 0.017400
fir 63.665202 7.820010 0.000000
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 3.177681e-017.
> In LMsarsem_panel at 38
In space at 21
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 2.098193e-017.
> In LMsarsem_panel at 38
In space at 21
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 7.983944e-019.
> In LMsarsem_panel at 38
In space at 21
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 2.105254e-017.
> In LMsarsem_panel at 38
In space at 21
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 4.869742e-017.
> In LMsarsem_panel at 38
In space at 21
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 2.324269e-017.
> In LMsarsem_panel at 38
In space at 21
LM test no spatial lag, probability = 20.1094, 0.0000
robust LM test no spatial lag, probability = 31.2385, 0.0000
LM test no spatial error, probability = 70.2445, 0.0000
robust LM test no spatial error, probability = 81.3736, 0.0000
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 2.048182e-016.
> In sar_panel_FE at 352
In space at 25
Pooled model with spatially lagged dependent variable, spatial and time period fixed effects
Dependent Variable = gy
R-squared = 0.9731
corr-squared = 0.2338
sigma^2 = 49.5059
Nobs,Nvar,#FE = 180, 8, 13
log-likelihood = NaN
# of iterations = 1
min and max rho = -1.0000, 1.0000
total time in secs = 0.2970
time for optimiz = 0.0940
time for lndet = 0.0310
No lndet approximation used
***************************************************************
Variable Coefficient Asymptot t-stat z-probability
y0 -17.027376 -1.806973 0.070766
pc -20.741611 -2.397489 0.016508
gpc -20.375769 -3.560497 0.000370
emp 10.192561 1.056646 0.290673
edu 21.639652 2.493960 0.012633
inv -5566589.110156 -1.016164 0.309551
fir 5566550.776313 1.016157 0.309555
W*dep.var. -0.236068 -1.722842 0.084917
Pooled model with spatially lagged dependent variable, no fixed effects
Dependent Variable = gy
R-squared = 0.4770
corr-squared = 0.5369
sigma^2 = 961.1517
Nobs,Nvar,#FE = 180, 8, 7
log-likelihood = NaN
# of iterations = 1
min and max rho = -1.0000, 1.0000
total time in secs = 0.0630
time for optimiz = 0.0160
time for lndet = 0.0160
No lndet approximation used
***************************************************************
Variable Coefficient Asymptot t-stat z-probability
y0 22.494983 2.719872 0.006531
pc 81.851928 5.572041 0.000000
gpc 26.294205 2.212825 0.026910
emp -43.051587 -3.745458 0.000180
edu -62.503393 -6.772293 0.000000
inv 8.056630 0.589667 0.555414
fir 32.305173 2.503307 0.012304
W*dep.var. -0.236068 -1.893304 0.058318
matlab likelihood,Matlab做空间面板模型log-likelihood为NAN怎么办相关推荐
- 豪斯曼检验matlab,豪斯曼检验、空间面板模型选择等问题
各位大神,本人空间计量小白,最近看了姜磊老师的书,自己也进行了实证分析.有一些问题不太懂: 1.空间面板数据模型分为混合空间面板数据模型.空间固定效应空间面板数据模型.时间固定效应空间面板模型.空间和 ...
- y空间兑换代码_动态空间面板模型教程(一文读懂动态面板空间spregdpd操作应用)...
1 动态空间面板模型命令spregdpd 动态空间面板模型命令为spregdpd,语法格式为: spregdpd depvar indepvars [weight] , nc(#) wmfile(we ...
- 用matlab做空间计量模型,MATLAB 空间计量模型的实现
前面也在各大论坛混迹,学习MATLAB的空间计量模型的实现,并且经过痛苦的学习过程,好容易有点收获.最近看论坛里还有很多同行在痛苦的学习,就想分享下我的学习经验.让大家共同进步. (1)首先你需要到h ...
- stata中使用xsmle命令做空间面板数据hausman检验出现3200错误的解决办法
xsmle gdp gt cz gdzc ersan ur,model(sdm) wmat(Wzhusj) hausman nolog Warning: All regressors will be ...
- 面板空间计量模型(Stata)
面板空间计量模型(Stata) 文章目录 面板空间计量模型(Stata) @[toc] 1 面板空间自回归模型 2 面板空间误差模型 3 面板空间自相关模型 4 面板空间杜宾模型 5 动态面板空间计量 ...
- 空间计量模型_Stata空间面板数据模型专题直播丨Stata空间计量3月远程直播
2月28日19:00-21:00Stata空间计量直播专题课(空间面板数据模型)提供全套资料及课后Q&A 空间面板数据模型的前生今世:静态.动态和具有共同因子约束的空间面板数据模型. 模型选择 ...
- R语言空间面板数据统计分析
install.packages("splm") library(splm) library(spdep) library(sp) library(Matrix) library( ...
- 在matlab中输出参数太多,本人在用matlab做空间杜宾模型,但是结果提示输出参数过多...
本人在用matlab做空间杜宾模型,用的是jplv7工具箱做的,但是结果却提示输出参数过多,请问我应该怎么做,代码如下!(还有matlab只需要把面板数据设置成要求的格式就行么,没有其他的要求了,怎么 ...
- 面板门限模型Matlab,空间面板门槛模型操作及应用
原标题:空间面板门槛模型操作及应用 一.空间面板门槛模型简介 二.空间面板门槛操作应用 来源:https://spatial-panels.com/software/ 空间面板门槛模型的Matlab操 ...
最新文章
- Ant Design Vue 表格内编辑(附完整源码及效果图)
- SAP MM 分期付款场景下的付款方式
- 冬天了,麦克风/话筒 有杂音 的原因!
- 基于clang插件的一种iOS包大小瘦身方案
- Golden Software Surfer 17中文版
- Lync Server 2013:边缘服务器 -- Set CA Error
- qt的一些参数配置 win和linux
- maven库的查询和配置
- 软件工程的23种设计模式
- java excel 透视_在Java中用Excel创建数据透视表和数据透视图
- li怎么让文字在图片下面_div+css(ul li)实现图片上文字下列表布局
- 计算机加入域用户名,将客户端计算机加入到域中
- 借记来帐,借记往账,贷记来帐,贷记往账
- android画cci指标代码,大智慧CCI画线指标源码 副图公式
- 使用Heartbeat实现双机热备
- 磁盘分区、格式化及 LVM 管理
- 华为服务器新机安装配置,安装驱动,制作raid,raid5
- 微信小程序--获取视频链接(Videourl)方法~~~
- 考考你的基础知识:C++ 文件操作ofstream、ifstream使用
- python处理原始音频数据
热门文章
- 微信公众号 - 实现 H5 网页在微信内置浏览器中下载文件,可预览和下载 office 文件(doc / xls / ppt / pdf 等)适用于任何前端技术栈网站,兼容安卓和苹果系统!
- 陈学智升任VMware全球副总裁、大中华区总裁,面临四个挑战
- nnunet入门之一 (CT图像分割)
- 开源的工作流都有哪些特征?
- Bowtie2错误:Could not locate a Bowtie index corresponding to basename /home/s45/mouse
- Prometheus学习之Blackbox
- python机器人开发——基于Micropython的智能机器人底层控制开发
- Linux:TTY串口驱动数据接收设置
- 成熟FOC电机控制代码 可用于电动自行车,滑板 车,电机FOC控制等
- 【WebLogic使用】3.WebLogic配置jndi数据源