## models.loo_pit()


The leave-one-out PIT of any model's observations: each observation's


Usage


``` python
models.loo_pit(
    observed,
    replicated,
    log_lik,
    r_eff=None,
    seed=0,
)
```


place among its replicates under the Pareto-smoothed importance weights for leaving it out, randomized over ties; uniform for a calibrated model. Matches R [loo](models.BayesGlmFit.md#prospicio.models.BayesGlmFit.loo)'s `E_loo` of `y_rep <= y`.


## Parameters


`observed: list of float`  

`replicated: list of list of float`  
One replicated dataset per posterior draw.

`log_lik: list of list of float`  
The pointwise log-likelihood, one row per draw (as [elpd_loo](models.elpd_loo.md#prospicio.models.elpd_loo)).

`r_eff: list of float = None`  
Each observation's relative efficiency; 1 if omitted.

`seed: int = ``0`  
Seeds the randomization over ties.


## Returns


`dict`  
[pit](models.pit.md#prospicio.models.pit) and [pareto_k](models.Elpd.md#prospicio.models.Elpd.pareto_k) per observation, and `ks`.


## Examples

``` python
>>> from prospicio.models import loo_pit
>>> loo_pit([2.5], [[1.0], [2.0], [3.0], [4.0]], [[-1.0]] * 4)["pit"]
```

\[0.5\]
