subset.Mcomp {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 cond1 .
If cond1 denotes type then cond2 would
denote period, but if cond1 denotes period then cond2 would denote
type. |
... |
Other arguments. |
Possible values for cond1
and cond2
denoting period are 1, 4, 12, "yearly", "quarterly", "monthly"
and "other".
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.
M3.quarterly <- subset(M3,4) M1.yearly.industry <- subset(M1,1,"industry")