## aggregate.occurrence_pml()


The occurrence PML at an annual probability [p](models.Elpd.md#prospicio.models.Elpd.p): the loss whose


Usage


``` python
aggregate.occurrence_pml(
    frequency,
    severity,
    p,
    tower=None,
    view="ceded",
)
```


occurrence exceedance is [p](models.Elpd.md#prospicio.models.Elpd.p), for any claim count (the Python package [aggregate](aggregate.Clash.md#prospicio.aggregate.Clash.aggregate)'s [oep](aggregate.EventLossTable.md#prospicio.aggregate.EventLossTable.oep) covers Poisson counts). With an occurrence program `tower` it is the PML of the ceded or net loss, the program's function of the gross PML, as [aggregate](aggregate.Clash.md#prospicio.aggregate.Clash.aggregate) 2.1.0's [oep](aggregate.EventLossTable.md#prospicio.aggregate.EventLossTable.oep) on an `occurrence ceded to` or `net of` clause; annual terms do not enter. Where the view is flat (a layer placed in full, for the net) its [severity_survival](aggregate.OccurrencePml.md#prospicio.aggregate.OccurrencePml.severity_survival) is the gross survival at the end of that stretch, so the achieved probability falls below [p](models.Elpd.md#prospicio.models.Elpd.p).


## Parameters


`frequency: a claim count`  

`severity: a severity`  

`p: float`  
In `(0, 1 - P(N = 0))`.

`tower: Tower = None`  
An occurrence program on the loss basis.

`view: str = ``"ceded"`  
`"gross"`, `"ceded"` or `"net"`, with `tower`.


## Returns


`OccurrencePml`  


## Raises


`ValueError`  
If [p](models.Elpd.md#prospicio.models.Elpd.p) is outside `(0, 1 - P(N = 0))`.


## Examples

``` python
>>> from prospicio.aggregate import occurrence_pml
>>> from prospicio.distributions import Lognormal, Poisson
>>> pml = occurrence_pml(Poisson(2.0), Lognormal.from_mean_cv(100.0, 2.0), 0.01)
>>> round(pml.loss, 4), pml.annual_return_period
```

(1171.4979, 100.0)
