Decomposition of time series with no seasonal component using local regression models

ts.non.seas.decomp(tsdata, tojson=F)

Arguments

tsdata

The input univariate non seasonal time series data

tojson

If TRUE the results are returned in json format, default returns a list

Value

A list with the following components:

  • stl.plot:

    • trend The estimated trend component

    • trend.ci.up The estimated up limit for trend component

    • trend.ci.low The estimated low limit for trend component

    • seasonal The estimated seasonal component

    • remainder The estimated remainder component

    • time The time of the series was sampled

  • stl.general:

    • stl.degree The degree of fit

    • degfr The effective degrees of freedom

    • degfr.fitted The fitted degrees of freedom

  • residuals_fitted:

    • residuals The residuals of the model (fitted innovations)

    • fitted The model's fitted values

    • time the time of tsdata

    • line The y=0 line

  • compare:

    • resid.variance The residuals variance

    • used.obs The used observations for the fitting

    • loglik The maximized log-likelihood (of the differenced data), or the approximation to it used

    • aic The AIC value corresponding to the log-likelihood

    • bic The BIC value corresponding to the log-likelihood

    • gcv The generalized cross-validation statistic

Details

For non-seasonal time series there is no seasonal component. Local regression and likelihood models (locfit package) are used in order to extract the trend and remaider components.

References

add

See also

ts.analysis, locfit, predict.locfit

Examples

ts.non.seas.decomp(Athens_draft_ts)
#> $stl.plot #> $stl.plot$trend #> [1] 698958230 656722462 666934798 720359313 825103478 927286963 955162556 #> [8] 901594076 826636814 777095660 749465109 753417721 #> #> $stl.plot$conf.interval.up #> [1] 799474104 718316873 728193402 787153597 894791906 998843432 #> [7] 1026719025 971282505 893431098 838354265 811059520 853933595 #> #> $stl.plot$conf.interval.low #> [1] 598442356 595128052 605676193 653565029 755415049 855730494 883606087 #> [8] 831905648 759842530 715837055 687870698 652901846 #> #> $stl.plot$seasonal #> NULL #> #> $stl.plot$remainder #> Time Series: #> Start = 2004 #> End = 2015 #> Frequency = 1 #> [1] 21936770 -27785462 -48384798 4470687 33838522 -7778963 #> [7] 22325444 30012924 39880579 -109987660 23957446 6141563 #> #> $stl.plot$time #> Time Series: #> Start = 2004 #> End = 2015 #> Frequency = 1 #> [1] 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 #> #> #> $stl.general #> $stl.general$degfr #> df1 #> 5.417865 #> #> $stl.general$degfr.fitted #> df2 #> 5.101126 #> #> $stl.general$stl.degree #> [1] 2 #> #> #> $residuals_fitted #> $residuals_fitted$residuals #> [1] 21936770 -27785462 -48384798 4470687 33838522 -7778963 #> [7] 22325444 30012924 39880579 -109987660 23957446 6141563 #> #> $residuals_fitted$fitted #> [1] 698958230 656722462 666934798 720359313 825103478 927286963 955162556 #> [8] 901594076 826636814 777095660 749465109 753417721 #> #> $residuals_fitted$time #> Time Series: #> Start = 2004 #> End = 2015 #> Frequency = 1 #> [1] 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 #> #> $residuals_fitted$line #> [1] 0 #> #> #> $compare #> $compare$resid.variance #> [1] 1.865319e+15 #> #> $compare$used.obs #> [1] 2004.00 2015.00 2009.50 2006.75 2012.25 #> #> $compare$loglik #> lk #> -1.025926e+16 #> #> $compare$aic #> aic #> 2.051851e+16 #> #> $compare$bic #> aic #> 2.051851e+16 #> #> $compare$gcv #> gcv #> 5.683207e+15 #> #>