Skip to contents

One component of a predictive distribution

Usage

marginal(dist, key, ...)

Arguments

key

A named list (or vector) with one value per dimension. An origin period is named by its label ("2021", 2021, "2021Q3").

...

Unused; for methods.

Value

A sampled object, or NULL when no component has this key.

Examples

pd <- predictive_distribution(matrix(1:6, ncol = 2), data.frame(year = c(2023, 2024)))
marginal(pd, list(year = 2024))
#> <sampled> 3 draws, mean = 5