C_CalculateExtremeStatisticsExcessesOverThreshold

C_CalculateExtremeStatisticsExcessesOverThreshold calculates the excesses over a specified threshold. Declustering of the time history is also performed.

The function is optional in the sense that an analysis can be performed without calling C_CalculateExtremeStatisticsExcessesOverThreshold. There are two main scenarios where the function is useful:

  1. Call C_CalculateExtremeStatisticsExcessesOverThreshold as part of an iterative search algorithm to determine an appropriate choice of threshold. Once the threshold is chosen the analysis proceeds with a call to C_FitExtremeStatistics.
  2. Following a call to C_FitExtremeStatistics, C_CalculateExtremeStatisticsExcessesOverThreshold can be used to determine the excesses values used to fit the statistical distribution.

int C_CalculateExtremeStatisticsExcessesOverThreshold(

TOrcFxAPIHandle ExtremeStatisticsHandle,

const TExtremeStatisticsSpecification *lpSpecification

double *lpExcessses,

int *lpStatus

);

Parameters

ExtremeStatisticsHandle (IN)

The extreme statistics handle returned by C_OpenExtremeStatistics.

lpSpecification (IN)

Points to a TExtremeStatisticsSpecification structure specifying the threshold and decluster period.

If C_FitExtremeStatistics has already been called, then lpSpecification can be NULL. In this scenario the function returns the excesses corresponding to the threshold and decluster period that were passed to C_FitExtremeStatistics.

lpExcessess (OUT)

Points to an array of double values. The array is allocated by the caller and must be have length of at least N values, where N is the number of excesses. In order to obtain N call C_CalculateExtremeStatisticsExcessesOverThreshold passing NULL for this parameter.

lpStatus (OUT)

Points to a variable in which the status result for the function call will be returned.

Return Value

The number of excesses.

See also

TExtremeStatisticsSpecification, C_OpenExtremeStatistics, C_FitExtremeStatistics.