library(RJDemetra)
X-12-ARIMA is a seasonal adjustment program developed and supported by the U.S. Census Bureau. It includes all the capabilities of the X-11 program (see Dagum, E.B. (1980)) which estimates trend and seasonal component using moving averages. X-12-ARIMA offers useful enhancements including: extension of the time series with forecasts and backcasts from ARIMA models prior to seasonal adjustment, adjustment for effects estimated with user-defined regressors, additional seasonal and trend filter options, alternative seasonal-trend-irregular decomposition, additional diagnostics of the quality and stability of the adjustments, extensive time series modelling and model selection capabilities for linear regression models with ARIMA errors. For basic information on the X-12-ARIMA program see X-12-ARIMA Reference Manual (2007). More information on X-12-ARIMA can be found at http://www.census.gov.
X-13ARIMA-SEATS is a seasonal adjustment program developed and supported by the U.S. Census Bureau that contains two seasonal adjustment modules: the enhanced X-11 seasonal adjustment procedure and ARIMA model based seasonal adjustment procedure from the SEATS seasonal adjustment procedure originally developed by Victor Gómez and Agustín Maravall at the Bank of Spain.
For information on the X-3ARIMA-SEATS program see X-13ARIMA-SEATS Reference Manual (2013). More information on X-13ARIMA-SEATS can be found at http://www.census.gov. https://www.census.gov/srd/www/winx13
TRAMO/SEATS is a model-based seasonal adjustment method developed by Victor Gomez and Agustin Maravall (the Bank of Spain). It consists of two linked programs: TRAMO and SEATS. TRAMO (“Time Series Regression with ARIMA Noise, Missing Observations, and Outliers”) performs estimation, forecasting, and interpolation of regression models with missing observations and ARIMA errors, in the presence of possibly several types of outliers.
SEATS (“Signal Extraction in ARIMA Time Series”) performs an ARIMA-based decomposition of an observed time series into unobserved components. Both programs are supported by the Bank of Spain.
For basic information on the TRAMO/SEATS see CAPORELLO, G., and MARAVALL, A. (2004). More information on TRAMO/SEATS can be found at www.bde.es.
RegARIMA model, pre-adjustment in X13 and TRAMO-SEATS
The regarima/regarima_x13/regarima_tramoseats functions decompose the input time series in a linear deterministic component and in a stochastic component.
The deterministic part of the series can contain outliers, calendar effects and regression effects.
The stochastic part is defined by a seasonal multiplicative ARIMA model·
When seasonally adjusting with X13 and TRAMO-SEATS, the first step consists in pre-adjusting the original series with a RegARIMA model, where the original series is corrected for any deterministic effects and missing observations.
This step is also referred to as the linearization of the original series.
The RegARIMA model (model with ARIMA errors) is specified as such: \(z_t = y_tβ + x_t\)
myseries <- ipi_c_eu[, "FR"]
myspec1 <- regarima_spec_tramoseats(spec = "TRfull")
myreg1 <- regarima(myseries, spec = myspec1)
layout(matrix(1:2,2,1))
plot(myreg1)
# To modify a pre-specified model specification
myspec2 <- regarima_spec_tramoseats(spec = "TRfull",
tradingdays.mauto = "Unused",
tradingdays.option = "WorkingDays",
easter.type = "Standard",
automdl.enabled = FALSE, arima.mu = TRUE)
myreg2 <- regarima(myseries, spec = myspec2)
# To modify the model specification of a "regarima" object
myspec3 <- regarima_spec_tramoseats(myreg1,
tradingdays.mauto = "Unused",
tradingdays.option = "WorkingDays",
easter.type = "Standard",
automdl.enabled = FALSE,
arima.mu = TRUE)
myreg3 <- regarima(myseries, myspec3)
# To modify the model specification of a "regarima_spec" object
myspec4 <- regarima_spec_tramoseats(myspec1,
tradingdays.mauto = "Unused",
tradingdays.option = "WorkingDays",
easter.type = "Standard",
automdl.enabled = FALSE, arima.mu = TRUE)
myreg4 <- regarima(myseries, myspec4)
# Pre-specified outliers
myspec1 <- regarima_spec_tramoseats(spec = "TRfull",
usrdef.outliersEnabled = TRUE,
usrdef.outliersType = c("LS", "LS"),
usrdef.outliersDate = c("2008-10-01" ,"2003-01-01"),
usrdef.outliersCoef = c(10, -8), transform.function = "None")
s_preOut(myspec1)
myreg1 <- regarima(myseries, myspec1)
myreg1
## y = regression model + arima (2, 1, 0, 1, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.4872 0.051
## Phi(2) 0.2964 0.051
## BPhi(1) -0.2070 0.071
## BTheta(1) -0.8048 0.044
##
## Estimate Std. Error
## Week days 0.6814 0.039
## Leap year 1.9125 0.726
## Easter [6] -2.4901 0.461
## TC (4-2020) -22.4492 2.288
## TC (3-2020) -21.2013 2.296
## AO (5-2011) 12.6414 1.908
## LS (11-2008) -14.2909 1.954
##
## Fixed outliers:
## Coefficients
## LS (10-2008) 10
## LS (1-2003) -8
##
##
## Residual standard error: 2.421 on 347 degrees of freedom
## Log likelihood = -831.3, aic = 1687 aicc = 1688, bic(corrected for length) = 1.949
s_preOut(myreg1)
# User-defined variables
var1 <- ts(rnorm(length(myseries))*10, start = start(myseries),frequency = 12)
var2 <- ts(rnorm(length(myseries))*100, start = start(myseries),frequency = 12)
var <- ts.union(var1, var2)
myspec1 <- regarima_spec_tramoseats(spec = "TRfull",
usrdef.varEnabled = TRUE,
usrdef.var = var)
s_preVar(myspec1)
## $series
## var1 var2
## Jan 1990 16.38492292 167.94350673
## Feb 1990 -3.20301667 164.18586576
## Mar 1990 -0.99940799 68.16033169
## Apr 1990 13.13429575 133.60062553
## May 1990 -5.92383395 90.34007014
## Jun 1990 -6.87066265 -138.40761325
## Jul 1990 -5.55115920 -31.52421526
## Aug 1990 9.01278759 -93.90060924
## Sep 1990 -2.15358678 53.05553370
## Oct 1990 11.26230583 -49.26827187
## Nov 1990 4.26942485 -162.77216032
## Dec 1990 -6.01171770 -20.38310342
## Jan 1991 -4.16121688 19.56135338
## Feb 1991 7.85257518 -59.81028307
## Mar 1991 3.58743423 28.71178840
## Apr 1991 -0.13210587 -8.52875028
## May 1991 2.72555235 -79.34068953
## Jun 1991 12.65511131 89.47294368
## Jul 1991 6.72828392 -35.51020571
## Aug 1991 -4.68212521 69.36984879
## Sep 1991 -4.75354959 -264.71615460
## Oct 1991 2.89208330 -286.76658043
## Nov 1991 -10.08517278 5.19860742
## Dec 1991 -4.05272098 18.04882751
## Jan 1992 -1.80971492 -25.51701650
## Feb 1992 22.80403863 217.20614182
## Mar 1992 -5.37264595 -29.59698206
## Apr 1992 4.44502921 101.17043028
## May 1992 -4.69884337 -28.06924873
## Jun 1992 -13.25524457 -121.42143336
## Jul 1992 -16.02512027 -54.31380524
## Aug 1992 0.41124257 -209.70594603
## Sep 1992 7.46526711 135.03700389
## Oct 1992 23.33056492 -69.26006311
## Nov 1992 0.11416412 -95.00553002
## Dec 1992 -6.98448997 -25.34213706
## Jan 1993 13.22414693 -57.46474867
## Feb 1993 16.61127888 -12.23834712
## Mar 1993 -17.92372538 74.42882743
## Apr 1993 11.72440543 -109.44554831
## May 1993 15.05319226 -45.37213729
## Jun 1993 -4.39639799 243.64490328
## Jul 1993 22.30921469 -122.61672637
## Aug 1993 -7.41987687 280.68857151
## Sep 1993 4.31407888 28.47413604
## Oct 1993 0.23138705 11.32911292
## Nov 1993 -0.20880546 77.48667520
## Dec 1993 4.87965447 -31.31851258
## Jan 1994 6.64225542 -8.97063980
## Feb 1994 2.42570225 -44.25266094
## Mar 1994 13.26797208 -17.34122217
## Apr 1994 -6.88566575 -137.20905329
## May 1994 -9.13008027 201.48955440
## Jun 1994 11.81577576 42.01452253
## Jul 1994 -3.29311745 -75.09091637
## Aug 1994 4.09389342 53.38185991
## Sep 1994 -2.42130632 -51.06907026
## Oct 1994 -0.38121979 -129.91187012
## Nov 1994 6.33857689 -79.29621441
## Dec 1994 16.52271893 -75.11892307
## Jan 1995 6.42283042 -56.91568119
## Feb 1995 4.00615962 -138.45348117
## Mar 1995 22.93325369 -13.26495682
## Apr 1995 5.64318399 54.88528510
## May 1995 -3.18187547 -40.04395713
## Jun 1995 -3.97376179 -60.10343495
## Jul 1995 -16.62896277 -179.40171947
## Aug 1995 7.69573244 -110.75919661
## Sep 1995 14.40815045 17.60841752
## Oct 1995 -7.61843401 -271.78837266
## Nov 1995 -3.10100290 -50.54661525
## Dec 1995 -6.85773985 -28.51461167
## Jan 1996 -3.82170393 -4.94147205
## Feb 1996 -12.31869971 42.35833862
## Mar 1996 15.16218503 -95.33793066
## Apr 1996 -0.46314583 37.27677875
## May 1996 4.51579824 39.00611550
## Jun 1996 12.78559105 -211.73323051
## Jul 1996 -3.40675956 -50.86359709
## Aug 1996 -6.75366729 -13.51872094
## Sep 1996 2.79233825 11.43623834
## Oct 1996 14.20171427 7.55904627
## Nov 1996 4.06932409 -137.87513104
## Dec 1996 -6.89148477 70.89235549
## Jan 1997 5.13443829 -88.00701490
## Feb 1997 -13.82335658 70.90406099
## Mar 1997 8.23547443 164.88760549
## Apr 1997 -15.82489860 -91.97962373
## May 1997 -5.98327749 -136.81057787
## Jun 1997 2.36498436 -25.40461740
## Jul 1997 3.94092963 -69.42821587
## Aug 1997 -5.71673075 21.67348123
## Sep 1997 4.14338161 -59.44048916
## Oct 1997 -2.08229943 70.95193200
## Nov 1997 0.24914460 -91.92475345
## Dec 1997 -18.58964684 -130.67952098
## Jan 1998 -15.67462080 -22.12278542
## Feb 1998 3.06115598 19.59772066
## Mar 1998 0.02564113 -59.64568942
## Apr 1998 10.33473809 -16.81882612
## May 1998 -5.18396309 96.10452269
## Jun 1998 -4.42549443 -241.59753081
## Jul 1998 2.12013915 -46.12072700
## Aug 1998 0.51487091 -34.40996066
## Sep 1998 12.18123515 -19.25152611
## Oct 1998 -7.92627114 88.41979483
## Nov 1998 2.11797793 114.52613256
## Dec 1998 -9.40709251 -42.51651945
## Jan 1999 15.22593542 144.38354530
## Feb 1999 -7.21105691 78.01775433
## Mar 1999 -2.88914737 104.22602054
## Apr 1999 17.17858746 -221.18413199
## May 1999 11.52286818 3.80380041
## Jun 1999 -4.91092907 32.26338600
## Jul 1999 9.33868993 24.50839279
## Aug 1999 4.65588136 -54.68288066
## Sep 1999 12.83418385 -59.24808244
## Oct 1999 0.34553874 156.42439200
## Nov 1999 -1.76820507 -76.35765127
## Dec 1999 -4.51127363 -41.92192552
## Jan 2000 -16.80921771 -64.31902556
## Feb 2000 -7.55660246 -72.85386634
## Mar 2000 8.54545945 175.93800622
## Apr 2000 -3.76686723 -88.92850333
## May 2000 -3.92641217 12.31043194
## Jun 2000 -4.81792134 151.39401059
## Jul 2000 8.74590968 187.11757492
## Aug 2000 5.57416543 71.15529004
## Sep 2000 9.73360068 93.00669851
## Oct 2000 -18.37271977 192.63969872
## Nov 2000 -8.65109091 11.65460267
## Dec 2000 10.12988282 -96.04836809
## Jan 2001 -2.58261261 -105.48130843
## Feb 2001 -3.49696032 -61.68311501
## Mar 2001 -1.61395685 142.36776772
## Apr 2001 14.03106334 63.93416476
## May 2001 -9.62587413 -44.84153678
## Jun 2001 8.00705399 50.82555780
## Jul 2001 -9.35089160 168.92113342
## Aug 2001 0.13597512 -73.37546954
## Sep 2001 -4.25852056 -134.52339602
## Oct 2001 2.84463678 65.72611825
## Nov 2001 -11.61245965 -65.08534001
## Dec 2001 1.89489114 -82.44863678
## Jan 2002 -17.37333118 -31.20571053
## Feb 2002 0.99899248 1.93758459
## Mar 2002 0.09079389 27.81255428
## Apr 2002 -5.21111220 4.61518393
## May 2002 -12.90979615 73.31196445
## Jun 2002 0.26445386 -19.83392243
## Jul 2002 6.40969504 83.83262874
## Aug 2002 -14.35507591 101.89875839
## Sep 2002 -15.68600210 -57.86805886
## Oct 2002 -1.58284703 79.42373380
## Nov 2002 -2.59408719 129.05761942
## Dec 2002 -4.70120731 123.50483842
## Jan 2003 -8.53765768 -99.87649724
## Feb 2003 -6.23427231 28.73689998
## Mar 2003 3.35438307 39.58207171
## Apr 2003 -6.35035544 183.60272724
## May 2003 2.11488999 -179.15473426
## Jun 2003 1.53320004 -260.26753362
## Jul 2003 -4.62809458 104.35685228
## Aug 2003 -5.41921677 -141.07463039
## Sep 2003 -5.14279131 -19.14401371
## Oct 2003 -2.39862671 -123.05422334
## Nov 2003 -5.61601307 -22.07488692
## Dec 2003 5.43661475 -90.02158158
## Jan 2004 2.35749222 -143.06394048
## Feb 2004 -0.32781534 27.64701313
## Mar 2004 6.48881588 -74.76285281
## Apr 2004 -7.45063981 -65.43655673
## May 2004 -0.94426316 -13.27207796
## Jun 2004 -1.31419276 -209.55272696
## Jul 2004 -11.97761359 -132.81406540
## Aug 2004 -13.38495509 -246.15781188
## Sep 2004 1.43166143 -23.21718736
## Oct 2004 8.29382342 -0.03089156
## Nov 2004 5.85627083 -35.13743146
## Dec 2004 -4.53096786 62.60648277
## Jan 2005 -8.30071437 -63.23654194
## Feb 2005 -14.64584416 -47.36453930
## Mar 2005 11.31529760 -31.20161040
## Apr 2005 -6.01137583 -114.65942226
## May 2005 -14.73666107 3.59456198
## Jun 2005 11.93852216 -143.90266587
## Jul 2005 -0.18781359 4.50858286
## Aug 2005 7.60277641 160.38023781
## Sep 2005 -3.76443075 48.70556669
## Oct 2005 -18.80584186 67.61291307
## Nov 2005 1.28166204 147.63537901
## Dec 2005 -0.96664588 -74.50272839
## Jan 2006 13.75586115 120.07566757
## Feb 2006 -12.73468033 -211.66908724
## Mar 2006 -1.83984432 -76.98865919
## Apr 2006 -6.77036701 -120.91397332
## May 2006 12.67304303 -74.79980676
## Jun 2006 10.05894665 69.27257867
## Jul 2006 9.35477863 -65.30025400
## Aug 2006 -0.50980966 -7.14365205
## Sep 2006 -9.42228492 -122.93297030
## Oct 2006 -10.95951510 7.83563745
## Nov 2006 -0.38204801 97.03307558
## Dec 2006 -7.38743339 21.56007127
## Jan 2007 -6.86846049 -52.39579012
## Feb 2007 -21.70303845 -26.11232417
## Mar 2007 21.99404557 -123.72596638
## Apr 2007 -15.28247209 185.52017447
## May 2007 10.38301143 -64.63090966
## Jun 2007 -0.72637451 -40.97244154
## Jul 2007 -16.97995171 97.00418912
## Aug 2007 24.47098839 88.24886834
## Sep 2007 -7.88780632 -43.53906134
## Oct 2007 -16.02483515 26.61605193
## Nov 2007 4.22549743 -69.36484906
## Dec 2007 7.83445485 15.43923318
## Jan 2008 -4.23914386 -42.54378479
## Feb 2008 -12.00486183 45.89920645
## Mar 2008 11.30991816 -59.23000534
## Apr 2008 15.53753599 -110.95814406
## May 2008 -4.56595386 6.96087787
## Jun 2008 1.56937863 104.30746712
## Jul 2008 -8.24487472 115.65982067
## Aug 2008 32.16520089 -183.95742327
## Sep 2008 4.09185032 -16.88187093
## Oct 2008 -2.53349055 182.47304571
## Nov 2008 13.16347383 -26.14281870
## Dec 2008 -7.25010481 -152.06447107
## Jan 2009 15.06251027 131.21889203
## Feb 2009 -9.37472580 91.84172228
## Mar 2009 -4.11668592 45.36349780
## Apr 2009 6.27991871 -101.48220383
## May 2009 20.61583106 75.30824544
## Jun 2009 -7.49651661 111.56486795
## Jul 2009 1.79937650 8.47085554
## Aug 2009 16.16215620 -31.92595907
## Sep 2009 7.82535487 11.82943110
## Oct 2009 -4.18739428 201.92394698
## Nov 2009 -2.95268209 114.72429562
## Dec 2009 29.78782717 106.97176011
## Jan 2010 -7.26117209 -85.37366723
## Feb 2010 -1.11550958 71.25335798
## Mar 2010 -18.93446186 4.37379613
## Apr 2010 -10.90039054 79.29427656
## May 2010 -6.34395000 31.62636392
## Jun 2010 12.54823464 -74.15473027
## Jul 2010 -0.82875744 79.67043103
## Aug 2010 -0.04172684 -95.22084946
## Sep 2010 -5.91086593 -40.65786548
## Oct 2010 12.90745837 -22.89351701
## Nov 2010 16.80768807 115.38846060
## Dec 2010 -8.16681403 63.80341101
## Jan 2011 -10.40728296 23.29041351
## Feb 2011 4.55056114 161.51499652
## Mar 2011 -13.48489729 51.05983332
## Apr 2011 -8.45037743 -54.73278401
## May 2011 -10.63195110 -25.58572034
## Jun 2011 -2.80049194 162.65896075
## Jul 2011 -3.85642815 -9.20213512
## Aug 2011 -14.80270245 67.53555310
## Sep 2011 -10.50433865 -121.86157671
## Oct 2011 -15.17610839 -4.80211030
## Nov 2011 -11.33704659 -56.63230378
## Dec 2011 -1.35349773 12.05675875
## Jan 2012 -0.35760145 -25.05322146
## Feb 2012 13.75166720 18.82173087
## Mar 2012 13.14976644 -66.08161665
## Apr 2012 -1.26979316 115.50633179
## May 2012 -9.90748214 89.22271202
## Jun 2012 6.86048771 -98.79304838
## Jul 2012 -27.80063935 -30.44797212
## Aug 2012 -5.17126381 58.04630322
## Sep 2012 -8.50443186 -20.65905261
## Oct 2012 0.03957087 80.86215152
## Nov 2012 4.34876394 -117.05432199
## Dec 2012 -11.98276358 -51.82224341
## Jan 2013 19.98580173 -96.12149628
## Feb 2013 0.05521286 0.35265337
## Mar 2013 14.19346019 -57.15686057
## Apr 2013 -7.35701455 19.33268552
## May 2013 -8.29847089 -12.53339920
## Jun 2013 -2.30937161 90.06466692
## Jul 2013 -11.33129346 27.26056561
## Aug 2013 -1.58028544 98.95133052
## Sep 2013 12.01060285 -218.46936703
## Oct 2013 5.44992686 87.08148702
## Nov 2013 -11.00115168 40.44659461
## Dec 2013 7.49676782 -88.86359984
## Jan 2014 -19.57271106 24.77992963
## Feb 2014 -15.93034863 -89.55211029
## Mar 2014 1.99577622 -48.67089122
## Apr 2014 -2.12912656 -25.19884024
## May 2014 2.99912260 -23.57440587
## Jun 2014 -3.46255145 68.80053971
## Jul 2014 -6.16677782 59.71274904
## Aug 2014 -18.25959938 98.36909478
## Sep 2014 -6.04661662 1.82281637
## Oct 2014 -8.96354274 -107.77298661
## Nov 2014 -1.89800079 45.74121698
## Dec 2014 12.76305243 5.97422475
## Jan 2015 -4.34005640 -28.81172228
## Feb 2015 25.84993173 -160.08358779
## Mar 2015 -15.00832050 -55.90969028
## Apr 2015 -4.70820467 115.75321070
## May 2015 -3.20376110 238.19735352
## Jun 2015 6.05290898 179.30834063
## Jul 2015 -10.56598139 20.87063235
## Aug 2015 -15.71428363 110.11343619
## Sep 2015 -1.25305825 1.16090999
## Oct 2015 7.72038382 86.25776364
## Nov 2015 -3.76002411 -91.64539404
## Dec 2015 -5.03047478 -8.66392645
## Jan 2016 -16.29807726 100.57895618
## Feb 2016 -12.53498116 -190.16722777
## Mar 2016 -4.83611492 51.14354411
## Apr 2016 8.58512344 -116.60953670
## May 2016 -12.37386661 143.86007760
## Jun 2016 8.39088520 34.26977523
## Jul 2016 -3.78678863 160.77136379
## Aug 2016 0.18036925 103.95117222
## Sep 2016 -9.48250201 -93.19840477
## Oct 2016 -9.56090297 -44.83806716
## Nov 2016 -0.05678122 -136.70760280
## Dec 2016 2.36061588 -150.92549832
## Jan 2017 1.96599298 -40.34826042
## Feb 2017 11.14178740 -34.02603340
## Mar 2017 16.14819918 -93.00038080
## Apr 2017 -2.31871002 7.34682201
## May 2017 15.49074630 -57.00961254
## Jun 2017 2.76487174 -69.20509552
## Jul 2017 11.22487671 207.13657705
## Aug 2017 5.53512025 -273.04557030
## Sep 2017 -4.28548319 -209.31470839
## Oct 2017 21.60882983 34.28315473
## Nov 2017 -13.87524279 -128.77709254
## Dec 2017 -3.57188360 -179.52660321
## Jan 2018 -2.75964229 116.38832779
## Feb 2018 -3.35816812 25.59683959
## Mar 2018 -12.70009837 -14.87188082
## Apr 2018 -7.26413243 -125.75146715
## May 2018 -6.45138059 -74.76562610
## Jun 2018 9.49805793 -36.72825709
## Jul 2018 3.13555298 170.16459237
## Aug 2018 -15.63034876 -50.04710699
## Sep 2018 5.76662427 96.78658410
## Oct 2018 -3.07806350 -18.58997580
## Nov 2018 -11.80931117 -153.55541113
## Dec 2018 17.91806341 73.55741092
## Jan 2019 -7.45828652 88.56367157
## Feb 2019 17.45923172 -30.00122936
## Mar 2019 -13.37947150 102.83424129
## Apr 2019 -0.89656199 140.23776101
## May 2019 -8.28797080 -37.07106573
## Jun 2019 -5.28905511 35.22273169
## Jul 2019 9.26210216 -55.17148365
## Aug 2019 2.40388366 -141.18472031
## Sep 2019 8.71468821 -89.53415403
## Oct 2019 2.50075400 -7.43265183
## Nov 2019 0.21080227 -40.05676304
## Dec 2019 -5.24462662 -120.22664859
## Jan 2020 -4.28220631 -106.66678285
## Feb 2020 16.17190173 -34.44109235
## Mar 2020 -10.56763878 -76.13753313
## Apr 2020 15.94003860 -55.10334658
## May 2020 -0.86418714 159.35889464
## Jun 2020 -0.36932039 35.62022270
## Jul 2020 6.47746523 195.23045372
## Aug 2020 11.97075968 99.81130888
## Sep 2020 0.72212259 -1.28290495
## Oct 2020 -9.64717757 17.09856669
## Nov 2020 -23.45500036 -154.79408650
## Dec 2020 14.90259938 25.73290499
##
## $description
## type coeff
## var1 Undefined NA
## var2 Undefined NA
myreg1 <- regarima(myseries,myspec1)
myspec2 <- regarima_spec_tramoseats(spec = "TRfull",
usrdef.varEnabled = TRUE,
usrdef.var = var,
usrdef.varCoef = c(17,-1),
transform.function = "None")
myreg2 <- regarima(myseries, myspec2)
# Pre-specified ARMA coefficients
myspec1 <- regarima_spec_tramoseats(spec = "TRfull",
arima.coefEnabled = TRUE, automdl.enabled = FALSE,
arima.p = 2, arima.q = 0, arima.bp = 1, arima.bq = 1,
arima.coef = c(-0.12, -0.12, -0.3, -0.99),
arima.coefType = rep("Fixed", 4))
myreg1 <- regarima(myseries, myspec1)
myreg1
## y = regression model + arima (2, 1, 0, 1, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) -0.12 0
## Phi(2) -0.12 0
## BPhi(1) -0.30 0
## BTheta(1) -0.99 0
##
## Estimate Std. Error
## Mean -0.007018 0.029
## Week days 0.704716 0.029
## Leap year 2.163501 0.675
## Easter [6] -2.360603 0.385
## TC (4-2020) -25.280857 2.517
## TC (3-2020) -21.581618 2.569
## AO (5-2011) 14.219490 1.749
## LS (11-2008) -6.225300 2.608
##
##
## Residual standard error: 2.712 on 350 degrees of freedom
## Log likelihood = -882.9, aic = 1784 aicc = 1784, bic(corrected for length) = 2.127
summary(myreg1)
## y = regression model + arima (2, 1, 0, 1, 1, 1)
##
## Model: RegARIMA - TRAMO/SEATS
## Estimation span: from 1-1990 to 12-2020
## Log-transformation: no
## Regression model: mean, trading days effect(2), leap year effect, Easter effect, outliers(4)
##
## Coefficients:
## ARIMA:
## Estimate Std. Error T-stat Pr(>|t|)
## Phi(1) -0.12 0.00 NA NA
## Phi(2) -0.12 0.00 NA NA
## BPhi(1) -0.30 0.00 NA NA
## BTheta(1) -0.99 0.00 NA NA
##
## Regression model:
## Estimate Std. Error T-stat Pr(>|t|)
## Mean -0.007018 0.028698 -0.245 0.80694
## Week days 0.704716 0.029477 23.907 < 2e-16 ***
## Leap year 2.163501 0.675295 3.204 0.00148 **
## Easter [6] -2.360603 0.384746 -6.135 2.24e-09 ***
## TC (4-2020) -25.280857 2.517080 -10.044 < 2e-16 ***
## TC (3-2020) -21.581618 2.569059 -8.401 8.88e-16 ***
## AO (5-2011) 14.219490 1.748501 8.132 6.88e-15 ***
## LS (11-2008) -6.225300 2.608253 -2.387 0.01751 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 2.712 on 350 degrees of freedom
## Log likelihood = -882.9, aic = 1784, aicc = 1784, bic(corrected for length) = 2.127
s_arimaCoef(myspec1)
s_arimaCoef(myreg1)
RegARIMA model specification, pre-adjustment in TRAMO-SEATS
Function to create (and/or modify) a c(“regarima_spec”,“TRAMO_SEATS”) class object with the RegARIMA model specification for the TRAMO-SEATS method.
| Identifier | Log/level detection | Outliers detection | Calendar effects | ARIMA |
|---|---|---|---|---|
| TR0 | NA | NA | NA | Airline(+mean) |
| TR1 | automatic | AO/LS/TC | NA | Airline(+mean) |
| TR2 | automatic | AO/LS/TC | 2 td vars + Easter | Airline(+mean) |
| TR3 | automatic | AO/LS/TC | NA | automatic |
| TR4 | automatic | AO/LS/TC | 2 td vars + Easter | automatic |
| TR5 | automatic | AO/LS/TC | 7 td vars + Easter | automatic |
| TRfull | automatic | AO/LS/TC | automatic | automatic |
# X13 method
myseries <- ipi_c_eu[, "FR"]
myreg <- regarima_x13(myseries, spec ="RG5c")
summary(myreg)
## y = regression model + arima (2, 1, 1, 0, 1, 1)
##
## Model: RegARIMA - X13
## Estimation span: from 1-1990 to 12-2020
## Log-transformation: no
## Regression model: no mean, trading days effect(7), leap year effect, Easter effect, outliers(4)
##
## Coefficients:
## ARIMA:
## Estimate Std. Error T-stat Pr(>|t|)
## Phi(1) 0.0003269 0.1077296 0.003 0.9976
## Phi(2) 0.1688192 0.0740996 2.278 0.0233 *
## Theta(1) -0.5485606 0.1016550 -5.396 1.24e-07 ***
## BTheta(1) -0.6660849 0.0422242 -15.775 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Regression model:
## Estimate Std. Error T-stat Pr(>|t|)
## Monday 0.55932 0.22801 2.453 0.014638 *
## Tuesday 0.88221 0.22832 3.864 0.000132 ***
## Wednesday 1.03996 0.22930 4.535 7.85e-06 ***
## Thursday 0.04943 0.22944 0.215 0.829549
## Friday 0.91132 0.22988 3.964 8.88e-05 ***
## Saturday -1.57769 0.22775 -6.927 1.99e-11 ***
## Leap year 2.15403 0.70527 3.054 0.002425 **
## Easter [1] -2.37950 0.45391 -5.242 2.71e-07 ***
## TC (4-2020) -35.59245 2.17330 -16.377 < 2e-16 ***
## AO (3-2020) -20.89026 2.18013 -9.582 < 2e-16 ***
## AO (5-2011) 13.49850 1.85694 7.269 2.28e-12 ***
## LS (11-2008) -12.54901 1.63554 -7.673 1.60e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 2.218 on 342 degrees of freedom
## Log likelihood = -799.1, aic = 1632, aicc = 1634, bic(corrected for length) = 1.855
plot(myreg)
myspec1 <- regarima_spec_x13(myreg, tradingdays.option = "WorkingDays")
myreg1 <- regarima(myseries, myspec1)
myspec2 <- regarima_spec_x13(myreg,
usrdef.outliersEnabled = TRUE,
usrdef.outliersType = c("LS", "AO"),
usrdef.outliersDate = c("2008-10-01", "2002-01-01"),
usrdef.outliersCoef = c(36, 14),
transform.function = "None")
myreg2 <- regarima(myseries, myspec2)
myreg2
## y = regression model + arima (2, 1, 1, 0, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.07859 0.114
## Phi(2) 0.19792 0.076
## Theta(1) -0.48272 0.111
## BTheta(1) -0.65916 0.043
##
## Estimate Std. Error
## Monday 0.64094 0.228
## Tuesday 0.81794 0.229
## Wednesday 1.05374 0.229
## Thursday 0.06981 0.228
## Friday 0.93434 0.228
## Saturday -1.63686 0.226
## Leap year 2.11550 0.697
## Easter [1] -2.38135 0.451
## AO (9-2008) 31.95554 2.924
## LS (9-2008) -57.04093 2.657
## TC (4-2020) -35.62104 2.120
## AO (3-2020) -21.00931 2.145
## AO (5-2011) 13.21877 1.832
## TC (9-2008) 23.44654 4.001
## TC (12-2001) -20.47521 2.922
## AO (12-2001) 17.13461 2.962
## TC (2-2002) 10.61731 1.937
##
## Fixed outliers:
## Coefficients
## LS (10-2008) 36
## AO (1-2002) 14
##
##
## Residual standard error: 2.178 on 337 degrees of freedom
## Log likelihood = -792.6, aic = 1629 aicc = 1632, bic(corrected for length) = 1.901
myspec3 <- regarima_spec_x13(myreg, automdl.enabled = FALSE,
arima.p = 1, arima.q = 1,
arima.bp = 0, arima.bq = 1,
arima.coefEnabled = TRUE,
arima.coef = c(-0.8, -0.6, 0),
arima.coefType = c(rep("Fixed", 2), "Undefined"))
s_arimaCoef(myspec3)
myreg3 <- regarima(myseries, myspec3)
summary(myreg3)
## y = regression model + arima (1, 1, 1, 0, 1, 1)
##
## Model: RegARIMA - X13
## Estimation span: from 1-1990 to 12-2020
## Log-transformation: yes
## Regression model: no mean, trading days effect(6), no leap year effect, Easter effect, outliers(3)
##
## Coefficients:
## ARIMA:
## Estimate Std. Error T-stat Pr(>|t|)
## Phi(1) -0.8000 0.0000 NA NA
## Theta(1) -0.6000 0.0000 NA NA
## BTheta(1) -0.6977 0.0399 -17.49 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Regression model:
## Estimate Std. Error T-stat Pr(>|t|)
## Monday 0.006317 0.001791 3.526 0.000476 ***
## Tuesday 0.007824 0.001793 4.363 1.68e-05 ***
## Wednesday 0.010528 0.001802 5.841 1.16e-08 ***
## Thursday 0.001857 0.001811 1.025 0.306022
## Friday 0.010099 0.001812 5.574 4.90e-08 ***
## Saturday -0.018439 0.001781 -10.354 < 2e-16 ***
## Easter [1] -0.020593 0.003515 -5.859 1.06e-08 ***
## TC (4-2020) -0.475720 0.031229 -15.233 < 2e-16 ***
## AO (3-2020) -0.213355 0.023246 -9.178 < 2e-16 ***
## AO (5-2011) 0.143705 0.015529 9.254 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Residual standard error: 0.0256 on 347 degrees of freedom
## Log likelihood = 802.3, aic = 1733, aicc = 1734, bic(corrected for length) = -7.15
plot(myreg3)
# TRAMO-SEATS method
myspec <- regarima_spec_tramoseats("TRfull")
myreg <- regarima(myseries, myspec)
myreg
## y = regression model + arima (2, 1, 0, 0, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.4032 0.051
## Phi(2) 0.2883 0.051
## BTheta(1) -0.6641 0.042
##
## Estimate Std. Error
## Week days 0.6994 0.032
## Leap year 2.3231 0.690
## Easter [6] -2.5154 0.436
## AO (5-2011) 13.4679 1.787
## TC (4-2020) -22.2128 2.205
## TC (3-2020) -21.0391 2.217
## AO (5-2000) 6.7386 1.794
##
##
## Residual standard error: 2.326 on 348 degrees of freedom
## Log likelihood = -816.1, aic = 1654 aicc = 1655, bic(corrected for length) = 1.852
myspec2 <- regarima_spec_tramoseats(myspec,
tradingdays.mauto = "Unused",
tradingdays.option = "WorkingDays",
easter.type = "Standard",
automdl.enabled = FALSE, arima.mu = TRUE)
myreg2 <- regarima(myseries, myspec2)
var1 <- ts(rnorm(length(myseries))*10, start = start(myseries), frequency = 12)
var2 <- ts(rnorm(length(myseries))*100, start = start(myseries), frequency = 12)
var <- ts.union(var1, var2)
myspec3 <- regarima_spec_tramoseats(myspec,
usrdef.varEnabled = TRUE,
usrdef.var = var)
s_preVar(myspec3)
## $series
## var1 var2
## Jan 1990 -4.40401719 199.6101877
## Feb 1990 1.89091774 49.8916842
## Mar 1990 8.14085757 -15.5064781
## Apr 1990 -24.86976208 -56.4608460
## May 1990 5.70360269 -44.5788749
## Jun 1990 17.18738621 -2.0157288
## Jul 1990 -19.34324591 -117.5352599
## Aug 1990 14.31820305 87.3528873
## Sep 1990 -11.40214617 -23.4101144
## Oct 1990 -4.23628235 108.2749540
## Nov 1990 -8.46767803 -61.7862240
## Dec 1990 -11.88203333 -281.2603830
## Jan 1991 -11.68303497 3.1239895
## Feb 1991 -18.21499748 57.9946436
## Mar 1991 2.99785213 71.8058958
## Apr 1991 18.26701322 -209.9932040
## May 1991 1.65118362 131.0122953
## Jun 1991 5.63322407 -153.9564377
## Jul 1991 -5.23676101 -48.2660474
## Aug 1991 -7.31563034 43.5381927
## Sep 1991 22.98892443 -61.7903629
## Oct 1991 -3.58440075 35.5027311
## Nov 1991 4.91701099 -85.6213626
## Dec 1991 -9.49536754 -8.3038460
## Jan 1992 2.06863364 -43.8236225
## Feb 1992 -1.11243995 63.9551139
## Mar 1992 -12.79407733 -75.6585074
## Apr 1992 -5.34643607 -2.8862919
## May 1992 -12.72361095 9.1470433
## Jun 1992 9.15293561 -29.5699995
## Jul 1992 7.23165632 -57.0556836
## Aug 1992 -9.09629251 -100.6500356
## Sep 1992 -2.76464223 -49.4819003
## Oct 1992 -3.61356741 10.2712951
## Nov 1992 -1.88895946 -76.4452006
## Dec 1992 -22.93380253 58.9476101
## Jan 1993 5.75380939 -48.8900270
## Feb 1993 21.22260222 264.7417423
## Mar 1993 -0.23207487 -25.6799328
## Apr 1993 20.20476024 -13.5288442
## May 1993 13.82150176 99.5066800
## Jun 1993 -3.89882491 124.3436261
## Jul 1993 9.91761198 34.3160083
## Aug 1993 -0.61746246 -52.5160979
## Sep 1993 1.52919712 133.4981536
## Oct 1993 5.15745834 88.1222497
## Nov 1993 1.06406045 129.3276099
## Dec 1993 7.57545872 6.5210905
## Jan 1994 -6.41309066 -145.0259364
## Feb 1994 10.77608447 17.7969383
## Mar 1994 -2.93809463 -182.4449322
## Apr 1994 -1.69735855 -55.5647748
## May 1994 -16.92064604 72.3296907
## Jun 1994 -4.20867029 -89.6400009
## Jul 1994 4.62659691 223.0223703
## Aug 1994 -13.31142247 -159.7187297
## Sep 1994 8.91709763 105.3317470
## Oct 1994 2.52503735 15.6610545
## Nov 1994 -5.28606716 -22.7685947
## Dec 1994 -8.40031342 47.4206254
## Jan 1995 23.69090311 -160.4976813
## Feb 1995 -12.03433435 170.1094173
## Mar 1995 -5.23194528 49.3517904
## Apr 1995 -0.84763807 117.8895108
## May 1995 11.75867819 -245.1035045
## Jun 1995 -16.96107232 95.4737758
## Jul 1995 -11.06736917 -119.4405714
## Aug 1995 -11.05796616 87.7130118
## Sep 1995 8.07558442 -113.4636428
## Oct 1995 -3.38413126 87.8343659
## Nov 1995 -3.20600632 59.5661444
## Dec 1995 0.67420168 -13.7273453
## Jan 1996 4.19782646 -13.2972650
## Feb 1996 3.67167796 110.8006009
## Mar 1996 -6.26077416 -77.9718042
## Apr 1996 -0.25750768 -34.2017328
## May 1996 4.44687100 -161.9281174
## Jun 1996 8.06907697 -41.1110064
## Jul 1996 -7.37641965 53.6901786
## Aug 1996 -7.85211280 -1.2001923
## Sep 1996 9.08400324 -128.3845501
## Oct 1996 1.92731435 -133.6312557
## Nov 1996 6.65466453 23.0715907
## Dec 1996 -10.00785359 -180.4628844
## Jan 1997 2.48907268 -4.2005483
## Feb 1997 -1.15132332 55.2678852
## Mar 1997 0.21931668 -52.8641185
## Apr 1997 4.97902117 -14.7156142
## May 1997 -2.82535193 -65.7063657
## Jun 1997 3.94260970 6.4913486
## Jul 1997 9.75539933 63.2003842
## Aug 1997 -5.22275428 -65.6797543
## Sep 1997 0.29010133 48.3282684
## Oct 1997 20.87611304 134.4685625
## Nov 1997 -0.63329925 -95.4821782
## Dec 1997 7.53088002 -100.8111537
## Jan 1998 1.29547998 68.0456246
## Feb 1998 27.75815419 -68.7107778
## Mar 1998 -3.68666165 100.8576161
## Apr 1998 11.98948330 -84.2904103
## May 1998 -8.97869123 -17.0580638
## Jun 1998 0.31158605 -23.2727577
## Jul 1998 3.85341925 2.7044241
## Aug 1998 9.43476762 158.7175472
## Sep 1998 2.37830218 52.2878252
## Oct 1998 -8.96175576 43.5612834
## Nov 1998 13.24338303 -88.7856773
## Dec 1998 -9.07445337 -24.4611413
## Jan 1999 -24.23395155 142.4215424
## Feb 1999 -16.74363237 -187.0488722
## Mar 1999 12.60310241 -113.5610395
## Apr 1999 -0.80198720 6.1299610
## May 1999 4.78475520 78.8126271
## Jun 1999 -2.22085145 133.2927455
## Jul 1999 -2.36213248 -118.2278195
## Aug 1999 13.58262753 -164.9275543
## Sep 1999 7.61815817 -161.8763020
## Oct 1999 -13.55381770 70.3259917
## Nov 1999 -6.47032059 49.2131814
## Dec 1999 3.12313904 -126.1989018
## Jan 2000 1.64836998 40.2343427
## Feb 2000 -1.42591944 99.4988149
## Mar 2000 2.43459340 16.7340393
## Apr 2000 -3.99478419 -114.3532078
## May 2000 -0.08460240 135.6138000
## Jun 2000 -17.25885603 76.8897169
## Jul 2000 -6.59397092 -132.3525305
## Aug 2000 16.90131463 -26.9657782
## Sep 2000 8.87461057 109.3085865
## Oct 2000 -15.73110564 179.1609085
## Nov 2000 -9.89301515 7.4621613
## Dec 2000 -3.79516425 112.6751416
## Jan 2001 -3.00431215 -52.9214731
## Feb 2001 12.34282878 -23.3341352
## Mar 2001 17.34268612 96.9173878
## Apr 2001 -5.75317742 -74.3714002
## May 2001 -3.72689991 -39.2964913
## Jun 2001 -7.17066717 107.6991919
## Jul 2001 4.78152682 43.6762415
## Aug 2001 24.12247842 9.0275296
## Sep 2001 2.01279529 -27.6481501
## Oct 2001 -7.86872806 -48.2718222
## Nov 2001 -18.42323423 -11.2226668
## Dec 2001 8.45565906 108.0498340
## Jan 2002 2.78863367 -183.5160106
## Feb 2002 6.78646733 -28.5303555
## Mar 2002 4.18820745 -109.6829108
## Apr 2002 -3.53952687 15.0717375
## May 2002 -9.54112623 -80.7874415
## Jun 2002 -3.88655479 48.1280978
## Jul 2002 18.40143225 55.4450610
## Aug 2002 -5.05846872 29.0992833
## Sep 2002 3.72768932 -130.3354511
## Oct 2002 2.11354998 129.1172113
## Nov 2002 -3.43864495 -169.1574729
## Dec 2002 1.99956398 40.0514581
## Jan 2003 15.23041132 114.8678593
## Feb 2003 8.46237020 -65.1580436
## Mar 2003 -15.08300130 42.3962054
## Apr 2003 6.31395165 -17.6653270
## May 2003 15.78978043 -14.4294314
## Jun 2003 -7.81678547 -100.8561179
## Jul 2003 -5.42856007 77.5880281
## Aug 2003 -8.39649488 26.8350894
## Sep 2003 -2.17120682 -97.0915270
## Oct 2003 6.63211731 6.1394117
## Nov 2003 -11.22019807 -139.1206649
## Dec 2003 4.56295273 -251.0481253
## Jan 2004 23.05966717 82.2302312
## Feb 2004 -5.39112494 65.5433248
## Mar 2004 5.81456632 85.5316275
## Apr 2004 -1.66966870 -78.2999241
## May 2004 -7.59635968 -127.4317201
## Jun 2004 -7.71037489 68.5742434
## Jul 2004 -10.82634740 123.7382598
## Aug 2004 -2.20205972 -4.5164897
## Sep 2004 -14.95130925 -129.0678186
## Oct 2004 -1.71294065 6.2416163
## Nov 2004 -1.15897298 4.9760323
## Dec 2004 -6.79438386 186.3277656
## Jan 2005 -6.12030137 12.8775688
## Feb 2005 -9.24697243 32.5715623
## Mar 2005 -11.86502145 9.8525773
## Apr 2005 7.88252089 -5.2194366
## May 2005 9.73629869 14.4085916
## Jun 2005 5.58780895 -76.8144823
## Jul 2005 -8.66625060 57.8964653
## Aug 2005 1.77909422 -57.7471596
## Sep 2005 -8.74816764 -65.6719664
## Oct 2005 4.32449568 70.8474757
## Nov 2005 -14.93459180 -73.0496950
## Dec 2005 -5.31957606 161.8541752
## Jan 2006 6.15675114 -71.0029419
## Feb 2006 0.36299741 -54.4075001
## Mar 2006 -1.15046412 -50.5509377
## Apr 2006 0.67375243 -146.7482371
## May 2006 -8.09319055 -56.6670677
## Jun 2006 6.52936807 -185.6186904
## Jul 2006 4.74512893 -54.4975016
## Aug 2006 -15.97614262 -12.7355589
## Sep 2006 -0.97084161 134.5383856
## Oct 2006 -9.91061556 21.7077693
## Nov 2006 -13.93136398 1.3416024
## Dec 2006 -14.64217889 -22.9279589
## Jan 2007 0.01076949 -18.2724220
## Feb 2007 6.02616268 -15.2480362
## Mar 2007 5.60826876 58.5208418
## Apr 2007 11.52618548 -180.9485352
## May 2007 2.47639791 71.3690677
## Jun 2007 -2.28136481 -57.3865238
## Jul 2007 4.99117242 7.7913414
## Aug 2007 19.79987758 113.1773635
## Sep 2007 -0.79471929 -171.4002964
## Oct 2007 -0.13351668 50.3616449
## Nov 2007 16.92939246 -114.8184315
## Dec 2007 -0.22264661 165.6856490
## Jan 2008 -21.42159660 37.4604093
## Feb 2008 11.11012234 49.0859137
## Mar 2008 -0.96223657 86.9490611
## Apr 2008 2.70058661 -14.9702178
## May 2008 7.97214579 -158.1510102
## Jun 2008 0.12409549 23.0552041
## Jul 2008 -4.68058182 165.6720832
## Aug 2008 9.12240183 -18.7648916
## Sep 2008 3.08880774 66.9563000
## Oct 2008 -15.06248057 -11.9744703
## Nov 2008 0.12945878 128.9871121
## Dec 2008 17.54681797 -223.3197679
## Jan 2009 -7.94640878 54.1372798
## Feb 2009 -4.69668340 -99.5690474
## Mar 2009 1.66848376 -13.9634824
## Apr 2009 -9.09256368 148.0456127
## May 2009 1.26141368 -220.6662985
## Jun 2009 5.11604436 22.0037309
## Jul 2009 10.10238454 -0.4561165
## Aug 2009 2.99053254 -103.8525696
## Sep 2009 14.95579094 -192.7185264
## Oct 2009 3.63646410 -23.0770121
## Nov 2009 25.66722555 -87.6254066
## Dec 2009 11.39881342 39.3475999
## Jan 2010 -13.84607604 27.9875495
## Feb 2010 -3.91894183 158.8561728
## Mar 2010 12.11974233 -136.7529566
## Apr 2010 -7.56715811 33.9097859
## May 2010 -10.95777353 202.6245956
## Jun 2010 -12.21904230 143.2578701
## Jul 2010 -18.33016186 -0.7401003
## Aug 2010 12.65440591 -103.2141356
## Sep 2010 -12.44221290 148.0116898
## Oct 2010 -9.90617942 -116.5461666
## Nov 2010 0.28927591 -101.7301953
## Dec 2010 -1.64797615 -56.4988289
## Jan 2011 5.77216219 32.0122878
## Feb 2011 -13.90457383 94.2515618
## Mar 2011 11.99640467 159.9672409
## Apr 2011 -12.58567294 74.5187231
## May 2011 -4.48827411 -74.2395360
## Jun 2011 -15.23210866 73.4428799
## Jul 2011 -16.22848122 -0.5848419
## Aug 2011 -8.37277950 -188.6069429
## Sep 2011 7.94979694 -12.1385109
## Oct 2011 11.79994323 56.1940649
## Nov 2011 13.33927592 210.7545709
## Dec 2011 7.68689753 12.0189219
## Jan 2012 5.61392155 -106.8627657
## Feb 2012 -22.58104051 136.2678111
## Mar 2012 12.96655407 -122.5296819
## Apr 2012 -0.72452627 105.1879914
## May 2012 -5.23318607 65.0803560
## Jun 2012 -4.84918506 48.3502139
## Jul 2012 -1.60150865 7.9868852
## Aug 2012 8.57456978 -124.5000751
## Sep 2012 7.39088262 223.1891203
## Oct 2012 16.42449156 -73.2335614
## Nov 2012 -10.03524758 -94.0388174
## Dec 2012 -6.62165171 -32.8819208
## Jan 2013 16.47003115 -86.6720370
## Feb 2013 -14.55755855 -16.5331877
## Mar 2013 3.76416463 36.9279492
## Apr 2013 -1.73157874 162.9986292
## May 2013 -4.47200559 24.5434262
## Jun 2013 0.73879733 -122.2996894
## Jul 2013 -1.80795104 -99.9153969
## Aug 2013 -0.72690804 -38.0867661
## Sep 2013 -3.38122324 -5.7274346
## Oct 2013 -1.50824359 -175.4119859
## Nov 2013 12.68125794 178.8992744
## Dec 2013 4.20794700 25.9562404
## Jan 2014 -5.99400984 -106.4377481
## Feb 2014 -7.10047156 71.4996717
## Mar 2014 -17.39718101 -37.6117686
## Apr 2014 12.13900161 49.7204534
## May 2014 11.89854636 -67.2232022
## Jun 2014 -9.71272947 -39.2080408
## Jul 2014 -1.90393853 -144.3713830
## Aug 2014 -11.44862545 -208.4876501
## Sep 2014 12.81750355 90.2357275
## Oct 2014 3.57278252 89.3661231
## Nov 2014 -8.51902980 80.4696200
## Dec 2014 8.77250860 -59.8725129
## Jan 2015 -2.15925059 103.4162878
## Feb 2015 4.15771840 91.0489008
## Mar 2015 14.01124650 138.2988430
## Apr 2015 8.20880188 -1.8408803
## May 2015 12.20005214 -104.8627211
## Jun 2015 -16.78630309 -215.6516411
## Jul 2015 -13.56755821 -55.8818862
## Aug 2015 -7.37217831 -44.1898869
## Sep 2015 12.09620672 -78.1669836
## Oct 2015 2.81401263 123.1672816
## Nov 2015 1.59523824 0.9229724
## Dec 2015 -22.67159557 103.5369356
## Jan 2016 -2.14728428 237.5256589
## Feb 2016 1.75062942 17.1875413
## Mar 2016 -7.34578854 -134.2429885
## Apr 2016 -3.06736220 -70.4930537
## May 2016 1.66908914 -194.6950771
## Jun 2016 -4.06882737 61.3433746
## Jul 2016 -12.34374402 209.0044934
## Aug 2016 -6.12848819 101.2412356
## Sep 2016 3.55655764 30.0622159
## Oct 2016 -3.57128604 -19.9762713
## Nov 2016 9.28436352 -75.8686743
## Dec 2016 5.85554927 -131.3409337
## Jan 2017 15.70917065 -86.4414640
## Feb 2017 -3.39731423 106.8725573
## Mar 2017 -8.98902395 -104.7100536
## Apr 2017 4.78497064 -138.4499960
## May 2017 1.35009311 -80.4749371
## Jun 2017 10.00210392 79.5352674
## Jul 2017 -4.34920331 60.7687149
## Aug 2017 2.25293404 180.2607270
## Sep 2017 -6.73371906 -48.5668690
## Oct 2017 -11.61452749 -137.3532166
## Nov 2017 12.22508539 -114.8305143
## Dec 2017 -1.30758160 79.0780944
## Jan 2018 -0.04374481 -76.0276195
## Feb 2018 18.77681489 136.4954711
## Mar 2018 21.17141331 32.6193179
## Apr 2018 2.43242574 27.4691801
## May 2018 4.86855629 40.7389335
## Jun 2018 9.64102748 -151.7056253
## Jul 2018 5.16497536 94.6747525
## Aug 2018 4.79104029 236.2440503
## Sep 2018 -6.99014902 56.7896684
## Oct 2018 0.65883540 -48.2098551
## Nov 2018 -11.91224987 50.7174494
## Dec 2018 -6.81941575 -20.9219852
## Jan 2019 -1.95820876 119.1709437
## Feb 2019 -5.97871667 -13.0975847
## Mar 2019 2.26040282 79.3044795
## Apr 2019 -3.27315798 63.0683105
## May 2019 -9.90967762 -11.0105264
## Jun 2019 -1.88331092 24.9056464
## Jul 2019 0.57103582 -167.3112041
## Aug 2019 15.31266501 72.5489241
## Sep 2019 -0.31296754 -4.7296332
## Oct 2019 -5.07563267 -56.2048101
## Nov 2019 2.41326540 -22.7108457
## Dec 2019 4.45481511 -46.7923245
## Jan 2020 0.54665837 -256.0332205
## Feb 2020 0.14797681 -195.0811099
## Mar 2020 -7.70528979 -71.0511619
## Apr 2020 15.82348973 -80.1138747
## May 2020 -7.09569593 104.8344387
## Jun 2020 -17.38280294 -49.6650934
## Jul 2020 3.22585883 153.7036407
## Aug 2020 1.42154132 -55.1517337
## Sep 2020 -12.12230323 80.0691458
## Oct 2020 1.34121681 -96.6477330
## Nov 2020 -19.61314644 242.3448036
## Dec 2020 -1.16113761 -37.4301509
##
## $description
## type coeff
## var1 Undefined NA
## var2 Undefined NA
myreg3 <- regarima(myseries, myspec3)
myreg3
## y = regression model + arima (2, 1, 0, 0, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.3886 0.052
## Phi(2) 0.2844 0.052
## BTheta(1) -0.6601 0.042
##
## Estimate Std. Error
## r.var1 0.000541 0.010
## r.var2 -0.001354 0.001
## Week days 0.698005 0.032
## Leap year 2.381916 0.686
## Easter [6] -2.532004 0.431
## TC (4-2020) -22.190903 2.214
## TC (3-2020) -20.879503 2.222
## AO (5-2011) 13.435020 1.780
## AO (5-2000) 6.990264 1.789
##
##
## Residual standard error: 2.319 on 346 degrees of freedom
## Log likelihood = -814.9, aic = 1656 aicc = 1657, bic(corrected for length) = 1.879
myspec2 <- regarima_spec_x13(spec = "RG5c",
usrdef.varEnabled = TRUE,
usrdef.var = var1, usrdef.varCoef = 2,
transform.function = "None")
myreg2 <- regarima(myseries, myspec2)
s_preVar(myreg2)
## $series
## Jan Feb Mar Apr May
## 1990 -4.40401719 1.89091774 8.14085757 -24.86976208 5.70360269
## 1991 -11.68303497 -18.21499748 2.99785213 18.26701322 1.65118362
## 1992 2.06863364 -1.11243995 -12.79407733 -5.34643607 -12.72361095
## 1993 5.75380939 21.22260222 -0.23207487 20.20476024 13.82150176
## 1994 -6.41309066 10.77608447 -2.93809463 -1.69735855 -16.92064604
## 1995 23.69090311 -12.03433435 -5.23194528 -0.84763807 11.75867819
## 1996 4.19782646 3.67167796 -6.26077416 -0.25750768 4.44687100
## 1997 2.48907268 -1.15132332 0.21931668 4.97902117 -2.82535193
## 1998 1.29547998 27.75815419 -3.68666165 11.98948330 -8.97869123
## 1999 -24.23395155 -16.74363237 12.60310241 -0.80198720 4.78475520
## 2000 1.64836998 -1.42591944 2.43459340 -3.99478419 -0.08460240
## 2001 -3.00431215 12.34282878 17.34268612 -5.75317742 -3.72689991
## 2002 2.78863367 6.78646733 4.18820745 -3.53952687 -9.54112623
## 2003 15.23041132 8.46237020 -15.08300130 6.31395165 15.78978043
## 2004 23.05966717 -5.39112494 5.81456632 -1.66966870 -7.59635968
## 2005 -6.12030137 -9.24697243 -11.86502145 7.88252089 9.73629869
## 2006 6.15675114 0.36299741 -1.15046412 0.67375243 -8.09319055
## 2007 0.01076949 6.02616268 5.60826876 11.52618548 2.47639791
## 2008 -21.42159660 11.11012234 -0.96223657 2.70058661 7.97214579
## 2009 -7.94640878 -4.69668340 1.66848376 -9.09256368 1.26141368
## 2010 -13.84607604 -3.91894183 12.11974233 -7.56715811 -10.95777353
## 2011 5.77216219 -13.90457383 11.99640467 -12.58567294 -4.48827411
## 2012 5.61392155 -22.58104051 12.96655407 -0.72452627 -5.23318607
## 2013 16.47003115 -14.55755855 3.76416463 -1.73157874 -4.47200559
## 2014 -5.99400984 -7.10047156 -17.39718101 12.13900161 11.89854636
## 2015 -2.15925059 4.15771840 14.01124650 8.20880188 12.20005214
## 2016 -2.14728428 1.75062942 -7.34578854 -3.06736220 1.66908914
## 2017 15.70917065 -3.39731423 -8.98902395 4.78497064 1.35009311
## 2018 -0.04374481 18.77681489 21.17141331 2.43242574 4.86855629
## 2019 -1.95820876 -5.97871667 2.26040282 -3.27315798 -9.90967762
## 2020 0.54665837 0.14797681 -7.70528979 15.82348973 -7.09569593
## Jun Jul Aug Sep Oct
## 1990 17.18738621 -19.34324591 14.31820305 -11.40214617 -4.23628235
## 1991 5.63322407 -5.23676101 -7.31563034 22.98892443 -3.58440075
## 1992 9.15293561 7.23165632 -9.09629251 -2.76464223 -3.61356741
## 1993 -3.89882491 9.91761198 -0.61746246 1.52919712 5.15745834
## 1994 -4.20867029 4.62659691 -13.31142247 8.91709763 2.52503735
## 1995 -16.96107232 -11.06736917 -11.05796616 8.07558442 -3.38413126
## 1996 8.06907697 -7.37641965 -7.85211280 9.08400324 1.92731435
## 1997 3.94260970 9.75539933 -5.22275428 0.29010133 20.87611304
## 1998 0.31158605 3.85341925 9.43476762 2.37830218 -8.96175576
## 1999 -2.22085145 -2.36213248 13.58262753 7.61815817 -13.55381770
## 2000 -17.25885603 -6.59397092 16.90131463 8.87461057 -15.73110564
## 2001 -7.17066717 4.78152682 24.12247842 2.01279529 -7.86872806
## 2002 -3.88655479 18.40143225 -5.05846872 3.72768932 2.11354998
## 2003 -7.81678547 -5.42856007 -8.39649488 -2.17120682 6.63211731
## 2004 -7.71037489 -10.82634740 -2.20205972 -14.95130925 -1.71294065
## 2005 5.58780895 -8.66625060 1.77909422 -8.74816764 4.32449568
## 2006 6.52936807 4.74512893 -15.97614262 -0.97084161 -9.91061556
## 2007 -2.28136481 4.99117242 19.79987758 -0.79471929 -0.13351668
## 2008 0.12409549 -4.68058182 9.12240183 3.08880774 -15.06248057
## 2009 5.11604436 10.10238454 2.99053254 14.95579094 3.63646410
## 2010 -12.21904230 -18.33016186 12.65440591 -12.44221290 -9.90617942
## 2011 -15.23210866 -16.22848122 -8.37277950 7.94979694 11.79994323
## 2012 -4.84918506 -1.60150865 8.57456978 7.39088262 16.42449156
## 2013 0.73879733 -1.80795104 -0.72690804 -3.38122324 -1.50824359
## 2014 -9.71272947 -1.90393853 -11.44862545 12.81750355 3.57278252
## 2015 -16.78630309 -13.56755821 -7.37217831 12.09620672 2.81401263
## 2016 -4.06882737 -12.34374402 -6.12848819 3.55655764 -3.57128604
## 2017 10.00210392 -4.34920331 2.25293404 -6.73371906 -11.61452749
## 2018 9.64102748 5.16497536 4.79104029 -6.99014902 0.65883540
## 2019 -1.88331092 0.57103582 15.31266501 -0.31296754 -5.07563267
## 2020 -17.38280294 3.22585883 1.42154132 -12.12230323 1.34121681
## Nov Dec
## 1990 -8.46767803 -11.88203333
## 1991 4.91701099 -9.49536754
## 1992 -1.88895946 -22.93380253
## 1993 1.06406045 7.57545872
## 1994 -5.28606716 -8.40031342
## 1995 -3.20600632 0.67420168
## 1996 6.65466453 -10.00785359
## 1997 -0.63329925 7.53088002
## 1998 13.24338303 -9.07445337
## 1999 -6.47032059 3.12313904
## 2000 -9.89301515 -3.79516425
## 2001 -18.42323423 8.45565906
## 2002 -3.43864495 1.99956398
## 2003 -11.22019807 4.56295273
## 2004 -1.15897298 -6.79438386
## 2005 -14.93459180 -5.31957606
## 2006 -13.93136398 -14.64217889
## 2007 16.92939246 -0.22264661
## 2008 0.12945878 17.54681797
## 2009 25.66722555 11.39881342
## 2010 0.28927591 -1.64797615
## 2011 13.33927592 7.68689753
## 2012 -10.03524758 -6.62165171
## 2013 12.68125794 4.20794700
## 2014 -8.51902980 8.77250860
## 2015 1.59523824 -22.67159557
## 2016 9.28436352 5.85554927
## 2017 12.22508539 -1.30758160
## 2018 -11.91224987 -6.81941575
## 2019 2.41326540 4.45481511
## 2020 -19.61314644 -1.16113761
##
## $description
## type coeff
## userdef Undefined 2
# Pre-specified ARMA coefficients
myspec1 <- regarima_spec_x13(spec = "RG5c",
automdl.enabled =FALSE,
arima.p = 1, arima.q = 1,
arima.bp = 0, arima.bq = 1,
arima.coefEnabled = TRUE,
arima.coef = c(-0.8, -0.6, 0),
arima.coefType = c(rep("Fixed", 2), "Undefined"))
s_arimaCoef(myspec1)
myreg1 <- regarima(myseries, myspec1)
myreg1
## y = regression model + arima (1, 1, 1, 0, 1, 1)
## Log-transformation: yes
## Coefficients:
## Estimate Std. Error
## Phi(1) -0.8000 0.00
## Theta(1) -0.6000 0.00
## BTheta(1) -0.6977 0.04
##
## Estimate Std. Error
## Monday 0.006317 0.002
## Tuesday 0.007824 0.002
## Wednesday 0.010528 0.002
## Thursday 0.001857 0.002
## Friday 0.010099 0.002
## Saturday -0.018439 0.002
## Easter [1] -0.020593 0.004
## TC (4-2020) -0.475720 0.031
## AO (3-2020) -0.213355 0.023
## AO (5-2011) 0.143705 0.016
##
##
## Residual standard error: 0.0256 on 347 degrees of freedom
## Log likelihood = 802.3, aic = 1733 aicc = 1734, bic(corrected for length) = -7.15
RegARIMA model specification: the pre-adjustment in X13
Function to create (and/or modify) a c(“regarima_spec”,“X13”) class object with the RegARIMA model specification for the X13 method.
| Identifier | Log/level detection | Outliers detection | Calendar effects | ARIMA |
|---|---|---|---|---|
| RG0 | NA | NA | NA | Airline(+mean) |
| RG1 | automatic | AO/LS/TC | NA | Airline(+mean) |
| RG2c | automatic | AO/LS/TC | 2 td vars + Easter | Airline(+mean) |
| RG3 | automatic | AO/LS/TC | NA | automatic |
| RG4c | automatic | AO/LS/TC | 2 td vars + Easter | automatic |
| RG5c | automatic | AO/LS/TC | 7 td vars + Easter | automatic |
myseries <- ipi_c_eu[, "FR"]
myspec1 <- regarima_spec_x13(spec = "RG5c")
myreg1 <- regarima(myseries, spec = myspec1)
# To modify a pre-specified model specification
myspec2 <- regarima_spec_x13(spec = "RG5c",
tradingdays.option = "WorkingDays")
myreg2 <- regarima(myseries, spec = myspec2)
# To modify the model specification of a "regarima" object
myspec3 <- regarima_spec_x13(myreg1, tradingdays.option = "WorkingDays")
myreg3 <- regarima(myseries, myspec3)
# To modify the model specification of a "regarima_spec" object
myspec4 <- regarima_spec_x13(myspec1, tradingdays.option = "WorkingDays")
myreg4 <- regarima(myseries, myspec4)
# Pre-specified outliers
myspec1 <- regarima_spec_x13(spec = "RG5c", usrdef.outliersEnabled = TRUE,
usrdef.outliersType = c("LS", "AO"),
usrdef.outliersDate = c("2008-10-01", "2002-01-01"),
usrdef.outliersCoef = c(36, 14),
transform.function = "None")
myreg1 <- regarima(myseries, myspec1)
myreg1
## y = regression model + arima (2, 1, 1, 0, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.07859 0.114
## Phi(2) 0.19792 0.076
## Theta(1) -0.48272 0.111
## BTheta(1) -0.65916 0.043
##
## Estimate Std. Error
## Monday 0.64094 0.228
## Tuesday 0.81794 0.229
## Wednesday 1.05374 0.229
## Thursday 0.06981 0.228
## Friday 0.93434 0.228
## Saturday -1.63686 0.226
## Leap year 2.11550 0.697
## Easter [1] -2.38135 0.451
## AO (9-2008) 31.95554 2.924
## LS (9-2008) -57.04093 2.657
## TC (4-2020) -35.62104 2.120
## AO (3-2020) -21.00931 2.145
## AO (5-2011) 13.21877 1.832
## TC (9-2008) 23.44654 4.001
## TC (12-2001) -20.47521 2.922
## AO (12-2001) 17.13461 2.962
## TC (2-2002) 10.61731 1.937
##
## Fixed outliers:
## Coefficients
## LS (10-2008) 36
## AO (1-2002) 14
##
##
## Residual standard error: 2.178 on 337 degrees of freedom
## Log likelihood = -792.6, aic = 1629 aicc = 1632, bic(corrected for length) = 1.901
s_preOut(myreg1)
# User-defined variables
var1 <- ts(rnorm(length(myseries))*10, start = start(myseries),
frequency = 12)
var2 <- ts(rnorm(length(myseries))*100, start = start(myseries),
frequency = 12)
var <- ts.union(var1, var2)
myspec1 <- regarima_spec_x13(spec = "RG5c", usrdef.varEnabled = TRUE,
usrdef.var = var)
myreg1 <- regarima(myseries, myspec1)
myreg1
## y = regression model + arima (2, 1, 1, 0, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.005263 0.108
## Phi(2) 0.175303 0.074
## Theta(1) -0.542329 0.102
## BTheta(1) -0.672062 0.042
##
## Estimate Std. Error
## r.var1 -0.004272 0.009
## r.var2 0.001653 0.001
## Monday 0.550707 0.229
## Tuesday 0.904491 0.229
## Wednesday 0.990459 0.231
## Thursday 0.072727 0.230
## Friday 0.943799 0.231
## Saturday -1.612544 0.229
## Leap year 2.241717 0.707
## Easter [1] -2.314698 0.455
## TC (4-2020) -35.860402 2.179
## AO (3-2020) -20.333868 2.194
## AO (5-2011) 13.581502 1.855
## LS (11-2008) -12.281328 1.642
##
##
## Residual standard error: 2.206 on 340 degrees of freedom
## Log likelihood = -797.3, aic = 1633 aicc = 1635, bic(corrected for length) = 1.878
#Seasonal Adjustment
##tramoseats
Seasonal Adjustment with TRAMO-SEATS
Function to estimate the seasonally adjusted series (sa) with the TRAMO-SEATS method. This is achieved by decomposing the time series (y) into the: trend-cycle (t), seasonal component (s) and irregular component (i).
The final seasonally adjusted series shall be free of seasonal and calendarrelated movements.
The first step of a seasonal adjustment consist in pre-adjusting the time series. This is done by removing its deterministic effects, using a regression model with ARIMA noise (RegARIMA, see:regarima).
In the second part, the pre-adjusted series is decomposed into the following components: trend-cycle (t), seasonal component (s) and irregular component (i). The decomposition can be: additive (y = t + s + i) or multiplicative (y = t ∗ s ∗ i). The final seasonally adjusted series (sa) shall be free of seasonal and calendar-related movements.
In the TRAMO-SEATS method, the second step - SEATS (“Signal Extraction in ARIMA Time Series”) - performs an ARIMA-based decomposition of an observed time series into unobserved components.
| Identifier | Log/level detection | Outliers detection | Calendar effects | ARIMA |
|---|---|---|---|---|
| RSA0 | NA | NA | NA | Airline(+mean) |
| RSA1 | automatic | AO/LS/TC | NA | Airline(+mean) |
| RSA2 | automatic | AO/LS/TC | 2 td vars + Easter | Airline(+mean) |
| RSA3 | automatic | AO/LS/TC | NA | automatic |
| RSA4 | automatic | AO/LS/TC | 2 td vars + Easter | automatic |
| RSA5 | automatic | AO/LS/TC | 7 td vars + Easter | automatic |
| RSAfull | automatic | AO/LS/TC | automatic | automatic |
#Example 1
myseries <- ipi_c_eu[, "FR"]
myspec <- tramoseats_spec("RSAfull")
mysa <- tramoseats(myseries, myspec)
mysa
## [4m[1mRegARIMA[22m[24m
## y = regression model + arima (2, 1, 0, 0, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.4032 0.051
## Phi(2) 0.2883 0.051
## BTheta(1) -0.6641 0.042
##
## Estimate Std. Error
## Week days 0.6994 0.032
## Leap year 2.3231 0.690
## Easter [6] -2.5154 0.436
## AO (5-2011) 13.4679 1.787
## TC (4-2020) -22.2128 2.205
## TC (3-2020) -21.0391 2.217
## AO (5-2000) 6.7386 1.794
##
##
## Residual standard error: 2.326 on 348 degrees of freedom
## Log likelihood = -816.1, aic = 1654 aicc = 1655, bic(corrected for length) = 1.852
##
##
##
## [4m[1mDecomposition[22m[24m
## [1mModel[22m
## AR : 1 + 0.403230 B + 0.288342 B^2
## D : 1 - B - B^12 + B^13
## MA : 1 - 0.664088 B^12
##
##
## [1mSA[22m
## AR : 1 + 0.403230 B + 0.288342 B^2
## D : 1 - 2.000000 B + B^2
## MA : 1 - 0.970348 B + 0.005940 B^2 - 0.005813 B^3 + 0.003576 B^4
## Innovation variance: 0.7043507
##
## [1mTrend[22m
## D : 1 - 2.000000 B + B^2
## MA : 1 + 0.033519 B - 0.966481 B^2
## Innovation variance: 0.06093642
##
## [1mSeasonal[22m
## D : 1 + B + B^2 + B^3 + B^4 + B^5 + B^6 + B^7 + B^8 + B^9 + B^10 + B^11
## MA : 1 + 1.328957 B + 1.105787 B^2 + 1.185470 B^3 + 1.067845 B^4 + 0.820748 B^5 + 0.632456 B^6 + 0.404457 B^7 + 0.245256 B^8 + 0.001615 B^9 - 0.055617 B^10 - 0.203557 B^11
## Innovation variance: 0.04290744
##
## [1mTransitory[22m
## AR : 1 + 0.403230 B + 0.288342 B^2
## MA : 1 - 0.260079 B - 0.739921 B^2
## Innovation variance: 0.05287028
##
## [1mIrregular[22m
## Innovation variance: 0.2032994
##
##
##
## [4m[1mFinal[22m[24m
## Last observed values
## y sa t s i
## Jan 2020 101.0 102.93775 103.0182 -1.9377453 -0.08043801
## Feb 2020 100.1 103.53944 103.2312 -3.4394383 0.30818847
## Mar 2020 91.8 82.47698 103.4998 9.3230241 -21.02286361
## Apr 2020 66.7 65.77310 103.9608 0.9268969 -38.18766871
## May 2020 73.7 79.43342 104.7269 -5.7334221 -25.29345247
## Jun 2020 98.2 88.07766 105.3319 10.1223443 -17.25422206
## Jul 2020 97.4 92.71048 105.4216 4.6895154 -12.71111705
## Aug 2020 71.7 97.32129 104.9801 -25.6212858 -7.65880696
## Sep 2020 104.7 97.44274 104.0807 7.2572622 -6.63793072
## Oct 2020 106.7 98.20925 103.1711 8.4907485 -4.96183772
## Nov 2020 101.6 99.98044 102.4813 1.6195550 -2.50088282
## Dec 2020 96.6 98.99458 101.9735 -2.3945790 -2.97892307
##
## Forecasts:
## y_f sa_f t_f s_f i_f
## Jan 2021 93.22264 100.1984 101.7578 -6.975740 -1.55946363
## Feb 2021 96.81455 100.8845 101.7113 -4.069924 -0.82679910
## Mar 2021 111.72198 100.8668 101.6647 10.855228 -0.79795880
## Apr 2021 102.76178 101.0716 101.6181 1.690178 -0.54654378
## May 2021 95.52744 101.2474 101.5716 -5.719910 -0.32422597
## Jun 2021 111.44221 101.2711 101.5250 10.171157 -0.25395653
## Jul 2021 103.57813 101.2947 101.4784 2.283395 -0.18370915
## Aug 2021 78.21363 101.3135 101.4319 -23.099833 -0.11841662
## Sep 2021 108.57631 101.3000 101.3853 7.276282 -0.08528380
## Oct 2021 107.32040 101.2771 101.3387 6.043321 -0.06166933
## Nov 2021 105.33458 101.2505 101.2922 4.084088 -0.04168414
## Dec 2021 98.79675 101.2164 101.2456 -2.419656 -0.02920922
##
##
## [4m[1mDiagnostics[22m[24m
## [1m Relative contribution of the components to the stationary
## portion of the variance in the original series,
## after the removal of the long term trend [22m
## Trend computed by Hodrick-Prescott filter (cycle length = 8.0 years)
## Component
## Cycle 6.087
## Seasonal 80.528
## Irregular 0.965
## TD & Hol. 3.590
## Others 8.102
## Total 99.271
##
## [1m Combined test in the entire series [22m
## Non parametric tests for stable seasonality
## P.value
## Kruskall-Wallis test 0.00
## Test for the presence of seasonality assuming stability 0.00
## Evolutive seasonality test 0.01
##
## Identifiable seasonality present
##
## [1m Residual seasonality tests [22m
## P.value
## qs test on sa 1.000
## qs test on i 1.000
## f-test on sa (seasonal dummies) 1.000
## f-test on i (seasonal dummies) 1.000
## Residual seasonality (entire series) 1.000
## Residual seasonality (last 3 years) 0.974
## f-test on sa (td) 0.152
## f-test on i (td) 0.224
##
##
## [4m[1mAdditional output variables[22m[24m
# Equivalent to:
mysa1 <- tramoseats(myseries, spec = "RSAfull")
mysa1
## [4m[1mRegARIMA[22m[24m
## y = regression model + arima (2, 1, 0, 0, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.4032 0.051
## Phi(2) 0.2883 0.051
## BTheta(1) -0.6641 0.042
##
## Estimate Std. Error
## Week days 0.6994 0.032
## Leap year 2.3231 0.690
## Easter [6] -2.5154 0.436
## AO (5-2011) 13.4679 1.787
## TC (4-2020) -22.2128 2.205
## TC (3-2020) -21.0391 2.217
## AO (5-2000) 6.7386 1.794
##
##
## Residual standard error: 2.326 on 348 degrees of freedom
## Log likelihood = -816.1, aic = 1654 aicc = 1655, bic(corrected for length) = 1.852
##
##
##
## [4m[1mDecomposition[22m[24m
## [1mModel[22m
## AR : 1 + 0.403230 B + 0.288342 B^2
## D : 1 - B - B^12 + B^13
## MA : 1 - 0.664088 B^12
##
##
## [1mSA[22m
## AR : 1 + 0.403230 B + 0.288342 B^2
## D : 1 - 2.000000 B + B^2
## MA : 1 - 0.970348 B + 0.005940 B^2 - 0.005813 B^3 + 0.003576 B^4
## Innovation variance: 0.7043507
##
## [1mTrend[22m
## D : 1 - 2.000000 B + B^2
## MA : 1 + 0.033519 B - 0.966481 B^2
## Innovation variance: 0.06093642
##
## [1mSeasonal[22m
## D : 1 + B + B^2 + B^3 + B^4 + B^5 + B^6 + B^7 + B^8 + B^9 + B^10 + B^11
## MA : 1 + 1.328957 B + 1.105787 B^2 + 1.185470 B^3 + 1.067845 B^4 + 0.820748 B^5 + 0.632456 B^6 + 0.404457 B^7 + 0.245256 B^8 + 0.001615 B^9 - 0.055617 B^10 - 0.203557 B^11
## Innovation variance: 0.04290744
##
## [1mTransitory[22m
## AR : 1 + 0.403230 B + 0.288342 B^2
## MA : 1 - 0.260079 B - 0.739921 B^2
## Innovation variance: 0.05287028
##
## [1mIrregular[22m
## Innovation variance: 0.2032994
##
##
##
## [4m[1mFinal[22m[24m
## Last observed values
## y sa t s i
## Jan 2020 101.0 102.93775 103.0182 -1.9377453 -0.08043801
## Feb 2020 100.1 103.53944 103.2312 -3.4394383 0.30818847
## Mar 2020 91.8 82.47698 103.4998 9.3230241 -21.02286361
## Apr 2020 66.7 65.77310 103.9608 0.9268969 -38.18766871
## May 2020 73.7 79.43342 104.7269 -5.7334221 -25.29345247
## Jun 2020 98.2 88.07766 105.3319 10.1223443 -17.25422206
## Jul 2020 97.4 92.71048 105.4216 4.6895154 -12.71111705
## Aug 2020 71.7 97.32129 104.9801 -25.6212858 -7.65880696
## Sep 2020 104.7 97.44274 104.0807 7.2572622 -6.63793072
## Oct 2020 106.7 98.20925 103.1711 8.4907485 -4.96183772
## Nov 2020 101.6 99.98044 102.4813 1.6195550 -2.50088282
## Dec 2020 96.6 98.99458 101.9735 -2.3945790 -2.97892307
##
## Forecasts:
## y_f sa_f t_f s_f i_f
## Jan 2021 93.22264 100.1984 101.7578 -6.975740 -1.55946363
## Feb 2021 96.81455 100.8845 101.7113 -4.069924 -0.82679910
## Mar 2021 111.72198 100.8668 101.6647 10.855228 -0.79795880
## Apr 2021 102.76178 101.0716 101.6181 1.690178 -0.54654378
## May 2021 95.52744 101.2474 101.5716 -5.719910 -0.32422597
## Jun 2021 111.44221 101.2711 101.5250 10.171157 -0.25395653
## Jul 2021 103.57813 101.2947 101.4784 2.283395 -0.18370915
## Aug 2021 78.21363 101.3135 101.4319 -23.099833 -0.11841662
## Sep 2021 108.57631 101.3000 101.3853 7.276282 -0.08528380
## Oct 2021 107.32040 101.2771 101.3387 6.043321 -0.06166933
## Nov 2021 105.33458 101.2505 101.2922 4.084088 -0.04168414
## Dec 2021 98.79675 101.2164 101.2456 -2.419656 -0.02920922
##
##
## [4m[1mDiagnostics[22m[24m
## [1m Relative contribution of the components to the stationary
## portion of the variance in the original series,
## after the removal of the long term trend [22m
## Trend computed by Hodrick-Prescott filter (cycle length = 8.0 years)
## Component
## Cycle 6.087
## Seasonal 80.528
## Irregular 0.965
## TD & Hol. 3.590
## Others 8.102
## Total 99.271
##
## [1m Combined test in the entire series [22m
## Non parametric tests for stable seasonality
## P.value
## Kruskall-Wallis test 0.00
## Test for the presence of seasonality assuming stability 0.00
## Evolutive seasonality test 0.01
##
## Identifiable seasonality present
##
## [1m Residual seasonality tests [22m
## P.value
## qs test on sa 1.000
## qs test on i 1.000
## f-test on sa (seasonal dummies) 1.000
## f-test on i (seasonal dummies) 1.000
## Residual seasonality (entire series) 1.000
## Residual seasonality (last 3 years) 0.974
## f-test on sa (td) 0.152
## f-test on i (td) 0.224
##
##
## [4m[1mAdditional output variables[22m[24m
#Example 2
var1 <- ts(rnorm(length(myseries))*10, start = start(myseries), frequency = 12)
var2 <- ts(rnorm(length(myseries))*100, start = start(myseries), frequency = 12)
var <- ts.union(var1, var2)
myspec2 <- tramoseats_spec(myspec,
tradingdays.mauto = "Unused",
tradingdays.option = "WorkingDays",
easter.type = "Standard",
automdl.enabled = FALSE, arima.mu = TRUE,
usrdef.varEnabled = TRUE, usrdef.var = var)
s_preVar(myspec2)
## $series
## var1 var2
## Jan 1990 7.69755750 -6.117184e+01
## Feb 1990 -8.76814509 -9.478869e+01
## Mar 1990 -7.88404622 -4.935547e+01
## Apr 1990 -9.10099660 -6.000433e+01
## May 1990 -21.04871256 1.394980e+02
## Jun 1990 6.03282533 2.353540e+01
## Jul 1990 -2.68378955 8.995677e+01
## Aug 1990 4.89292509 1.408521e+02
## Sep 1990 21.24866511 4.881147e+01
## Oct 1990 -2.50298321 -6.701156e+01
## Nov 1990 0.82760782 8.972396e+01
## Dec 1990 4.02189744 5.664696e+01
## Jan 1991 -5.53565656 -1.737790e+02
## Feb 1991 0.93930288 -1.324783e+02
## Mar 1991 -15.53812057 -4.232983e+01
## Apr 1991 18.99607896 2.994741e+01
## May 1991 -7.46791437 2.578350e+02
## Jun 1991 -11.25671773 -8.743504e+01
## Jul 1991 10.69210720 1.239860e+01
## Aug 1991 1.14756965 7.286703e+01
## Sep 1991 -4.98595955 7.315771e+01
## Oct 1991 -6.68017775 -1.784723e+01
## Nov 1991 9.15602573 -8.361290e+01
## Dec 1991 -9.01353929 -1.831584e+01
## Jan 1992 27.05288901 1.840223e+02
## Feb 1992 2.03456853 2.304018e+00
## Mar 1992 -17.11922428 -1.622534e+02
## Apr 1992 -16.33270940 1.275697e+02
## May 1992 -5.44906162 -1.031585e+01
## Jun 1992 -4.33900839 3.313665e+01
## Jul 1992 -3.27589198 1.040285e+02
## Aug 1992 5.57356948 9.218541e+01
## Sep 1992 23.76477447 -1.003007e+02
## Oct 1992 -9.65104528 1.696971e+02
## Nov 1992 2.37557657 3.774172e+01
## Dec 1992 15.18542995 2.636018e+01
## Jan 1993 -8.61629643 -1.102749e+02
## Feb 1993 19.42199724 1.103385e+02
## Mar 1993 26.90308871 1.551787e+02
## Apr 1993 -5.80285640 -1.236520e+02
## May 1993 -11.42278663 -1.091432e+02
## Jun 1993 3.66602023 1.089892e+02
## Jul 1993 13.74942240 -1.633175e+01
## Aug 1993 -19.72685708 1.574108e+02
## Sep 1993 7.79982680 1.704966e+01
## Oct 1993 15.17530486 1.153810e+02
## Nov 1993 -16.49455886 -4.053327e+01
## Dec 1993 10.19453005 5.799309e+01
## Jan 1994 -3.22701751 3.426837e+01
## Feb 1994 -2.30565754 -3.934820e+01
## Mar 1994 -17.81257156 8.675341e+01
## Apr 1994 -7.45040577 9.008047e+01
## May 1994 -15.81047385 -9.927983e+01
## Jun 1994 -0.41137035 -6.993947e+01
## Jul 1994 7.73727341 -6.091266e+01
## Aug 1994 11.77969891 1.139724e+00
## Sep 1994 -1.21663167 -6.620164e+01
## Oct 1994 -1.80814869 7.212988e+01
## Nov 1994 -5.05582603 8.393527e+01
## Dec 1994 17.94876801 -4.412385e+01
## Jan 1995 3.90119645 -2.341100e+00
## Feb 1995 11.93310734 1.305334e+02
## Mar 1995 -6.11610551 -6.112176e+01
## Apr 1995 -11.30809147 -5.641323e+01
## May 1995 -7.28688877 1.739624e+02
## Jun 1995 6.09957125 -5.411676e+01
## Jul 1995 -4.82963770 1.154269e+02
## Aug 1995 7.90678719 -8.224782e+01
## Sep 1995 -16.33196879 6.519331e+01
## Oct 1995 -8.78259933 -3.716833e+01
## Nov 1995 -0.74832309 -1.074953e+00
## Dec 1995 4.53346797 5.421018e+01
## Jan 1996 4.38155966 3.850160e+01
## Feb 1996 7.30459779 1.001075e+02
## Mar 1996 -11.17699622 -6.260546e+01
## Apr 1996 -13.21774056 -1.410117e+02
## May 1996 -13.09872183 -1.271254e+02
## Jun 1996 0.41847394 -1.545068e+02
## Jul 1996 -9.69500834 -1.438641e+01
## Aug 1996 -18.11442115 1.267209e+02
## Sep 1996 -4.63465887 5.653171e+01
## Oct 1996 3.27938354 1.448169e+02
## Nov 1996 0.77369805 -9.135503e+01
## Dec 1996 -3.24000248 4.615369e+01
## Jan 1997 -12.15089180 1.380083e+00
## Feb 1997 -7.47749491 1.131403e+02
## Mar 1997 -3.83908421 3.546732e+01
## Apr 1997 -11.73866975 -7.640918e+00
## May 1997 -3.51281250 -7.701738e+01
## Jun 1997 -2.33741858 -1.230936e+02
## Jul 1997 -6.43580965 1.798254e+02
## Aug 1997 -5.87360933 6.154715e+01
## Sep 1997 1.63462245 5.617205e+01
## Oct 1997 -10.23675357 -1.017753e+02
## Nov 1997 -14.91446617 1.483798e+02
## Dec 1997 16.72838811 1.236882e+02
## Jan 1998 1.45447617 1.170365e+01
## Feb 1998 -15.31290229 1.635749e+02
## Mar 1998 13.00049510 1.171268e+01
## Apr 1998 -10.75619269 4.244706e+01
## May 1998 15.39861307 2.261293e+01
## Jun 1998 6.35672706 2.079812e+02
## Jul 1998 -5.65373740 -1.966096e+01
## Aug 1998 -4.41548492 -1.257577e+02
## Sep 1998 2.46621070 -1.885083e+02
## Oct 1998 -2.61011753 -1.723266e+02
## Nov 1998 -6.45690877 1.293431e+02
## Dec 1998 5.87141888 -1.638152e+00
## Jan 1999 7.06615701 -6.511092e+01
## Feb 1999 -2.92370246 7.122216e+01
## Mar 1999 2.79699889 1.220707e+02
## Apr 1999 -13.49736731 1.486424e+02
## May 1999 17.86594463 9.349965e+01
## Jun 1999 3.66386193 1.552281e+01
## Jul 1999 -16.40898108 2.314159e+02
## Aug 1999 -8.10147384 -1.897316e+02
## Sep 1999 -7.99117248 1.477720e+02
## Oct 1999 3.80915177 -6.740272e+01
## Nov 1999 1.39918793 7.317285e+01
## Dec 1999 -6.24697198 2.851466e+01
## Jan 2000 0.68197675 3.612068e+01
## Feb 2000 3.98486021 -3.150900e+01
## Mar 2000 6.09491738 1.235700e+01
## Apr 2000 -9.32125748 6.635702e+01
## May 2000 -0.95209901 -6.422054e+01
## Jun 2000 -19.68605834 2.290808e+02
## Jul 2000 4.91632404 5.607762e+01
## Aug 2000 -6.91833302 3.150965e+02
## Sep 2000 3.42103663 1.263056e+01
## Oct 2000 8.86248550 2.543792e+00
## Nov 2000 -17.66931806 3.628495e+01
## Dec 2000 -0.54140353 1.875220e+02
## Jan 2001 22.99871961 4.408241e+01
## Feb 2001 -11.26643672 1.794610e+02
## Mar 2001 -11.74564605 5.083581e+01
## Apr 2001 2.38507120 -6.970882e+01
## May 2001 -24.80647834 -1.742413e+01
## Jun 2001 4.38795495 -2.524204e+02
## Jul 2001 20.31667887 2.349607e+01
## Aug 2001 -2.71970094 4.499701e+00
## Sep 2001 -9.82773387 -5.945454e+01
## Oct 2001 0.58108902 1.085002e+02
## Nov 2001 11.57341837 -8.203475e+01
## Dec 2001 -10.73923045 -1.139479e+02
## Jan 2002 11.73009709 -8.814105e+00
## Feb 2002 7.77763754 2.024793e+01
## Mar 2002 3.59452909 3.480105e+01
## Apr 2002 8.53834422 1.501895e+02
## May 2002 -10.24101143 7.623339e+01
## Jun 2002 17.76122611 -8.983932e+01
## Jul 2002 6.25383858 -1.629129e+02
## Aug 2002 7.56281617 -3.991999e+01
## Sep 2002 1.24156675 1.151387e+02
## Oct 2002 0.42806713 -1.089278e+02
## Nov 2002 4.88677760 3.631937e+01
## Dec 2002 2.44061691 2.585679e+01
## Jan 2003 10.70223119 -1.051993e+02
## Feb 2003 11.44046408 -2.780926e+00
## Mar 2003 -4.13134116 1.068513e+02
## Apr 2003 10.38935365 -1.142134e+02
## May 2003 -8.95895929 3.193102e+01
## Jun 2003 15.06942132 -3.496720e+01
## Jul 2003 4.67460727 1.985163e+00
## Aug 2003 -9.99996016 8.321591e+01
## Sep 2003 0.59716271 4.508182e+01
## Oct 2003 -5.44907056 -2.017367e+01
## Nov 2003 -2.65068618 -3.061819e+00
## Dec 2003 9.03624381 -1.759762e+02
## Jan 2004 15.60013987 9.126506e+01
## Feb 2004 -7.17675732 1.908845e+02
## Mar 2004 -3.16260420 6.337922e+00
## Apr 2004 -0.35325988 7.795115e+01
## May 2004 6.07043577 1.527528e+02
## Jun 2004 -12.33481951 -6.461135e+01
## Jul 2004 0.85468864 8.417124e+01
## Aug 2004 -5.24434164 7.937273e+01
## Sep 2004 10.13295811 -2.528577e+02
## Oct 2004 -3.33336428 1.304324e+02
## Nov 2004 -5.26926654 -6.868965e+01
## Dec 2004 3.47508129 4.280419e+01
## Jan 2005 -8.98258056 1.153560e+02
## Feb 2005 7.22468898 4.509297e+01
## Mar 2005 18.43717958 6.908706e+01
## Apr 2005 -5.29582908 -1.362294e+02
## May 2005 0.88958320 4.644507e+01
## Jun 2005 -7.86250540 -6.850550e+01
## Jul 2005 -6.51932771 -6.518370e+01
## Aug 2005 -10.07646041 9.929281e+00
## Sep 2005 13.94901389 6.107843e+01
## Oct 2005 -2.49176919 -5.223367e+01
## Nov 2005 -8.19211317 4.562504e+01
## Dec 2005 1.38301701 -1.790791e+01
## Jan 2006 -5.41231327 -6.658423e+00
## Feb 2006 -7.08881294 -5.332551e+00
## Mar 2006 1.03185027 -4.294932e+01
## Apr 2006 26.10380678 7.074497e+01
## May 2006 -15.20572391 1.378830e+02
## Jun 2006 -14.52590662 -1.181023e+02
## Jul 2006 6.91118053 -9.698924e+01
## Aug 2006 13.56022610 -3.583571e+01
## Sep 2006 -2.25651818 -7.628338e+01
## Oct 2006 8.30142010 2.427731e+00
## Nov 2006 -2.51631303 6.058405e+01
## Dec 2006 -4.02995029 1.210040e+01
## Jan 2007 -5.90047529 7.012192e+01
## Feb 2007 -5.34757082 -2.951237e+02
## Mar 2007 0.85796438 -6.107377e+01
## Apr 2007 11.01603770 -1.581236e+02
## May 2007 3.83347544 8.767034e+01
## Jun 2007 -6.18547298 1.212380e+02
## Jul 2007 4.27922062 1.537420e+02
## Aug 2007 -6.39963444 -2.100368e+02
## Sep 2007 5.96477396 4.617224e+00
## Oct 2007 -8.39399298 -2.028333e+01
## Nov 2007 9.98275799 1.814987e+01
## Dec 2007 12.11094217 -9.584198e+01
## Jan 2008 3.71657564 -1.913476e+02
## Feb 2008 2.36425191 4.153787e+01
## Mar 2008 -9.20807322 -6.736838e+01
## Apr 2008 1.17141397 5.649969e+01
## May 2008 9.86629095 1.256673e+02
## Jun 2008 20.17671342 6.943351e+01
## Jul 2008 16.84676784 -6.799677e+01
## Aug 2008 -3.34421306 -5.374667e+01
## Sep 2008 -0.62220700 -6.798191e+00
## Oct 2008 -8.20946909 -2.252120e+02
## Nov 2008 -12.08521967 -2.227996e+01
## Dec 2008 3.86271201 -4.530943e+01
## Jan 2009 -11.77092992 -2.371678e+02
## Feb 2009 -15.12584860 -4.915371e+01
## Mar 2009 -15.98841503 1.022592e+02
## Apr 2009 -1.62984242 -1.609276e+02
## May 2009 2.87381061 1.460266e+02
## Jun 2009 -5.92098291 -7.402011e+01
## Jul 2009 3.48625362 7.960895e+01
## Aug 2009 -0.51920336 -1.469571e+01
## Sep 2009 -9.80652997 -7.357061e+01
## Oct 2009 -0.24731977 2.049825e+02
## Nov 2009 3.33570653 6.267776e+01
## Dec 2009 5.60601165 1.473491e+02
## Jan 2010 -5.08519548 8.438488e+01
## Feb 2010 2.95061749 6.197845e+01
## Mar 2010 3.62697266 7.787595e+01
## Apr 2010 4.83797796 1.849958e+01
## May 2010 -1.79534397 -1.193970e+01
## Jun 2010 3.84841036 1.751710e+01
## Jul 2010 -13.14968507 -1.875257e+01
## Aug 2010 18.05482685 -7.696341e+01
## Sep 2010 -5.67368359 -6.006321e+00
## Oct 2010 -2.01900848 1.145784e+02
## Nov 2010 -6.14383236 -8.579173e+00
## Dec 2010 -0.40994730 8.109350e+00
## Jan 2011 -5.21080707 1.952896e+02
## Feb 2011 -6.19300218 8.544977e+01
## Mar 2011 9.46738473 -1.691839e+01
## Apr 2011 0.91945800 -1.253285e+01
## May 2011 -7.37219831 -1.590330e+01
## Jun 2011 16.44727562 1.554015e+01
## Jul 2011 6.93354882 3.708831e+01
## Aug 2011 16.86572571 8.666766e+01
## Sep 2011 -4.57745629 6.718038e+00
## Oct 2011 -3.15171785 -1.381566e+02
## Nov 2011 -1.80352176 6.473956e+01
## Dec 2011 1.03107026 2.829499e+01
## Jan 2012 5.00689660 -6.394017e+01
## Feb 2012 14.11781332 9.249040e+01
## Mar 2012 -1.75504064 -1.572740e+02
## Apr 2012 -7.94499656 1.616675e+00
## May 2012 5.31014093 -2.081181e+01
## Jun 2012 2.64372509 -5.869860e+01
## Jul 2012 25.47113134 2.401041e+01
## Aug 2012 -2.97586621 -6.296879e+01
## Sep 2012 -7.67046775 -1.042549e+02
## Oct 2012 0.59106393 4.262855e+01
## Nov 2012 28.46860602 -3.887581e+01
## Dec 2012 0.49133737 5.876302e+01
## Jan 2013 -4.83927837 4.231937e+01
## Feb 2013 -16.49333553 -9.330088e+01
## Mar 2013 -9.95136372 8.876058e+01
## Apr 2013 7.46468887 2.251565e+01
## May 2013 -23.19237961 -6.010982e+00
## Jun 2013 3.34151183 -8.993900e-01
## Jul 2013 14.18681022 7.672624e+00
## Aug 2013 -5.37777417 1.263374e+02
## Sep 2013 3.38352617 -4.732324e+01
## Oct 2013 -20.69093288 9.970284e+01
## Nov 2013 5.63141272 4.305784e+00
## Dec 2013 13.36041067 1.020564e+02
## Jan 2014 12.48553114 7.745574e+00
## Feb 2014 -11.91445049 4.956615e+01
## Mar 2014 -14.38825447 5.102942e+01
## Apr 2014 16.69462130 2.288205e+00
## May 2014 2.50111905 -9.674965e+01
## Jun 2014 -13.20923393 -1.021459e+02
## Jul 2014 -9.66615780 2.502920e+01
## Aug 2014 2.30830093 7.273911e+01
## Sep 2014 -11.73418395 -1.866498e+00
## Oct 2014 -1.61380397 -5.987378e+01
## Nov 2014 4.92385941 -1.925933e+02
## Dec 2014 8.99675503 -1.645246e+02
## Jan 2015 14.36563631 8.874164e+01
## Feb 2015 3.10854095 7.031450e+00
## Mar 2015 9.37330604 1.327471e+01
## Apr 2015 -0.08174478 6.333804e+01
## May 2015 -10.67822183 -1.225719e+01
## Jun 2015 0.37765862 -1.280325e+02
## Jul 2015 0.90047906 -1.108708e+00
## Aug 2015 26.53751039 -1.216277e+02
## Sep 2015 -3.57038681 3.011200e+02
## Oct 2015 8.13057385 -2.760172e+01
## Nov 2015 -11.32133498 -1.810071e+01
## Dec 2015 0.65506200 -1.261408e+02
## Jan 2016 -4.23454118 -1.127585e+02
## Feb 2016 -2.67085090 3.163212e+01
## Mar 2016 -11.24123564 8.451747e+01
## Apr 2016 0.75501796 1.445487e+02
## May 2016 -7.42450341 5.825727e+01
## Jun 2016 -1.88509772 -2.205444e+02
## Jul 2016 -24.41518735 8.875916e+01
## Aug 2016 11.05542992 1.496582e+02
## Sep 2016 11.65946198 -3.661553e+01
## Oct 2016 8.00545223 5.982152e+01
## Nov 2016 -36.50949324 -7.138575e+01
## Dec 2016 13.59461324 -1.020020e+02
## Jan 2017 -1.97446765 -1.418467e+02
## Feb 2017 6.60003717 1.275735e+02
## Mar 2017 -15.13482186 4.297874e+01
## Apr 2017 6.75029792 -7.122593e-03
## May 2017 6.83285767 1.133312e+02
## Jun 2017 13.85250424 -8.454449e+01
## Jul 2017 -2.13087645 -6.499844e+01
## Aug 2017 6.45481173 -7.077042e+00
## Sep 2017 -4.48165991 -9.158163e+01
## Oct 2017 2.68676037 4.905732e+00
## Nov 2017 -4.77068676 -1.372080e+02
## Dec 2017 -4.23723718 5.590481e+01
## Jan 2018 8.43140092 1.108820e+01
## Feb 2018 -9.42949389 1.232511e+02
## Mar 2018 -5.60431545 1.074962e+02
## Apr 2018 8.79702406 -5.484571e+01
## May 2018 -2.22376279 -2.860896e+01
## Jun 2018 6.00763680 -8.161407e+01
## Jul 2018 -8.96516403 9.839624e+01
## Aug 2018 -0.84102663 2.660832e+00
## Sep 2018 11.15494009 9.268938e+01
## Oct 2018 0.73921597 1.929664e+01
## Nov 2018 2.05017910 7.382390e+01
## Dec 2018 3.33099570 6.655840e+01
## Jan 2019 0.87912296 -6.087581e+01
## Feb 2019 6.12604126 -2.184289e+02
## Mar 2019 -15.34957108 4.224552e+01
## Apr 2019 -9.07673559 1.481240e+02
## May 2019 -2.31785006 -1.320106e+01
## Jun 2019 -14.76196828 -3.581356e+01
## Jul 2019 1.34203619 -1.221866e+02
## Aug 2019 5.63593963 1.781609e+02
## Sep 2019 -10.70075583 -2.916401e+01
## Oct 2019 9.61445568 -1.151497e+02
## Nov 2019 10.85835421 1.327556e+02
## Dec 2019 14.85343798 -2.602837e+02
## Jan 2020 12.42957317 -1.090972e+01
## Feb 2020 -8.44701502 -2.571147e+02
## Mar 2020 -4.81670643 2.328622e+01
## Apr 2020 -2.37399876 9.100171e+01
## May 2020 4.91041337 2.838789e+01
## Jun 2020 6.24148499 -2.796864e+01
## Jul 2020 -5.44323297 1.023880e+01
## Aug 2020 -14.48134785 -2.330489e+01
## Sep 2020 2.55832130 -1.275781e+02
## Oct 2020 16.71282078 -2.235519e+02
## Nov 2020 22.09710745 2.668214e+01
## Dec 2020 6.52103946 -8.850549e+01
##
## $description
## type coeff
## var1 Undefined NA
## var2 Undefined NA
mysa2 <- tramoseats(myseries, myspec2,
userdefined = c("decomposition.sa_lin_f", "decomposition.sa_lin_e"))
mysa2
## [4m[1mRegARIMA[22m[24m
## y = regression model + arima (0, 1, 1, 0, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Theta(1) -0.6182 0.043
## BTheta(1) -0.6651 0.042
##
## Estimate Std. Error
## Mean 1.288e-03 0.017
## r.var1 -2.479e-03 0.010
## r.var2 -7.886e-04 0.001
## Monday 5.802e-01 0.239
## Tuesday 8.531e-01 0.238
## Wednesday 1.068e+00 0.239
## Thursday 2.389e-02 0.239
## Friday 8.809e-01 0.241
## Saturday -1.560e+00 0.237
## Leap year 2.172e+00 0.726
## Easter [6] -2.169e+00 0.482
## TC (4-2020) -2.110e+01 2.230
## TC (3-2020) -2.117e+01 2.222
## AO (5-2011) 1.283e+01 1.910
## LS (11-2008) -1.240e+01 1.657
##
##
## Residual standard error: 2.241 on 341 degrees of freedom
## Log likelihood = -802.8, aic = 1642 aicc = 1644, bic(corrected for length) = 1.892
##
##
##
## [4m[1mDecomposition[22m[24m
## [1mModel[22m
## D : 1 - B - B^12 + B^13
## MA : 1 - 0.618177 B - 0.665118 B^12 + 0.411161 B^13
##
##
## [1mSA[22m
## D : 1 - 2.000000 B + B^2
## MA : 1 - 1.588165 B + 0.600809 B^2
## Innovation variance: 0.7102212
##
## [1mTrend[22m
## D : 1 - 2.000000 B + B^2
## MA : 1 + 0.033325 B - 0.966675 B^2
## Innovation variance: 0.02555918
##
## [1mSeasonal[22m
## D : 1 + B + B^2 + B^3 + B^4 + B^5 + B^6 + B^7 + B^8 + B^9 + B^10 + B^11
## MA : 1 + 0.852070 B + 0.614974 B^2 + 0.347649 B^3 + 0.089792 B^4 - 0.133411 B^5 - 0.307987 B^6 - 0.428720 B^7 - 0.497363 B^8 - 0.521604 B^9 - 0.515186 B^10 - 0.500213 B^11
## Innovation variance: 0.03107939
##
## [1mIrregular[22m
## Innovation variance: 0.4514145
##
##
##
## [4m[1mFinal[22m[24m
## Last observed values
## y sa t s i
## Jan 2020 101.0 102.80574 103.2663 -1.8057389 -0.46058826
## Feb 2020 100.1 103.39224 103.3580 -3.2922409 0.03427508
## Mar 2020 91.8 82.28866 103.4711 9.5113382 -21.18243733
## Apr 2020 66.7 66.14372 103.6707 0.5562849 -37.52701486
## May 2020 73.7 79.36670 104.0185 -5.6667047 -24.65180977
## Jun 2020 98.2 88.15399 104.3199 10.0460072 -16.16589847
## Jul 2020 97.4 92.95850 104.3863 4.4414966 -11.42774980
## Aug 2020 71.7 97.34564 104.1761 -25.6456433 -6.83040987
## Sep 2020 104.7 97.12883 103.7508 7.5711731 -6.62200793
## Oct 2020 106.7 98.49301 103.3233 8.2069895 -4.83027377
## Nov 2020 101.6 100.21036 102.9830 1.3896353 -2.77265649
## Dec 2020 96.6 99.16046 102.7377 -2.5604563 -3.57720825
##
## Forecasts:
## y_f sa_f t_f s_f i_f
## Jan 2021 94.79147 101.1974 102.6470 -6.374640 -1.44963913
## Feb 2021 97.57263 101.6242 102.6390 -3.944525 -1.01474739
## Mar 2021 113.22669 101.9207 102.6310 11.312253 -0.71032317
## Apr 2021 103.54072 102.1260 102.6232 1.383623 -0.49722622
## May 2021 96.31037 102.2674 102.6155 -5.947324 -0.34805836
## Jun 2021 112.89644 102.3642 102.6079 10.600519 -0.24364085
## Jul 2021 104.26039 102.4298 102.6004 1.869623 -0.17054859
## Aug 2021 79.33460 102.4736 102.5930 -23.145397 -0.11938402
## Sep 2021 109.19025 102.5021 102.5857 6.739725 -0.08356881
## Oct 2021 108.77166 102.5200 102.5785 6.327370 -0.05849817
## Nov 2021 106.64706 102.5305 102.5715 4.101246 -0.04094872
## Dec 2021 99.87823 102.5359 102.5645 -2.584463 -0.02866410
##
##
## [4m[1mDiagnostics[22m[24m
## [1m Relative contribution of the components to the stationary
## portion of the variance in the original series,
## after the removal of the long term trend [22m
## Trend computed by Hodrick-Prescott filter (cycle length = 8.0 years)
## Component
## Cycle 1.850
## Seasonal 59.076
## Irregular 0.993
## TD & Hol. 2.546
## Others 33.488
## Total 97.953
##
## [1m Combined test in the entire series [22m
## Non parametric tests for stable seasonality
## P.value
## Kruskall-Wallis test 0.000
## Test for the presence of seasonality assuming stability 0.000
## Evolutive seasonality test 0.067
##
## Identifiable seasonality present
##
## [1m Residual seasonality tests [22m
## P.value
## qs test on sa 1.000
## qs test on i 1.000
## f-test on sa (seasonal dummies) 1.000
## f-test on i (seasonal dummies) 1.000
## Residual seasonality (entire series) 1.000
## Residual seasonality (last 3 years) 0.962
## f-test on sa (td) 0.946
## f-test on i (td) 1.000
##
##
## [4m[1mAdditional output variables[22m[24m
## Names of additional variables (2):
## decomposition.sa_lin_f, decomposition.sa_lin_e
plot(mysa2)
plot(mysa2$regarima)
plot(mysa2$decomposition)
TRAMO-SEATS model specification, SA/TRAMO-SEATS
myseries <- ipi_c_eu[, "FR"]
myspec1 <- tramoseats_spec(spec = c("RSAfull"))
mysa1 <- tramoseats(myseries, spec = myspec1)
# To modify a pre-specified model specification
myspec2 <- tramoseats_spec(spec = "RSAfull",
tradingdays.mauto = "Unused",
tradingdays.option = "WorkingDays",
easter.type = "Standard",
automdl.enabled = FALSE, arima.mu = TRUE)
mysa2 <- tramoseats(myseries, spec = myspec2)
# To modify the model specification of a "SA" object
myspec3 <- tramoseats_spec(mysa1,
tradingdays.mauto = "Unused",
tradingdays.option = "WorkingDays",
easter.type = "Standard",
automdl.enabled = FALSE, arima.mu = TRUE)
mysa3 <- tramoseats(myseries, myspec3)
# To modify the model specification of a "SA_spec" object
myspec4 <- tramoseats_spec(myspec1, tradingdays.mauto = "Unused",
tradingdays.option = "WorkingDays",
easter.type = "Standard", automdl.enabled = FALSE, arima.mu = TRUE)
mysa4 <- tramoseats(myseries, myspec4)
# Pre-specified outliers
myspec5 <- tramoseats_spec(spec = "RSAfull",
usrdef.outliersEnabled = TRUE,
usrdef.outliersType = c("LS", "LS"),
usrdef.outliersDate = c("2008-10-01", "2003-01-01"),
usrdef.outliersCoef = c(10,-8), transform.function = "None")
s_preOut(myspec5)
mysa5 <- tramoseats(myseries, myspec5)
mysa5
## [4m[1mRegARIMA[22m[24m
## y = regression model + arima (2, 1, 0, 1, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.4872 0.051
## Phi(2) 0.2964 0.051
## BPhi(1) -0.2070 0.071
## BTheta(1) -0.8048 0.044
##
## Estimate Std. Error
## Week days 0.6814 0.039
## Leap year 1.9125 0.726
## Easter [6] -2.4901 0.461
## TC (4-2020) -22.4492 2.288
## TC (3-2020) -21.2013 2.296
## AO (5-2011) 12.6414 1.908
## LS (11-2008) -14.2909 1.954
##
## Fixed outliers:
## Coefficients
## LS (10-2008) 10
## LS (1-2003) -8
##
##
## Residual standard error: 2.421 on 347 degrees of freedom
## Log likelihood = -831.3, aic = 1687 aicc = 1688, bic(corrected for length) = 1.949
##
##
##
## [4m[1mDecomposition[22m[24m
## [1mModel[22m
## AR : 1 + 0.487236 B + 0.296353 B^2 - 0.207019 B^12 - 0.100867 B^13 - 0.061351 B^14
## D : 1 - B - B^12 + B^13
## MA : 1 - 0.804783 B^12
##
##
## [1mSA[22m
## AR : 1 - 0.389767 B - 0.130954 B^2 - 0.259902 B^3
## D : 1 - 2.000000 B + B^2
## MA : 1 - 1.807789 B + 0.901808 B^2 - 0.269318 B^3 + 0.305238 B^4 - 0.126109 B^5
## Innovation variance: 0.434195
##
## [1mTrend[22m
## AR : 1 - 0.877002 B
## D : 1 - 2.000000 B + B^2
## MA : 1 - 0.714788 B - 0.995207 B^2 + 0.719581 B^3
## Innovation variance: 0.02178125
##
## [1mSeasonal[22m
## AR : 1 + 0.877002 B + 0.769133 B^2 + 0.674532 B^3 + 0.591566 B^4 + 0.518805 B^5 + 0.454993 B^6 + 0.399030 B^7 + 0.349950 B^8 + 0.306907 B^9 + 0.269159 B^10 + 0.236053 B^11
## D : 1 + B + B^2 + B^3 + B^4 + B^5 + B^6 + B^7 + B^8 + B^9 + B^10 + B^11
## MA : 1 + 2.178999 B + 3.063892 B^2 + 4.121863 B^3 + 5.003640 B^4 + 5.601993 B^5 + 6.042224 B^6 + 6.245708 B^7 + 6.304190 B^8 + 6.112595 B^9 + 5.879629 B^10 + 5.538195 B^11 + 4.649065 B^12 + 3.623707 B^13 + 2.832188 B^14 + 1.903031 B^15 + 1.111724 B^16 + 0.543666 B^17 + 0.100438 B^18 - 0.158107 B^19 - 0.300012 B^20 - 0.253276 B^21 - 0.169309 B^22
## Innovation variance: 0.2937308
##
## [1mTransitory[22m
## AR : 1 + 0.487236 B + 0.296353 B^2
## MA : 1 + 0.374200 B + B^2
## Innovation variance: 0.0004441626
##
## [1mIrregular[22m
## Innovation variance: 0.2270517
##
##
##
## [4m[1mFinal[22m[24m
## Last observed values
## y sa t s i
## Jan 2020 101.0 103.36086 103.6698 -2.3608556 -0.30898902
## Feb 2020 100.1 103.77440 103.7591 -3.6743960 0.01526074
## Mar 2020 91.8 82.68181 103.8823 9.1181885 -21.20051445
## Apr 2020 66.7 66.03104 104.0672 0.6689644 -38.03612893
## May 2020 73.7 78.40145 104.3488 -4.7014498 -25.94737674
## Jun 2020 98.2 87.17684 104.5662 11.0231647 -17.38939710
## Jul 2020 97.4 92.05260 104.5630 5.3474007 -12.51040945
## Aug 2020 71.7 96.37053 104.3138 -24.6705259 -7.94324202
## Sep 2020 104.7 97.23252 103.8686 7.4674839 -6.63612508
## Oct 2020 106.7 98.61143 103.4107 8.0885663 -4.79928434
## Nov 2020 101.6 100.11916 103.0293 1.4808373 -2.91011190
## Dec 2020 96.6 99.92823 102.7128 -3.3282284 -2.78459980
##
## Forecasts:
## y_f sa_f t_f s_f i_f
## Jan 2021 93.59565 100.9960 102.4996 -7.399679 -1.50358792
## Feb 2021 97.28250 101.2996 102.3539 -4.015335 -1.05431433
## Mar 2021 111.80873 101.4867 102.2239 10.324214 -0.73723634
## Apr 2021 103.12191 101.5917 102.1076 1.532091 -0.51591304
## May 2021 95.98703 101.6419 102.0033 -5.653012 -0.36144565
## Jun 2021 112.41967 101.6567 101.9096 10.762935 -0.25290781
## Jul 2021 103.94320 101.6482 101.8251 2.296412 -0.17699539
## Aug 2021 78.58807 101.6248 101.7488 -23.036711 -0.12394718
## Sep 2021 109.12657 101.5928 101.6796 7.534699 -0.08675036
## Oct 2021 107.23292 101.5558 101.6166 5.678242 -0.06071652
## Nov 2021 105.47170 101.5165 101.5590 3.956022 -0.04250960
## Dec 2021 99.15981 101.4766 101.5063 -2.317856 -0.02975541
##
##
## [4m[1mDiagnostics[22m[24m
## [1m Relative contribution of the components to the stationary
## portion of the variance in the original series,
## after the removal of the long term trend [22m
## Trend computed by Hodrick-Prescott filter (cycle length = 8.0 years)
## Component
## Cycle 3.137
## Seasonal 61.551
## Irregular 0.352
## TD & Hol. 2.592
## Others 30.919
## Total 98.551
##
## [1m Combined test in the entire series [22m
## Non parametric tests for stable seasonality
## P.value
## Kruskall-Wallis test 0.000
## Test for the presence of seasonality assuming stability 0.000
## Evolutive seasonality test 0.243
##
## Identifiable seasonality present
##
## [1m Residual seasonality tests [22m
## P.value
## qs test on sa 1.000
## qs test on i 1.000
## f-test on sa (seasonal dummies) 1.000
## f-test on i (seasonal dummies) 1.000
## Residual seasonality (entire series) 1.000
## Residual seasonality (last 3 years) 0.990
## f-test on sa (td) 0.024
## f-test on i (td) 0.089
##
##
## [4m[1mAdditional output variables[22m[24m
s_preOut(mysa5)
# User-defined calendar regressors
var1 <- ts(rnorm(length(myseries))*10, start = start(myseries), frequency = 12)
var2 <- ts(rnorm(length(myseries))*100, start = start(myseries), frequency = 12)
var<- ts.union(var1, var2)
myspec6 <- tramoseats_spec(spec = "RSAfull", tradingdays.option = "UserDefined",
usrdef.varEnabled = TRUE, usrdef.var = var,
usrdef.varType = c("Calendar", "Calendar"))
## Warning: With tradingdays.option = "UserDefined", the parameters tradingdays.leapyear and tradingdays.stocktd are ignored.
s_preVar(myspec6)
## $series
## var1 var2
## Jan 1990 11.234807626 43.6117770
## Feb 1990 6.155548267 241.4531764
## Mar 1990 0.055691306 -48.6326296
## Apr 1990 4.728702120 7.7603197
## May 1990 -1.574199736 -141.8350122
## Jun 1990 -10.184838876 12.4423099
## Jul 1990 1.739487973 43.0258310
## Aug 1990 11.715538195 194.0977073
## Sep 1990 0.718647582 23.8808027
## Oct 1990 0.576121743 -1.0277507
## Nov 1990 -6.074500475 -120.0488376
## Dec 1990 5.765268083 -132.4614098
## Jan 1991 6.857432304 20.7786161
## Feb 1991 -2.365449402 167.8685311
## Mar 1991 -4.126971884 129.7634413
## Apr 1991 -1.529481579 -45.4953222
## May 1991 2.927648020 -117.8217060
## Jun 1991 23.364132210 160.5386009
## Jul 1991 -4.618307793 -124.1235718
## Aug 1991 2.886227185 110.8317362
## Sep 1991 -12.111800914 -10.5908822
## Oct 1991 -3.808383965 34.9078632
## Nov 1991 2.522180964 48.5293273
## Dec 1991 9.863013375 -99.4292415
## Jan 1992 -5.275371916 -130.0413015
## Feb 1992 -14.240569441 115.6717553
## Mar 1992 22.923206383 -74.1035415
## Apr 1992 10.318737830 -22.6166988
## May 1992 16.474421391 114.2370786
## Jun 1992 11.508897501 -13.5403449
## Jul 1992 -6.816442390 11.6727689
## Aug 1992 -13.184547665 7.8731736
## Sep 1992 15.603113556 -80.2385177
## Oct 1992 23.252281114 4.5016544
## Nov 1992 -11.636430320 -175.1405260
## Dec 1992 -15.766189472 32.6256073
## Jan 1993 -1.580952748 60.4646295
## Feb 1993 2.820184769 70.8368439
## Mar 1993 13.098329364 17.7199759
## Apr 1993 -9.062778883 15.9205977
## May 1993 -6.053123846 -136.6111001
## Jun 1993 2.532178506 37.2508618
## Jul 1993 -2.629423030 87.8370076
## Aug 1993 -5.916965301 114.3284575
## Sep 1993 2.671769660 143.3081166
## Oct 1993 15.771723697 135.7432155
## Nov 1993 -3.097506765 -48.2075314
## Dec 1993 -9.556645551 128.0200049
## Jan 1994 -1.859144001 25.6967099
## Feb 1994 -1.397367834 127.4583267
## Mar 1994 -3.674063092 -22.6820933
## Apr 1994 -6.170818530 -76.0094424
## May 1994 2.413915626 -115.1342568
## Jun 1994 3.325563383 109.7706099
## Jul 1994 1.418301735 -5.7578553
## Aug 1994 -10.018682077 38.1102502
## Sep 1994 -1.215301684 15.7158068
## Oct 1994 12.040429272 -96.2044594
## Nov 1994 -30.162342059 -178.4498443
## Dec 1994 8.646373635 -24.6646742
## Jan 1995 -5.436003022 -53.6416244
## Feb 1995 -2.152556750 118.3308262
## Mar 1995 -2.977573434 -171.2538775
## Apr 1995 -3.163786655 62.3973780
## May 1995 9.183399187 -37.5760694
## Jun 1995 -10.126869911 -24.2824120
## Jul 1995 -20.234008846 -19.1468571
## Aug 1995 20.052110118 -11.5480964
## Sep 1995 21.740195705 83.6052201
## Oct 1995 -4.896841080 -29.8527272
## Nov 1995 2.197424959 126.4018770
## Dec 1995 6.469090510 84.7451332
## Jan 1996 5.360211450 -128.4843489
## Feb 1996 -6.505032820 -109.2726002
## Mar 1996 3.779507865 -115.4717240
## Apr 1996 5.002069531 101.7173870
## May 1996 -1.046977110 -77.1328412
## Jun 1996 14.558418052 75.4845014
## Jul 1996 -7.829178672 24.7091192
## Aug 1996 -4.341482424 55.3327799
## Sep 1996 -1.678633973 82.0609337
## Oct 1996 1.041632678 73.2633026
## Nov 1996 2.963769605 -12.1899044
## Dec 1996 -3.030768366 -81.5265582
## Jan 1997 -12.355094086 -52.0475501
## Feb 1997 -3.272128348 128.7551415
## Mar 1997 -14.637592934 -145.9930514
## Apr 1997 -1.986210837 -130.2789515
## May 1997 -11.808176000 -23.5593755
## Jun 1997 1.605981584 57.1521335
## Jul 1997 3.318518982 231.1588470
## Aug 1997 8.101140756 187.3858580
## Sep 1997 7.270425617 -2.8650956
## Oct 1997 -15.913850078 128.9243361
## Nov 1997 -4.282748341 -129.3264010
## Dec 1997 -6.016399555 42.2418381
## Jan 1998 10.858287578 24.4842685
## Feb 1998 0.076675852 143.4676363
## Mar 1998 -4.802342233 7.4072050
## Apr 1998 -8.290044799 -8.0915263
## May 1998 -10.190330747 242.4498144
## Jun 1998 -3.327404805 4.2256334
## Jul 1998 4.992958169 -56.0061724
## Aug 1998 -25.034040761 17.4261218
## Sep 1998 14.508040547 -55.3224385
## Oct 1998 0.949633955 -128.9847332
## Nov 1998 2.800604070 16.6655395
## Dec 1998 2.432992493 -24.9120457
## Jan 1999 -11.105768535 -90.5603354
## Feb 1999 -1.141306581 213.6045638
## Mar 1999 -4.746882351 -31.5167782
## Apr 1999 -13.684097269 -26.5461470
## May 1999 14.049748736 -101.1250134
## Jun 1999 -3.598050056 -186.9326611
## Jul 1999 1.254654424 -105.1561005
## Aug 1999 16.680241725 125.3757660
## Sep 1999 -5.540657507 41.6393382
## Oct 1999 -5.539000742 132.0062806
## Nov 1999 12.105096216 42.1918679
## Dec 1999 -1.585777314 64.9051374
## Jan 2000 -0.665011245 -50.0544309
## Feb 2000 5.020999609 77.3418826
## Mar 2000 -2.282317442 144.5517187
## Apr 2000 8.523491625 63.5976475
## May 2000 3.292145337 -1.2232484
## Jun 2000 -6.655611512 -6.6138226
## Jul 2000 23.649508488 0.9186052
## Aug 2000 -7.329523266 -71.8824712
## Sep 2000 -10.905306510 185.0638525
## Oct 2000 15.375392118 62.9172599
## Nov 2000 -12.425216944 -66.7364224
## Dec 2000 -7.928351238 33.0121775
## Jan 2001 1.527505638 -148.1411888
## Feb 2001 20.193178304 19.4806292
## Mar 2001 8.477779915 -35.8351023
## Apr 2001 3.271957379 -57.1397861
## May 2001 19.295011633 -62.4689098
## Jun 2001 -5.403058644 -19.9963637
## Jul 2001 14.277287602 -35.1090990
## Aug 2001 17.346477288 -132.8604126
## Sep 2001 6.125320313 39.6257824
## Oct 2001 -10.394691357 93.9274143
## Nov 2001 -12.192067715 -16.0568036
## Dec 2001 -29.822123400 -167.0814056
## Jan 2002 7.202309185 144.5099736
## Feb 2002 -5.563820581 134.2099921
## Mar 2002 -6.332598449 73.3275084
## Apr 2002 5.594526425 38.9482366
## May 2002 6.723717891 -42.8095726
## Jun 2002 -1.887504499 -35.0482332
## Jul 2002 -30.535280594 20.5112498
## Aug 2002 15.778904542 -129.7654078
## Sep 2002 8.782476522 38.7666516
## Oct 2002 4.451493834 -205.5516201
## Nov 2002 15.198679257 -8.2284735
## Dec 2002 -7.456577577 65.2772777
## Jan 2003 17.688261402 194.9443703
## Feb 2003 8.457541471 -174.6650335
## Mar 2003 -6.064682216 -181.7939588
## Apr 2003 -12.679261424 -43.8948802
## May 2003 1.137128364 7.5951254
## Jun 2003 14.430446826 -0.6604290
## Jul 2003 -1.165532124 -26.3328650
## Aug 2003 7.310763240 198.6583508
## Sep 2003 -17.575805112 107.7024613
## Oct 2003 0.157910786 44.6283782
## Nov 2003 -15.513333129 155.6873152
## Dec 2003 4.984927457 -27.7133829
## Jan 2004 1.060115219 24.7037296
## Feb 2004 11.140501802 51.7389588
## Mar 2004 -26.074656167 -195.7885633
## Apr 2004 -0.834601879 -30.9330235
## May 2004 9.943919495 -25.7322066
## Jun 2004 0.973985082 -4.0920322
## Jul 2004 7.565938876 -139.7692209
## Aug 2004 6.025771806 -32.5178929
## Sep 2004 -23.143818118 112.5720896
## Oct 2004 14.856040555 109.6676143
## Nov 2004 4.884692421 -11.3066952
## Dec 2004 0.077337283 -110.5767274
## Jan 2005 10.726038932 103.6583501
## Feb 2005 -7.552226346 90.2836211
## Mar 2005 -10.583560395 47.1933735
## Apr 2005 17.488239663 -107.2281352
## May 2005 6.559794423 107.4902120
## Jun 2005 -0.385241809 38.2041332
## Jul 2005 2.335189888 -85.8946737
## Aug 2005 -8.347241299 -45.3458741
## Sep 2005 2.024058608 106.8110104
## Oct 2005 3.062151573 -137.4960745
## Nov 2005 -5.269803828 -3.4702879
## Dec 2005 -5.658371644 85.8070091
## Jan 2006 1.728853886 -37.3121301
## Feb 2006 10.676148697 -101.5070526
## Mar 2006 -3.288199825 5.6047948
## Apr 2006 -1.597885233 -120.7537838
## May 2006 4.641523749 -44.3201289
## Jun 2006 -7.300623983 108.5168287
## Jul 2006 -9.535529016 62.9518050
## Aug 2006 2.097650752 55.5874481
## Sep 2006 -6.157656714 -14.0754618
## Oct 2006 -8.504228321 -220.5949948
## Nov 2006 -13.564186691 36.1038402
## Dec 2006 1.103514001 -50.6022563
## Jan 2007 -15.711526756 -46.2326766
## Feb 2007 8.256621260 -243.9248745
## Mar 2007 -14.213470997 4.7417407
## Apr 2007 -3.960475365 -11.2618981
## May 2007 -7.591677514 86.8939307
## Jun 2007 2.724016648 53.6299481
## Jul 2007 8.305270339 60.4049196
## Aug 2007 9.093746118 198.6630722
## Sep 2007 5.652710849 -106.6478829
## Oct 2007 -3.061140557 -96.1825588
## Nov 2007 -5.129955408 27.3739603
## Dec 2007 11.384312490 165.7407990
## Jan 2008 6.957235557 27.4849159
## Feb 2008 -2.920576717 77.4997439
## Mar 2008 -6.231155691 46.8634032
## Apr 2008 14.748268309 63.3486630
## May 2008 11.572517345 -107.4677334
## Jun 2008 -0.789923493 54.1952152
## Jul 2008 -5.651844253 -32.3363143
## Aug 2008 2.657484540 6.4837613
## Sep 2008 1.703845889 -115.6983941
## Oct 2008 4.186551754 -40.4069220
## Nov 2008 -1.341028669 33.8432076
## Dec 2008 18.029057568 80.2038736
## Jan 2009 3.347907315 -175.7206211
## Feb 2009 -4.860458616 2.9619396
## Mar 2009 -0.320136211 -25.6459963
## Apr 2009 9.123564990 -72.9732327
## May 2009 -20.060283865 58.4161454
## Jun 2009 20.620234375 12.3589334
## Jul 2009 -7.773773571 -142.6444879
## Aug 2009 14.234679204 2.6286082
## Sep 2009 -13.261166915 -47.6274666
## Oct 2009 -11.135598272 11.7455534
## Nov 2009 10.479581080 -67.2006165
## Dec 2009 7.800976736 85.9890431
## Jan 2010 -3.387123363 -43.7037449
## Feb 2010 5.125327757 -115.7184473
## Mar 2010 1.625854467 -52.6222751
## Apr 2010 -18.353748223 108.2198559
## May 2010 11.221637605 98.0311654
## Jun 2010 -15.302272921 104.0913040
## Jul 2010 7.990990744 105.1904709
## Aug 2010 7.243572010 41.7279790
## Sep 2010 -3.501690583 157.8949037
## Oct 2010 8.154337412 -49.8198166
## Nov 2010 -0.961026669 50.4710207
## Dec 2010 13.895581586 47.5259601
## Jan 2011 -4.632822057 -219.2269790
## Feb 2011 0.541099317 -16.7273725
## Mar 2011 30.477809857 -249.7892940
## Apr 2011 -4.384835228 107.3955911
## May 2011 1.640247981 -54.2164979
## Jun 2011 -2.921833002 -55.7382873
## Jul 2011 -14.656898644 18.3661830
## Aug 2011 -0.169942072 54.0570071
## Sep 2011 5.062161459 -25.4876020
## Oct 2011 -1.266687367 -136.2110973
## Nov 2011 -4.877009671 -72.1897568
## Dec 2011 -4.305451828 -162.2781739
## Jan 2012 -2.043896315 -2.8551048
## Feb 2012 -2.848390714 -127.9557277
## Mar 2012 -14.131972174 44.0741922
## Apr 2012 -9.521882379 -137.7309761
## May 2012 -7.354083274 -106.0828479
## Jun 2012 -6.279338576 -253.1962405
## Jul 2012 6.824609443 -23.8841675
## Aug 2012 -3.998299619 71.6692832
## Sep 2012 5.134261780 85.5081284
## Oct 2012 1.698055272 -43.7331112
## Nov 2012 9.987218965 64.1348354
## Dec 2012 0.266558354 -103.0179556
## Jan 2013 22.034300886 114.1895970
## Feb 2013 20.066816505 -0.8946223
## Mar 2013 -4.170803391 -1.4794926
## Apr 2013 17.185326878 65.5088819
## May 2013 -12.924795014 -128.4663963
## Jun 2013 -12.666714697 91.7723135
## Jul 2013 11.691635851 -1.0859766
## Aug 2013 11.696400561 131.8121367
## Sep 2013 -17.735632511 63.1771531
## Oct 2013 -6.434869448 -99.1479685
## Nov 2013 0.716947318 -42.8961616
## Dec 2013 14.972802577 28.7925118
## Jan 2014 -12.417557201 -22.7077565
## Feb 2014 20.556503859 144.5969112
## Mar 2014 -18.159070655 69.7648195
## Apr 2014 24.090818268 55.4066365
## May 2014 -15.689721832 15.9347864
## Jun 2014 -2.165316157 -16.3189430
## Jul 2014 -11.909334420 5.4885957
## Aug 2014 11.077330669 200.6735495
## Sep 2014 -1.600483077 61.0574567
## Oct 2014 9.036763750 -37.4860046
## Nov 2014 0.782286803 -67.8554326
## Dec 2014 -1.468320472 -157.4058305
## Jan 2015 -6.988097216 14.2919097
## Feb 2015 11.989069290 195.6263746
## Mar 2015 -9.706859680 -161.9399743
## Apr 2015 -1.149433397 -77.4307617
## May 2015 2.813355968 179.9657588
## Jun 2015 2.405232174 118.6968243
## Jul 2015 7.141597762 138.6246306
## Aug 2015 -19.914063875 131.5800711
## Sep 2015 20.498617257 -55.3995812
## Oct 2015 6.843212259 -39.5304416
## Nov 2015 10.550117941 12.9391465
## Dec 2015 -10.334509013 171.0296610
## Jan 2016 12.656742553 -5.9556750
## Feb 2016 -13.303401407 -130.3606612
## Mar 2016 0.269598722 -46.5006950
## Apr 2016 -8.851672682 36.1157038
## May 2016 12.395533897 184.3767344
## Jun 2016 -25.909231875 13.0823678
## Jul 2016 -5.143942160 137.6961776
## Aug 2016 0.236933179 122.1151520
## Sep 2016 -2.516082471 -28.9411557
## Oct 2016 -13.700396692 -185.7560321
## Nov 2016 -2.531945584 13.0753720
## Dec 2016 6.416601661 34.5917662
## Jan 2017 -3.396212375 -33.9502904
## Feb 2017 -0.002108138 37.8270580
## Mar 2017 1.057872552 -88.5302931
## Apr 2017 -4.552074737 173.0041388
## May 2017 -7.832728483 45.0314465
## Jun 2017 0.913232698 119.7699082
## Jul 2017 -10.595446406 0.9300345
## Aug 2017 -0.451119969 165.8137343
## Sep 2017 -10.514388107 184.4209179
## Oct 2017 9.447892378 -13.2835419
## Nov 2017 18.792540121 66.3743856
## Dec 2017 -7.060850997 129.8350037
## Jan 2018 -2.316912984 -20.9998325
## Feb 2018 1.655942175 30.4825898
## Mar 2018 4.970637106 -137.1669677
## Apr 2018 -6.604031167 9.8890768
## May 2018 -6.193192969 57.0841294
## Jun 2018 9.094415148 -121.3925222
## Jul 2018 -10.034175707 42.3537821
## Aug 2018 -4.690884802 -49.1857374
## Sep 2018 -1.869109417 68.3902581
## Oct 2018 16.176740118 -11.4934829
## Nov 2018 26.735912006 -119.5400315
## Dec 2018 14.755450217 -107.3517575
## Jan 2019 -3.237985306 131.2697803
## Feb 2019 -4.791866962 17.5526585
## Mar 2019 -7.966137675 94.6401135
## Apr 2019 13.347948865 15.4598236
## May 2019 -28.821426446 85.6812134
## Jun 2019 -14.526921644 37.9816153
## Jul 2019 -5.395192314 -11.3740450
## Aug 2019 1.469720137 178.3033072
## Sep 2019 16.890078271 66.7086924
## Oct 2019 -10.025343992 35.9620299
## Nov 2019 3.297080277 117.1104367
## Dec 2019 1.105361193 -34.6423806
## Jan 2020 7.405422230 -13.4323388
## Feb 2020 2.625440075 61.7714983
## Mar 2020 13.880799582 -67.8424958
## Apr 2020 -3.086851401 112.8910801
## May 2020 1.918177722 3.3454882
## Jun 2020 -1.659658092 -112.3963655
## Jul 2020 8.667010645 143.1999747
## Aug 2020 -1.564362696 -29.1102644
## Sep 2020 -5.955333637 -43.8024686
## Oct 2020 0.329007119 6.0512652
## Nov 2020 -1.633428436 39.0953103
## Dec 2020 -11.155930235 -111.9258917
##
## $description
## type coeff
## var1 Calendar NA
## var2 Calendar NA
mysa6 <- tramoseats(myseries, myspec6)
## Warning in tramoseats.SA_spec(myseries, myspec6): [decomposition.Model
## decomposition: Parameters cut off]
myspec7 <- tramoseats_spec(spec = "RSAfull",
usrdef.varEnabled = TRUE,
usrdef.var = var, usrdef.varCoef = c(17,-1),
transform.function = "None")
mysa7 <- tramoseats(myseries, myspec7)
# Pre-specified ARMA coefficients
myspec8 <- tramoseats_spec(spec = "RSAfull",
arima.coefEnabled = TRUE, automdl.enabled = FALSE,
arima.p = 2, arima.q = 0,
arima.bp = 1, arima.bq = 1,
arima.coef = c(-0.12, -0.12, -0.3, -0.99),
arima.coefType = rep("Fixed", 4))
mysa8 <- tramoseats(myseries, myspec8)
## Warning in tramoseats.SA_spec(myseries, myspec8): [decomposition.Model
## decomposition: Parameters cut off]
mysa8
## [4m[1mRegARIMA[22m[24m
## y = regression model + arima (2, 1, 0, 1, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) -0.12 0
## Phi(2) -0.12 0
## BPhi(1) -0.30 0
## BTheta(1) -0.99 0
##
## Estimate Std. Error
## Mean -0.007018 0.029
## Week days 0.704716 0.029
## Leap year 2.163501 0.675
## Easter [6] -2.360603 0.385
## TC (4-2020) -25.280857 2.517
## TC (3-2020) -21.581618 2.569
## AO (5-2011) 14.219490 1.749
## LS (11-2008) -6.225300 2.608
##
##
## Residual standard error: 2.712 on 350 degrees of freedom
## Log likelihood = -882.9, aic = 1784 aicc = 1784, bic(corrected for length) = 2.127
##
##
##
## [4m[1mDecomposition[22m[24m
## [1mModel[22m
## AR : 1 - 0.120000 B - 0.120000 B^2 - 0.300000 B^12 + 0.036000 B^13 + 0.036000 B^14
## D : 1 - B - B^12 + B^13
## MA : 1 - 0.950000 B^12
##
##
## [1mSA[22m
## AR : 1 - 1.024538 B - 0.011455 B^2 + 0.108545 B^3
## D : 1 - 2.000000 B + B^2
## MA : 1 - 1.941460 B + 0.995458 B^2 + 0.036596 B^3 - 0.098708 B^4 + 0.008921 B^5
## Innovation variance: 0.4957156
##
## [1mTrend[22m
## AR : 1 - 0.904538 B
## D : 1 - 2.000000 B + B^2
## MA : 1 - 0.722193 B - 0.998833 B^2 + 0.723360 B^3
## Innovation variance: 0.1026625
##
## [1mSeasonal[22m
## AR : 1 + 0.904538 B + 0.818189 B^2 + 0.740083 B^3 + 0.669433 B^4 + 0.605527 B^5 + 0.547723 B^6 + 0.495436 B^7 + 0.448140 B^8 + 0.405360 B^9 + 0.366664 B^10 + 0.331661 B^11
## D : 1 + B + B^2 + B^3 + B^4 + B^5 + B^6 + B^7 + B^8 + B^9 + B^10 + B^11
## MA : 1 + 2.915179 B + 5.617938 B^2 + 8.595374 B^3 + 11.505684 B^4 + 14.135215 B^5 + 16.348945 B^6 + 18.036965 B^7 + 19.197199 B^8 + 19.965176 B^9 + 20.301074 B^10 + 20.149549 B^11 + 19.110304 B^12 + 17.206569 B^13 + 14.558551 B^14 + 11.650924 B^15 + 8.806927 B^16 + 6.228869 B^17 + 4.044510 B^18 + 2.357558 B^19 + 1.170033 B^20 + 0.354583 B^21 - 0.052292 B^22
## Innovation variance: 0.2584115
##
## [1mTransitory[22m
## AR : 1 - 0.120000 B - 0.120000 B^2
## MA : 1 + 1.287572 B + 0.287572 B^2
## Innovation variance: 9.66767e-06
##
## [1mIrregular[22m
## Innovation variance: 0.1228651
##
##
##
## [4m[1mFinal[22m[24m
## Last observed values
## y sa t s i
## Jan 2020 101.0 104.26082 104.1042 -3.260821 0.15661216
## Feb 2020 100.1 104.61371 104.5530 -4.513714 0.06076253
## Mar 2020 91.8 83.22384 104.8133 8.576159 -21.58942879
## Apr 2020 66.7 64.54936 105.1877 2.150645 -40.63830016
## May 2020 73.7 77.68315 105.6408 -3.983146 -27.95763593
## Jun 2020 98.2 85.98531 105.6977 12.214693 -19.71243272
## Jul 2020 97.4 91.30785 105.6878 6.092154 -14.37997103
## Aug 2020 71.7 96.93855 105.3429 -25.238546 -8.40432490
## Sep 2020 104.7 96.44550 104.0342 8.254501 -7.58868184
## Oct 2020 106.7 97.99258 103.1705 8.707420 -5.17788550
## Nov 2020 101.6 100.37821 102.7766 1.221785 -2.39834446
## Dec 2020 96.6 98.88800 101.7659 -2.287995 -2.87795452
##
## Forecasts:
## y_f sa_f t_f s_f i_f
## Jan 2021 90.45630 99.25146 100.88131 -8.3529406 -1.62984885
## Feb 2021 92.96291 99.26414 100.40502 -5.6858753 -1.14087970
## Mar 2021 107.94414 99.16721 99.96582 9.4108234 -0.79860872
## Apr 2021 100.06082 99.00111 99.56013 1.7251675 -0.55902344
## May 2021 92.32683 98.79338 99.18469 -5.8047774 -0.39131514
## Jun 2021 109.76210 98.56264 98.83656 11.5896516 -0.27391913
## Jul 2021 99.28583 98.32134 98.51308 1.7410215 -0.19174293
## Aug 2021 72.73390 98.07763 98.21185 -24.3850120 -0.13421991
## Sep 2021 105.42789 97.83673 97.93068 8.1237153 -0.09395290
## Oct 2021 103.20722 97.60185 97.66762 6.1153709 -0.06576632
## Nov 2021 101.03104 97.37483 97.42087 4.2605212 -0.04603637
## Dec 2021 96.56590 97.15661 97.18883 -0.4705564 -0.03222456
##
##
## [4m[1mDiagnostics[22m[24m
## [1m Relative contribution of the components to the stationary
## portion of the variance in the original series,
## after the removal of the long term trend [22m
## Trend computed by Hodrick-Prescott filter (cycle length = 8.0 years)
## Component
## Cycle 3.408
## Seasonal 72.835
## Irregular 0.303
## TD & Hol. 3.240
## Others 18.296
## Total 98.081
##
## [1m Combined test in the entire series [22m
## Non parametric tests for stable seasonality
## P.value
## Kruskall-Wallis test 0.000
## Test for the presence of seasonality assuming stability 0.000
## Evolutive seasonality test 0.072
##
## Identifiable seasonality present
##
## [1m Residual seasonality tests [22m
## P.value
## qs test on sa 1.000
## qs test on i 1.000
## f-test on sa (seasonal dummies) 1.000
## f-test on i (seasonal dummies) 1.000
## Residual seasonality (entire series) 1.000
## Residual seasonality (last 3 years) 0.881
## f-test on sa (td) 0.008
## f-test on i (td) 0.052
##
##
## [4m[1mAdditional output variables[22m[24m
s_arimaCoef(myspec8)
s_arimaCoef(mysa8)
Seasonal Adjustment with X13-ARIMA
Functions to estimate the seasonally adjusted series (sa) with the X13-ARIMA method. This is achieved by decomposing the time series (y) into the trend-cycle (t), the seasonal component (s) and the irregular component (i). The final seasonally adjusted series shall be free of seasonal and calendar-related movements.
The first step of a seasonal adjustment consist in pre-adjusting the time series. This is done by removing its deterministic effects, using a regression model with ARIMA noise (RegARIMA, see: regarima).
In the second part, the pre-adjusted series is decomposed into the following components: trend-cycle (t), seasonal component (s) and irregular component (i). The decomposition can be: additive (y = t + s + i) or multiplicative (y = t ∗ s ∗ i).
The final seasonally adjusted series (sa) shall be free of seasonal and calendar-related movements. In the X13 method, the X11 algorithm (second step) decomposes the time series by means of linear filters.
###RSA - X11 |Identifier | Log/level detection | Outliers detection | Calendar effects | ARIMA| |———-|—————-|—————–|—————–|—————| |RSA0 | NA | NA | NA | Airline(+mean)| |RSA1 | automatic | AO/LS/TC | NA | Airline(+mean)| |RSA2c | automatic | AO/LS/TC | 2 td vars + Easter | Airline(+mean)| |RSA3 | automatic | AO/LS/TC | NA | automatic| |RSA4c | automatic | AO/LS/TC | 2 td vars + Easter | automatic| |RSA5c | automatic | AO/LS/TC | 7 td vars + Easter | automatic| |X11 | NA | NA | NA | NA|
myseries <- ipi_c_eu[, "FR"]
mysa <- x13(myseries, spec = "RSA5c")
myspec1 <- x13_spec(mysa,
tradingdays.option = "WorkingDays",
usrdef.outliersEnabled = TRUE,
usrdef.outliersType = c("LS","AO"),
usrdef.outliersDate = c("2008-10-01", "2002-01-01"),
usrdef.outliersCoef = c(36, 14),
transform.function = "None")
mysa1 <- x13(myseries, myspec1)
mysa1
## [4m[1mRegARIMA[22m[24m
## y = regression model + arima (2, 1, 1, 0, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.07097 0.113
## Phi(2) 0.18458 0.076
## Theta(1) -0.49960 0.109
## BTheta(1) -0.67159 0.042
##
## Estimate Std. Error
## Week days 0.7006 0.032
## Leap year 2.1304 0.706
## Easter [1] -2.5164 0.449
## AO (9-2008) 31.9754 2.915
## LS (9-2008) -57.0469 2.643
## TC (4-2020) -35.7315 2.120
## AO (3-2020) -21.1268 2.143
## AO (5-2011) 13.1096 1.831
## TC (9-2008) 23.4429 3.992
## TC (12-2001) -20.7847 2.923
## AO (12-2001) 17.4012 2.965
## TC (2-2002) 10.9354 1.947
##
## Fixed outliers:
## Coefficients
## LS (10-2008) 36
## AO (1-2002) 14
##
##
## Residual standard error: 2.203 on 342 degrees of freedom
## Log likelihood = -796.8, aic = 1628 aicc = 1629, bic(corrected for length) = 1.842
##
##
##
## [4m[1mDecomposition[22m[24m
## [1m Monitoring and Quality Assessment Statistics: [22m
## M stats
## M(1) 0.123
## M(2) 0.077
## M(3) 1.090
## M(4) 0.462
## M(5) 1.076
## M(6) 0.012
## M(7) 0.084
## M(8) 0.239
## M(9) 0.063
## M(10) 0.261
## M(11) 0.247
## Q 0.343
## Q-M2 0.376
##
## Final filters:
## Seasonal filter: 3x5
## Trend filter: 13 terms Henderson moving average
##
##
## [4m[1mFinal[22m[24m
## Last observed values
## y sa t s i
## Jan 2020 101.0 102.87962 103.0467 -1.8796156 -0.1670595
## Feb 2020 100.1 103.69266 103.0695 -3.5926626 0.6231576
## Mar 2020 91.8 82.71191 103.2806 9.0880860 -20.5686997
## Apr 2020 66.7 66.50454 103.7148 0.1954637 -37.2102444
## May 2020 73.7 79.26051 104.1579 -5.5605127 -24.8974169
## Jun 2020 98.2 87.33656 104.4693 10.8634372 -17.1326924
## Jul 2020 97.4 92.25854 104.5607 5.1414577 -12.3021598
## Aug 2020 71.7 97.61259 104.3399 -25.9125935 -6.7273564
## Sep 2020 104.7 97.72915 103.8344 6.9708497 -6.1052450
## Oct 2020 106.7 97.88023 103.1893 8.8197721 -5.3090643
## Nov 2020 101.6 100.02183 102.6450 1.5781686 -2.6231898
## Dec 2020 96.6 99.57395 102.3812 -2.9739462 -2.8072744
##
## Forecasts:
## y_f sa_f t_f s_f i_f
## Jan 2021 94.18436 101.0457 102.3450 -6.861337 -1.2993559
## Feb 2021 97.79239 101.6105 102.3926 -3.818145 -0.7820417
## Mar 2021 113.57431 102.0601 102.3848 11.514239 -0.3247224
## Apr 2021 102.35339 102.1397 102.2602 0.213698 -0.1205157
## May 2021 96.03579 101.5178 102.0894 -5.482029 -0.5715363
## Jun 2021 112.11607 101.1530 101.9455 10.963039 -0.7924771
## Jul 2021 104.27431 101.4573 101.8906 2.817029 -0.4332705
## Aug 2021 78.93779 102.3316 101.9760 -23.393812 0.3556267
## Sep 2021 109.38106 102.3208 102.1412 7.060299 0.1795151
## Oct 2021 108.13045 101.7976 102.3181 6.332810 -0.5205026
## Nov 2021 106.18847 102.3720 102.4888 3.816423 -0.1167707
## Dec 2021 99.71043 102.9386 102.6489 -3.228124 0.2896785
##
##
## [4m[1mDiagnostics[22m[24m
## [1m Relative contribution of the components to the stationary
## portion of the variance in the original series,
## after the removal of the long term trend [22m
## Trend computed by Hodrick-Prescott filter (cycle length = 8.0 years)
## Component
## Cycle 1.672
## Seasonal 42.185
## Irregular 0.768
## TD & Hol. 1.828
## Others 55.698
## Total 102.151
##
## [1m Combined test in the entire series [22m
## Non parametric tests for stable seasonality
## P.value
## Kruskall-Wallis test 0.000
## Test for the presence of seasonality assuming stability 0.000
## Evolutive seasonality test 0.022
##
## Identifiable seasonality present
##
## [1m Residual seasonality tests [22m
## P.value
## qs test on sa 1.000
## qs test on i 0.835
## f-test on sa (seasonal dummies) 0.682
## f-test on i (seasonal dummies) 0.460
## Residual seasonality (entire series) 0.421
## Residual seasonality (last 3 years) 0.948
## f-test on sa (td) 0.075
## f-test on i (td) 0.329
##
##
## [4m[1mAdditional output variables[22m[24m
summary(mysa1$regarima)
## y = regression model + arima (2, 1, 1, 0, 1, 1)
##
## Model: RegARIMA - X13
## Estimation span: from 1-1990 to 12-2020
## Log-transformation: no
## Regression model: no mean, trading days effect(2), leap year effect, Easter effect, outliers(9)
##
## Coefficients:
## ARIMA:
## Estimate Std. Error T-stat Pr(>|t|)
## Phi(1) 0.07097 0.11299 0.628 0.5303
## Phi(2) 0.18458 0.07587 2.433 0.0155 *
## Theta(1) -0.49960 0.10887 -4.589 6.17e-06 ***
## BTheta(1) -0.67159 0.04206 -15.968 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Regression model:
## Estimate Std. Error T-stat Pr(>|t|)
## Week days 0.70061 0.03198 21.905 < 2e-16 ***
## Leap year 2.13040 0.70573 3.019 0.00272 **
## Easter [1] -2.51639 0.44884 -5.606 4.13e-08 ***
## AO (9-2008) 31.97543 2.91519 10.969 < 2e-16 ***
## LS (9-2008) -57.04686 2.64339 -21.581 < 2e-16 ***
## TC (4-2020) -35.73152 2.11967 -16.857 < 2e-16 ***
## AO (3-2020) -21.12683 2.14309 -9.858 < 2e-16 ***
## AO (5-2011) 13.10957 1.83067 7.161 4.56e-12 ***
## TC (9-2008) 23.44294 3.99228 5.872 9.81e-09 ***
## TC (12-2001) -20.78475 2.92315 -7.110 6.30e-12 ***
## AO (12-2001) 17.40120 2.96520 5.868 1.00e-08 ***
## TC (2-2002) 10.93541 1.94738 5.615 3.93e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Coefficients
## LS (10-2008) 36
## AO (1-2002) 14
##
##
## Residual standard error: 2.203 on 342 degrees of freedom
## Log likelihood = -796.8, aic = 1628, aicc = 1629, bic(corrected for length) = 1.842
myspec2 <- x13_spec(mysa,
automdl.enabled =FALSE,
arima.coefEnabled = TRUE,
arima.p = 1, arima.q = 1, arima.bp = 0, arima.bq = 1,
arima.coef = c(-0.8, -0.6, 0),
arima.coefType = c(rep("Fixed", 2), "Undefined"))
s_arimaCoef(myspec2)
mysa2 <- x13(myseries, myspec2,
userdefined = c("decomposition.d18", "decomposition.d19"))
mysa2
## [4m[1mRegARIMA[22m[24m
## y = regression model + arima (1, 1, 1, 0, 1, 1)
## Log-transformation: yes
## Coefficients:
## Estimate Std. Error
## Phi(1) -0.8000 0.00
## Theta(1) -0.6000 0.00
## BTheta(1) -0.6977 0.04
##
## Estimate Std. Error
## Monday 0.006317 0.002
## Tuesday 0.007824 0.002
## Wednesday 0.010528 0.002
## Thursday 0.001857 0.002
## Friday 0.010099 0.002
## Saturday -0.018439 0.002
## Easter [1] -0.020593 0.004
## TC (4-2020) -0.475720 0.031
## AO (3-2020) -0.213355 0.023
## AO (5-2011) 0.143705 0.016
##
##
## Residual standard error: 0.0256 on 347 degrees of freedom
## Log likelihood = 802.3, aic = 1733 aicc = 1734, bic(corrected for length) = -7.15
##
##
##
## [4m[1mDecomposition[22m[24m
## [1m Monitoring and Quality Assessment Statistics: [22m
## M stats
## M(1) 0.097
## M(2) 0.052
## M(3) 0.750
## M(4) 0.749
## M(5) 0.731
## M(6) 0.126
## M(7) 0.075
## M(8) 0.220
## M(9) 0.075
## M(10) 0.293
## M(11) 0.281
## Q 0.300
## Q-M2 0.331
##
## Final filters:
## Seasonal filter: 3x5
## Trend filter: 13 terms Henderson moving average
##
##
## [4m[1mFinal[22m[24m
## Last observed values
## y sa t s i
## Jan 2020 101.0 103.50059 103.4716 0.9758398 1.0002804
## Feb 2020 100.1 103.70789 104.1959 0.9652110 0.9953168
## Mar 2020 91.8 85.02419 105.2353 1.0796927 0.8079439
## Apr 2020 66.7 66.06576 106.3700 1.0096002 0.6210940
## May 2020 73.7 77.29646 107.2332 0.9534719 0.7208256
## Jun 2020 98.2 88.21419 107.6348 1.1131996 0.8195693
## Jul 2020 97.4 92.04371 107.5406 1.0581929 0.8558971
## Aug 2020 71.7 95.53300 106.9592 0.7505260 0.8931720
## Sep 2020 104.7 97.32774 105.9849 1.0757467 0.9183169
## Oct 2020 106.7 98.74148 104.7928 1.0805996 0.9422542
## Nov 2020 101.6 100.23569 103.5604 1.0136110 0.9678964
## Dec 2020 96.6 99.45166 102.3889 0.9713262 0.9713127
##
## Forecasts:
## y_f sa_f t_f s_f i_f
## Jan 2021 91.86627 99.03608 101.33234 0.9276040 0.9773393
## Feb 2021 93.73814 98.76312 100.39814 0.9491209 0.9837146
## Mar 2021 109.97904 99.04192 99.55589 1.1104292 0.9948373
## Apr 2021 99.51314 98.51411 98.84092 1.0101410 0.9966935
## May 2021 92.44138 97.26558 98.27297 0.9504018 0.9897491
## Jun 2021 109.51917 97.80126 97.82297 1.1198135 0.9997780
## Jul 2021 99.72232 96.85484 97.49522 1.0296059 0.9934317
## Aug 2021 74.93973 97.28720 97.30419 0.7702938 0.9998254
## Sep 2021 104.15955 97.30940 97.21500 1.0703955 1.0009711
## Oct 2021 102.57254 96.84676 97.16553 1.0591221 0.9967193
## Nov 2021 100.68100 96.97009 97.14932 1.0382686 0.9981552
## Dec 2021 94.63045 97.42206 97.13060 0.9713452 1.0030007
##
##
## [4m[1mDiagnostics[22m[24m
## [1m Relative contribution of the components to the stationary
## portion of the variance in the original series,
## after the removal of the long term trend [22m
## Trend computed by Hodrick-Prescott filter (cycle length = 8.0 years)
## Component
## Cycle 5.183
## Seasonal 82.105
## Irregular 1.148
## TD & Hol. 3.365
## Others 10.592
## Total 102.393
##
## [1m Combined test in the entire series [22m
## Non parametric tests for stable seasonality
## P.value
## Kruskall-Wallis test 0.000
## Test for the presence of seasonality assuming stability 0.000
## Evolutive seasonality test 0.406
##
## Identifiable seasonality present
##
## [1m Residual seasonality tests [22m
## P.value
## qs test on sa 1.000
## qs test on i 0.939
## f-test on sa (seasonal dummies) 0.990
## f-test on i (seasonal dummies) 0.972
## Residual seasonality (entire series) 0.989
## Residual seasonality (last 3 years) 0.996
## f-test on sa (td) 0.994
## f-test on i (td) 0.959
##
##
## [4m[1mAdditional output variables[22m[24m
## Names of additional variables (2):
## decomposition.d18, decomposition.d19
plot(mysa2)
plot(mysa2$regarima)
plot(mysa2$decomposition)
X-13ARIMA model specification, SA/X13
myseries <- ipi_c_eu[, "FR"]
plot(myseries)
#layout(matrix(1:6,6,1))
myspec1 <- x13_spec(spec = "RSA5c")
myreg1 <- x13(myseries, spec = myspec1)
layout(matrix(1:2,2,1))
plot(myreg1)
# To modify a pre-specified model specification
myspec2 <- x13_spec(spec = "RSA5c", tradingdays.option = "WorkingDays")
myreg2 <- x13(myseries, spec = myspec2)
plot(myreg2)
# To modify the model specification of a "X13" object
myspec3 <- x13_spec(myreg1, tradingdays.option = "WorkingDays")
myreg3 <- x13(myseries, myspec3)
plot(myreg3)
# To modify the model specification of a "X13_spec" object
myspec4 <- x13_spec(myspec1, tradingdays.option = "WorkingDays")
myreg4 <- x13(myseries, myspec4)
plot(myreg4)
# Pre-specified outliers
myspec1 <- x13_spec(spec = "RSA5c", usrdef.outliersEnabled = TRUE,
usrdef.outliersType = c("LS", "AO"),
usrdef.outliersDate = c("2008-10-01", "2002-01-01"),
usrdef.outliersCoef = c(36, 14),
transform.function = "None")
myreg1 <- x13(myseries, myspec1)
plot(myreg1)
#s_preOut(myreg1)
summary(myreg1)
## Length Class Mode
## regarima 9 regarima list
## decomposition 6 decomposition_X11 list
## final 2 final list
## diagnostics 3 diagnostics list
## user_defined 0 user_defined list
# User-defined calendar regressors
var1 <- ts(rnorm(length(myseries))*10, start = start(myseries), frequency = 12)
var2 <- ts(rnorm(length(myseries))*100, start = start(myseries), frequency = 12)
var <- ts.union(var1, var2)
myspec1 <- x13_spec(spec = "RSA5c",
tradingdays.option = "UserDefined",
usrdef.varEnabled = TRUE,
usrdef.var = var,
usrdef.varType = c("Calendar", "Calendar"))
## Warning: With tradingdays.option = "UserDefined", the parameters tradingdays.autoadjust, tradingdays.leapyear and tradingdays.stocktd are ignored.
myreg1 <- x13(myseries, myspec1)
myreg1
## [4m[1mRegARIMA[22m[24m
## y = regression model + arima (3, 1, 1, 0, 1, 1)
## Log-transformation: no
## Coefficients:
## Estimate Std. Error
## Phi(1) 0.3595 0.209
## Phi(2) 0.1177 0.210
## Phi(3) -0.3259 0.155
## Theta(1) -0.6771 0.192
## BTheta(1) -0.7343 0.039
##
## Estimate Std. Error
## Easter [8] -2.891 0.686
## TC (4-2020) -36.231 2.021
## AO (3-2020) -22.969 2.463
## LS (11-2008) -12.368 1.610
## AO (5-2011) 9.825 2.265
## TC (2-2009) -8.128 1.857
##
##
## Residual standard error: 2.839 on 347 degrees of freedom
## Log likelihood = -889.4, aic = 1803 aicc = 1804, bic(corrected for length) = 2.267
##
##
##
## [4m[1mDecomposition[22m[24m
## [1m Monitoring and Quality Assessment Statistics: [22m
## M stats
## M(1) 0.376
## M(2) 0.310
## M(3) 3.000
## M(4) 0.733
## M(5) 2.377
## M(6) 0.514
## M(7) 0.116
## M(8) 0.294
## M(9) 0.074
## M(10) 0.369
## M(11) 0.334
## Q 0.818
## Q-M2 0.881
##
## Final filters:
## Seasonal filter: 3x5
## Trend filter: 23-Henderson
##
##
## [4m[1mFinal[22m[24m
## Last observed values
## y sa t s i
## Jan 2020 101.0 103.76443 103.7718 -2.764432 -0.007371637
## Feb 2020 100.1 104.34515 103.9252 -4.245147 0.419965250
## Mar 2020 91.8 81.04300 104.1168 10.757002 -23.073821166
## Apr 2020 66.7 68.07471 104.2936 -1.374714 -36.218923904
## May 2020 73.7 77.34542 104.4050 -3.645424 -27.059534745
## Jun 2020 98.2 88.68292 104.4313 9.517080 -15.748342655
## Jul 2020 97.4 93.46921 104.3778 3.930791 -10.908580688
## Aug 2020 71.7 95.43752 104.2570 -23.737519 -8.819459329
## Sep 2020 104.7 99.17267 104.0850 5.527329 -4.912314376
## Oct 2020 106.7 97.12864 103.8669 9.571357 -6.738282414
## Nov 2020 101.6 99.69487 103.6276 1.905134 -3.932784061
## Dec 2020 96.6 102.36060 103.4003 -5.760595 -1.039736263
##
## Forecasts:
## y_f sa_f t_f s_f i_f
## Jan 2021 98.44952 101.2056 103.1901 -2.7560785 -1.98454698
## Feb 2021 98.43821 102.5471 103.0165 -4.1088538 -0.46944312
## Mar 2021 110.75460 101.9734 102.8973 8.7811716 -0.92383422
## Apr 2021 103.71542 102.9016 102.8411 0.8138272 0.06051994
## May 2021 99.53055 103.1863 102.8510 -3.6557369 0.33528360
## Jun 2021 111.31381 101.6749 102.8754 9.6388933 -1.20051449
## Jul 2021 105.69802 101.5389 102.9077 4.1591091 -1.36882965
## Aug 2021 79.42133 103.3872 102.9666 -23.9658420 0.42058783
## Sep 2021 108.59095 102.9687 103.0586 5.6222373 -0.08983556
## Oct 2021 112.00799 102.4761 103.1532 9.5318659 -0.67704911
## Nov 2021 105.36088 103.8747 103.2467 1.4862299 0.62793860
## Dec 2021 98.66941 104.3502 103.4522 -5.6808324 0.89800432
##
##
## [4m[1mDiagnostics[22m[24m
## [1m Relative contribution of the components to the stationary
## portion of the variance in the original series,
## after the removal of the long term trend [22m
## Trend computed by Hodrick-Prescott filter (cycle length = 8.0 years)
## Component
## Cycle 1.963
## Seasonal 59.842
## Irregular 3.416
## TD & Hol. 0.172
## Others 34.046
## Total 99.439
##
## [1m Combined test in the entire series [22m
## Non parametric tests for stable seasonality
## P.value
## Kruskall-Wallis test 0.000
## Test for the presence of seasonality assuming stability 0.000
## Evolutive seasonality test 0.269
##
## Identifiable seasonality present
##
## [1m Residual seasonality tests [22m
## P.value
## qs test on sa 0.000
## qs test on i 0.002
## f-test on sa (seasonal dummies) 0.813
## f-test on i (seasonal dummies) 0.754
## Residual seasonality (entire series) 0.568
## Residual seasonality (last 3 years) 1.000
## f-test on sa (td) 0.000
## f-test on i (td) 0.000
##
##
## [4m[1mAdditional output variables[22m[24m
myspec2 <- x13_spec(spec = "RSA5c", usrdef.varEnabled = TRUE,
usrdef.var = var1, usrdef.varCoef = 2,
transform.function = "None")
myreg2 <- x13(myseries, myspec2)
#s_preVar(myreg2)
plot(myreg2)
# Pre-specified ARMA coefficients
myspec1 <- x13_spec(spec = "RSA5c",
automdl.enabled = FALSE,
arima.p = 1, arima.q = 1, arima.bp = 0, arima.bq = 1,
arima.coefEnabled = TRUE, arima.coef = c(-0.8, -0.6, 0),
arima.coefType = c(rep("Fixed", 2), "Undefined"))
#s_arimaCoef(myspec1)
myreg1 <- x13(myseries, myspec1)
plot(myreg1)
# To define a seasonal filter
myspec1 <- x13_spec("RSA5c", x11.seasonalma = rep("S3X1", 12))
mysa1 <- x13(myseries, myspec1)
plot(mysa1)