I am trying to get the Hill estimator of "alpha" and the Hill-plot graph from a standard Cauchy distribution. So, how to get it? Thanks!
Hill estimator can be outlined as follows.
- Generate a set X (for example, generate 100 variates from the Cauchy distribution)
- Order the elements of the set X in a decreasing fashion: Xi ≥ Xj, for i < j
- Construct the sets of Hk, for k>=2 (k=2,3,...,100): Hk=Σ{ln(Xj ) − ln(Xk)}/k , where j=1,2,...,k
- The set αk is defined by αk= 1/Hk
Since all elements in set αk should be real number, my coding below could not get the correct set of αk. Does someone know how to get the set of αk? Thanks!
X = RandomVariate[CauchyDistribution[0, 1], 100]
X = Sort[X, Greater]
t = {};
For[
i = 1, i <= 99, i++;
a = 1/Mean[Log[X[[1 ;; i]]] - Log[X[[i]]]];
T = AppendTo[t, a]
]
ln(Xj )
? $\endgroup$CauchyDistribution[0,1]
, you're going to get complex numbers after taking the log about half of the time. Is that what you want? $\endgroup$