powered by
Estimates and forecasts daily time series with weekly and monthly seasonal patterns
DAYforecast( y, u = NULL, initial_date, h = 24, lambda = 1, criterion = "aic", p0 = -9999.9, verbose = FALSE )
An object of class UComp. It is a list containing the model specification, estimated parameters, and forecasting results.
UComp
A numeric vector, ts object or list containing daily observations of the dependent variable.
ts
Optional matrix or vector of exogenous regressors. If provided, it must cover both the estimation and forecast periods.
A character or Date object indicating the calendar start date of the series.
Date
Integer indicating the forecast horizon (number of days ahead).
Box–Cox transformation parameter (NULL for automatic identification).
Information criterion used for model selection (AIC, BIC, AICc).
Initial parameter vector for Maximum Likelihood estimation.
if TRUE, prints estimation details.
TRUE
Diego J. Pedregal
DAYforecast estimates and forecasts daily univariate time series using Dynamic Harmonic Regression (DHR).
DAYforecast
The function is tailored for daily data and explicitly accounts for:
Monthly seasonality through sinusoidal terms based on calendar months
Weekly seasonality through sinusoidal terms with periods of 7 days
Standard methods applicable to UComp objects are available.
UC, UCforecast, UCfilter, UCsmooth, UCdisturb, UCcomponents
UC
UCforecast
UCfilter
UCsmooth
UCdisturb
UCcomponents
# \donttest{ y <- rnorm(400) m <- DAYforecast(y, initial_date = "2015-01-01", h = 30) # }
Run the code above in your browser using DataLab