-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathauto_arima_help.txt
174 lines (139 loc) · 7.31 KB
/
auto_arima_help.txt
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
Fit best SARIMA(X) model to univariate time series.
Returns best SARIMA(X) model according to either AIC, AICc, BIC or HQC value.
The function conducts a (brute force) search over possible models within the
order constraints provided.
This is an alternative package to the existing gretl "armax" package written by
Yi-Nung Yang which has some limitations compared to this package (e.g. it does
only support ARMA type models).
The features of the auto_arima package are:
- Consideration of seasonal ARIMA models with and without exogenous regressors.
- Simple user-interface.
- GUI-access through the gretl menu.
- Public convenience functions for the user for summarizing results, or
retrieving the gretl ARIMA command of the 'best' model.
- Source code is tested by means of unit-tests to minimize bugs.
Please ask questions and report bugs on the gretl mailing list if possible.
Alternatively, create an issue ticket on the github repo (see below).
Source code and test script(s) can be found here:
https://github.com/atecon/auto_arima
PUBLIC FUNCTIONS:
-----------------------------------------------------------------------
Function: auto_arima(const series y, const list xlist[null],
bundle opts[null])
Arguments:
y: series, Endogenous variable
xlist: list, List of exogenous variables (optional)
opts: bundle, Bundle for passing SARIMA(X) parameters and further
options (see below for details)
Return:
Bundle comprising the various items.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------
Function: print_auto_arima_results(const bundle model)
Arguments:
model: bundle, Bundle returned by auto_arima() function
Return:
No return value. Print summary results for each parameter combination and
information criteria estimated in tabular form.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------
Function: get_auto_arima_parameters (const bundle model, const string
info_criteria, const int model_rank[1::])
Arguments:
model: bundle, Bundle returned by auto_arima() function
info_criteria: string, Name of information criteria (either "aicc", "aic",
"bic" or "hqc") for which to return SARIMA parameter vector
model_rank: int, Compute the SARIMA parameter vector for the n-th
best model in terms of the chosen information criteria.
Return:
Vector of SARIMA parameters of the n-th best model in terms of the chosen
information criteria.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------
Function: get_auto_arima_command (const bundle model, const string
info_criteria, const int model_rank[1::])
Arguments:
model: bundle, Bundle returned by auto_arima() function
info_criteria: string, Name of information criteria (either "aicc", "aic",
"bic" or "hqc") for which to return SARIMA parameter vector
model_rank: int, Consider the n-th best model in terms of the chosen
information criteria.
Return:
String holding the gretl/ hansl command for estimating the selected model.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------
Function: auto_arima_gui(void)
Arguments:
Return:
A wrapper for the GUI. Prints summary results and returns a bundle with model
results.
-----------------------------------------------------------------------
The optional 'opts' bundle:
----------------------------
The user can pass an optional bundle as the 3rd argument to the
auto_arima() function. Currently, the following options are supported:
* verbose: bool, print details if 1, otherwise no printout
(default 1).
* with_intercept: bool, if 1 (or TRUE) an intercept is added to the
model, of 0 (or FALSE) no intercept is added (default 1).
* with_seasonality: bool, if 1 (or TRUE) seasonal ARIMA parameter
combinations are considered (if the data frequency
has seasonality), otherwise seasonal ARIMA parameters
are not considered (default 1).
* estimation_method: string, if "conditional_ml" use conditional maximum
likelihood
* min_p, max_p, min_d, max_d, min_q, max_q, min_P, max_P, min_D, max_D,
min_Q, max_Q: Model parameters (see below for explanations)
Default SARIMA(X) parameter values:
--------------------------------
* min_p : scalar, minimum autoregressive order (default 0)
* max_p : scalar, maximum autoregressive order (default 4)
* min_d : scalar, minimum order of 1-st differencing (default 0)
* max_d : scalar, maximum order of 1-st differencing (default 1)
* min_q : scalar, minimum moving-average order (default 0)
* max_q : scalar, maximum moving-average order (default 4)
* min_P : scalar, minimum seasonal autoregressive order (default 0)
* max_P : scalar, maximum seasonal autoregressive order (default 1)
* min_D : scalar, minimum order of seasonal-differencing (default 0)
* max_D : scalar, maximum order of seasonal-differencing (default 1)
* min_Q : scalar, minimum seasonal moving-average order (default 0)
* max_Q : scalar, maximum seasonal moving-average order (default 1)
Changelog:
- v0.8, February 2023:
+ Remove line breaks in help text
+ Fix typos
- v0.7, September 2020:
+ Bugfix: In case if verbose=0 an error in the arima command was not caught
which led to a full stop.
+ Set default for parameter "verbose" to 0 (do not print details).
- v0.6, August 2020:
+ Fix bug in print_table_and_row_labels(): wrong models where highlighted
as best ones.
+ Fix bug in get_auto_arima_parameters(): wrong n-th best model was
retrieved.
+ Fix minor bug in final_model_options_string(): verbosity option did not
work right.
+ Catch error when trying to retrieve information criteria in case model did
not converge and verbose == 0.
+ Add name of endogenous and xlist members when calling gui function.
+ Fix typos in help file.
+ Print name of endogenous and number of exogenous in summary printout
+ Unit-tests added and improved.
- v0.52, August 2020:
+ Fix "max_P" parameter for GUI wrapper function
- v0.51, July 2020:
+ Fix bug when executing get_auto_arima_command() function: Names of
endogenous series and exogenous list where not correct in every case.
+ GUI access: Boolean parameter "seasonality" dropped: It is automatically
checked now whether the active data set has seasonal frequency.
+ Minor formatting improvements.
- v0.5, July 2020:
+ initial release
TODO:
=====
- Re-think the defaults for the AR part 1 and 4
- The GUI is quite busy, with all those possible min/max orders. I would
imagine that for a "quick and dirty" job one would always want to specify the
_maximum_ order, but in general the _minimum_ order should be always 0.
Therefore, it may make sense to get rid of most of those boxes, and tell the
user that to do fancy things one should use scripting.