add_prior_anomaly: Add a prior on the probability of an anomaly

View source: R/add_prior.R

add_prior_anomalyR Documentation

Add a prior on the probability of an anomaly

Description

Add a prior on the probability of an anomaly

Usage

add_prior_anomaly(priors, prob)

Arguments

priors

A list containing other, already defined, priors. If NULL, a list will be started with anomaly as entry. Else, the provided list will be extended with anomaly.

prob

The prob parameter for a Binomial distribution, as in dbinom(). The corresponding size parameter of dbinom will be the length of the time series.

Value

A list that includes a list named anomaly, which is a list with a prob key-value pair.

See Also

add_prior_trend(), add_prior_level(), add_prior_error(), add_prior_seasonality()

Examples

ps <- add_prior_anomaly(priors = list(), prob = 0.01)
print(ps)

# overwrites the existing entry
ps <- add_prior_anomaly(priors = ps, prob = 0.05)
print(ps)


timradtke/heuristika documentation built on April 24, 2023, 1:55 a.m.