The model's time axis is a regular grid of n_steps steps. A step is a
calendar month, quarter or year, running from the step containing
start to the step containing end. Alternatively, give only n_steps
for a plain index 1..n_steps; survey data then carry the time step as
a whole number.
Usage
time_frame(
start = NULL,
end = NULL,
step = c("month", "quarter", "year"),
n_steps = NULL
)Arguments
- start, end
The first and last dates of the window:
Dates, or strings"YYYY","YYYY-MM"or"YYYY-MM-DD", or whole years as numbers. A year or month stands for the whole period: asstartits first day, asendits last (sotime_frame(2001, 2020, "month")runs from January 2001 to December 2020). The window then covers every step that contains a day betweenstartandend.- step
"month","quarter"or"year".- n_steps
Instead of
startandend: the number of steps of a plain index frame.
Value
An object of class stareal_time: n_steps, step, labels
(one per step, e.g. "2020-03", "2020-Q1", "2020"), and for
calendar steps starts, the first day of each step.
Details
The temporal prior is a first-order autoregression between consecutive steps, so the step sets the scale on which the temporal correlation \(\rho_t\) is read.
See also
time_index() to map dates to steps.
