hypest.m

来自「Modeling and Forecasting Electricity Loa」· M 代码 · 共 35 行

M
35
字号
function [params,fval,exitflag,iterations]=hypest(x,x0);
%HYPEST Estimate parameters of the hyperbolic distribution.
%   PARAMS=HYPEST(X) returns the maximum likelihood estimates of the
%   hyperbolic distribution parameters PARAMS=[ALPHA,BETA,DELTA,MU] for a 
%   data vector X. The estimates are computed numerically using the 
%   FMINSEARCH simplex optimization routine.
%   [PARAMS,FVAL,EXITFLAG,ITERATIONS]=HYPEST(X,X0) additionally allows to 
%   specify the initial estimates supplied to FMINSEARCH (default value: 
%   [0.5,0,1]) and returns the value of the objective function FVAL, an 
%   EXITFLAG that describes the exit condition of FMINSEARCH (type "help
%   FMINSEARCH" in the command line for details) and the numer of
%   ITERATIONS performed to reach the result.
%
%   Reference(s):
%	[1] R.Weron (2004) "Computationally intensive Value at Risk 
%   calculations", in "Handbook of Computational Statistics: Concepts and 
%   Methods", eds. J.E. Gentle, W. Haerdle, Y. Mori, Springer, Berlin, 
%   911-950. 
%   [2] R.Weron (2007) "Modeling and Forecasting Electricity Loads and 
%   Prices: A Statistical Approach", Wiley, Chichester.   

%   Written by Adam Misiorek and Rafal Weron (2006.09.22)
%   Copyright (c) 2006 by Rafal Weron

global mu;
% Set initial parameter estimates
if nargin==1
    x0=[0.5,0,1];
end;
warning off
% Run optimization
[params,fval,exitflag,output] = fminsearch('hyploglik',x0,optimset('MaxFunEvals',1e12),x);
params = [params,mu];
iterations = output.iterations;
warning on

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?