## reserving.DevelopmentCorrelationTest


Mack's test for correlation between adjacent development factors


Usage

``` python
reserving.DevelopmentCorrelationTest()
```


(Mack 1994, appendix G; R ChainLadder's `dfCorTest`), from [development_correlation](reserving.development_correlation.md#prospicio.reserving.development_correlation) or [MackFit.development_correlation](reserving.MackFit.md#prospicio.reserving.MackFit.development_correlation).

[t](distributions.Pareto.md#prospicio.distributions.Pareto.t) is the weighted mean of the Spearman rank correlations of each pair of adjacent link-ratio columns over the origins they share (weight `n - 1`), with variance `1 / sum(weights)`, Mack's `1 / ((I - 2)(I - 3) / 2)` on a full triangle, compared with `± q sqrt(variance)`, [q](reserving.MunichFit.md#prospicio.reserving.MunichFit.q) the standard normal's `(1 + ci) / 2` quantile.


## Attributes

| Name | Description |
|----|----|
| [ci](#ci) | The interval's confidence level. |
| [lower](#lower) | The interval's lower end, `-upper`. |
| [pairs](#pairs) | Every pair of adjacent link columns with two origins in common, |
| [passes](#passes) | Whether [t](distributions.Pareto.md#prospicio.distributions.Pareto.t) lies within the interval (ends included): no |
| [t](#t) | `T`, the weighted mean of the pairs' Spearman correlations. |
| [upper](#upper) | The interval's upper end. |
| [variance](#variance) | `Var[T]`; `E[T]` is 0. |

------------------------------------------------------------------------


#### ci


The interval's confidence level.


`ci: float`


------------------------------------------------------------------------


#### lower


The interval's lower end, `-upper`.


`lower: float`


------------------------------------------------------------------------


#### pairs


Every pair of adjacent link columns with two origins in common,


`pairs: list[dict]`


youngest first, as a list of dicts with `age` (the age in months at the start of the first link), [n](pricing.TrendFit.md#prospicio.pricing.TrendFit.n) (the origins in common), [t](distributions.Pareto.md#prospicio.distributions.Pareto.t) (Spearman's correlation with average ranks for ties; NaN if a column's ranks are all tied) and `weight` (`n - 1`, or 0 where [t](distributions.Pareto.md#prospicio.distributions.Pareto.t) is NaN).


------------------------------------------------------------------------


#### passes


Whether [t](distributions.Pareto.md#prospicio.distributions.Pareto.t) lies within the interval (ends included): no


`passes: bool`


correlation between adjacent development factors is detected.


------------------------------------------------------------------------


#### t


`T`, the weighted mean of the pairs' Spearman correlations.


`t: float`


------------------------------------------------------------------------


#### upper


The interval's upper end.


`upper: float`


------------------------------------------------------------------------


#### variance


`Var[T]`; `E[T]` is 0.


`variance: float`


## Methods

| Name | Description |
|----|----|
| [to_frame()](#to_frame) | [pairs](reserving.DevelopmentCorrelationTest.md#prospicio.reserving.DevelopmentCorrelationTest.pairs) as a table, one row per pair. Needs pandas. |

------------------------------------------------------------------------


#### to_frame()


[pairs](reserving.DevelopmentCorrelationTest.md#prospicio.reserving.DevelopmentCorrelationTest.pairs) as a table, one row per pair. Needs pandas.


Usage

``` python
to_frame()
```


##### Returns


`pandas.DataFrame`
