Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationFri, 25 Nov 2016 14:53:15 +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/25/t1480086044dkv65z0lzur1o41.htm/, Retrieved Sun, 19 May 2024 01:22:23 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Sun, 19 May 2024 01:22:23 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
149
143
135
126
119
133
134
123
147
144
150
140
165
173
167
161
151
163
158
152
176
170
168
164
185
186
184
179
171
187
191
176
204
196
193
179
195
201
192
181
171
177
176
155
173
167
164
152
173
162
158
154
151
160
160
143
170
166
153
144




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=&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=&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'Herman Ole Andreas Wold' @ wold.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1149NANA10.303NA
2143NANA10.8238NA
3135NANA5.12587NA
4126NANA-1.84288NA
5119NANA-9.8533NA
6133NANA0.823785NA
7134136.345137.583-1.23872-2.34462
8123124.563139.5-14.9366-1.56337
9147150.209142.0838.12587-3.2092
10144146.72144.8751.84462-2.71962
11150148.386147.6670.7196181.61372
12140140.355150.25-9.89497-0.355035
13165162.803152.510.3032.19705
14173165.532154.70810.82387.46788
15167162.251157.1255.125874.74913
16161157.574159.417-1.842883.42622
17151151.397161.25-9.8533-0.396701
18163163.8241630.823785-0.823785
19158163.595164.833-1.23872-5.59462
20152151.272166.208-14.93660.728299
21176175.584167.4588.125870.415799
22170170.761168.9171.84462-0.761285
23168171.22170.50.719618-3.21962
24164162.438172.333-9.894971.56163
25185185.011174.70810.303-0.0112847
26186187.907177.08310.8238-1.90712
27184184.376179.255.12587-0.375868
28179179.657181.5-1.84288-0.657118
29171173.772183.625-9.8533-2.7717
30187186.115185.2920.8237850.884549
31191185.095186.333-1.238725.90538
32176172.438187.375-14.93663.56163
33204196.459188.3338.125877.5408
34196190.595188.751.844625.40538
35193189.553188.8330.7196183.44705
36179178.522188.417-9.894970.478299
37195197.678187.37510.303-2.67795
38201196.699185.87510.82384.30122
39192188.834183.7085.125873.1658
40181179.365181.208-1.842881.63455
41171168.938178.792-9.85332.06163
42177177.282176.4580.823785-0.282118
43176173.178174.417-1.238722.82205
44155156.938171.875-14.9366-1.93837
45173176.959168.8338.12587-3.9592
46167168.136166.2921.84462-1.13628
47164165.053164.3330.719618-1.05295
48152152.897162.792-9.89497-0.896701
49173171.72161.41710.3031.28038
50162171.074160.2510.8238-9.07378
51158164.751159.6255.12587-6.75087
52154157.615159.458-1.84288-3.61545
53151149.105158.958-9.85331.89497
54160158.99158.1670.8237851.00955
55160NANA-1.23872NA
56143NANA-14.9366NA
57170NANA8.12587NA
58166NANA1.84462NA
59153NANA0.719618NA
60144NANA-9.89497NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 149 & NA & NA & 10.303 & NA \tabularnewline
2 & 143 & NA & NA & 10.8238 & NA \tabularnewline
3 & 135 & NA & NA & 5.12587 & NA \tabularnewline
4 & 126 & NA & NA & -1.84288 & NA \tabularnewline
5 & 119 & NA & NA & -9.8533 & NA \tabularnewline
6 & 133 & NA & NA & 0.823785 & NA \tabularnewline
7 & 134 & 136.345 & 137.583 & -1.23872 & -2.34462 \tabularnewline
8 & 123 & 124.563 & 139.5 & -14.9366 & -1.56337 \tabularnewline
9 & 147 & 150.209 & 142.083 & 8.12587 & -3.2092 \tabularnewline
10 & 144 & 146.72 & 144.875 & 1.84462 & -2.71962 \tabularnewline
11 & 150 & 148.386 & 147.667 & 0.719618 & 1.61372 \tabularnewline
12 & 140 & 140.355 & 150.25 & -9.89497 & -0.355035 \tabularnewline
13 & 165 & 162.803 & 152.5 & 10.303 & 2.19705 \tabularnewline
14 & 173 & 165.532 & 154.708 & 10.8238 & 7.46788 \tabularnewline
15 & 167 & 162.251 & 157.125 & 5.12587 & 4.74913 \tabularnewline
16 & 161 & 157.574 & 159.417 & -1.84288 & 3.42622 \tabularnewline
17 & 151 & 151.397 & 161.25 & -9.8533 & -0.396701 \tabularnewline
18 & 163 & 163.824 & 163 & 0.823785 & -0.823785 \tabularnewline
19 & 158 & 163.595 & 164.833 & -1.23872 & -5.59462 \tabularnewline
20 & 152 & 151.272 & 166.208 & -14.9366 & 0.728299 \tabularnewline
21 & 176 & 175.584 & 167.458 & 8.12587 & 0.415799 \tabularnewline
22 & 170 & 170.761 & 168.917 & 1.84462 & -0.761285 \tabularnewline
23 & 168 & 171.22 & 170.5 & 0.719618 & -3.21962 \tabularnewline
24 & 164 & 162.438 & 172.333 & -9.89497 & 1.56163 \tabularnewline
25 & 185 & 185.011 & 174.708 & 10.303 & -0.0112847 \tabularnewline
26 & 186 & 187.907 & 177.083 & 10.8238 & -1.90712 \tabularnewline
27 & 184 & 184.376 & 179.25 & 5.12587 & -0.375868 \tabularnewline
28 & 179 & 179.657 & 181.5 & -1.84288 & -0.657118 \tabularnewline
29 & 171 & 173.772 & 183.625 & -9.8533 & -2.7717 \tabularnewline
30 & 187 & 186.115 & 185.292 & 0.823785 & 0.884549 \tabularnewline
31 & 191 & 185.095 & 186.333 & -1.23872 & 5.90538 \tabularnewline
32 & 176 & 172.438 & 187.375 & -14.9366 & 3.56163 \tabularnewline
33 & 204 & 196.459 & 188.333 & 8.12587 & 7.5408 \tabularnewline
34 & 196 & 190.595 & 188.75 & 1.84462 & 5.40538 \tabularnewline
35 & 193 & 189.553 & 188.833 & 0.719618 & 3.44705 \tabularnewline
36 & 179 & 178.522 & 188.417 & -9.89497 & 0.478299 \tabularnewline
37 & 195 & 197.678 & 187.375 & 10.303 & -2.67795 \tabularnewline
38 & 201 & 196.699 & 185.875 & 10.8238 & 4.30122 \tabularnewline
39 & 192 & 188.834 & 183.708 & 5.12587 & 3.1658 \tabularnewline
40 & 181 & 179.365 & 181.208 & -1.84288 & 1.63455 \tabularnewline
41 & 171 & 168.938 & 178.792 & -9.8533 & 2.06163 \tabularnewline
42 & 177 & 177.282 & 176.458 & 0.823785 & -0.282118 \tabularnewline
43 & 176 & 173.178 & 174.417 & -1.23872 & 2.82205 \tabularnewline
44 & 155 & 156.938 & 171.875 & -14.9366 & -1.93837 \tabularnewline
45 & 173 & 176.959 & 168.833 & 8.12587 & -3.9592 \tabularnewline
46 & 167 & 168.136 & 166.292 & 1.84462 & -1.13628 \tabularnewline
47 & 164 & 165.053 & 164.333 & 0.719618 & -1.05295 \tabularnewline
48 & 152 & 152.897 & 162.792 & -9.89497 & -0.896701 \tabularnewline
49 & 173 & 171.72 & 161.417 & 10.303 & 1.28038 \tabularnewline
50 & 162 & 171.074 & 160.25 & 10.8238 & -9.07378 \tabularnewline
51 & 158 & 164.751 & 159.625 & 5.12587 & -6.75087 \tabularnewline
52 & 154 & 157.615 & 159.458 & -1.84288 & -3.61545 \tabularnewline
53 & 151 & 149.105 & 158.958 & -9.8533 & 1.89497 \tabularnewline
54 & 160 & 158.99 & 158.167 & 0.823785 & 1.00955 \tabularnewline
55 & 160 & NA & NA & -1.23872 & NA \tabularnewline
56 & 143 & NA & NA & -14.9366 & NA \tabularnewline
57 & 170 & NA & NA & 8.12587 & NA \tabularnewline
58 & 166 & NA & NA & 1.84462 & NA \tabularnewline
59 & 153 & NA & NA & 0.719618 & NA \tabularnewline
60 & 144 & NA & NA & -9.89497 & 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]149[/C][C]NA[/C][C]NA[/C][C]10.303[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]143[/C][C]NA[/C][C]NA[/C][C]10.8238[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]135[/C][C]NA[/C][C]NA[/C][C]5.12587[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]126[/C][C]NA[/C][C]NA[/C][C]-1.84288[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]119[/C][C]NA[/C][C]NA[/C][C]-9.8533[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]133[/C][C]NA[/C][C]NA[/C][C]0.823785[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]134[/C][C]136.345[/C][C]137.583[/C][C]-1.23872[/C][C]-2.34462[/C][/ROW]
[ROW][C]8[/C][C]123[/C][C]124.563[/C][C]139.5[/C][C]-14.9366[/C][C]-1.56337[/C][/ROW]
[ROW][C]9[/C][C]147[/C][C]150.209[/C][C]142.083[/C][C]8.12587[/C][C]-3.2092[/C][/ROW]
[ROW][C]10[/C][C]144[/C][C]146.72[/C][C]144.875[/C][C]1.84462[/C][C]-2.71962[/C][/ROW]
[ROW][C]11[/C][C]150[/C][C]148.386[/C][C]147.667[/C][C]0.719618[/C][C]1.61372[/C][/ROW]
[ROW][C]12[/C][C]140[/C][C]140.355[/C][C]150.25[/C][C]-9.89497[/C][C]-0.355035[/C][/ROW]
[ROW][C]13[/C][C]165[/C][C]162.803[/C][C]152.5[/C][C]10.303[/C][C]2.19705[/C][/ROW]
[ROW][C]14[/C][C]173[/C][C]165.532[/C][C]154.708[/C][C]10.8238[/C][C]7.46788[/C][/ROW]
[ROW][C]15[/C][C]167[/C][C]162.251[/C][C]157.125[/C][C]5.12587[/C][C]4.74913[/C][/ROW]
[ROW][C]16[/C][C]161[/C][C]157.574[/C][C]159.417[/C][C]-1.84288[/C][C]3.42622[/C][/ROW]
[ROW][C]17[/C][C]151[/C][C]151.397[/C][C]161.25[/C][C]-9.8533[/C][C]-0.396701[/C][/ROW]
[ROW][C]18[/C][C]163[/C][C]163.824[/C][C]163[/C][C]0.823785[/C][C]-0.823785[/C][/ROW]
[ROW][C]19[/C][C]158[/C][C]163.595[/C][C]164.833[/C][C]-1.23872[/C][C]-5.59462[/C][/ROW]
[ROW][C]20[/C][C]152[/C][C]151.272[/C][C]166.208[/C][C]-14.9366[/C][C]0.728299[/C][/ROW]
[ROW][C]21[/C][C]176[/C][C]175.584[/C][C]167.458[/C][C]8.12587[/C][C]0.415799[/C][/ROW]
[ROW][C]22[/C][C]170[/C][C]170.761[/C][C]168.917[/C][C]1.84462[/C][C]-0.761285[/C][/ROW]
[ROW][C]23[/C][C]168[/C][C]171.22[/C][C]170.5[/C][C]0.719618[/C][C]-3.21962[/C][/ROW]
[ROW][C]24[/C][C]164[/C][C]162.438[/C][C]172.333[/C][C]-9.89497[/C][C]1.56163[/C][/ROW]
[ROW][C]25[/C][C]185[/C][C]185.011[/C][C]174.708[/C][C]10.303[/C][C]-0.0112847[/C][/ROW]
[ROW][C]26[/C][C]186[/C][C]187.907[/C][C]177.083[/C][C]10.8238[/C][C]-1.90712[/C][/ROW]
[ROW][C]27[/C][C]184[/C][C]184.376[/C][C]179.25[/C][C]5.12587[/C][C]-0.375868[/C][/ROW]
[ROW][C]28[/C][C]179[/C][C]179.657[/C][C]181.5[/C][C]-1.84288[/C][C]-0.657118[/C][/ROW]
[ROW][C]29[/C][C]171[/C][C]173.772[/C][C]183.625[/C][C]-9.8533[/C][C]-2.7717[/C][/ROW]
[ROW][C]30[/C][C]187[/C][C]186.115[/C][C]185.292[/C][C]0.823785[/C][C]0.884549[/C][/ROW]
[ROW][C]31[/C][C]191[/C][C]185.095[/C][C]186.333[/C][C]-1.23872[/C][C]5.90538[/C][/ROW]
[ROW][C]32[/C][C]176[/C][C]172.438[/C][C]187.375[/C][C]-14.9366[/C][C]3.56163[/C][/ROW]
[ROW][C]33[/C][C]204[/C][C]196.459[/C][C]188.333[/C][C]8.12587[/C][C]7.5408[/C][/ROW]
[ROW][C]34[/C][C]196[/C][C]190.595[/C][C]188.75[/C][C]1.84462[/C][C]5.40538[/C][/ROW]
[ROW][C]35[/C][C]193[/C][C]189.553[/C][C]188.833[/C][C]0.719618[/C][C]3.44705[/C][/ROW]
[ROW][C]36[/C][C]179[/C][C]178.522[/C][C]188.417[/C][C]-9.89497[/C][C]0.478299[/C][/ROW]
[ROW][C]37[/C][C]195[/C][C]197.678[/C][C]187.375[/C][C]10.303[/C][C]-2.67795[/C][/ROW]
[ROW][C]38[/C][C]201[/C][C]196.699[/C][C]185.875[/C][C]10.8238[/C][C]4.30122[/C][/ROW]
[ROW][C]39[/C][C]192[/C][C]188.834[/C][C]183.708[/C][C]5.12587[/C][C]3.1658[/C][/ROW]
[ROW][C]40[/C][C]181[/C][C]179.365[/C][C]181.208[/C][C]-1.84288[/C][C]1.63455[/C][/ROW]
[ROW][C]41[/C][C]171[/C][C]168.938[/C][C]178.792[/C][C]-9.8533[/C][C]2.06163[/C][/ROW]
[ROW][C]42[/C][C]177[/C][C]177.282[/C][C]176.458[/C][C]0.823785[/C][C]-0.282118[/C][/ROW]
[ROW][C]43[/C][C]176[/C][C]173.178[/C][C]174.417[/C][C]-1.23872[/C][C]2.82205[/C][/ROW]
[ROW][C]44[/C][C]155[/C][C]156.938[/C][C]171.875[/C][C]-14.9366[/C][C]-1.93837[/C][/ROW]
[ROW][C]45[/C][C]173[/C][C]176.959[/C][C]168.833[/C][C]8.12587[/C][C]-3.9592[/C][/ROW]
[ROW][C]46[/C][C]167[/C][C]168.136[/C][C]166.292[/C][C]1.84462[/C][C]-1.13628[/C][/ROW]
[ROW][C]47[/C][C]164[/C][C]165.053[/C][C]164.333[/C][C]0.719618[/C][C]-1.05295[/C][/ROW]
[ROW][C]48[/C][C]152[/C][C]152.897[/C][C]162.792[/C][C]-9.89497[/C][C]-0.896701[/C][/ROW]
[ROW][C]49[/C][C]173[/C][C]171.72[/C][C]161.417[/C][C]10.303[/C][C]1.28038[/C][/ROW]
[ROW][C]50[/C][C]162[/C][C]171.074[/C][C]160.25[/C][C]10.8238[/C][C]-9.07378[/C][/ROW]
[ROW][C]51[/C][C]158[/C][C]164.751[/C][C]159.625[/C][C]5.12587[/C][C]-6.75087[/C][/ROW]
[ROW][C]52[/C][C]154[/C][C]157.615[/C][C]159.458[/C][C]-1.84288[/C][C]-3.61545[/C][/ROW]
[ROW][C]53[/C][C]151[/C][C]149.105[/C][C]158.958[/C][C]-9.8533[/C][C]1.89497[/C][/ROW]
[ROW][C]54[/C][C]160[/C][C]158.99[/C][C]158.167[/C][C]0.823785[/C][C]1.00955[/C][/ROW]
[ROW][C]55[/C][C]160[/C][C]NA[/C][C]NA[/C][C]-1.23872[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]143[/C][C]NA[/C][C]NA[/C][C]-14.9366[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]170[/C][C]NA[/C][C]NA[/C][C]8.12587[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]166[/C][C]NA[/C][C]NA[/C][C]1.84462[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]153[/C][C]NA[/C][C]NA[/C][C]0.719618[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]144[/C][C]NA[/C][C]NA[/C][C]-9.89497[/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
1149NANA10.303NA
2143NANA10.8238NA
3135NANA5.12587NA
4126NANA-1.84288NA
5119NANA-9.8533NA
6133NANA0.823785NA
7134136.345137.583-1.23872-2.34462
8123124.563139.5-14.9366-1.56337
9147150.209142.0838.12587-3.2092
10144146.72144.8751.84462-2.71962
11150148.386147.6670.7196181.61372
12140140.355150.25-9.89497-0.355035
13165162.803152.510.3032.19705
14173165.532154.70810.82387.46788
15167162.251157.1255.125874.74913
16161157.574159.417-1.842883.42622
17151151.397161.25-9.8533-0.396701
18163163.8241630.823785-0.823785
19158163.595164.833-1.23872-5.59462
20152151.272166.208-14.93660.728299
21176175.584167.4588.125870.415799
22170170.761168.9171.84462-0.761285
23168171.22170.50.719618-3.21962
24164162.438172.333-9.894971.56163
25185185.011174.70810.303-0.0112847
26186187.907177.08310.8238-1.90712
27184184.376179.255.12587-0.375868
28179179.657181.5-1.84288-0.657118
29171173.772183.625-9.8533-2.7717
30187186.115185.2920.8237850.884549
31191185.095186.333-1.238725.90538
32176172.438187.375-14.93663.56163
33204196.459188.3338.125877.5408
34196190.595188.751.844625.40538
35193189.553188.8330.7196183.44705
36179178.522188.417-9.894970.478299
37195197.678187.37510.303-2.67795
38201196.699185.87510.82384.30122
39192188.834183.7085.125873.1658
40181179.365181.208-1.842881.63455
41171168.938178.792-9.85332.06163
42177177.282176.4580.823785-0.282118
43176173.178174.417-1.238722.82205
44155156.938171.875-14.9366-1.93837
45173176.959168.8338.12587-3.9592
46167168.136166.2921.84462-1.13628
47164165.053164.3330.719618-1.05295
48152152.897162.792-9.89497-0.896701
49173171.72161.41710.3031.28038
50162171.074160.2510.8238-9.07378
51158164.751159.6255.12587-6.75087
52154157.615159.458-1.84288-3.61545
53151149.105158.958-9.85331.89497
54160158.99158.1670.8237851.00955
55160NANA-1.23872NA
56143NANA-14.9366NA
57170NANA8.12587NA
58166NANA1.84462NA
59153NANA0.719618NA
60144NANA-9.89497NA



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