Generate time series with a default value that is changed within a certain subperiod. The function allows for additional convenience when specifying single period dummies and dummies that go from a certain point in time to the end of the series.
create_dummy_ts(
end_basic,
dummy_start,
dummy_end = NULL,
sp = T,
start_basic = c(1980, 1),
basic_value = 0,
dummy_value = 1,
frequency = 4
)
numeric vector of form c(yyyy,p) defining the end of the time series.
numeric vector of form c(yyyy,p) defining the beginning of the period with different value.
numeric vector of form c(yyyy,p) defining the end of the period with different value. Defaults to NULL, using the end_date of the series.
logical should NULL value for dummy_end lead to a single period dummy (TRUE) or to alternative values until the end.
numeric vector of form c(yyyy,p) defining the start of the time series. Defaults to c(1980,1)
default value of the time series, defaults to 0.
the alternative value, defaults to 1.
integer frequency of the regular time series, defaults to 4 (quarterly).
Matthias Bannert