Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationTue, 08 Dec 2015 14:52:05 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2015/Dec/08/t1449586378ng9lf8p915416bn.htm/, Retrieved Thu, 16 May 2024 14:21:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=285508, Retrieved Thu, 16 May 2024 14:21:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact94
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Classical Decomposition] [HPC Retail Sales] [2008-03-02 16:19:32] [74be16979710d4c4e7c6647856088456]
- R  D    [Classical Decomposition] [classical decompo...] [2015-12-08 14:52:05] [20fcaaf1d4bc4a12bf87c6c50d624c14] [Current]
- RMP       [Decomposition by Loess] [Loess totaal mannen] [2015-12-08 15:45:08] [22b6f4a061c8797aa483199554a73d13]
- RMP         [Structural Time Series Models] [structural time s...] [2015-12-08 16:02:26] [22b6f4a061c8797aa483199554a73d13]
- RMPD          [Classical Decomposition] [classical decompo...] [2015-12-08 17:17:05] [22b6f4a061c8797aa483199554a73d13]
- RMP             [Decomposition by Loess] [Loess totaal vrouwen] [2015-12-08 17:53:15] [22b6f4a061c8797aa483199554a73d13]
- RMP               [Structural Time Series Models] [structural time s...] [2015-12-08 18:02:34] [22b6f4a061c8797aa483199554a73d13]
Feedback Forum

Post a new message
Dataseries X:
287224
279998
283495
285775
282329
277799
271980
266730
262433
285378
286692
282917
277686
274371
277466
290604
290770
283654
278601
274405
272817
294292
300562
298982
296917
295008
297295
305671
303853
300708
298194
292254
290646
314707
317009
317706
313312
311048
315917
326174
322116
317092
310468
302438
298493
320124
321873
321676
316696
312612
313307
320883
318749
315126
304600
295245
293619
309700
310597
307416
301126




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'Sir Maurice George Kendall' @ kendall.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=285508&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Maurice George Kendall' @ kendall.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=285508&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=285508&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1287224NANA1060.79NA
2279998NANA-2469.04NA
3283495NANA-354.422NA
4285775NANA8904.12NA
5282329NANA6440.76NA
6277799NANA1209.55NA
7271980273179278998-5819.32-1199.1
8266730265800278367-12566.8930.255
9262433261804277881-16076.6628.692
102853782836062778315775.181771.94
112866922863232783847938.85369.359
122829172849362789795956.9-2019.36
132776862805602794991060.79-2874.08
14274371277626280095-2469.04-3254.92
15277466280493280847-354.422-3027
162906042905562816528904.1248.3799
172907702890422826016440.761728.41
182836542850582838481209.55-1403.67
19278601279499285319-5819.32-898.47
20274405274413286980-12566.8-8.16181
21272817272589288666-16076.6227.526
222942922958952901205775.18-1603.22
233005622992322912937938.851330.19
242989822985062925495956.9476.432
252969172951362940761060.791780.59
26295008293167295636-2469.041841.33
27297295296768297122-354.422527.13
283056713076202987168904.12-1948.91
293038533066923002526440.76-2839.46
303007083029273017171209.55-2218.71
31298194297361303180-5819.32832.863
32292254291965304532-12566.8288.88
33290646289900305976-16076.6746.401
343147073133823076065775.181325.44
353170093171603092227938.85-151.474
363177063166223106655956.91083.85
373133123129203118591060.79391.88
38311048310326312795-2469.04721.953
39315917313192313546-354.4222725.05
403261743230033140998904.123170.84
413221163209683145276440.761147.83
423170923161053148951209.55986.953
43310468309383315202-5819.321085.4
44302438302841315408-12566.8-403.287
45298493299288315364-16076.6-794.933
463201243208103150355775.18-686.474
473218733226133146757938.85-740.391
483216763204093144525956.91266.77
493166963151873141261060.791509.3
50312612311113313582-2469.041499.33
51313307312724313079-354.422582.505
523208833213463124428904.12-462.62
533187493179783115376440.76770.911
543151263116833104731209.553443.12
55304600303411309230-5819.321188.9
56295245NANA-12566.8NA
57293619NANA-16076.6NA
58309700NANA5775.18NA
59310597NANA7938.85NA
60307416NANA5956.9NA
61301126NANA1060.79NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 287224 & NA & NA & 1060.79 & NA \tabularnewline
2 & 279998 & NA & NA & -2469.04 & NA \tabularnewline
3 & 283495 & NA & NA & -354.422 & NA \tabularnewline
4 & 285775 & NA & NA & 8904.12 & NA \tabularnewline
5 & 282329 & NA & NA & 6440.76 & NA \tabularnewline
6 & 277799 & NA & NA & 1209.55 & NA \tabularnewline
7 & 271980 & 273179 & 278998 & -5819.32 & -1199.1 \tabularnewline
8 & 266730 & 265800 & 278367 & -12566.8 & 930.255 \tabularnewline
9 & 262433 & 261804 & 277881 & -16076.6 & 628.692 \tabularnewline
10 & 285378 & 283606 & 277831 & 5775.18 & 1771.94 \tabularnewline
11 & 286692 & 286323 & 278384 & 7938.85 & 369.359 \tabularnewline
12 & 282917 & 284936 & 278979 & 5956.9 & -2019.36 \tabularnewline
13 & 277686 & 280560 & 279499 & 1060.79 & -2874.08 \tabularnewline
14 & 274371 & 277626 & 280095 & -2469.04 & -3254.92 \tabularnewline
15 & 277466 & 280493 & 280847 & -354.422 & -3027 \tabularnewline
16 & 290604 & 290556 & 281652 & 8904.12 & 48.3799 \tabularnewline
17 & 290770 & 289042 & 282601 & 6440.76 & 1728.41 \tabularnewline
18 & 283654 & 285058 & 283848 & 1209.55 & -1403.67 \tabularnewline
19 & 278601 & 279499 & 285319 & -5819.32 & -898.47 \tabularnewline
20 & 274405 & 274413 & 286980 & -12566.8 & -8.16181 \tabularnewline
21 & 272817 & 272589 & 288666 & -16076.6 & 227.526 \tabularnewline
22 & 294292 & 295895 & 290120 & 5775.18 & -1603.22 \tabularnewline
23 & 300562 & 299232 & 291293 & 7938.85 & 1330.19 \tabularnewline
24 & 298982 & 298506 & 292549 & 5956.9 & 476.432 \tabularnewline
25 & 296917 & 295136 & 294076 & 1060.79 & 1780.59 \tabularnewline
26 & 295008 & 293167 & 295636 & -2469.04 & 1841.33 \tabularnewline
27 & 297295 & 296768 & 297122 & -354.422 & 527.13 \tabularnewline
28 & 305671 & 307620 & 298716 & 8904.12 & -1948.91 \tabularnewline
29 & 303853 & 306692 & 300252 & 6440.76 & -2839.46 \tabularnewline
30 & 300708 & 302927 & 301717 & 1209.55 & -2218.71 \tabularnewline
31 & 298194 & 297361 & 303180 & -5819.32 & 832.863 \tabularnewline
32 & 292254 & 291965 & 304532 & -12566.8 & 288.88 \tabularnewline
33 & 290646 & 289900 & 305976 & -16076.6 & 746.401 \tabularnewline
34 & 314707 & 313382 & 307606 & 5775.18 & 1325.44 \tabularnewline
35 & 317009 & 317160 & 309222 & 7938.85 & -151.474 \tabularnewline
36 & 317706 & 316622 & 310665 & 5956.9 & 1083.85 \tabularnewline
37 & 313312 & 312920 & 311859 & 1060.79 & 391.88 \tabularnewline
38 & 311048 & 310326 & 312795 & -2469.04 & 721.953 \tabularnewline
39 & 315917 & 313192 & 313546 & -354.422 & 2725.05 \tabularnewline
40 & 326174 & 323003 & 314099 & 8904.12 & 3170.84 \tabularnewline
41 & 322116 & 320968 & 314527 & 6440.76 & 1147.83 \tabularnewline
42 & 317092 & 316105 & 314895 & 1209.55 & 986.953 \tabularnewline
43 & 310468 & 309383 & 315202 & -5819.32 & 1085.4 \tabularnewline
44 & 302438 & 302841 & 315408 & -12566.8 & -403.287 \tabularnewline
45 & 298493 & 299288 & 315364 & -16076.6 & -794.933 \tabularnewline
46 & 320124 & 320810 & 315035 & 5775.18 & -686.474 \tabularnewline
47 & 321873 & 322613 & 314675 & 7938.85 & -740.391 \tabularnewline
48 & 321676 & 320409 & 314452 & 5956.9 & 1266.77 \tabularnewline
49 & 316696 & 315187 & 314126 & 1060.79 & 1509.3 \tabularnewline
50 & 312612 & 311113 & 313582 & -2469.04 & 1499.33 \tabularnewline
51 & 313307 & 312724 & 313079 & -354.422 & 582.505 \tabularnewline
52 & 320883 & 321346 & 312442 & 8904.12 & -462.62 \tabularnewline
53 & 318749 & 317978 & 311537 & 6440.76 & 770.911 \tabularnewline
54 & 315126 & 311683 & 310473 & 1209.55 & 3443.12 \tabularnewline
55 & 304600 & 303411 & 309230 & -5819.32 & 1188.9 \tabularnewline
56 & 295245 & NA & NA & -12566.8 & NA \tabularnewline
57 & 293619 & NA & NA & -16076.6 & NA \tabularnewline
58 & 309700 & NA & NA & 5775.18 & NA \tabularnewline
59 & 310597 & NA & NA & 7938.85 & NA \tabularnewline
60 & 307416 & NA & NA & 5956.9 & NA \tabularnewline
61 & 301126 & NA & NA & 1060.79 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=285508&T=1

[TABLE]
[ROW][C]Classical Decomposition by Moving Averages[/C][/ROW]
[ROW][C]t[/C][C]Observations[/C][C]Fit[/C][C]Trend[/C][C]Seasonal[/C][C]Random[/C][/ROW]
[ROW][C]1[/C][C]287224[/C][C]NA[/C][C]NA[/C][C]1060.79[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]279998[/C][C]NA[/C][C]NA[/C][C]-2469.04[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]283495[/C][C]NA[/C][C]NA[/C][C]-354.422[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]285775[/C][C]NA[/C][C]NA[/C][C]8904.12[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]282329[/C][C]NA[/C][C]NA[/C][C]6440.76[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]277799[/C][C]NA[/C][C]NA[/C][C]1209.55[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]271980[/C][C]273179[/C][C]278998[/C][C]-5819.32[/C][C]-1199.1[/C][/ROW]
[ROW][C]8[/C][C]266730[/C][C]265800[/C][C]278367[/C][C]-12566.8[/C][C]930.255[/C][/ROW]
[ROW][C]9[/C][C]262433[/C][C]261804[/C][C]277881[/C][C]-16076.6[/C][C]628.692[/C][/ROW]
[ROW][C]10[/C][C]285378[/C][C]283606[/C][C]277831[/C][C]5775.18[/C][C]1771.94[/C][/ROW]
[ROW][C]11[/C][C]286692[/C][C]286323[/C][C]278384[/C][C]7938.85[/C][C]369.359[/C][/ROW]
[ROW][C]12[/C][C]282917[/C][C]284936[/C][C]278979[/C][C]5956.9[/C][C]-2019.36[/C][/ROW]
[ROW][C]13[/C][C]277686[/C][C]280560[/C][C]279499[/C][C]1060.79[/C][C]-2874.08[/C][/ROW]
[ROW][C]14[/C][C]274371[/C][C]277626[/C][C]280095[/C][C]-2469.04[/C][C]-3254.92[/C][/ROW]
[ROW][C]15[/C][C]277466[/C][C]280493[/C][C]280847[/C][C]-354.422[/C][C]-3027[/C][/ROW]
[ROW][C]16[/C][C]290604[/C][C]290556[/C][C]281652[/C][C]8904.12[/C][C]48.3799[/C][/ROW]
[ROW][C]17[/C][C]290770[/C][C]289042[/C][C]282601[/C][C]6440.76[/C][C]1728.41[/C][/ROW]
[ROW][C]18[/C][C]283654[/C][C]285058[/C][C]283848[/C][C]1209.55[/C][C]-1403.67[/C][/ROW]
[ROW][C]19[/C][C]278601[/C][C]279499[/C][C]285319[/C][C]-5819.32[/C][C]-898.47[/C][/ROW]
[ROW][C]20[/C][C]274405[/C][C]274413[/C][C]286980[/C][C]-12566.8[/C][C]-8.16181[/C][/ROW]
[ROW][C]21[/C][C]272817[/C][C]272589[/C][C]288666[/C][C]-16076.6[/C][C]227.526[/C][/ROW]
[ROW][C]22[/C][C]294292[/C][C]295895[/C][C]290120[/C][C]5775.18[/C][C]-1603.22[/C][/ROW]
[ROW][C]23[/C][C]300562[/C][C]299232[/C][C]291293[/C][C]7938.85[/C][C]1330.19[/C][/ROW]
[ROW][C]24[/C][C]298982[/C][C]298506[/C][C]292549[/C][C]5956.9[/C][C]476.432[/C][/ROW]
[ROW][C]25[/C][C]296917[/C][C]295136[/C][C]294076[/C][C]1060.79[/C][C]1780.59[/C][/ROW]
[ROW][C]26[/C][C]295008[/C][C]293167[/C][C]295636[/C][C]-2469.04[/C][C]1841.33[/C][/ROW]
[ROW][C]27[/C][C]297295[/C][C]296768[/C][C]297122[/C][C]-354.422[/C][C]527.13[/C][/ROW]
[ROW][C]28[/C][C]305671[/C][C]307620[/C][C]298716[/C][C]8904.12[/C][C]-1948.91[/C][/ROW]
[ROW][C]29[/C][C]303853[/C][C]306692[/C][C]300252[/C][C]6440.76[/C][C]-2839.46[/C][/ROW]
[ROW][C]30[/C][C]300708[/C][C]302927[/C][C]301717[/C][C]1209.55[/C][C]-2218.71[/C][/ROW]
[ROW][C]31[/C][C]298194[/C][C]297361[/C][C]303180[/C][C]-5819.32[/C][C]832.863[/C][/ROW]
[ROW][C]32[/C][C]292254[/C][C]291965[/C][C]304532[/C][C]-12566.8[/C][C]288.88[/C][/ROW]
[ROW][C]33[/C][C]290646[/C][C]289900[/C][C]305976[/C][C]-16076.6[/C][C]746.401[/C][/ROW]
[ROW][C]34[/C][C]314707[/C][C]313382[/C][C]307606[/C][C]5775.18[/C][C]1325.44[/C][/ROW]
[ROW][C]35[/C][C]317009[/C][C]317160[/C][C]309222[/C][C]7938.85[/C][C]-151.474[/C][/ROW]
[ROW][C]36[/C][C]317706[/C][C]316622[/C][C]310665[/C][C]5956.9[/C][C]1083.85[/C][/ROW]
[ROW][C]37[/C][C]313312[/C][C]312920[/C][C]311859[/C][C]1060.79[/C][C]391.88[/C][/ROW]
[ROW][C]38[/C][C]311048[/C][C]310326[/C][C]312795[/C][C]-2469.04[/C][C]721.953[/C][/ROW]
[ROW][C]39[/C][C]315917[/C][C]313192[/C][C]313546[/C][C]-354.422[/C][C]2725.05[/C][/ROW]
[ROW][C]40[/C][C]326174[/C][C]323003[/C][C]314099[/C][C]8904.12[/C][C]3170.84[/C][/ROW]
[ROW][C]41[/C][C]322116[/C][C]320968[/C][C]314527[/C][C]6440.76[/C][C]1147.83[/C][/ROW]
[ROW][C]42[/C][C]317092[/C][C]316105[/C][C]314895[/C][C]1209.55[/C][C]986.953[/C][/ROW]
[ROW][C]43[/C][C]310468[/C][C]309383[/C][C]315202[/C][C]-5819.32[/C][C]1085.4[/C][/ROW]
[ROW][C]44[/C][C]302438[/C][C]302841[/C][C]315408[/C][C]-12566.8[/C][C]-403.287[/C][/ROW]
[ROW][C]45[/C][C]298493[/C][C]299288[/C][C]315364[/C][C]-16076.6[/C][C]-794.933[/C][/ROW]
[ROW][C]46[/C][C]320124[/C][C]320810[/C][C]315035[/C][C]5775.18[/C][C]-686.474[/C][/ROW]
[ROW][C]47[/C][C]321873[/C][C]322613[/C][C]314675[/C][C]7938.85[/C][C]-740.391[/C][/ROW]
[ROW][C]48[/C][C]321676[/C][C]320409[/C][C]314452[/C][C]5956.9[/C][C]1266.77[/C][/ROW]
[ROW][C]49[/C][C]316696[/C][C]315187[/C][C]314126[/C][C]1060.79[/C][C]1509.3[/C][/ROW]
[ROW][C]50[/C][C]312612[/C][C]311113[/C][C]313582[/C][C]-2469.04[/C][C]1499.33[/C][/ROW]
[ROW][C]51[/C][C]313307[/C][C]312724[/C][C]313079[/C][C]-354.422[/C][C]582.505[/C][/ROW]
[ROW][C]52[/C][C]320883[/C][C]321346[/C][C]312442[/C][C]8904.12[/C][C]-462.62[/C][/ROW]
[ROW][C]53[/C][C]318749[/C][C]317978[/C][C]311537[/C][C]6440.76[/C][C]770.911[/C][/ROW]
[ROW][C]54[/C][C]315126[/C][C]311683[/C][C]310473[/C][C]1209.55[/C][C]3443.12[/C][/ROW]
[ROW][C]55[/C][C]304600[/C][C]303411[/C][C]309230[/C][C]-5819.32[/C][C]1188.9[/C][/ROW]
[ROW][C]56[/C][C]295245[/C][C]NA[/C][C]NA[/C][C]-12566.8[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]293619[/C][C]NA[/C][C]NA[/C][C]-16076.6[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]309700[/C][C]NA[/C][C]NA[/C][C]5775.18[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]310597[/C][C]NA[/C][C]NA[/C][C]7938.85[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]307416[/C][C]NA[/C][C]NA[/C][C]5956.9[/C][C]NA[/C][/ROW]
[ROW][C]61[/C][C]301126[/C][C]NA[/C][C]NA[/C][C]1060.79[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=285508&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=285508&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1287224NANA1060.79NA
2279998NANA-2469.04NA
3283495NANA-354.422NA
4285775NANA8904.12NA
5282329NANA6440.76NA
6277799NANA1209.55NA
7271980273179278998-5819.32-1199.1
8266730265800278367-12566.8930.255
9262433261804277881-16076.6628.692
102853782836062778315775.181771.94
112866922863232783847938.85369.359
122829172849362789795956.9-2019.36
132776862805602794991060.79-2874.08
14274371277626280095-2469.04-3254.92
15277466280493280847-354.422-3027
162906042905562816528904.1248.3799
172907702890422826016440.761728.41
182836542850582838481209.55-1403.67
19278601279499285319-5819.32-898.47
20274405274413286980-12566.8-8.16181
21272817272589288666-16076.6227.526
222942922958952901205775.18-1603.22
233005622992322912937938.851330.19
242989822985062925495956.9476.432
252969172951362940761060.791780.59
26295008293167295636-2469.041841.33
27297295296768297122-354.422527.13
283056713076202987168904.12-1948.91
293038533066923002526440.76-2839.46
303007083029273017171209.55-2218.71
31298194297361303180-5819.32832.863
32292254291965304532-12566.8288.88
33290646289900305976-16076.6746.401
343147073133823076065775.181325.44
353170093171603092227938.85-151.474
363177063166223106655956.91083.85
373133123129203118591060.79391.88
38311048310326312795-2469.04721.953
39315917313192313546-354.4222725.05
403261743230033140998904.123170.84
413221163209683145276440.761147.83
423170923161053148951209.55986.953
43310468309383315202-5819.321085.4
44302438302841315408-12566.8-403.287
45298493299288315364-16076.6-794.933
463201243208103150355775.18-686.474
473218733226133146757938.85-740.391
483216763204093144525956.91266.77
493166963151873141261060.791509.3
50312612311113313582-2469.041499.33
51313307312724313079-354.422582.505
523208833213463124428904.12-462.62
533187493179783115376440.76770.911
543151263116833104731209.553443.12
55304600303411309230-5819.321188.9
56295245NANA-12566.8NA
57293619NANA-16076.6NA
58309700NANA5775.18NA
59310597NANA7938.85NA
60307416NANA5956.9NA
61301126NANA1060.79NA



Parameters (Session):
par1 = additive ; par2 = 12 ;
Parameters (R input):
par1 = additive ; par2 = 12 ;
R code (references can be found in the software module):
par2 <- as.numeric(par2)
x <- ts(x,freq=par2)
m <- decompose(x,type=par1)
m$figure
bitmap(file='test1.png')
plot(m)
dev.off()
mylagmax <- length(x)/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$trend),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$seasonal),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$random),na.action=na.pass,lag.max = mylagmax,main='Random')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
spectrum(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
spectrum(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
cpgram(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
cpgram(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Classical Decomposition by Moving Averages',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observations',header=TRUE)
a<-table.element(a,'Fit',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Random',header=TRUE)
a<-table.row.end(a)
for (i in 1:length(m$trend)) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
if (par1 == 'additive') a<-table.element(a,signif(m$trend[i]+m$seasonal[i],6)) else a<-table.element(a,signif(m$trend[i]*m$seasonal[i],6))
a<-table.element(a,signif(m$trend[i],6))
a<-table.element(a,signif(m$seasonal[i],6))
a<-table.element(a,signif(m$random[i],6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')