Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationMon, 25 Apr 2016 15:19:00 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2016/Apr/25/t1461593988wx9lplbsqszgtol.htm/, Retrieved Mon, 06 May 2024 06:42:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=294707, Retrieved Mon, 06 May 2024 06:42:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact116
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [Decompositie-Fail...] [2016-04-25 14:19:00] [45930f35caeb32be6f319da4f3b0c690] [Current]
Feedback Forum

Post a new message
Dataseries X:
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
671
679
862
624
516
650
583
444
562
540
524
674




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ wold.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 & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=294707&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]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=294707&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=294707&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'Herman Ole Andreas Wold' @ wold.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1726NANA48.8368NA
2784NANA16.7847NA
3884NANA41.6389NA
4696NANA23.2431NA
5893NANA18.1285NA
6674NANA-44.309NA
7703860.306806.54253.7639-157.306
8799722.681825.5-102.81976.3194
9793777.712833.458-55.746515.2882
10799892.733841.7550.9826-93.7326
111022865.785854.12511.6597156.215
12758806.378868.542-62.1632-48.3785
131021942.42893.58348.836878.5799
14944927.326910.54216.784716.6736
15915957.181915.54241.6389-42.1806
16864955.035931.79223.2431-91.0347
171022959.837941.70818.128562.1632
18891898.233942.542-44.309-7.23264
1910871002.89949.12553.763984.1111
20822854.722957.542-102.819-32.7222
21890914.587970.333-55.7465-24.5868
2210921036.44985.45850.982655.559
239671011.2999.54211.6597-44.2014
24833950.671012.83-62.1632-117.67
25110410711022.1748.836832.9965
2610631044.121027.3316.784718.8819
2711031070.851029.2141.638932.1528
2810391053.71030.4623.2431-14.7014
2911851048.341030.2118.1285136.663
301047988.5241032.83-44.30958.4757
3111551084.261030.553.763970.7361
32878913.9721016.79-102.819-35.9722
33879940.837996.583-55.7465-61.8368
3411331034.19983.20850.982698.809
35920978.535966.87511.6597-58.5347
36943871.92934.083-62.163271.0799
37938954.462905.62548.8368-16.4618
38900902.076885.29216.7847-2.07639
39781915.306873.66741.6389-134.306
401040878.035854.79223.2431161.965
41792848.17830.04218.1285-56.1701
42653768.983813.292-44.309-115.983
43866848.389794.62553.763917.6111
44679671.472774.292-102.8197.52778
45799712.712768.458-55.746586.2882
46760805.483754.550.9826-45.4826
47699737.326725.66711.6597-38.3264
48762651.878714.042-62.1632110.122
49671750.962702.12548.8368-79.9618
50679697.326680.54216.7847-18.3264
51862702.514660.87541.6389159.486
52624665.076641.83323.2431-41.0764
53516643.503625.37518.1285-127.503
54650570.108614.417-44.30979.8924
55583NANA53.7639NA
56444NANA-102.819NA
57562NANA-55.7465NA
58540NANA50.9826NA
59524NANA11.6597NA
60674NANA-62.1632NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 726 & NA & NA & 48.8368 & NA \tabularnewline
2 & 784 & NA & NA & 16.7847 & NA \tabularnewline
3 & 884 & NA & NA & 41.6389 & NA \tabularnewline
4 & 696 & NA & NA & 23.2431 & NA \tabularnewline
5 & 893 & NA & NA & 18.1285 & NA \tabularnewline
6 & 674 & NA & NA & -44.309 & NA \tabularnewline
7 & 703 & 860.306 & 806.542 & 53.7639 & -157.306 \tabularnewline
8 & 799 & 722.681 & 825.5 & -102.819 & 76.3194 \tabularnewline
9 & 793 & 777.712 & 833.458 & -55.7465 & 15.2882 \tabularnewline
10 & 799 & 892.733 & 841.75 & 50.9826 & -93.7326 \tabularnewline
11 & 1022 & 865.785 & 854.125 & 11.6597 & 156.215 \tabularnewline
12 & 758 & 806.378 & 868.542 & -62.1632 & -48.3785 \tabularnewline
13 & 1021 & 942.42 & 893.583 & 48.8368 & 78.5799 \tabularnewline
14 & 944 & 927.326 & 910.542 & 16.7847 & 16.6736 \tabularnewline
15 & 915 & 957.181 & 915.542 & 41.6389 & -42.1806 \tabularnewline
16 & 864 & 955.035 & 931.792 & 23.2431 & -91.0347 \tabularnewline
17 & 1022 & 959.837 & 941.708 & 18.1285 & 62.1632 \tabularnewline
18 & 891 & 898.233 & 942.542 & -44.309 & -7.23264 \tabularnewline
19 & 1087 & 1002.89 & 949.125 & 53.7639 & 84.1111 \tabularnewline
20 & 822 & 854.722 & 957.542 & -102.819 & -32.7222 \tabularnewline
21 & 890 & 914.587 & 970.333 & -55.7465 & -24.5868 \tabularnewline
22 & 1092 & 1036.44 & 985.458 & 50.9826 & 55.559 \tabularnewline
23 & 967 & 1011.2 & 999.542 & 11.6597 & -44.2014 \tabularnewline
24 & 833 & 950.67 & 1012.83 & -62.1632 & -117.67 \tabularnewline
25 & 1104 & 1071 & 1022.17 & 48.8368 & 32.9965 \tabularnewline
26 & 1063 & 1044.12 & 1027.33 & 16.7847 & 18.8819 \tabularnewline
27 & 1103 & 1070.85 & 1029.21 & 41.6389 & 32.1528 \tabularnewline
28 & 1039 & 1053.7 & 1030.46 & 23.2431 & -14.7014 \tabularnewline
29 & 1185 & 1048.34 & 1030.21 & 18.1285 & 136.663 \tabularnewline
30 & 1047 & 988.524 & 1032.83 & -44.309 & 58.4757 \tabularnewline
31 & 1155 & 1084.26 & 1030.5 & 53.7639 & 70.7361 \tabularnewline
32 & 878 & 913.972 & 1016.79 & -102.819 & -35.9722 \tabularnewline
33 & 879 & 940.837 & 996.583 & -55.7465 & -61.8368 \tabularnewline
34 & 1133 & 1034.19 & 983.208 & 50.9826 & 98.809 \tabularnewline
35 & 920 & 978.535 & 966.875 & 11.6597 & -58.5347 \tabularnewline
36 & 943 & 871.92 & 934.083 & -62.1632 & 71.0799 \tabularnewline
37 & 938 & 954.462 & 905.625 & 48.8368 & -16.4618 \tabularnewline
38 & 900 & 902.076 & 885.292 & 16.7847 & -2.07639 \tabularnewline
39 & 781 & 915.306 & 873.667 & 41.6389 & -134.306 \tabularnewline
40 & 1040 & 878.035 & 854.792 & 23.2431 & 161.965 \tabularnewline
41 & 792 & 848.17 & 830.042 & 18.1285 & -56.1701 \tabularnewline
42 & 653 & 768.983 & 813.292 & -44.309 & -115.983 \tabularnewline
43 & 866 & 848.389 & 794.625 & 53.7639 & 17.6111 \tabularnewline
44 & 679 & 671.472 & 774.292 & -102.819 & 7.52778 \tabularnewline
45 & 799 & 712.712 & 768.458 & -55.7465 & 86.2882 \tabularnewline
46 & 760 & 805.483 & 754.5 & 50.9826 & -45.4826 \tabularnewline
47 & 699 & 737.326 & 725.667 & 11.6597 & -38.3264 \tabularnewline
48 & 762 & 651.878 & 714.042 & -62.1632 & 110.122 \tabularnewline
49 & 671 & 750.962 & 702.125 & 48.8368 & -79.9618 \tabularnewline
50 & 679 & 697.326 & 680.542 & 16.7847 & -18.3264 \tabularnewline
51 & 862 & 702.514 & 660.875 & 41.6389 & 159.486 \tabularnewline
52 & 624 & 665.076 & 641.833 & 23.2431 & -41.0764 \tabularnewline
53 & 516 & 643.503 & 625.375 & 18.1285 & -127.503 \tabularnewline
54 & 650 & 570.108 & 614.417 & -44.309 & 79.8924 \tabularnewline
55 & 583 & NA & NA & 53.7639 & NA \tabularnewline
56 & 444 & NA & NA & -102.819 & NA \tabularnewline
57 & 562 & NA & NA & -55.7465 & NA \tabularnewline
58 & 540 & NA & NA & 50.9826 & NA \tabularnewline
59 & 524 & NA & NA & 11.6597 & NA \tabularnewline
60 & 674 & NA & NA & -62.1632 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=294707&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]726[/C][C]NA[/C][C]NA[/C][C]48.8368[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]784[/C][C]NA[/C][C]NA[/C][C]16.7847[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]884[/C][C]NA[/C][C]NA[/C][C]41.6389[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]696[/C][C]NA[/C][C]NA[/C][C]23.2431[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]893[/C][C]NA[/C][C]NA[/C][C]18.1285[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]674[/C][C]NA[/C][C]NA[/C][C]-44.309[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]703[/C][C]860.306[/C][C]806.542[/C][C]53.7639[/C][C]-157.306[/C][/ROW]
[ROW][C]8[/C][C]799[/C][C]722.681[/C][C]825.5[/C][C]-102.819[/C][C]76.3194[/C][/ROW]
[ROW][C]9[/C][C]793[/C][C]777.712[/C][C]833.458[/C][C]-55.7465[/C][C]15.2882[/C][/ROW]
[ROW][C]10[/C][C]799[/C][C]892.733[/C][C]841.75[/C][C]50.9826[/C][C]-93.7326[/C][/ROW]
[ROW][C]11[/C][C]1022[/C][C]865.785[/C][C]854.125[/C][C]11.6597[/C][C]156.215[/C][/ROW]
[ROW][C]12[/C][C]758[/C][C]806.378[/C][C]868.542[/C][C]-62.1632[/C][C]-48.3785[/C][/ROW]
[ROW][C]13[/C][C]1021[/C][C]942.42[/C][C]893.583[/C][C]48.8368[/C][C]78.5799[/C][/ROW]
[ROW][C]14[/C][C]944[/C][C]927.326[/C][C]910.542[/C][C]16.7847[/C][C]16.6736[/C][/ROW]
[ROW][C]15[/C][C]915[/C][C]957.181[/C][C]915.542[/C][C]41.6389[/C][C]-42.1806[/C][/ROW]
[ROW][C]16[/C][C]864[/C][C]955.035[/C][C]931.792[/C][C]23.2431[/C][C]-91.0347[/C][/ROW]
[ROW][C]17[/C][C]1022[/C][C]959.837[/C][C]941.708[/C][C]18.1285[/C][C]62.1632[/C][/ROW]
[ROW][C]18[/C][C]891[/C][C]898.233[/C][C]942.542[/C][C]-44.309[/C][C]-7.23264[/C][/ROW]
[ROW][C]19[/C][C]1087[/C][C]1002.89[/C][C]949.125[/C][C]53.7639[/C][C]84.1111[/C][/ROW]
[ROW][C]20[/C][C]822[/C][C]854.722[/C][C]957.542[/C][C]-102.819[/C][C]-32.7222[/C][/ROW]
[ROW][C]21[/C][C]890[/C][C]914.587[/C][C]970.333[/C][C]-55.7465[/C][C]-24.5868[/C][/ROW]
[ROW][C]22[/C][C]1092[/C][C]1036.44[/C][C]985.458[/C][C]50.9826[/C][C]55.559[/C][/ROW]
[ROW][C]23[/C][C]967[/C][C]1011.2[/C][C]999.542[/C][C]11.6597[/C][C]-44.2014[/C][/ROW]
[ROW][C]24[/C][C]833[/C][C]950.67[/C][C]1012.83[/C][C]-62.1632[/C][C]-117.67[/C][/ROW]
[ROW][C]25[/C][C]1104[/C][C]1071[/C][C]1022.17[/C][C]48.8368[/C][C]32.9965[/C][/ROW]
[ROW][C]26[/C][C]1063[/C][C]1044.12[/C][C]1027.33[/C][C]16.7847[/C][C]18.8819[/C][/ROW]
[ROW][C]27[/C][C]1103[/C][C]1070.85[/C][C]1029.21[/C][C]41.6389[/C][C]32.1528[/C][/ROW]
[ROW][C]28[/C][C]1039[/C][C]1053.7[/C][C]1030.46[/C][C]23.2431[/C][C]-14.7014[/C][/ROW]
[ROW][C]29[/C][C]1185[/C][C]1048.34[/C][C]1030.21[/C][C]18.1285[/C][C]136.663[/C][/ROW]
[ROW][C]30[/C][C]1047[/C][C]988.524[/C][C]1032.83[/C][C]-44.309[/C][C]58.4757[/C][/ROW]
[ROW][C]31[/C][C]1155[/C][C]1084.26[/C][C]1030.5[/C][C]53.7639[/C][C]70.7361[/C][/ROW]
[ROW][C]32[/C][C]878[/C][C]913.972[/C][C]1016.79[/C][C]-102.819[/C][C]-35.9722[/C][/ROW]
[ROW][C]33[/C][C]879[/C][C]940.837[/C][C]996.583[/C][C]-55.7465[/C][C]-61.8368[/C][/ROW]
[ROW][C]34[/C][C]1133[/C][C]1034.19[/C][C]983.208[/C][C]50.9826[/C][C]98.809[/C][/ROW]
[ROW][C]35[/C][C]920[/C][C]978.535[/C][C]966.875[/C][C]11.6597[/C][C]-58.5347[/C][/ROW]
[ROW][C]36[/C][C]943[/C][C]871.92[/C][C]934.083[/C][C]-62.1632[/C][C]71.0799[/C][/ROW]
[ROW][C]37[/C][C]938[/C][C]954.462[/C][C]905.625[/C][C]48.8368[/C][C]-16.4618[/C][/ROW]
[ROW][C]38[/C][C]900[/C][C]902.076[/C][C]885.292[/C][C]16.7847[/C][C]-2.07639[/C][/ROW]
[ROW][C]39[/C][C]781[/C][C]915.306[/C][C]873.667[/C][C]41.6389[/C][C]-134.306[/C][/ROW]
[ROW][C]40[/C][C]1040[/C][C]878.035[/C][C]854.792[/C][C]23.2431[/C][C]161.965[/C][/ROW]
[ROW][C]41[/C][C]792[/C][C]848.17[/C][C]830.042[/C][C]18.1285[/C][C]-56.1701[/C][/ROW]
[ROW][C]42[/C][C]653[/C][C]768.983[/C][C]813.292[/C][C]-44.309[/C][C]-115.983[/C][/ROW]
[ROW][C]43[/C][C]866[/C][C]848.389[/C][C]794.625[/C][C]53.7639[/C][C]17.6111[/C][/ROW]
[ROW][C]44[/C][C]679[/C][C]671.472[/C][C]774.292[/C][C]-102.819[/C][C]7.52778[/C][/ROW]
[ROW][C]45[/C][C]799[/C][C]712.712[/C][C]768.458[/C][C]-55.7465[/C][C]86.2882[/C][/ROW]
[ROW][C]46[/C][C]760[/C][C]805.483[/C][C]754.5[/C][C]50.9826[/C][C]-45.4826[/C][/ROW]
[ROW][C]47[/C][C]699[/C][C]737.326[/C][C]725.667[/C][C]11.6597[/C][C]-38.3264[/C][/ROW]
[ROW][C]48[/C][C]762[/C][C]651.878[/C][C]714.042[/C][C]-62.1632[/C][C]110.122[/C][/ROW]
[ROW][C]49[/C][C]671[/C][C]750.962[/C][C]702.125[/C][C]48.8368[/C][C]-79.9618[/C][/ROW]
[ROW][C]50[/C][C]679[/C][C]697.326[/C][C]680.542[/C][C]16.7847[/C][C]-18.3264[/C][/ROW]
[ROW][C]51[/C][C]862[/C][C]702.514[/C][C]660.875[/C][C]41.6389[/C][C]159.486[/C][/ROW]
[ROW][C]52[/C][C]624[/C][C]665.076[/C][C]641.833[/C][C]23.2431[/C][C]-41.0764[/C][/ROW]
[ROW][C]53[/C][C]516[/C][C]643.503[/C][C]625.375[/C][C]18.1285[/C][C]-127.503[/C][/ROW]
[ROW][C]54[/C][C]650[/C][C]570.108[/C][C]614.417[/C][C]-44.309[/C][C]79.8924[/C][/ROW]
[ROW][C]55[/C][C]583[/C][C]NA[/C][C]NA[/C][C]53.7639[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]444[/C][C]NA[/C][C]NA[/C][C]-102.819[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]562[/C][C]NA[/C][C]NA[/C][C]-55.7465[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]540[/C][C]NA[/C][C]NA[/C][C]50.9826[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]524[/C][C]NA[/C][C]NA[/C][C]11.6597[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]674[/C][C]NA[/C][C]NA[/C][C]-62.1632[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=294707&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=294707&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
1726NANA48.8368NA
2784NANA16.7847NA
3884NANA41.6389NA
4696NANA23.2431NA
5893NANA18.1285NA
6674NANA-44.309NA
7703860.306806.54253.7639-157.306
8799722.681825.5-102.81976.3194
9793777.712833.458-55.746515.2882
10799892.733841.7550.9826-93.7326
111022865.785854.12511.6597156.215
12758806.378868.542-62.1632-48.3785
131021942.42893.58348.836878.5799
14944927.326910.54216.784716.6736
15915957.181915.54241.6389-42.1806
16864955.035931.79223.2431-91.0347
171022959.837941.70818.128562.1632
18891898.233942.542-44.309-7.23264
1910871002.89949.12553.763984.1111
20822854.722957.542-102.819-32.7222
21890914.587970.333-55.7465-24.5868
2210921036.44985.45850.982655.559
239671011.2999.54211.6597-44.2014
24833950.671012.83-62.1632-117.67
25110410711022.1748.836832.9965
2610631044.121027.3316.784718.8819
2711031070.851029.2141.638932.1528
2810391053.71030.4623.2431-14.7014
2911851048.341030.2118.1285136.663
301047988.5241032.83-44.30958.4757
3111551084.261030.553.763970.7361
32878913.9721016.79-102.819-35.9722
33879940.837996.583-55.7465-61.8368
3411331034.19983.20850.982698.809
35920978.535966.87511.6597-58.5347
36943871.92934.083-62.163271.0799
37938954.462905.62548.8368-16.4618
38900902.076885.29216.7847-2.07639
39781915.306873.66741.6389-134.306
401040878.035854.79223.2431161.965
41792848.17830.04218.1285-56.1701
42653768.983813.292-44.309-115.983
43866848.389794.62553.763917.6111
44679671.472774.292-102.8197.52778
45799712.712768.458-55.746586.2882
46760805.483754.550.9826-45.4826
47699737.326725.66711.6597-38.3264
48762651.878714.042-62.1632110.122
49671750.962702.12548.8368-79.9618
50679697.326680.54216.7847-18.3264
51862702.514660.87541.6389159.486
52624665.076641.83323.2431-41.0764
53516643.503625.37518.1285-127.503
54650570.108614.417-44.30979.8924
55583NANA53.7639NA
56444NANA-102.819NA
57562NANA-55.7465NA
58540NANA50.9826NA
59524NANA11.6597NA
60674NANA-62.1632NA



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')