Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationSun, 29 Nov 2015 22:35:13 +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/Nov/29/t1448836558gbzjv8g3dmcnu60.htm/, Retrieved Wed, 15 May 2024 17:57:06 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=284553, Retrieved Wed, 15 May 2024 17:57:06 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact70
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [Classical Decompo...] [2015-11-29 22:35:13] [e4113772e8352caea1c7944bf41cc9e0] [Current]
Feedback Forum

Post a new message
Dataseries X:
789
811
996
778
603
990
735
800
706
766
870
647
726
784
884
696
893
674
703
799
793
799
1022
758
1021
944
915
864
1022
891
1087
822
890
1092
967
833
1104
1063
1103
1039
1185
1047
1155
878
879
1133
920
943
938
900
781
1040
792
653
866
679
799
760
699
762




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=284553&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=284553&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=284553&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
1789NANA52.1892NA
2811NANA27.5851NA
3996NANA25.8767NA
4778NANA13.9705NA
5603NANA79.0642NA
6990NANA-77.1024NA
7735815.898788.29227.6059-80.8976
8800714.418784.542-70.123385.5816
9706702.189778.75-76.56083.81076
10766824.116770.66753.4497-58.1163
11870825.335779.33346.001744.6649
12647676.293778.25-101.957-29.2934
13726815.939763.7552.1892-89.9392
14784789.96762.37527.5851-5.96007
15884791.835765.95825.876792.1649
16696784.929770.95813.9705-88.9288
17893857.731778.66779.064235.2691
18674712.523789.625-77.1024-38.5226
19703834.148806.54227.6059-131.148
20799755.377825.5-70.123343.6233
21793756.898833.458-76.560836.1024
22799895.2841.7553.4497-96.1997
231022900.127854.12546.0017121.873
24758766.585868.542-101.957-8.58507
251021945.773893.58352.189275.2274
26944938.127910.54227.58515.87326
27915941.418915.54225.8767-26.4184
28864945.762931.79213.9705-81.7622
2910221020.77941.70879.06421.22743
30891865.439942.542-77.102425.5608
311087976.731949.12527.6059110.269
32822887.418957.542-70.1233-65.4184
33890893.773970.333-76.5608-3.77257
3410921038.91985.45853.449753.092
359671045.54999.54246.0017-78.5434
36833910.8771012.83-101.957-77.8767
3711041074.361022.1752.189229.6441
3810631054.921027.3327.58518.0816
3911031055.091029.2125.876747.9149
4010391044.431030.4613.9705-5.42882
4111851109.271030.2179.064275.7274
421047955.7311032.83-77.102491.2691
4311551058.111030.527.605996.8941
44878946.6681016.79-70.1233-68.6684
45879920.023996.583-76.5608-41.0226
4611331036.66983.20853.449796.342
479201012.88966.87546.0017-92.8767
48943832.127934.083-101.957110.873
49938957.814905.62552.1892-19.8142
50900912.877885.29227.5851-12.8767
51781899.543873.66725.8767-118.543
521040868.762854.79213.9705171.238
53792909.106830.04279.0642-117.106
54653736.189813.292-77.1024-83.1892
55866NANA27.6059NA
56679NANA-70.1233NA
57799NANA-76.5608NA
58760NANA53.4497NA
59699NANA46.0017NA
60762NANA-101.957NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 789 & NA & NA & 52.1892 & NA \tabularnewline
2 & 811 & NA & NA & 27.5851 & NA \tabularnewline
3 & 996 & NA & NA & 25.8767 & NA \tabularnewline
4 & 778 & NA & NA & 13.9705 & NA \tabularnewline
5 & 603 & NA & NA & 79.0642 & NA \tabularnewline
6 & 990 & NA & NA & -77.1024 & NA \tabularnewline
7 & 735 & 815.898 & 788.292 & 27.6059 & -80.8976 \tabularnewline
8 & 800 & 714.418 & 784.542 & -70.1233 & 85.5816 \tabularnewline
9 & 706 & 702.189 & 778.75 & -76.5608 & 3.81076 \tabularnewline
10 & 766 & 824.116 & 770.667 & 53.4497 & -58.1163 \tabularnewline
11 & 870 & 825.335 & 779.333 & 46.0017 & 44.6649 \tabularnewline
12 & 647 & 676.293 & 778.25 & -101.957 & -29.2934 \tabularnewline
13 & 726 & 815.939 & 763.75 & 52.1892 & -89.9392 \tabularnewline
14 & 784 & 789.96 & 762.375 & 27.5851 & -5.96007 \tabularnewline
15 & 884 & 791.835 & 765.958 & 25.8767 & 92.1649 \tabularnewline
16 & 696 & 784.929 & 770.958 & 13.9705 & -88.9288 \tabularnewline
17 & 893 & 857.731 & 778.667 & 79.0642 & 35.2691 \tabularnewline
18 & 674 & 712.523 & 789.625 & -77.1024 & -38.5226 \tabularnewline
19 & 703 & 834.148 & 806.542 & 27.6059 & -131.148 \tabularnewline
20 & 799 & 755.377 & 825.5 & -70.1233 & 43.6233 \tabularnewline
21 & 793 & 756.898 & 833.458 & -76.5608 & 36.1024 \tabularnewline
22 & 799 & 895.2 & 841.75 & 53.4497 & -96.1997 \tabularnewline
23 & 1022 & 900.127 & 854.125 & 46.0017 & 121.873 \tabularnewline
24 & 758 & 766.585 & 868.542 & -101.957 & -8.58507 \tabularnewline
25 & 1021 & 945.773 & 893.583 & 52.1892 & 75.2274 \tabularnewline
26 & 944 & 938.127 & 910.542 & 27.5851 & 5.87326 \tabularnewline
27 & 915 & 941.418 & 915.542 & 25.8767 & -26.4184 \tabularnewline
28 & 864 & 945.762 & 931.792 & 13.9705 & -81.7622 \tabularnewline
29 & 1022 & 1020.77 & 941.708 & 79.0642 & 1.22743 \tabularnewline
30 & 891 & 865.439 & 942.542 & -77.1024 & 25.5608 \tabularnewline
31 & 1087 & 976.731 & 949.125 & 27.6059 & 110.269 \tabularnewline
32 & 822 & 887.418 & 957.542 & -70.1233 & -65.4184 \tabularnewline
33 & 890 & 893.773 & 970.333 & -76.5608 & -3.77257 \tabularnewline
34 & 1092 & 1038.91 & 985.458 & 53.4497 & 53.092 \tabularnewline
35 & 967 & 1045.54 & 999.542 & 46.0017 & -78.5434 \tabularnewline
36 & 833 & 910.877 & 1012.83 & -101.957 & -77.8767 \tabularnewline
37 & 1104 & 1074.36 & 1022.17 & 52.1892 & 29.6441 \tabularnewline
38 & 1063 & 1054.92 & 1027.33 & 27.5851 & 8.0816 \tabularnewline
39 & 1103 & 1055.09 & 1029.21 & 25.8767 & 47.9149 \tabularnewline
40 & 1039 & 1044.43 & 1030.46 & 13.9705 & -5.42882 \tabularnewline
41 & 1185 & 1109.27 & 1030.21 & 79.0642 & 75.7274 \tabularnewline
42 & 1047 & 955.731 & 1032.83 & -77.1024 & 91.2691 \tabularnewline
43 & 1155 & 1058.11 & 1030.5 & 27.6059 & 96.8941 \tabularnewline
44 & 878 & 946.668 & 1016.79 & -70.1233 & -68.6684 \tabularnewline
45 & 879 & 920.023 & 996.583 & -76.5608 & -41.0226 \tabularnewline
46 & 1133 & 1036.66 & 983.208 & 53.4497 & 96.342 \tabularnewline
47 & 920 & 1012.88 & 966.875 & 46.0017 & -92.8767 \tabularnewline
48 & 943 & 832.127 & 934.083 & -101.957 & 110.873 \tabularnewline
49 & 938 & 957.814 & 905.625 & 52.1892 & -19.8142 \tabularnewline
50 & 900 & 912.877 & 885.292 & 27.5851 & -12.8767 \tabularnewline
51 & 781 & 899.543 & 873.667 & 25.8767 & -118.543 \tabularnewline
52 & 1040 & 868.762 & 854.792 & 13.9705 & 171.238 \tabularnewline
53 & 792 & 909.106 & 830.042 & 79.0642 & -117.106 \tabularnewline
54 & 653 & 736.189 & 813.292 & -77.1024 & -83.1892 \tabularnewline
55 & 866 & NA & NA & 27.6059 & NA \tabularnewline
56 & 679 & NA & NA & -70.1233 & NA \tabularnewline
57 & 799 & NA & NA & -76.5608 & NA \tabularnewline
58 & 760 & NA & NA & 53.4497 & NA \tabularnewline
59 & 699 & NA & NA & 46.0017 & NA \tabularnewline
60 & 762 & NA & NA & -101.957 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=284553&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]789[/C][C]NA[/C][C]NA[/C][C]52.1892[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]811[/C][C]NA[/C][C]NA[/C][C]27.5851[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]996[/C][C]NA[/C][C]NA[/C][C]25.8767[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]778[/C][C]NA[/C][C]NA[/C][C]13.9705[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]603[/C][C]NA[/C][C]NA[/C][C]79.0642[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]990[/C][C]NA[/C][C]NA[/C][C]-77.1024[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]735[/C][C]815.898[/C][C]788.292[/C][C]27.6059[/C][C]-80.8976[/C][/ROW]
[ROW][C]8[/C][C]800[/C][C]714.418[/C][C]784.542[/C][C]-70.1233[/C][C]85.5816[/C][/ROW]
[ROW][C]9[/C][C]706[/C][C]702.189[/C][C]778.75[/C][C]-76.5608[/C][C]3.81076[/C][/ROW]
[ROW][C]10[/C][C]766[/C][C]824.116[/C][C]770.667[/C][C]53.4497[/C][C]-58.1163[/C][/ROW]
[ROW][C]11[/C][C]870[/C][C]825.335[/C][C]779.333[/C][C]46.0017[/C][C]44.6649[/C][/ROW]
[ROW][C]12[/C][C]647[/C][C]676.293[/C][C]778.25[/C][C]-101.957[/C][C]-29.2934[/C][/ROW]
[ROW][C]13[/C][C]726[/C][C]815.939[/C][C]763.75[/C][C]52.1892[/C][C]-89.9392[/C][/ROW]
[ROW][C]14[/C][C]784[/C][C]789.96[/C][C]762.375[/C][C]27.5851[/C][C]-5.96007[/C][/ROW]
[ROW][C]15[/C][C]884[/C][C]791.835[/C][C]765.958[/C][C]25.8767[/C][C]92.1649[/C][/ROW]
[ROW][C]16[/C][C]696[/C][C]784.929[/C][C]770.958[/C][C]13.9705[/C][C]-88.9288[/C][/ROW]
[ROW][C]17[/C][C]893[/C][C]857.731[/C][C]778.667[/C][C]79.0642[/C][C]35.2691[/C][/ROW]
[ROW][C]18[/C][C]674[/C][C]712.523[/C][C]789.625[/C][C]-77.1024[/C][C]-38.5226[/C][/ROW]
[ROW][C]19[/C][C]703[/C][C]834.148[/C][C]806.542[/C][C]27.6059[/C][C]-131.148[/C][/ROW]
[ROW][C]20[/C][C]799[/C][C]755.377[/C][C]825.5[/C][C]-70.1233[/C][C]43.6233[/C][/ROW]
[ROW][C]21[/C][C]793[/C][C]756.898[/C][C]833.458[/C][C]-76.5608[/C][C]36.1024[/C][/ROW]
[ROW][C]22[/C][C]799[/C][C]895.2[/C][C]841.75[/C][C]53.4497[/C][C]-96.1997[/C][/ROW]
[ROW][C]23[/C][C]1022[/C][C]900.127[/C][C]854.125[/C][C]46.0017[/C][C]121.873[/C][/ROW]
[ROW][C]24[/C][C]758[/C][C]766.585[/C][C]868.542[/C][C]-101.957[/C][C]-8.58507[/C][/ROW]
[ROW][C]25[/C][C]1021[/C][C]945.773[/C][C]893.583[/C][C]52.1892[/C][C]75.2274[/C][/ROW]
[ROW][C]26[/C][C]944[/C][C]938.127[/C][C]910.542[/C][C]27.5851[/C][C]5.87326[/C][/ROW]
[ROW][C]27[/C][C]915[/C][C]941.418[/C][C]915.542[/C][C]25.8767[/C][C]-26.4184[/C][/ROW]
[ROW][C]28[/C][C]864[/C][C]945.762[/C][C]931.792[/C][C]13.9705[/C][C]-81.7622[/C][/ROW]
[ROW][C]29[/C][C]1022[/C][C]1020.77[/C][C]941.708[/C][C]79.0642[/C][C]1.22743[/C][/ROW]
[ROW][C]30[/C][C]891[/C][C]865.439[/C][C]942.542[/C][C]-77.1024[/C][C]25.5608[/C][/ROW]
[ROW][C]31[/C][C]1087[/C][C]976.731[/C][C]949.125[/C][C]27.6059[/C][C]110.269[/C][/ROW]
[ROW][C]32[/C][C]822[/C][C]887.418[/C][C]957.542[/C][C]-70.1233[/C][C]-65.4184[/C][/ROW]
[ROW][C]33[/C][C]890[/C][C]893.773[/C][C]970.333[/C][C]-76.5608[/C][C]-3.77257[/C][/ROW]
[ROW][C]34[/C][C]1092[/C][C]1038.91[/C][C]985.458[/C][C]53.4497[/C][C]53.092[/C][/ROW]
[ROW][C]35[/C][C]967[/C][C]1045.54[/C][C]999.542[/C][C]46.0017[/C][C]-78.5434[/C][/ROW]
[ROW][C]36[/C][C]833[/C][C]910.877[/C][C]1012.83[/C][C]-101.957[/C][C]-77.8767[/C][/ROW]
[ROW][C]37[/C][C]1104[/C][C]1074.36[/C][C]1022.17[/C][C]52.1892[/C][C]29.6441[/C][/ROW]
[ROW][C]38[/C][C]1063[/C][C]1054.92[/C][C]1027.33[/C][C]27.5851[/C][C]8.0816[/C][/ROW]
[ROW][C]39[/C][C]1103[/C][C]1055.09[/C][C]1029.21[/C][C]25.8767[/C][C]47.9149[/C][/ROW]
[ROW][C]40[/C][C]1039[/C][C]1044.43[/C][C]1030.46[/C][C]13.9705[/C][C]-5.42882[/C][/ROW]
[ROW][C]41[/C][C]1185[/C][C]1109.27[/C][C]1030.21[/C][C]79.0642[/C][C]75.7274[/C][/ROW]
[ROW][C]42[/C][C]1047[/C][C]955.731[/C][C]1032.83[/C][C]-77.1024[/C][C]91.2691[/C][/ROW]
[ROW][C]43[/C][C]1155[/C][C]1058.11[/C][C]1030.5[/C][C]27.6059[/C][C]96.8941[/C][/ROW]
[ROW][C]44[/C][C]878[/C][C]946.668[/C][C]1016.79[/C][C]-70.1233[/C][C]-68.6684[/C][/ROW]
[ROW][C]45[/C][C]879[/C][C]920.023[/C][C]996.583[/C][C]-76.5608[/C][C]-41.0226[/C][/ROW]
[ROW][C]46[/C][C]1133[/C][C]1036.66[/C][C]983.208[/C][C]53.4497[/C][C]96.342[/C][/ROW]
[ROW][C]47[/C][C]920[/C][C]1012.88[/C][C]966.875[/C][C]46.0017[/C][C]-92.8767[/C][/ROW]
[ROW][C]48[/C][C]943[/C][C]832.127[/C][C]934.083[/C][C]-101.957[/C][C]110.873[/C][/ROW]
[ROW][C]49[/C][C]938[/C][C]957.814[/C][C]905.625[/C][C]52.1892[/C][C]-19.8142[/C][/ROW]
[ROW][C]50[/C][C]900[/C][C]912.877[/C][C]885.292[/C][C]27.5851[/C][C]-12.8767[/C][/ROW]
[ROW][C]51[/C][C]781[/C][C]899.543[/C][C]873.667[/C][C]25.8767[/C][C]-118.543[/C][/ROW]
[ROW][C]52[/C][C]1040[/C][C]868.762[/C][C]854.792[/C][C]13.9705[/C][C]171.238[/C][/ROW]
[ROW][C]53[/C][C]792[/C][C]909.106[/C][C]830.042[/C][C]79.0642[/C][C]-117.106[/C][/ROW]
[ROW][C]54[/C][C]653[/C][C]736.189[/C][C]813.292[/C][C]-77.1024[/C][C]-83.1892[/C][/ROW]
[ROW][C]55[/C][C]866[/C][C]NA[/C][C]NA[/C][C]27.6059[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]679[/C][C]NA[/C][C]NA[/C][C]-70.1233[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]799[/C][C]NA[/C][C]NA[/C][C]-76.5608[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]760[/C][C]NA[/C][C]NA[/C][C]53.4497[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]699[/C][C]NA[/C][C]NA[/C][C]46.0017[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]762[/C][C]NA[/C][C]NA[/C][C]-101.957[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=284553&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=284553&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
1789NANA52.1892NA
2811NANA27.5851NA
3996NANA25.8767NA
4778NANA13.9705NA
5603NANA79.0642NA
6990NANA-77.1024NA
7735815.898788.29227.6059-80.8976
8800714.418784.542-70.123385.5816
9706702.189778.75-76.56083.81076
10766824.116770.66753.4497-58.1163
11870825.335779.33346.001744.6649
12647676.293778.25-101.957-29.2934
13726815.939763.7552.1892-89.9392
14784789.96762.37527.5851-5.96007
15884791.835765.95825.876792.1649
16696784.929770.95813.9705-88.9288
17893857.731778.66779.064235.2691
18674712.523789.625-77.1024-38.5226
19703834.148806.54227.6059-131.148
20799755.377825.5-70.123343.6233
21793756.898833.458-76.560836.1024
22799895.2841.7553.4497-96.1997
231022900.127854.12546.0017121.873
24758766.585868.542-101.957-8.58507
251021945.773893.58352.189275.2274
26944938.127910.54227.58515.87326
27915941.418915.54225.8767-26.4184
28864945.762931.79213.9705-81.7622
2910221020.77941.70879.06421.22743
30891865.439942.542-77.102425.5608
311087976.731949.12527.6059110.269
32822887.418957.542-70.1233-65.4184
33890893.773970.333-76.5608-3.77257
3410921038.91985.45853.449753.092
359671045.54999.54246.0017-78.5434
36833910.8771012.83-101.957-77.8767
3711041074.361022.1752.189229.6441
3810631054.921027.3327.58518.0816
3911031055.091029.2125.876747.9149
4010391044.431030.4613.9705-5.42882
4111851109.271030.2179.064275.7274
421047955.7311032.83-77.102491.2691
4311551058.111030.527.605996.8941
44878946.6681016.79-70.1233-68.6684
45879920.023996.583-76.5608-41.0226
4611331036.66983.20853.449796.342
479201012.88966.87546.0017-92.8767
48943832.127934.083-101.957110.873
49938957.814905.62552.1892-19.8142
50900912.877885.29227.5851-12.8767
51781899.543873.66725.8767-118.543
521040868.762854.79213.9705171.238
53792909.106830.04279.0642-117.106
54653736.189813.292-77.1024-83.1892
55866NANA27.6059NA
56679NANA-70.1233NA
57799NANA-76.5608NA
58760NANA53.4497NA
59699NANA46.0017NA
60762NANA-101.957NA



Parameters (Session):
par1 = additive ; par2 = 12 ;
Parameters (R input):
par1 = additive ; par2 = 12 ;
R code (references can be found in the software module):
par2 <- '12'
par1 <- 'multiplicative'
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')