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 computationFri, 11 Dec 2009 09:13:41 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2009/Dec/11/t12605480834rxzxmbpyz6u6eb.htm/, Retrieved Sun, 28 Apr 2024 23:26:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=66459, Retrieved Sun, 28 Apr 2024 23:26:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact171
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Classical Decomposition] [] [2009-11-27 14:58:37] [b98453cac15ba1066b407e146608df68]
- R  D    [Classical Decomposition] [Shwws9_v2] [2009-12-09 18:37:57] [5f89c040fdf1f8599c99d7f78a662321]
-    D        [Classical Decomposition] [Shwws9_v2] [2009-12-11 16:13:41] [93b66894f6318f3da4fcda772f2ffa6f] [Current]
Feedback Forum

Post a new message
Dataseries X:
102.1
102.86
102.99
103.73
105.02
104.43
104.63
104.93
105.87
105.66
106.76
106
107.22
107.33
107.11
108.86
107.72
107.88
108.38
107.72
108.41
109.9
111.45
112.18
113.34
113.46
114.06
115.54
116.39
115.94
116.97
115.94
115.91
116.43
116.26
116.35
117.9
117.7
117.53
117.86
117.65
116.51
115.93
115.31
115




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66459&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' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66459&T=0

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







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1102.1NANA1.00519037227915NA
2102.86NANA1.00184469355228NA
3102.99NANA0.999537013489676NA
4103.73NANA1.01026528475282NA
5105.02NANA1.00486594356418NA
6104.43NANA0.999928785216081NA
7104.63105.083572462831104.7951.002753685412770.995683697725526
8104.93104.288573508554105.1945833333330.9913872958467081.00615049635704
9105.87104.558093138201105.55250.9905790307022621.01254715749326
10105.66105.512595737331105.9379166666670.9959851869593221.00139703000991
11106.76106.129334173471106.2641666666670.9987311574783371.00594242705319
12106106.406605006988106.5204166666670.9989315507464160.996178761581943
13107.22107.374854396181106.8204166666671.005190372279150.998557815076431
14107.33107.290470279536107.0929166666671.001844693552281.00036843645443
15107.11107.265314602645107.3150.9995370134896760.998552051954354
16108.86108.702018976192107.59751.010265284752821.00145334029024
17107.72108.494957232481107.9695833333331.004865943564180.992857205051284
18107.88108.414778715091108.42250.9999287852160810.995067289520593
19108.38109.23497272044108.9351.002753685412770.992173086154119
20107.72108.502795671983109.4454166666670.9913872958467080.992785479239177
21108.41108.954200328205109.9904166666670.9905790307022620.995005237736909
22109.9110.114462294911110.5583333333330.9959851869593220.998052369412324
23111.45111.056824021680111.1979166666670.9987311574783371.00354031354475
24112.18111.775445870770111.8950.9989315507464161.00361934704065
25113.34113.173127526944112.588751.005190372279151.00147448848240
26113.46113.498150461960113.2891666666671.001844693552280.999663867104404
27114.06113.891412054570113.9441666666670.9995370134896761.00148025160448
28115.54115.704420231135114.528751.010265284752820.998578963268594
29116.39115.560839592310115.001251.004865943564181.00717509850755
30115.94115.367200231299115.3754166666670.9999287852160811.00496501403824
31116.97116.057875921603115.7391666666671.002753685412771.00785921740471
32115.94115.105848140362116.1058333333330.9913872958467081.00724682431966
33115.91115.330227355825116.4270833333330.9905790307022621.00502706582192
34116.43116.199931787232116.6683333333330.9959851869593221.00197993414651
35116.26116.669276988726116.81750.9987311574783370.996491990014088
36116.35116.768854960064116.893750.9989315507464160.996412956518182
37117.9NA116.874166666667NANA
38117.7NA116.804583333333NANA
39117.53NA116.740416666667NANA
40117.86NANANANA
41117.65NANANANA
42116.51NANANANA
43115.93NANANANA
44115.31NANANANA
45115NANANANA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 102.1 & NA & NA & 1.00519037227915 & NA \tabularnewline
2 & 102.86 & NA & NA & 1.00184469355228 & NA \tabularnewline
3 & 102.99 & NA & NA & 0.999537013489676 & NA \tabularnewline
4 & 103.73 & NA & NA & 1.01026528475282 & NA \tabularnewline
5 & 105.02 & NA & NA & 1.00486594356418 & NA \tabularnewline
6 & 104.43 & NA & NA & 0.999928785216081 & NA \tabularnewline
7 & 104.63 & 105.083572462831 & 104.795 & 1.00275368541277 & 0.995683697725526 \tabularnewline
8 & 104.93 & 104.288573508554 & 105.194583333333 & 0.991387295846708 & 1.00615049635704 \tabularnewline
9 & 105.87 & 104.558093138201 & 105.5525 & 0.990579030702262 & 1.01254715749326 \tabularnewline
10 & 105.66 & 105.512595737331 & 105.937916666667 & 0.995985186959322 & 1.00139703000991 \tabularnewline
11 & 106.76 & 106.129334173471 & 106.264166666667 & 0.998731157478337 & 1.00594242705319 \tabularnewline
12 & 106 & 106.406605006988 & 106.520416666667 & 0.998931550746416 & 0.996178761581943 \tabularnewline
13 & 107.22 & 107.374854396181 & 106.820416666667 & 1.00519037227915 & 0.998557815076431 \tabularnewline
14 & 107.33 & 107.290470279536 & 107.092916666667 & 1.00184469355228 & 1.00036843645443 \tabularnewline
15 & 107.11 & 107.265314602645 & 107.315 & 0.999537013489676 & 0.998552051954354 \tabularnewline
16 & 108.86 & 108.702018976192 & 107.5975 & 1.01026528475282 & 1.00145334029024 \tabularnewline
17 & 107.72 & 108.494957232481 & 107.969583333333 & 1.00486594356418 & 0.992857205051284 \tabularnewline
18 & 107.88 & 108.414778715091 & 108.4225 & 0.999928785216081 & 0.995067289520593 \tabularnewline
19 & 108.38 & 109.23497272044 & 108.935 & 1.00275368541277 & 0.992173086154119 \tabularnewline
20 & 107.72 & 108.502795671983 & 109.445416666667 & 0.991387295846708 & 0.992785479239177 \tabularnewline
21 & 108.41 & 108.954200328205 & 109.990416666667 & 0.990579030702262 & 0.995005237736909 \tabularnewline
22 & 109.9 & 110.114462294911 & 110.558333333333 & 0.995985186959322 & 0.998052369412324 \tabularnewline
23 & 111.45 & 111.056824021680 & 111.197916666667 & 0.998731157478337 & 1.00354031354475 \tabularnewline
24 & 112.18 & 111.775445870770 & 111.895 & 0.998931550746416 & 1.00361934704065 \tabularnewline
25 & 113.34 & 113.173127526944 & 112.58875 & 1.00519037227915 & 1.00147448848240 \tabularnewline
26 & 113.46 & 113.498150461960 & 113.289166666667 & 1.00184469355228 & 0.999663867104404 \tabularnewline
27 & 114.06 & 113.891412054570 & 113.944166666667 & 0.999537013489676 & 1.00148025160448 \tabularnewline
28 & 115.54 & 115.704420231135 & 114.52875 & 1.01026528475282 & 0.998578963268594 \tabularnewline
29 & 116.39 & 115.560839592310 & 115.00125 & 1.00486594356418 & 1.00717509850755 \tabularnewline
30 & 115.94 & 115.367200231299 & 115.375416666667 & 0.999928785216081 & 1.00496501403824 \tabularnewline
31 & 116.97 & 116.057875921603 & 115.739166666667 & 1.00275368541277 & 1.00785921740471 \tabularnewline
32 & 115.94 & 115.105848140362 & 116.105833333333 & 0.991387295846708 & 1.00724682431966 \tabularnewline
33 & 115.91 & 115.330227355825 & 116.427083333333 & 0.990579030702262 & 1.00502706582192 \tabularnewline
34 & 116.43 & 116.199931787232 & 116.668333333333 & 0.995985186959322 & 1.00197993414651 \tabularnewline
35 & 116.26 & 116.669276988726 & 116.8175 & 0.998731157478337 & 0.996491990014088 \tabularnewline
36 & 116.35 & 116.768854960064 & 116.89375 & 0.998931550746416 & 0.996412956518182 \tabularnewline
37 & 117.9 & NA & 116.874166666667 & NA & NA \tabularnewline
38 & 117.7 & NA & 116.804583333333 & NA & NA \tabularnewline
39 & 117.53 & NA & 116.740416666667 & NA & NA \tabularnewline
40 & 117.86 & NA & NA & NA & NA \tabularnewline
41 & 117.65 & NA & NA & NA & NA \tabularnewline
42 & 116.51 & NA & NA & NA & NA \tabularnewline
43 & 115.93 & NA & NA & NA & NA \tabularnewline
44 & 115.31 & NA & NA & NA & NA \tabularnewline
45 & 115 & NA & NA & NA & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66459&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]102.1[/C][C]NA[/C][C]NA[/C][C]1.00519037227915[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]102.86[/C][C]NA[/C][C]NA[/C][C]1.00184469355228[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]102.99[/C][C]NA[/C][C]NA[/C][C]0.999537013489676[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]103.73[/C][C]NA[/C][C]NA[/C][C]1.01026528475282[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]105.02[/C][C]NA[/C][C]NA[/C][C]1.00486594356418[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]104.43[/C][C]NA[/C][C]NA[/C][C]0.999928785216081[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]104.63[/C][C]105.083572462831[/C][C]104.795[/C][C]1.00275368541277[/C][C]0.995683697725526[/C][/ROW]
[ROW][C]8[/C][C]104.93[/C][C]104.288573508554[/C][C]105.194583333333[/C][C]0.991387295846708[/C][C]1.00615049635704[/C][/ROW]
[ROW][C]9[/C][C]105.87[/C][C]104.558093138201[/C][C]105.5525[/C][C]0.990579030702262[/C][C]1.01254715749326[/C][/ROW]
[ROW][C]10[/C][C]105.66[/C][C]105.512595737331[/C][C]105.937916666667[/C][C]0.995985186959322[/C][C]1.00139703000991[/C][/ROW]
[ROW][C]11[/C][C]106.76[/C][C]106.129334173471[/C][C]106.264166666667[/C][C]0.998731157478337[/C][C]1.00594242705319[/C][/ROW]
[ROW][C]12[/C][C]106[/C][C]106.406605006988[/C][C]106.520416666667[/C][C]0.998931550746416[/C][C]0.996178761581943[/C][/ROW]
[ROW][C]13[/C][C]107.22[/C][C]107.374854396181[/C][C]106.820416666667[/C][C]1.00519037227915[/C][C]0.998557815076431[/C][/ROW]
[ROW][C]14[/C][C]107.33[/C][C]107.290470279536[/C][C]107.092916666667[/C][C]1.00184469355228[/C][C]1.00036843645443[/C][/ROW]
[ROW][C]15[/C][C]107.11[/C][C]107.265314602645[/C][C]107.315[/C][C]0.999537013489676[/C][C]0.998552051954354[/C][/ROW]
[ROW][C]16[/C][C]108.86[/C][C]108.702018976192[/C][C]107.5975[/C][C]1.01026528475282[/C][C]1.00145334029024[/C][/ROW]
[ROW][C]17[/C][C]107.72[/C][C]108.494957232481[/C][C]107.969583333333[/C][C]1.00486594356418[/C][C]0.992857205051284[/C][/ROW]
[ROW][C]18[/C][C]107.88[/C][C]108.414778715091[/C][C]108.4225[/C][C]0.999928785216081[/C][C]0.995067289520593[/C][/ROW]
[ROW][C]19[/C][C]108.38[/C][C]109.23497272044[/C][C]108.935[/C][C]1.00275368541277[/C][C]0.992173086154119[/C][/ROW]
[ROW][C]20[/C][C]107.72[/C][C]108.502795671983[/C][C]109.445416666667[/C][C]0.991387295846708[/C][C]0.992785479239177[/C][/ROW]
[ROW][C]21[/C][C]108.41[/C][C]108.954200328205[/C][C]109.990416666667[/C][C]0.990579030702262[/C][C]0.995005237736909[/C][/ROW]
[ROW][C]22[/C][C]109.9[/C][C]110.114462294911[/C][C]110.558333333333[/C][C]0.995985186959322[/C][C]0.998052369412324[/C][/ROW]
[ROW][C]23[/C][C]111.45[/C][C]111.056824021680[/C][C]111.197916666667[/C][C]0.998731157478337[/C][C]1.00354031354475[/C][/ROW]
[ROW][C]24[/C][C]112.18[/C][C]111.775445870770[/C][C]111.895[/C][C]0.998931550746416[/C][C]1.00361934704065[/C][/ROW]
[ROW][C]25[/C][C]113.34[/C][C]113.173127526944[/C][C]112.58875[/C][C]1.00519037227915[/C][C]1.00147448848240[/C][/ROW]
[ROW][C]26[/C][C]113.46[/C][C]113.498150461960[/C][C]113.289166666667[/C][C]1.00184469355228[/C][C]0.999663867104404[/C][/ROW]
[ROW][C]27[/C][C]114.06[/C][C]113.891412054570[/C][C]113.944166666667[/C][C]0.999537013489676[/C][C]1.00148025160448[/C][/ROW]
[ROW][C]28[/C][C]115.54[/C][C]115.704420231135[/C][C]114.52875[/C][C]1.01026528475282[/C][C]0.998578963268594[/C][/ROW]
[ROW][C]29[/C][C]116.39[/C][C]115.560839592310[/C][C]115.00125[/C][C]1.00486594356418[/C][C]1.00717509850755[/C][/ROW]
[ROW][C]30[/C][C]115.94[/C][C]115.367200231299[/C][C]115.375416666667[/C][C]0.999928785216081[/C][C]1.00496501403824[/C][/ROW]
[ROW][C]31[/C][C]116.97[/C][C]116.057875921603[/C][C]115.739166666667[/C][C]1.00275368541277[/C][C]1.00785921740471[/C][/ROW]
[ROW][C]32[/C][C]115.94[/C][C]115.105848140362[/C][C]116.105833333333[/C][C]0.991387295846708[/C][C]1.00724682431966[/C][/ROW]
[ROW][C]33[/C][C]115.91[/C][C]115.330227355825[/C][C]116.427083333333[/C][C]0.990579030702262[/C][C]1.00502706582192[/C][/ROW]
[ROW][C]34[/C][C]116.43[/C][C]116.199931787232[/C][C]116.668333333333[/C][C]0.995985186959322[/C][C]1.00197993414651[/C][/ROW]
[ROW][C]35[/C][C]116.26[/C][C]116.669276988726[/C][C]116.8175[/C][C]0.998731157478337[/C][C]0.996491990014088[/C][/ROW]
[ROW][C]36[/C][C]116.35[/C][C]116.768854960064[/C][C]116.89375[/C][C]0.998931550746416[/C][C]0.996412956518182[/C][/ROW]
[ROW][C]37[/C][C]117.9[/C][C]NA[/C][C]116.874166666667[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]38[/C][C]117.7[/C][C]NA[/C][C]116.804583333333[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]39[/C][C]117.53[/C][C]NA[/C][C]116.740416666667[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]40[/C][C]117.86[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]41[/C][C]117.65[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]42[/C][C]116.51[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]43[/C][C]115.93[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]44[/C][C]115.31[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]45[/C][C]115[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66459&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66459&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
1102.1NANA1.00519037227915NA
2102.86NANA1.00184469355228NA
3102.99NANA0.999537013489676NA
4103.73NANA1.01026528475282NA
5105.02NANA1.00486594356418NA
6104.43NANA0.999928785216081NA
7104.63105.083572462831104.7951.002753685412770.995683697725526
8104.93104.288573508554105.1945833333330.9913872958467081.00615049635704
9105.87104.558093138201105.55250.9905790307022621.01254715749326
10105.66105.512595737331105.9379166666670.9959851869593221.00139703000991
11106.76106.129334173471106.2641666666670.9987311574783371.00594242705319
12106106.406605006988106.5204166666670.9989315507464160.996178761581943
13107.22107.374854396181106.8204166666671.005190372279150.998557815076431
14107.33107.290470279536107.0929166666671.001844693552281.00036843645443
15107.11107.265314602645107.3150.9995370134896760.998552051954354
16108.86108.702018976192107.59751.010265284752821.00145334029024
17107.72108.494957232481107.9695833333331.004865943564180.992857205051284
18107.88108.414778715091108.42250.9999287852160810.995067289520593
19108.38109.23497272044108.9351.002753685412770.992173086154119
20107.72108.502795671983109.4454166666670.9913872958467080.992785479239177
21108.41108.954200328205109.9904166666670.9905790307022620.995005237736909
22109.9110.114462294911110.5583333333330.9959851869593220.998052369412324
23111.45111.056824021680111.1979166666670.9987311574783371.00354031354475
24112.18111.775445870770111.8950.9989315507464161.00361934704065
25113.34113.173127526944112.588751.005190372279151.00147448848240
26113.46113.498150461960113.2891666666671.001844693552280.999663867104404
27114.06113.891412054570113.9441666666670.9995370134896761.00148025160448
28115.54115.704420231135114.528751.010265284752820.998578963268594
29116.39115.560839592310115.001251.004865943564181.00717509850755
30115.94115.367200231299115.3754166666670.9999287852160811.00496501403824
31116.97116.057875921603115.7391666666671.002753685412771.00785921740471
32115.94115.105848140362116.1058333333330.9913872958467081.00724682431966
33115.91115.330227355825116.4270833333330.9905790307022621.00502706582192
34116.43116.199931787232116.6683333333330.9959851869593221.00197993414651
35116.26116.669276988726116.81750.9987311574783370.996491990014088
36116.35116.768854960064116.893750.9989315507464160.996412956518182
37117.9NA116.874166666667NANA
38117.7NA116.804583333333NANA
39117.53NA116.740416666667NANA
40117.86NANANANA
41117.65NANANANA
42116.51NANANANA
43115.93NANANANA
44115.31NANANANA
45115NANANANA



Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
Parameters (R input):
par1 = multiplicative ; 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,m$trend[i]+m$seasonal[i]) else a<-table.element(a,m$trend[i]*m$seasonal[i])
a<-table.element(a,m$trend[i])
a<-table.element(a,m$seasonal[i])
a<-table.element(a,m$random[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')