| temporal_multiscale | R Documentation |
Specify a temporal random effect that decomposes variation into separate scales: a smooth trend, an optional seasonal cycle, and a short-term component. Each scale uses its own prior, letting slow and fast dynamics be modelled jointly.
temporal_multiscale(
time_var,
trend = c("rw2", "rw1", "none"),
seasonal = NULL,
short_term = c("ar1", "iid", "none"),
group_var = NULL,
shared = NULL
)
## S3 method for class 'tulpa_temporal_multiscale'
print(x, ...)
time_var |
Single character string naming the time variable in the data. |
trend |
Prior for the smooth long-term trend. One of |
seasonal |
Optional integer period ( |
short_term |
Prior for the short-term component. One of |
group_var |
Optional character string naming a grouping variable for group-specific temporal effects. |
shared |
Whether the effect is shared across processes in a
multi-process model. |
x |
A |
... |
Ignored. |
At least one of trend, seasonal, or short_term must be active.
A tulpa_temporal_multiscale object.
temporal_rw1(), temporal_rw2(), temporal_ar1() for
single-scale temporal priors.
# Trend + annual seasonal cycle + AR1 short-term component on monthly data
temporal_multiscale("month", trend = "rw2", seasonal = 12, short_term = "ar1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.