楼主: daming3775
3636 8

[问答] 估计MS regression时总是报错,还请大家看看! [推广有奖]

  • 6关注
  • 9粉丝

高级会员

已卖:157份资源

学科带头人

55%

还不是VIP/贵宾

-

威望
0
论坛币
7475 个
通用积分
29.6515
学术水平
22 点
热心指数
35 点
信用等级
17 点
经验
27067 点
帖子
681
精华
0
在线时间
3715 小时
注册时间
2004-11-19
最后登录
2025-12-23

楼主
daming3775 发表于 2012-8-2 11:04:07 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
本人使用Zhuanxin Ding的 Regime Switching Model with Time Varying Transition Probabilities程序包做 MS_Regress估计,使用Example_MS_Regress_Fit_tvtp程序时出现如下错误:Calculating Standard Error Vector...??? Error using ==> stdnormal_cdf at 36
stdnormal_cdf: x must not be empty

Error in ==> normcdf at 54
        cdf =  stdnormal_cdf ((x - m) ./ s);

Error in ==> tcdf at 70
p(normal) = normcdf(x(normal));

Error in ==> MS_Regress_Fit_tvtp at 105
param_pvalues=2*(1-tcdf(abs(param./param_std),nr-numel(param)));

Error in ==> Example_MS_Regress_Fit_tvtp at 37
[Spec_Out]=MS_Regress_Fit_tvtp(dep,indep,px,k,S,advOpt); % Estimating the model
我简单察看了一下,貌似是在估计累积分布函数(CDF)时,function cdf = stdnormal_cdf (x)报错,不知道应该怎么改,谢谢大家!!



二维码

扫码加我 拉你入群

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

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

关键词:regression regressio regress REG ESS Vector normal Error 程序

沙发
mayday 学生认证  发表于 2012-8-2 11:13:45
stdnormal_cdf不是matlab自带程序吧?是不是得贴出来才知道问题在哪儿?
时间好比乳沟,挤一挤还是有的。

藤椅
daming3775 发表于 2012-8-2 11:18:57
function cdf = stdnormal_cdf (x)
% STDNORMAL_CDF  CDF of the standard normal distribution
%  CDF = stdnormal_cdf(X)
%  For each component of X, compute the CDF of the standard normal
%  distribution at X.

% Adapted for Matlab (R) from GNU Octave 3.0.1
% Original file: statistics/distributions/stdnormal_cdf.m
% Original author: KH <Kurt.Hornik@wu-wien.ac.at>

% Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2004, 2005, 2006,
%               2007 Kurt Hornik
% Copyright (C) 2008-2009 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.

if (nargin ~= 1)
    error('stdnormal_cdf: you should provide one argument');
end

sz = size (x);
if (numel(x) == 0)
    error ('stdnormal_cdf: x must not be empty');
end

cdf = (ones (sz) + erf (x / sqrt (2))) / 2;

end

楼上的,这个程序是dynare 里的,我事先已经安装了!谢谢

板凳
daming3775 发表于 2012-8-2 14:32:34
谢谢大家!

报纸
yuanmingtianjin 发表于 2012-8-7 19:44:06
你好,你的ms_regress是在哪里下载的?发一个给我吧,yuanmingtianjin@163.com 我找到的都是死链

地板
LM2011dl 发表于 2012-8-12 08:32:01
那个可以用的吧~~但是我其他的用不了啊

7
waveland 发表于 2012-10-22 19:11:16
和我遭遇一样也用不了

8
jmxfns 在职认证  发表于 2013-2-28 20:34:15
楼主好~~ 我正在找MS-regression的程序包,楼主在哪里下的呀?方便的话能发我一份吗?1019740335@qq.com,非常感谢!

9
琥珀糖 发表于 2014-12-5 10:36:19
daming3775 发表于 2012-8-2 11:18
function cdf = stdnormal_cdf (x)
% STDNORMAL_CDF  CDF of the standard normal distribution
%  CDF = ...
我用的不变概率的MSVAR,但是matlab在计算标准差上跑不出结果,一直在运算,这是怎么回事

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-24 08:55