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

📄 negloglikpot.m

📁 极值理论中各种函数及图像的程序。matlab实现。
💻 M
字号:
function f=negloglikpot(theta,exceedances,span,threshold),
cond1=theta(2)<=0 ;
cond2=min(1+(theta(1)*(exceedances-theta(3)))/theta(2))<=0;
%cond3=imag((1+(theta(1)*(threshold-theta(3)))/theta(2))^(-1/theta(1)))~=0;

if cond1|cond2;
        f=inf;
else
	y=log(1+(theta(1)*(exceedances-theta(3)))/theta(2));
   term3=(1/theta(1)+1)*sum(y);
   term1=span*(1+(theta(1)*(threshold-theta(3)))/theta(2))^(-1/theta(1));
   term2=length(y)*log(theta(2));
   f=term1+term2+term3;   
end   

   
        
%negloglik <- function(theta)%	{%		if((theta[2] <= 0) | (min(1 + (theta[1] * (exceedances - %			theta[3]))/theta[2]) <= 0))%			f <- NA%		else {%			y <- log(1 + (theta[1] * (exceedances - theta[3%				]))/theta[2])%			term3 <- (1/theta[1] + 1) * sum(y)%			term1 <- span * (1 + (theta[1] * (thresh - %				theta[3]))/theta[2])^(-1/theta[1])%			term2 <- length(y) * log(theta[2])%			f <- term1 + term2 + term3%		}%		f%	}

⌨️ 快捷键说明

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