Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationMon, 28 Nov 2016 22:45:25 +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/2016/Nov/28/t14803731454ithafo0aqgbh5h.htm/, Retrieved Sat, 04 May 2024 11:05:53 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Sat, 04 May 2024 11:05:53 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
662
670
659
663
673
699
712
700
692
699
700
702
693
696
696
694
695
715
731
715
707
712
699
703
695
694
691
694
699
720
732
712
705
707
700
687
674
676
666
669
669
688
705
684
679
689
691
685
690
685
688
696
693
721
726
704
700
707
696
687




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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'Gwilym Jenkins' @ jenkins.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1662NANA-9.44792NA
2670NANA-9.88542NA
3659NANA-12.5104NA
4663NANA-9.67708NA
5673NANA-8.96875NA
6699NANA13.2292NA
7712712.677687.20825.4687-0.677083
8700697.354689.5837.770832.64583
9692692.521692.2080.3125-0.520833
10699700.708695.0425.66667-1.70833
11700698.115697.250.8645831.88542
12702696.01698.833-2.822925.98958
13693690.844700.292-9.447922.15625
14696691.823701.708-9.885424.17708
15696690.448702.958-12.51045.55208
16694694.448704.125-9.67708-0.447917
17695695.656704.625-8.96875-0.65625
18715717.854704.62513.2292-2.85417
19731730.219704.7525.46870.78125
20715712.521704.757.770832.47917
21707704.771704.4580.31252.22917
22712709.917704.255.666672.08333
23699705.281704.4170.864583-6.28125
24703701.969704.792-2.822921.03125
25695695.594705.042-9.44792-0.59375
26694695.073704.958-9.88542-1.07292
27691692.24704.75-12.5104-1.23958
28694694.781704.458-9.67708-0.78125
29699695.323704.292-8.968753.67708
30720716.896703.66713.22923.10417
31732727.594702.12525.46874.40625
32712708.271700.57.770833.72917
33705699.021698.7080.31255.97917
34707702.292696.6255.666674.70833
35700695.198694.3330.8645834.80208
36687688.927691.75-2.82292-1.92708
37674679.844689.292-9.44792-5.84375
38676677.115687-9.88542-1.11458
39666672.24684.75-12.5104-6.23958
40669673.24682.917-9.67708-4.23958
41669672.823681.792-8.96875-3.82292
42688694.562681.33313.2292-6.5625
43705707.385681.91725.4687-2.38542
44684690.729682.9587.77083-6.72917
45679684.562684.250.3125-5.5625
46689691.958686.2925.66667-2.95833
47691689.281688.4170.8645831.71875
48685687.969690.792-2.82292-2.96875
49690683.594693.042-9.447926.40625
50685684.865694.75-9.885420.135417
51688683.948696.458-12.51044.05208
52696688.406698.083-9.677087.59375
53693690.073699.042-8.968752.92708
54721712.562699.33313.22928.4375
55726NANA25.4687NA
56704NANA7.77083NA
57700NANA0.3125NA
58707NANA5.66667NA
59696NANA0.864583NA
60687NANA-2.82292NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 662 & NA & NA & -9.44792 & NA \tabularnewline
2 & 670 & NA & NA & -9.88542 & NA \tabularnewline
3 & 659 & NA & NA & -12.5104 & NA \tabularnewline
4 & 663 & NA & NA & -9.67708 & NA \tabularnewline
5 & 673 & NA & NA & -8.96875 & NA \tabularnewline
6 & 699 & NA & NA & 13.2292 & NA \tabularnewline
7 & 712 & 712.677 & 687.208 & 25.4687 & -0.677083 \tabularnewline
8 & 700 & 697.354 & 689.583 & 7.77083 & 2.64583 \tabularnewline
9 & 692 & 692.521 & 692.208 & 0.3125 & -0.520833 \tabularnewline
10 & 699 & 700.708 & 695.042 & 5.66667 & -1.70833 \tabularnewline
11 & 700 & 698.115 & 697.25 & 0.864583 & 1.88542 \tabularnewline
12 & 702 & 696.01 & 698.833 & -2.82292 & 5.98958 \tabularnewline
13 & 693 & 690.844 & 700.292 & -9.44792 & 2.15625 \tabularnewline
14 & 696 & 691.823 & 701.708 & -9.88542 & 4.17708 \tabularnewline
15 & 696 & 690.448 & 702.958 & -12.5104 & 5.55208 \tabularnewline
16 & 694 & 694.448 & 704.125 & -9.67708 & -0.447917 \tabularnewline
17 & 695 & 695.656 & 704.625 & -8.96875 & -0.65625 \tabularnewline
18 & 715 & 717.854 & 704.625 & 13.2292 & -2.85417 \tabularnewline
19 & 731 & 730.219 & 704.75 & 25.4687 & 0.78125 \tabularnewline
20 & 715 & 712.521 & 704.75 & 7.77083 & 2.47917 \tabularnewline
21 & 707 & 704.771 & 704.458 & 0.3125 & 2.22917 \tabularnewline
22 & 712 & 709.917 & 704.25 & 5.66667 & 2.08333 \tabularnewline
23 & 699 & 705.281 & 704.417 & 0.864583 & -6.28125 \tabularnewline
24 & 703 & 701.969 & 704.792 & -2.82292 & 1.03125 \tabularnewline
25 & 695 & 695.594 & 705.042 & -9.44792 & -0.59375 \tabularnewline
26 & 694 & 695.073 & 704.958 & -9.88542 & -1.07292 \tabularnewline
27 & 691 & 692.24 & 704.75 & -12.5104 & -1.23958 \tabularnewline
28 & 694 & 694.781 & 704.458 & -9.67708 & -0.78125 \tabularnewline
29 & 699 & 695.323 & 704.292 & -8.96875 & 3.67708 \tabularnewline
30 & 720 & 716.896 & 703.667 & 13.2292 & 3.10417 \tabularnewline
31 & 732 & 727.594 & 702.125 & 25.4687 & 4.40625 \tabularnewline
32 & 712 & 708.271 & 700.5 & 7.77083 & 3.72917 \tabularnewline
33 & 705 & 699.021 & 698.708 & 0.3125 & 5.97917 \tabularnewline
34 & 707 & 702.292 & 696.625 & 5.66667 & 4.70833 \tabularnewline
35 & 700 & 695.198 & 694.333 & 0.864583 & 4.80208 \tabularnewline
36 & 687 & 688.927 & 691.75 & -2.82292 & -1.92708 \tabularnewline
37 & 674 & 679.844 & 689.292 & -9.44792 & -5.84375 \tabularnewline
38 & 676 & 677.115 & 687 & -9.88542 & -1.11458 \tabularnewline
39 & 666 & 672.24 & 684.75 & -12.5104 & -6.23958 \tabularnewline
40 & 669 & 673.24 & 682.917 & -9.67708 & -4.23958 \tabularnewline
41 & 669 & 672.823 & 681.792 & -8.96875 & -3.82292 \tabularnewline
42 & 688 & 694.562 & 681.333 & 13.2292 & -6.5625 \tabularnewline
43 & 705 & 707.385 & 681.917 & 25.4687 & -2.38542 \tabularnewline
44 & 684 & 690.729 & 682.958 & 7.77083 & -6.72917 \tabularnewline
45 & 679 & 684.562 & 684.25 & 0.3125 & -5.5625 \tabularnewline
46 & 689 & 691.958 & 686.292 & 5.66667 & -2.95833 \tabularnewline
47 & 691 & 689.281 & 688.417 & 0.864583 & 1.71875 \tabularnewline
48 & 685 & 687.969 & 690.792 & -2.82292 & -2.96875 \tabularnewline
49 & 690 & 683.594 & 693.042 & -9.44792 & 6.40625 \tabularnewline
50 & 685 & 684.865 & 694.75 & -9.88542 & 0.135417 \tabularnewline
51 & 688 & 683.948 & 696.458 & -12.5104 & 4.05208 \tabularnewline
52 & 696 & 688.406 & 698.083 & -9.67708 & 7.59375 \tabularnewline
53 & 693 & 690.073 & 699.042 & -8.96875 & 2.92708 \tabularnewline
54 & 721 & 712.562 & 699.333 & 13.2292 & 8.4375 \tabularnewline
55 & 726 & NA & NA & 25.4687 & NA \tabularnewline
56 & 704 & NA & NA & 7.77083 & NA \tabularnewline
57 & 700 & NA & NA & 0.3125 & NA \tabularnewline
58 & 707 & NA & NA & 5.66667 & NA \tabularnewline
59 & 696 & NA & NA & 0.864583 & NA \tabularnewline
60 & 687 & NA & NA & -2.82292 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&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]662[/C][C]NA[/C][C]NA[/C][C]-9.44792[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]670[/C][C]NA[/C][C]NA[/C][C]-9.88542[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]659[/C][C]NA[/C][C]NA[/C][C]-12.5104[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]663[/C][C]NA[/C][C]NA[/C][C]-9.67708[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]673[/C][C]NA[/C][C]NA[/C][C]-8.96875[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]699[/C][C]NA[/C][C]NA[/C][C]13.2292[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]712[/C][C]712.677[/C][C]687.208[/C][C]25.4687[/C][C]-0.677083[/C][/ROW]
[ROW][C]8[/C][C]700[/C][C]697.354[/C][C]689.583[/C][C]7.77083[/C][C]2.64583[/C][/ROW]
[ROW][C]9[/C][C]692[/C][C]692.521[/C][C]692.208[/C][C]0.3125[/C][C]-0.520833[/C][/ROW]
[ROW][C]10[/C][C]699[/C][C]700.708[/C][C]695.042[/C][C]5.66667[/C][C]-1.70833[/C][/ROW]
[ROW][C]11[/C][C]700[/C][C]698.115[/C][C]697.25[/C][C]0.864583[/C][C]1.88542[/C][/ROW]
[ROW][C]12[/C][C]702[/C][C]696.01[/C][C]698.833[/C][C]-2.82292[/C][C]5.98958[/C][/ROW]
[ROW][C]13[/C][C]693[/C][C]690.844[/C][C]700.292[/C][C]-9.44792[/C][C]2.15625[/C][/ROW]
[ROW][C]14[/C][C]696[/C][C]691.823[/C][C]701.708[/C][C]-9.88542[/C][C]4.17708[/C][/ROW]
[ROW][C]15[/C][C]696[/C][C]690.448[/C][C]702.958[/C][C]-12.5104[/C][C]5.55208[/C][/ROW]
[ROW][C]16[/C][C]694[/C][C]694.448[/C][C]704.125[/C][C]-9.67708[/C][C]-0.447917[/C][/ROW]
[ROW][C]17[/C][C]695[/C][C]695.656[/C][C]704.625[/C][C]-8.96875[/C][C]-0.65625[/C][/ROW]
[ROW][C]18[/C][C]715[/C][C]717.854[/C][C]704.625[/C][C]13.2292[/C][C]-2.85417[/C][/ROW]
[ROW][C]19[/C][C]731[/C][C]730.219[/C][C]704.75[/C][C]25.4687[/C][C]0.78125[/C][/ROW]
[ROW][C]20[/C][C]715[/C][C]712.521[/C][C]704.75[/C][C]7.77083[/C][C]2.47917[/C][/ROW]
[ROW][C]21[/C][C]707[/C][C]704.771[/C][C]704.458[/C][C]0.3125[/C][C]2.22917[/C][/ROW]
[ROW][C]22[/C][C]712[/C][C]709.917[/C][C]704.25[/C][C]5.66667[/C][C]2.08333[/C][/ROW]
[ROW][C]23[/C][C]699[/C][C]705.281[/C][C]704.417[/C][C]0.864583[/C][C]-6.28125[/C][/ROW]
[ROW][C]24[/C][C]703[/C][C]701.969[/C][C]704.792[/C][C]-2.82292[/C][C]1.03125[/C][/ROW]
[ROW][C]25[/C][C]695[/C][C]695.594[/C][C]705.042[/C][C]-9.44792[/C][C]-0.59375[/C][/ROW]
[ROW][C]26[/C][C]694[/C][C]695.073[/C][C]704.958[/C][C]-9.88542[/C][C]-1.07292[/C][/ROW]
[ROW][C]27[/C][C]691[/C][C]692.24[/C][C]704.75[/C][C]-12.5104[/C][C]-1.23958[/C][/ROW]
[ROW][C]28[/C][C]694[/C][C]694.781[/C][C]704.458[/C][C]-9.67708[/C][C]-0.78125[/C][/ROW]
[ROW][C]29[/C][C]699[/C][C]695.323[/C][C]704.292[/C][C]-8.96875[/C][C]3.67708[/C][/ROW]
[ROW][C]30[/C][C]720[/C][C]716.896[/C][C]703.667[/C][C]13.2292[/C][C]3.10417[/C][/ROW]
[ROW][C]31[/C][C]732[/C][C]727.594[/C][C]702.125[/C][C]25.4687[/C][C]4.40625[/C][/ROW]
[ROW][C]32[/C][C]712[/C][C]708.271[/C][C]700.5[/C][C]7.77083[/C][C]3.72917[/C][/ROW]
[ROW][C]33[/C][C]705[/C][C]699.021[/C][C]698.708[/C][C]0.3125[/C][C]5.97917[/C][/ROW]
[ROW][C]34[/C][C]707[/C][C]702.292[/C][C]696.625[/C][C]5.66667[/C][C]4.70833[/C][/ROW]
[ROW][C]35[/C][C]700[/C][C]695.198[/C][C]694.333[/C][C]0.864583[/C][C]4.80208[/C][/ROW]
[ROW][C]36[/C][C]687[/C][C]688.927[/C][C]691.75[/C][C]-2.82292[/C][C]-1.92708[/C][/ROW]
[ROW][C]37[/C][C]674[/C][C]679.844[/C][C]689.292[/C][C]-9.44792[/C][C]-5.84375[/C][/ROW]
[ROW][C]38[/C][C]676[/C][C]677.115[/C][C]687[/C][C]-9.88542[/C][C]-1.11458[/C][/ROW]
[ROW][C]39[/C][C]666[/C][C]672.24[/C][C]684.75[/C][C]-12.5104[/C][C]-6.23958[/C][/ROW]
[ROW][C]40[/C][C]669[/C][C]673.24[/C][C]682.917[/C][C]-9.67708[/C][C]-4.23958[/C][/ROW]
[ROW][C]41[/C][C]669[/C][C]672.823[/C][C]681.792[/C][C]-8.96875[/C][C]-3.82292[/C][/ROW]
[ROW][C]42[/C][C]688[/C][C]694.562[/C][C]681.333[/C][C]13.2292[/C][C]-6.5625[/C][/ROW]
[ROW][C]43[/C][C]705[/C][C]707.385[/C][C]681.917[/C][C]25.4687[/C][C]-2.38542[/C][/ROW]
[ROW][C]44[/C][C]684[/C][C]690.729[/C][C]682.958[/C][C]7.77083[/C][C]-6.72917[/C][/ROW]
[ROW][C]45[/C][C]679[/C][C]684.562[/C][C]684.25[/C][C]0.3125[/C][C]-5.5625[/C][/ROW]
[ROW][C]46[/C][C]689[/C][C]691.958[/C][C]686.292[/C][C]5.66667[/C][C]-2.95833[/C][/ROW]
[ROW][C]47[/C][C]691[/C][C]689.281[/C][C]688.417[/C][C]0.864583[/C][C]1.71875[/C][/ROW]
[ROW][C]48[/C][C]685[/C][C]687.969[/C][C]690.792[/C][C]-2.82292[/C][C]-2.96875[/C][/ROW]
[ROW][C]49[/C][C]690[/C][C]683.594[/C][C]693.042[/C][C]-9.44792[/C][C]6.40625[/C][/ROW]
[ROW][C]50[/C][C]685[/C][C]684.865[/C][C]694.75[/C][C]-9.88542[/C][C]0.135417[/C][/ROW]
[ROW][C]51[/C][C]688[/C][C]683.948[/C][C]696.458[/C][C]-12.5104[/C][C]4.05208[/C][/ROW]
[ROW][C]52[/C][C]696[/C][C]688.406[/C][C]698.083[/C][C]-9.67708[/C][C]7.59375[/C][/ROW]
[ROW][C]53[/C][C]693[/C][C]690.073[/C][C]699.042[/C][C]-8.96875[/C][C]2.92708[/C][/ROW]
[ROW][C]54[/C][C]721[/C][C]712.562[/C][C]699.333[/C][C]13.2292[/C][C]8.4375[/C][/ROW]
[ROW][C]55[/C][C]726[/C][C]NA[/C][C]NA[/C][C]25.4687[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]704[/C][C]NA[/C][C]NA[/C][C]7.77083[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]700[/C][C]NA[/C][C]NA[/C][C]0.3125[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]707[/C][C]NA[/C][C]NA[/C][C]5.66667[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]696[/C][C]NA[/C][C]NA[/C][C]0.864583[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]687[/C][C]NA[/C][C]NA[/C][C]-2.82292[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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
1662NANA-9.44792NA
2670NANA-9.88542NA
3659NANA-12.5104NA
4663NANA-9.67708NA
5673NANA-8.96875NA
6699NANA13.2292NA
7712712.677687.20825.4687-0.677083
8700697.354689.5837.770832.64583
9692692.521692.2080.3125-0.520833
10699700.708695.0425.66667-1.70833
11700698.115697.250.8645831.88542
12702696.01698.833-2.822925.98958
13693690.844700.292-9.447922.15625
14696691.823701.708-9.885424.17708
15696690.448702.958-12.51045.55208
16694694.448704.125-9.67708-0.447917
17695695.656704.625-8.96875-0.65625
18715717.854704.62513.2292-2.85417
19731730.219704.7525.46870.78125
20715712.521704.757.770832.47917
21707704.771704.4580.31252.22917
22712709.917704.255.666672.08333
23699705.281704.4170.864583-6.28125
24703701.969704.792-2.822921.03125
25695695.594705.042-9.44792-0.59375
26694695.073704.958-9.88542-1.07292
27691692.24704.75-12.5104-1.23958
28694694.781704.458-9.67708-0.78125
29699695.323704.292-8.968753.67708
30720716.896703.66713.22923.10417
31732727.594702.12525.46874.40625
32712708.271700.57.770833.72917
33705699.021698.7080.31255.97917
34707702.292696.6255.666674.70833
35700695.198694.3330.8645834.80208
36687688.927691.75-2.82292-1.92708
37674679.844689.292-9.44792-5.84375
38676677.115687-9.88542-1.11458
39666672.24684.75-12.5104-6.23958
40669673.24682.917-9.67708-4.23958
41669672.823681.792-8.96875-3.82292
42688694.562681.33313.2292-6.5625
43705707.385681.91725.4687-2.38542
44684690.729682.9587.77083-6.72917
45679684.562684.250.3125-5.5625
46689691.958686.2925.66667-2.95833
47691689.281688.4170.8645831.71875
48685687.969690.792-2.82292-2.96875
49690683.594693.042-9.447926.40625
50685684.865694.75-9.885420.135417
51688683.948696.458-12.51044.05208
52696688.406698.083-9.677087.59375
53693690.073699.042-8.968752.92708
54721712.562699.33313.22928.4375
55726NANA25.4687NA
56704NANA7.77083NA
57700NANA0.3125NA
58707NANA5.66667NA
59696NANA0.864583NA
60687NANA-2.82292NA



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