matlab print用法,使用Matlab:错误使用 mprint (line 231) Wrong # rnames in mprint,怎么解决...
请问大牛们:在使用Matlab:错误使用 mprint (line 231) Wrong # rnames in mprint,怎么解决?
程序如下:
T=12;
N=10;
W=normw(W1);
y=A(:,[23]);
x=A(:,[17:22]);
for t=1:T
t1=(t-1)*N+1;t2=t*N;
wx(t1:t2,:)=W*x(t1:t2,:);
end
xconstant=ones(N*T,1);
[nobs, K]=size(x);
info.lflag=0;
info.model=1;
info.fe=0;
results=sar_panel_FE(y,x,W,T,info);
vnames=strvcat('logE’,’intercept’,’logshx’,’logPOP’,’logGDP’,’logSGDP','loginvest','logEgdp');
prt_spnew(results,vnames,1)
spat_model=0;
direct_indirect_effects_estimates(results,W,spat_model);
panel_effects_sar(results,vnames,W);
运行结果为:
Wrong # of variable names in prt_reg -- check vnames argument
will use generic variable names
Ordinary Least-squares Estimates
R-squared = 0.9229
Rbar-squared = 0.9188
sigma^2 = 0.0593
Durbin-Watson = 1.7247
Nobs, Nvars = 120, 7
***************************************************************
Variable Coefficient t-statistic t-probability
variable 1 12.955394 29.899434 0.000000
variable 2 0.107677 1.534543 0.127691
variable 3 0.046165 0.482356 0.630486
variable 4 1.296638 8.521197 0.000000
variable 5 -0.946691 -17.107434 0.000000
variable 6 -0.080238 -1.576146 0.117788
variable 7 -0.039277 -0.294729 0.768742
T =
12
LM test no spatial lag, probability = 24.9098, 0.000
robust LM test no spatial lag, probability = 39.4198, 0.000
LM test no spatial error, probability = 0.0070, 0.933
robust LM test no spatial error, probability = 14.5170, 0.000
>> bbw10-sfe
尝试将 SCRIPT bbw10 作为函数执行:
E:\bbw10.m
>> A=xlsread('E:\desktop\\bbw');
W1=xlsread('E:\desktop\\bbww1');
T=12;
N=10;
W=normw(W1);
y=A(:,[23]);
x=A(:,[17:22]);
>> for t=1:T
t1=(t-1)*N+1;t2=t*N;
wx(t1:t2,:)=W*x(t1:t2,:);
end
>> xconstant=ones(N*T,1);
[nobs, K]=size(x);
info.lflag=0;
info.model=1;
info.fe=0;
results=sar_panel_FE(y,x,W,T,info);
>> vnames=strvcat('logE’,’intercept’,’logshx’,’logPOP’,’logGDP’,’logSGDP','loginvest','logEgdp');
prt_spnew(results,vnames,1)
spat_model=0;
direct_indirect_effects_estimates(results,W,spat_model);
panel_effects_sar(results,vnames,W);
Wrong # of variable names in prt_sp -- check vnames argument
will use generic variable names
Pooled model with spatially lagged dependent variable and spatial fixed effects
R-squared = 0.9929
corr-squared = 0.7403
sigma^2 = 0.0056
Nobs,Nvar,#FE = 120, 7, 16
log-likelihood = 144.43011
# of iterations = 1
min and max rho = -1.1258, 1.0000
total time in secs = 1.3630
time for optimiz = 0.1790
time for lndet = 0.0470
time for eigs = 0.5650
time for t-stats = 0.0920
No lndet approximation used
***************************************************************
Variable Coefficient Asymptot t-stat z-probability
variable 1 0.016704 0.529562 0.596416
variable 2 -0.138047 -1.172315 0.241071
variable 3 21.031091 2.190213 0.028509
variable 4 -20.789949 -2.162468 0.030582
variable 5 0.020312 0.708341 0.478733
variable 6 -0.100153 -1.216628 0.223746
W*dep.var. 0.262199 2.579782 0.009886
direct t-stat indirect t-stat total t-stat
ans =
0.0167 0.5085 0.0052 0.4227 0.0220 0.4975
-0.1394 -1.1663 -0.0493 -0.9503 -0.1888 -1.1492
21.4270 2.1695 7.4555 1.4275 28.8825 2.0812
-21.1807 -2.1423 -7.3734 -1.4166 -28.5541 -2.0556
0.0208 0.7214 0.0068 0.5976 0.0277 0.7072
-0.1021 -1.2320 -0.0354 -0.9666 -0.1376 -1.1981
错误使用 mprint (line 231)
Wrong # rnames in mprint
出错 panel_effects_sar (line 188)
mprint(printout,ini);
matlab print用法,使用Matlab:错误使用 mprint (line 231) Wrong # rnames in mprint,怎么解决...相关推荐
- matlab fsolve用法,求助Matlab fsolve用法
fsolve编辑本段回目录 求解非线性方程函数 [x,fval,exitflag,output,jacobian]= fsolve(fun,x0,options) 输入及其输出解释如下 输出: ...
- matlab中fdyn,Matlab的用法总结
1. 对序列进行洗牌 randperm() randperm()产生随机的序列 %if filepaths 是一个5*1的结构体,then cshuffle = randperm(length(fil ...
- Matlab norm 用法小记
Matlab norm 用法小记 matlab norm (a) 用法以及实例 norm(A,p) 当A是向量时 norm(A,p) Returns sum(abs(A).^p)^(1/p), f ...
- matlab trapz无穷,trapz(matlab中trapz函数用法)
采用梯形法求积分 下面两种用法等效 h=pi/200; t=0:h:pi/2; y=sin(t)+cos(2*t); z1=trapz(t,y) z2=trapz(y)*h z1 = 1.0000 z ...
- Matlab中解决出现的错误使用 svmtrain (line 234) Y must be a vector or a character array.问题
Matlab中解决出现的错误使用 svmtrain (line 234) Y must be a vector or a character array.问题 目录 解决问题 解决思路 解决方法 解决 ...
- 【转】Matlab axis用法
Matlab axis用法 转自:http://blog.sina.com.cn/s/blog_b26a90750101kxdx.html axis off;% 去掉坐标轴 axistight;% ...
- MATLAB基本用法介绍
MATLAB基本用法介绍 最近由于学习算法又开始使用MATLAB了,因此记录一些MATLAB常用的用法,便于日后的复习 %% I. 清空环境变量及命令 clear all % 清除Workspace中 ...
- matlab fscanf用法
matlab fscanf用法 matlab中的fscanf的用法如下: A=fscanf(fid,format) [A, count]=fscanf(fid,format,size) [A, co ...
- 哈密顿圈 MATLAB程序,matlab求最佳哈密顿圈遇到错误
问题描述: matlab求最佳哈密顿圈遇到错误 求最佳哈密顿圈遇到错误 程序如下 %用矩阵翻转方法来实现二边逐次修**过程,求最佳哈密尔顿圈(H圈) clc clear load('zd.mat'); ...
最新文章
- C#开发Unity游戏教程之判断语句
- ABAP 直接上传图片的函数
- 海外净利润低?海尔智家H股上市有望看齐国内!
- 多版本php共存 linux,linux下多版本php共存的原理、方法
- PHPCMS 核心代码与 www 分离部署
- 小程序:自定义组件的实现方法及自定义组件与页面间的数据传递
- Citrix 客户端登录出现wfshell.exe - 应用程序错误的解决方法
- 快速学习django
- 对Spring 容器管理事务支持的总结
- ubb码转换的java类库 ubb2html_ubb代码转换为html
- 最小二乘法曲线拟合(c++实现)
- Apache的安装教程
- 信息安全概述-企业安全建设目标及架构设计
- ROS 教程1 机器人操作系统 基础知识 节点 话题 消息 服务 行动 参数 日志 TF变换 目标结构 启动文件
- 通过 BTC 联动程度判断牛熊
- 出现错误“0x7c938fea指令引用的0x00000010内存。该内存不能为written。”的另一种可能性
- Strings、bytes and runes -- 就要学习 Go 语言
- 使用terminalizer工具录制终端生成GIF动画
- [转帖] 嵌入式系统词汇表
- Java多线程——线程同步