TimeVaryingResult¶
- class TimeVaryingResult(*args)¶
Estimation result class for a non stationary GEV or GPD model.
- Parameters:
- factory
DistributionFactory
Parent distribution factory.
- data2-d sequence of float
Sample drawn from .
- parameterFunction
Function
The function .
- timeStamps2-d sequence of float
Values of .
- parameterDistribution
Distribution
The distribution of .
- normalizationFunction
LinearFunction
The normalization function .
- llhfloat
Maximum log-likelihood.
- factory
Methods
Draw the 4 usual diagnostic plots.
drawParameterFunction
([parameterIndex])Draw the parameter function.
Draw the quantile function.
Accessor to the object's name.
Accessor to the Parent distribution at a given time.
Optimal log-likelihood value accessor.
getName
()Accessor to the object's name.
Normalizing function accessor.
Optimal parameter accessor.
Accessor to the distribution of .
Parameter function accessor.
Accessor to the time grid.
hasName
()Test if the object is named.
setLogLikelihood
(logLikelihood)Optimal log-likelihood value accessor.
setName
(name)Accessor to the object's name.
setParameterDistribution
(parameterDistribution)Accessor to the distribution of of .
See also
Notes
This class is created by the method
buildTimeVarying()
of the classesGeneralizedExtremeValueFactory
andGeneralizedParetoFactory
.Let be a non stationary random variable which follows a GEV distribution or whose excesses above follow a GPD. The parameters of the GEV or GPD model depend on :
For the GPD, the threshold is assumed to be known.
We denote by the values of on the time stamps .
For numerical reasons, the time stamps have been normalized using the linear function:
Let be the set of parameters for the GEV model and for the GPD. Each component can be written as a function of :
where:
is the size of the functional basis involved in the modelling of ,
is usually referred to as the inverse-link function of the component ,
each is a scalar function ,
each .
We denote by the complete vector of parameters.
The estimator of the vector maximizes the likelihood of the Parent distribution (ie the distribution of ).
- __init__(*args)¶
- drawDiagnosticPlot()¶
Draw the 4 usual diagnostic plots.
- Returns:
- grid
GridLayout
- Returns a grid of 4 graphs:
the QQ-plot,
the PP-plot,
the return level graph (with confidence lines),
the density graph.
- grid
Notes
Let be a non stationary random variable which follows a GEV distribution or whose excesses above follow a GPD. The parameters of the GEV or GPD model depend on :
Then, the standardized variables defined respectively by:
respectively follows the standard Gumbel distribution (which is the GEV model with ) or the standard Exponential distribution (which is the GPD with ).
Then, the 4 usual diagnostic graphs are built from the transformed data compared to the Gumbel or Exponential model:
the probability-probability plot,
the quantile-quantile plot,
the return level plot,
the data histogram with the Gumbel/Exponential distribution.
If denotes the ordered transformed data, the graphs are defined as follows.
The probability-probability plot consists of the points (respectively for the GEV and GPD models):
The quantile-quantile plot consists of the points (respectively for the GEV and GPD models):
The return level plot consists of the points:
and the points:
where is the empirical -block return level (for the GEV model) or the -observation return level (for the GPD model) of the transformed data and the same quantity evaluated from the Gumbel/Exponential distribution.
- drawParameterFunction(parameterIndex=0)¶
Draw the parameter function.
- Parameters:
- parameterIndexint,
The index specifying the component of .
- Returns:
- graph
Graph
Graph of .
- graph
- drawQuantileFunction(p)¶
Draw the quantile function.
- Parameters:
- pfloat
The quantile level.
- Returns:
- graph
Graph
Quantile function graph.
- graph
Notes
The quantile function is the function where is the quantile of order of the Parent distribution at time .
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getDistribution(t)¶
Accessor to the Parent distribution at a given time.
- Parameters:
- tfloat
Time value.
- Returns:
- distribution
Distribution
The Parent distribution at time t.
- distribution
- getLogLikelihood()¶
Optimal log-likelihood value accessor.
- Returns:
- llhfloat
Maximum log-likelihood.
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getNormalizationFunction()¶
Normalizing function accessor.
- Returns:
- normalizeFunction
Function
The function .
- normalizeFunction
- getOptimalParameter()¶
Optimal parameter accessor.
- Returns:
- optimalParameter
Point
Optimal vector of parameters .
- optimalParameter
- getParameterDistribution()¶
Accessor to the distribution of .
- Returns:
- parameterDistribution
Distribution
The distribution of the estimator of .
- parameterDistribution
- getParameterFunction()¶
Parameter function accessor.
- Returns:
- parameterFunction
Function
The function .
- parameterFunction
- hasName()¶
Test if the object is named.
- Returns:
- hasNamebool
True if the name is not empty.
- setLogLikelihood(logLikelihood)¶
Optimal log-likelihood value accessor.
- Parameters:
- llhfloat
Maximum log-likelihood.
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.
- setParameterDistribution(parameterDistribution)¶
Accessor to the distribution of of .
- Parameters:
- parameterDistribution
Distribution
The distribution of the estimator of .
- parameterDistribution
Examples using the class¶
Estimate a GEV on the Port Pirie sea-levels data
Estimate a GPD on the daily rainfall data
Estimate a GEV on race times data
Estimate a GEV on the Fremantle sea-levels data