View source: R/temporal_core.R
| temporal_rw1 | R Documentation |
Specify a first-order random walk temporal random effect. RW1 penalizes
first differences, so adjacent time points are smoothed toward each other:
phi[t] - phi[t-1] ~ N(0, sigma^2).
temporal_rw1(time_var, group_var = NULL, cyclic = FALSE, shared = NULL)
time_var |
A formula ( |
group_var |
Optional formula ( |
cyclic |
Logical. If |
shared |
Whether the temporal effect is shared across processes in a
multi-process model. |
The precision matrix is rank T - 1 (one constraint needed). RW1 is the
least smooth of the random-walk priors; for smoother trends see
temporal_rw2(), and for a stationary alternative see temporal_ar1().
A tulpa_temporal object.
temporal_rw2(), temporal_ar1() for other temporal priors.
# Create temporal RW1 specification
temporal_rw1("year")
temporal_rw1("month", cyclic = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.