Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/model_based_repr.R

The `repr_lm`

computes seasonal regression coefficients from a linear model.
Additional exogenous variables can be also added.

1 |

`x` |
the numeric vector (time series) |

`freq` |
the frequency of the time series. Can be vector of two frequencies (seasonalities) or just an integer of one frequency. |

`method` |
the linear regression method to use. It can be "lm", "rlm" or "l1". |

`xreg` |
the data.frame with additional exogenous regressors or the single numeric vector |

This model-based representation method extracts regression coefficients from a linear model.
The extraction of seasonal regression coefficients is automatic.
The maximum number of seasonalities is 2 so it is possible to compute representation for double-seasonal time series.
The first set seasonality (frequency) is main, so for example if we have hourly time series (`freq = c(24, 24*7)`

),
the number of extracted daily seasonal coefficients is 24 and the number of
weekly seasonal coefficients is 7, because the length of second seasonality representation is always freq_1 / freq_2.
There is also possibility to add another independent variables (`xreg`

).

You have three possibilities for selection of a linear model method.

"lm" is classical OLS regression.

"rlm" is robust linear model using psi huber function and is implemented in MASS package.

"l1" is L1 quantile regression model (also robust linear regression method) implemented in package quantreg.

the numeric vector of regression coefficients

Peter Laurinec, <[email protected]>

Laurinec P, Lucka M (2016) Comparison of representations of time series for clustering smart meter data. In: Lecture Notes in Engineering and Computer Science: Proceedings of The World Congress on Engineering and Computer Science 2016, pp 458-463

Laurinec P, Loderer M, Vrablecova P, Lucka M, Rozinajova V, Ezzeddine AB (2016) Adaptive time series forecasting of energy consumption using optimized cluster analysis. In: Data Mining Workshops (ICDMW), 2016 IEEE 16th International Conference on, IEEE, pp 398-405

Laurinec P, Lucká M (2018) Clustering-based forecasting method for individual consumers electricity load using time series representations. Open Comput Sci, 8(1):38–50, DOI: 10.1515/comp-2018-0006

1 2 3 4 5 6 |

TSrepr documentation built on Nov. 22, 2018, 5:06 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.