# Create three seasons with random observations
obs <- 10
season <- c("2018/2019", "2019/2020", "2020/2021")
season_num_rev <- rev(seq(from = 1, to = length(season)))
observations <- rep(stats::rnorm(10, obs), length(season))
# Add into a tibble with decreasing weight for older seasons
data_input <- tibble::tibble(
observation = observations,
weight = 0.8^rep(season_num_rev, each = obs)
)
# Use the model
fit_percentiles(
weighted_observations = data_input,
conf_levels = c(0.50, 0.90, 0.95),
family= "weibull"
)
Run the code above in your browser using DataLab