stsm_dates_to_interpolate {autostsm}R Documentation

Create dates to interpolate

Description

Create dates to interpolate

Usage

stsm_dates_to_interpolate(y, dates, exo = NULL, interpolate)

Arguments

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

Value

List of the data, dates, and exo

Examples

## 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)

[Package autostsm version 3.0.1 Index]