View source: R/stsm_dates_to_interpolate.R
stsm_dates_to_interpolate | R Documentation |
Create dates to interpolate
stsm_dates_to_interpolate(y, dates, exo = NULL, interpolate)
y |
Univariate time series of data values. |
dates |
Vector of date values for y |
exo |
Matrix of exogenous variables. Can be used to specify regression effects or other seasonal effects like holidays, etc. |
interpolate |
Character string of how to interpolate |
List of the data, dates, and exo
## Not run:
#GDP Not seasonally adjusted
library(autostsm)
data("NA000334Q", package = "autostsm") #From FRED
NA000334Q = data.table(NA000334Q, keep.rownames = TRUE)
colnames(NA000334Q) = c("date", "y")
NA000334Q[, "date" := as.Date(date)]
NA000334Q[, "y" := as.numeric(y)]
NA000334Q = NA000334Q[date >= "1990-01-01", ]
dates_interp = stsm_dates_to_interpolate(y = NA000334Q$y, dates = NA000334Q$date,
interpolate = "monthly")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.