www.pudn.com > GarchTest.rar > myTUFFTest.m, change:2009-11-22,size:226b


function [tuff] = myTUFFTest(v,p); 
%POF-Test 
% <v> is the time of first violation  
%<p> is confidence level 
tuff = 0; 
if(v>0) 
a=p*(1-p)^(v-1); 
b=(1/v)*(1-1/v)^(v-1); 
tuff = -2*log10(a/b); 
else 
tuff =0;     
end