report: Create dynamic reports with a full analysis of a set of time...

Description Usage Arguments Details Value Author(s) Examples

View source: R/report.R

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

1
2
report(mode = "SARIMA", ts = 21864, parameters = NULL, report.file = NA,
  series.saveas = "none")

Arguments

mode

A character.The type of the analysis. So far, 'SARIMA', 'GRNN' and 'HOLT-WINTERS' are available.

ts

A integer, a ts object or a list of integers and ts objects. Either the ID of the series in the BETS database or a time series object (any series, not just BETS's). If a list is provided, a report is generated for each series in this list, which can be mixed with IDs and time series objects.

parameters

A list. The parameters of the report. See the 'details' section for more information.

report.file

A character. A path and a name for the report file (an .html file). If there is more than one series, this name will be used as a prefix. If this parameter is not provided, the report will be saved inside the 'reports' folder, under the BETS installation directory.

series.saveas

A character. The format of the file on which the series and the predictions should be written. Possible values are 'none' (default), 'sas', 'dta', 'spss', 'csv', 'csv2' . Is is saved under the same directory as the report file.

Details

SARIMA Report Parameters

GRNN Report Parameters

HOLT-WINTERS Report Parameters

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
##-- 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)

nmecsys/BETS documentation built on April 8, 2021, 1:54 a.m.