`R/BayesianBiasCorrection.R`

`sequentialFitBiasDistribution.Rd`

Learn empirical bias distributions sequentially or in groups; for each sequential step or analysis group, bias distributions is learned by by simultaneously analyzing a large set of negative control outcomes by a Bayesian hierarchical model through MCMC.

`sequentialFitBiasDistribution(LikelihoodProfileList, ...)`

- LikelihoodProfileList
A list of lists, each of which is a set of grid profile likelihoods regarding negative controls, indexed by analysis period ID for sequential analyses or group ID for group analyses.

- ...
Arguments passed to the

`fitBiasDistribution()`

function.

A (long) dataframe with four columns.
Column `mean`

includes MCMC samples for the average bias,
`scale`

for the sd/scale parameter,
`bias`

for predictive samples of the bias, and
`Id`

for the period ID or group ID.

```
# load example data
data("ncLikelihoods")
# fit bias distributions over analysis periods
# NOT RUN
# biasDistributions = sequentialFitBiasDistribution(ncLikelihoods, seed = 42)
```