Class ACERAnalysis
- java.lang.Object
-
- dev.nm.stat.evt.evd.univariate.fitting.acer.ACERAnalysis
-
public class ACERAnalysis extends Object
Average Conditional Exceedance Rate (ACER) method is for estimating the cdf of the maxima \(M\) distribution from observations. \[ F_M(\eta) = Pr(\max(X_1,X_2,...,X_n) \le \eta) \] With the assumption of the k-step markov-like dependency, the cdf \(F_M(\eta)\) becomes: \[ \begin{eqnarray} F_M(\eta) \approx P_k(\eta) & = & \exp(- \sum_{j=k}^N \alpha_{kj}(\eta) - \alpha_{k-1,k-1}(\eta) - ... - \alpha_{11}(\eta)) \\ & \approx & \exp(- \sum_{j=k}^N \alpha_{kj}(\eta)) \\ & \approx & \exp(- \epsilon_k(\eta) N) \end{eqnarray} \] where \(\alpha_{kj}(\eta)\) is the probability of the j-th element exceeding \(\eta\) conditional on the previous (k-1) non-exceedances, and \(\epsilon_k(\eta)\) is the mean of these conditional probabilities when \(N \to \infty\). The result could be used for estimation of an extreme distribution. This algorithm works as follows:- By counting the occurrences of threshold exceedances conditional on (k-1) previous non-exceedances in the observations, find the empirical values for \(P_k(\eta_i)\) where \(\eta_i\) are various equally-spaced barrier levels (or, thresholds) greater than the given tail marker.
- Using the empirical \(P_k(\eta_i)\), fit the sub-asymptotic form of Gumbel distribution, i.e., the ACER function: \[ \hat{\epsilon_k}(\eta) = q_k exp(-a_k (\eta - b_k)^{c_k}), \eta \ge \eta_1. \]
- With the fitted parameters of the ACER function, calculate the confidence interval of the fitted ACER function.
acer::acer.analysis
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ACERAnalysis.Result
-
Constructor Summary
Constructors Constructor Description ACERAnalysis()
Create an instance with the default values.ACERAnalysis(int kStepMemory, int nLevels, double confidenceLevel, boolean usePeaksOnly, boolean weightedByPeakCount)
Create an instance with various options listed below.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ACERAnalysis.Result
run(double[][] observations, double tailMarker)
Run the analysis with multi-period observations.ACERAnalysis.Result
run(double[] observations, double tailMarker)
Run the analysis with single-period observations.
-
-
-
Constructor Detail
-
ACERAnalysis
public ACERAnalysis()
Create an instance with the default values. That is,this(2, 300, 0.95, true, true);
-
ACERAnalysis
public ACERAnalysis(int kStepMemory, int nLevels, double confidenceLevel, boolean usePeaksOnly, boolean weightedByPeakCount)
Create an instance with various options listed below.- the value of k in the assumed k-step memory model (k = 1 means no dependency on previous observations; k = 2 is good enough for most cases)
- the number of barrier levels \(\eta_i\) for estimating the ACER values at different levels
- the confidence level for computing the confidence interval of the estimated ACER function
- whether or not to use only peaks in the observations for estimation (peaks are defined as data points whose values are preceded and followed by values smaller than itself)
- whether or not to put more emphasis on periods in which more events occur
- Parameters:
kStepMemory
- the value of k in the k-step memory modelnLevels
- the number of barrier levels to be used for estimationconfidenceLevel
- the confidence level for computing confidence intervalusePeaksOnly
-true
if use only peaks in the observations for estimationweightedByPeakCount
-true
if weight periods by the peak counts in the periods
-
-
Method Detail
-
run
public ACERAnalysis.Result run(double[] observations, double tailMarker)
Run the analysis with single-period observations. Tail marker is used to determine the start of the distribution tail, i.e., extreme values.- Parameters:
observations
- the observations (one row for each period, can has different length)tailMarker
- the appropriately chosen tail level \(\eta_1\)- Returns:
- the analysis result
-
run
public ACERAnalysis.Result run(double[][] observations, double tailMarker)
Run the analysis with multi-period observations. Tail marker is used to determine the start of the distribution tail, i.e., extreme values.- Parameters:
observations
- the observations (one row for each period, can has different length)tailMarker
- the appropriately chosen tail level \(\eta_1\)- Returns:
- the analysis result
-
-