subset.Mcomp | R Documentation |
subset.Mcomp
returns a subset of the time series data from the M
Competitions. Subsets can be for specific periods, or specific types of data
or both.
## S3 method for class 'Mcomp'
subset(x, cond1, cond2, ...)
x |
M-competition data or a subset of M-competition data |
cond1 |
Type or period of the data. Type is a character variable and period could be character or numeric. |
cond2 |
Optional second condition specifying type or period of the
data, depending on |
... |
Other arguments. |
Possible values for cond1
and cond2
denoting period are 1, 4,
12, "yearly", "quarterly", "monthly" and "other".
If cond1
or cond2
equals 111, then the 111 series used in the
extended comparisons in the 1982 M-competition are selected.
Possible values for cond1
and cond2
denoting type are "macro",
"micro", "industry", "finance", "demographic", "allother", "macro1",
"macro2", "micro1", "micro2", "micro3". These correspond to the descriptions
used in the competitions. See the references for details.
Partial matching used for both conditions.
An object of class Mcomp
consisting of the selected series.
Muhammad Akram and Rob Hyndman
Makridakis, S., A. Andersen, R. Carbone, R. Fildes, M. Hibon, R. Lewandowski, J. Newton, E. Parzen, and R. Winkler (1982) The accuracy of extrapolation (time series) methods: results of a forecasting competition. Journal of Forecasting, 1, 111–153.
Makridakis and Hibon (2000) The M3-competition: results, conclusions and implications. International Journal of Forecasting, 16, 451-476.
M1
M3.quarterly <- subset(M3,4)
M1.yearly.industry <- subset(M1,1,"industry")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.