Create a function of time for monthly parameters

Create a function of time for monthly parameters

Note

Version 1.0.0

Active bindings

parameters

vector of parameters with length 12.

Methods


Method new()

Initialize a monthlyParams object

Usage

monthlyParams$new(params)

Arguments

params

numeric vector of parameters with length 12.


Method predict()

Predict the monthly paramete

Usage

monthlyParams$predict(x)

Arguments

x

date as character or month as numeric.


Method update()

Update the monthly parameters

Usage

monthlyParams$update(params)

Arguments

params

numeric vector of parameters with length 12.


Method clone()

The objects of this class are cloneable with this method.

Usage

monthlyParams$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

set.seed(1)
params <- runif(12)
mp <- monthlyParams$new(params)
t_now <- as.Date("2022-01-01")
t_hor <- as.Date("2024-12-31")
dates <- seq.Date(t_now, t_hor, by = "1 day")
plot(mp$predict(dates), type = "l")