Title
Usage
seasonalbreaks(
y,
period = NA,
level = 1,
slope = 1,
noise = 1,
seasonal = c("HarrisonStevens", "Trigonometric", "Dummy", "Crude", "Fixed", "Unused"),
X = NULL,
X.td = NULL
)
Arguments
- y
input time series.
- period
annual frequency.
- level
-1 = no level, 0 = fixed level, 1 = sotchastic level
- slope
- noise
- seasonal
Seasonal model
- X
Regression variables (same length as y) or NULL
- X.td
Groups of days for trading days regressors. The length of the array must be 7. It indicates to what group each week day belongs. The first item corresponds to Mondays and the last one to Sundays. The group used for contrasts (usually Sundays) is identified by 0. The other groups are identified by 1, 2,... n (<= 6). For instance, usual trading days are defined by
c(1,2,3,4,5,6,0)
, week days byc(1,1,1,1,1,0,0)
, etc...
Examples
x<-rjd3toolkit::retail$BookStores
seasonalbreaks(x)
#> Jan Feb Mar Apr May Jun
#> 1992 0.0000000 4.5344085 4.7319409 4.7370857 4.7374342 4.7412178
#> 1993 6.6406207 2.6121536 2.1116208 2.2836784 2.6340822 2.6312561
#> 1994 3.4626399 9.0353762 8.9857174 8.6704149 7.9957178 7.9166209
#> 1995 6.6988846 1.5758037 1.5158821 1.1779918 1.1098137 1.0935541
#> 1996 7.6863080 10.5136727 10.2985543 10.1604844 10.1472893 10.2829321
#> 1997 10.3838930 11.8104539 12.5909470 12.8140984 12.7983964 12.7501311
#> 1998 6.5316509 2.5095290 1.8854772 2.0220242 2.0880965 1.8845011
#> 1999 4.4716943 5.9289155 5.9865213 5.9041184 6.1679422 6.7257316
#> 2000 15.6694425 14.8933111 15.6372461 15.5795308 16.6978640 16.5816832
#> 2001 15.6960179 44.0975564 45.3716921 47.3594662 46.2562422 45.4924349
#> 2002 36.6341360 10.3397000 7.2085004 7.7531984 7.8929338 8.2820255
#> 2003 26.2780970 25.2975121 24.8889161 21.0883962 20.5940546 20.6726482
#> 2004 6.3958692 7.8935990 7.7298076 6.5340909 6.7218717 6.2444239
#> 2005 5.2485448 7.4007502 6.9663630 7.1982887 6.9232836 7.1399682
#> 2006 9.3112703 6.0676658 6.1787142 6.4299454 6.7030477 5.9926391
#> 2007 11.1613944 11.5093438 12.1193656 11.1779311 10.4508261 9.4855103
#> 2008 15.6456375 14.8333080 13.9814092 14.1047317 12.4118635 11.8570886
#> 2009 5.9701833 5.9954505 4.4793922 4.7616370 4.8571049 4.7712356
#> 2010 6.8770229 6.8819585 6.8747939 6.6642612 6.4607312 6.4437359
#> Jul Aug Sep Oct Nov Dec
#> 1992 4.8756000 5.3638224 5.6283348 5.6779099 6.1101552 6.1966814
#> 1993 2.6801663 2.4258227 3.6436098 3.7175240 3.6925757 3.8166403
#> 1994 8.0064702 7.8145697 6.6973460 6.6826997 7.0892336 6.9821362
#> 1995 1.3194081 1.9403845 2.2821737 5.3725356 6.6809542 6.5402494
#> 1996 10.0613388 9.2697747 12.1455591 9.5131840 8.1460865 8.2347436
#> 1997 12.6716682 12.6010697 9.7133012 9.1671524 9.2870076 9.9731771
#> 1998 2.0858124 3.3923187 3.9497829 4.6316280 4.4114793 3.6744217
#> 1999 6.6086553 5.5959014 10.5512600 11.3097603 11.9910266 12.3436990
#> 2000 17.4196108 18.6381819 21.6553238 18.6856640 18.2993398 18.4093656
#> 2001 45.4318474 44.4110906 34.8325484 35.7686014 35.6979806 36.4534060
#> 2002 9.4286524 9.4407720 26.4519454 26.0070901 25.3063673 26.1002924
#> 2003 20.5377188 20.5688926 5.7159983 5.9716587 5.8292166 3.9053615
#> 2004 7.2044921 7.1450721 8.2481490 8.2821005 8.5449912 8.5087921
#> 2005 6.4544156 8.0804499 7.9842404 7.6973703 7.4377042 7.2073089
#> 2006 4.8312616 5.8106854 12.7206051 12.6379678 13.1056777 13.6566485
#> 2007 9.4547788 11.4104298 9.9655624 10.4322770 10.8476189 13.9733760
#> 2008 12.2763111 11.8567549 4.8895128 9.4082395 9.3122594 6.7367243
#> 2009 4.5555916 4.4902981 7.4540527 4.8048443 4.8237115 6.2914293
#> 2010 6.3965184 6.3942041 3.2813147 2.8996225 2.7472175 0.9462617