全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
3583 8
2012-08-02
本人使用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)报错,不知道应该怎么改,谢谢大家!!



二维码

扫码加我 拉你入群

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

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

全部回复
2012-8-2 11:13:45
stdnormal_cdf不是matlab自带程序吧?是不是得贴出来才知道问题在哪儿?
二维码

扫码加我 拉你入群

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

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

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 里的,我事先已经安装了!谢谢

二维码

扫码加我 拉你入群

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

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

2012-8-2 14:32:34
谢谢大家!
二维码

扫码加我 拉你入群

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

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

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

扫码加我 拉你入群

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

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

2012-8-12 08:32:01
那个可以用的吧~~但是我其他的用不了啊
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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