⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nigloglik.m

📁 Modeling and Forecasting Electricity Loads and Prices: A Statistical Approach" by Rafa&#322 Weron, p
💻 M
字号:
function y=nigloglik(params,x);
%NIGLOGLIK NIG log-likelihood function.
%   Y=NIGLOGLIK(PARAMS,X) returns the log-likelihood function of the NIG 
%   distribution with parameters PARAMS = [ALPHA,BETA,DELTA]. The location 
%   parameter MU is computed from the other three parameters and the mean 
%   of the data vector X.  
%
%   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;
alpha = params(1);
beta = params(2);
delta = params(3);
mu = -delta*beta/sqrt(alpha^2-beta^2)*besselk(-1/2+1,delta*sqrt(alpha^2-beta^2))/besselk(-1/2,delta*sqrt(alpha^2-beta^2))+mean(x);
if (delta>0)&(alpha>abs(beta))
    y = -sum(log(nigpdf(x,alpha,beta,delta,mu)));
else
    y = realmax;
end;

⌨️ 快捷键说明

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