report {BETS} | R Documentation |
Create dynamic reports with a full analysis of a set of time series
Description
Generate automatic reports with a complete analysis of a set of time series. For now, SARIMA (Box & Jenkins approach), Holt-Winters and GRNN analysis are possible. Soon, Multilayer Perceptron, Fuzzy Logic and Box-Cox analysis will become available.
Usage
report(mode = "SARIMA", ts = 21864, parameters = NULL, report.file = NA,
series.saveas = "none")
Arguments
mode |
A |
ts |
A |
parameters |
A |
report.file |
A |
series.saveas |
A |
Details
SARIMA Report Parameters
cf.lags
: Aninteger
. Maximum number of lags to show on the ACFs e PACFsn.ahead
: Aninteger
. Prevision horizon (number of steps ahead)inf.crit
: Acharacter
. Information criterion to be used in model selection.dummy
: Ats
object. A dummy regressor. Must also cover the forecasting period.ur.test
: Alist
. Parameters ofur_test
arch.test
: Alist
. Parameters ofarch_test
box.test
: Alist
. Parameters ofBox.test
GRNN Report Parameters
auto.reg
: Aboolean
. Is the dependant variable auto-regressive?present.regs
: Aboolean
Include non-lagged series among regressors?lag.max
: Ainteger
Regressors' maximum lagregs
: Alist
. Regressors codes or time seriesstart.train
: Training set starting periodend.train
: Training set ending periodstart.test
: Testing set starting periodend.test
: Testing set ending periodsigma.interval
: Anumeric
vector. Sigma intevalsigma.step
: Anumeric
value. Sigma stepvar.names
: Acharacter
vector. Variable names
HOLT-WINTERS Report Parameters
alpha
: Smooth factor of the level component. If numeric, it must be within the half-open unit interval (0, 1]. A small value means that older values in x are weighted more heavily. Values near 1.0 mean that the latest value has more weight. NULL means that the HoltWinters function should find the optimal value of alpha. It must not be FALSE or 0.beta
: Smooth factor of the trend component. If numeric, it must be within the unit interval [0, 1]. A small value means that older values in x are weighted more heavily. Values near 1.0 mean that the latest value has more weight. NULL means that the HoltWinters function should find the optimal value of beta. The trend component is omitted if beta is FALSE or 0.gamma
: Smooth factors of the seasonal component. If numeric, it must be within the unit interval [0, 1]. A small value means that older values in x are weighted more heavily. Values near 1.0 mean that the latest value has more weight. NULL means that the HoltWinters function should find the optimal value of gamma. The seasonal component will be omitted if gamma is FALSE or 0. This must be specified as FALSE if frequency(x) is not an integer greater than 1.additive
: A single character string specifying how the seasonal component interacts with the other components. "additive", the default, means that x is modeled as level + trend + seasonal and "multiplicative" means the model is (level + trend) * seasonal. Abbreviations of "additive" and "multiplicative" are accepted.l.start
: The starting value of the level component.b.start
: The starting value of the trend components.start
: The starting values of seasonal component, a vector of length frequency(x)n.ahead
: Prevision horizon (number of steps ahead)
For more information about these parameters, see also HoltWinters
. Most parameters are the same and we just reproduced their documentation here.
Value
One or more .html files (the reports) and, optionally, data files (series plus predictions).
Author(s)
Talitha Speranza talitha.speranza@fgv.br
Examples
##-- SARIMA
# parameters = list(lag.max = 48, n.ahead = 12 )
# report(ts = 21864, parameters = parameters)
# report(ts = 4447, series.saveas = "csv")
# series = list(BETSget(4447), BETSget(21864))
# parameters = list(lag.max = 20, n.ahead = 15 )
# report(ts = series, parameters = parameters)
# series = list(4447, 21864)
# report(ts = series, parameters = parameters)
# parameters = list(
# cf.lags = 25,
# n.ahead = 15,
# dummy = dum,
# arch.test = list(lags = 12, alpha = 0.01),
# box.test = list(type = "Box-Pierce")
# )
# report(ts = window(BETSget(21864), start= c(2002,1) , end = c(2015,10)),
#parameters = parameters)
# dum <- dummy(start= c(2002,1) , end = c(2017,1) ,
#from = c(2008,9) , to = c(2008,11))
# parameters = list(
# cf.lags = 25,
# n.ahead = 15,
# dummy = dum
# )
# report(ts = window(BETSget(21864), start= c(2002,1) , end = c(2015,10)),
#parameters = parameters)
##-- GRNN
# params = list(regs = 4382)
# report(mode = "GRNN", ts = 13522, parameters = params)
##-- HOLT-WINTERS
# params = list(alpha = 0.5, gamma = TRUE)
# report(mode = "HOLT-WINTERS", ts = 21864, series.saveas = "csv", parameters = params)
# params = list(gamma = T, beta = TRUE)
# report(mode = "HOLT-WINTERS", ts = 21864, series.saveas = "csv", parameters = params)