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 computationSun, 11 Dec 2016 14:01:42 +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/Dec/11/t1481461351bt91p6avycweb6z.htm/, Retrieved Thu, 02 May 2024 02:40:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=298775, Retrieved Thu, 02 May 2024 02:40:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact88
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [Classical Decompo...] [2016-12-11 13:01:42] [59384cc4294cbecf8e09b453c4247580] [Current]
Feedback Forum

Post a new message
Dataseries X:
2622.4
2607.5
2556.6
2569.3
2533.2
2529
2577.8
2556.6
2558.7
2541.7
2473.8
2461
2435.5
2414.3
2350.6
2329.4
2278.4
2252.9
2269.9
2227.4
2195.6
2204.1
2195.6
2202
2157.4
2142.5
2125.5
2110.7
2072.4
2076.7
2095.8
2023.6
2004.5
1985.4
1953.5
1915.3
1881.3
1821.9
1775.2
1790
1758.2
1747.6
1679.6
1692.3
1675.4
1639.3
1622.3
1577.7
1581.9
1562.8
1552.2
1535.2
1507.6




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time1 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=298775&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]1 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=298775&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=298775&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R ServerBig Analytics Cloud Computing Center







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
12622.4NANA8.7215NA
22607.5NANA0.451711NA
32556.6NANA-4.96168NA
42569.32571.712565.955.759-2.409
52533.22550.162557.99-7.83266-16.959
625292551.792553.93-2.13787-22.7871
72577.82560.522551.88.721517.2785
82556.625452544.550.45171111.5983
92558.72528.972533.93-4.9616829.7283
102541.72522.172516.415.75919.5327
112473.82484.862492.69-7.83266-11.059
1224612461.352463.49-2.13787-0.353795
132435.52437.182428.468.7215-1.67984
142414.32394.942394.480.45171119.365
152350.62355.92360.86-4.96168-5.29665
162329.42335.482329.725.759-6.07567
172278.42292.512300.34-7.83266-14.109
182252.92269.712271.85-2.13787-16.8121
192269.92257.212248.498.721512.6868
202227.42231.62231.150.451711-4.20171
212195.62215.052220.01-4.96168-19.4467
222204.12212.152206.395.759-8.05067
232195.62182.112189.94-7.8326613.491
2422022174.892177.02-2.1378727.1129
252157.42172.122163.48.7215-14.7215
262142.52145.82145.350.451711-3.30171
272125.52119.682124.64-4.961685.82001
282110.72114.832109.075.759-4.12567
292072.42086.192094.02-7.83266-13.7923
302076.72071.92074.03-2.137874.80454
312095.82062.232053.518.721533.5702
322023.62033.612033.160.451711-10.01
332004.52004.842009.8-4.96168-0.338318
341985.41984.231978.485.7591.166
351953.51935.961943.79-7.8326617.541
361915.31905.741907.87-2.137879.56287
371881.31881.21872.488.72150.0951637
381821.91840.381839.930.451711-18.4767
391775.21804.711809.68-4.96168-29.5133
4017901784.651778.895.7595.34933
411758.21743.451751.28-7.8326614.7493
421747.61730.031732.17-2.1378717.5712
431679.61720.011711.298.7215-40.4132
441692.31687.861687.410.4517114.43996
451675.41656.961661.92-4.9616818.4367
461639.31645.381639.625.759-6.084
471622.31612.861620.69-7.832669.441
481577.71597.51599.63-2.13787-19.7955
491581.91589.411580.698.7215-7.51317
501562.81562.911562.460.451711-0.110045
511552.2NANA-4.96168NA
521535.2NANA5.759NA
531507.6NANA-7.83266NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 2622.4 & NA & NA & 8.7215 & NA \tabularnewline
2 & 2607.5 & NA & NA & 0.451711 & NA \tabularnewline
3 & 2556.6 & NA & NA & -4.96168 & NA \tabularnewline
4 & 2569.3 & 2571.71 & 2565.95 & 5.759 & -2.409 \tabularnewline
5 & 2533.2 & 2550.16 & 2557.99 & -7.83266 & -16.959 \tabularnewline
6 & 2529 & 2551.79 & 2553.93 & -2.13787 & -22.7871 \tabularnewline
7 & 2577.8 & 2560.52 & 2551.8 & 8.7215 & 17.2785 \tabularnewline
8 & 2556.6 & 2545 & 2544.55 & 0.451711 & 11.5983 \tabularnewline
9 & 2558.7 & 2528.97 & 2533.93 & -4.96168 & 29.7283 \tabularnewline
10 & 2541.7 & 2522.17 & 2516.41 & 5.759 & 19.5327 \tabularnewline
11 & 2473.8 & 2484.86 & 2492.69 & -7.83266 & -11.059 \tabularnewline
12 & 2461 & 2461.35 & 2463.49 & -2.13787 & -0.353795 \tabularnewline
13 & 2435.5 & 2437.18 & 2428.46 & 8.7215 & -1.67984 \tabularnewline
14 & 2414.3 & 2394.94 & 2394.48 & 0.451711 & 19.365 \tabularnewline
15 & 2350.6 & 2355.9 & 2360.86 & -4.96168 & -5.29665 \tabularnewline
16 & 2329.4 & 2335.48 & 2329.72 & 5.759 & -6.07567 \tabularnewline
17 & 2278.4 & 2292.51 & 2300.34 & -7.83266 & -14.109 \tabularnewline
18 & 2252.9 & 2269.71 & 2271.85 & -2.13787 & -16.8121 \tabularnewline
19 & 2269.9 & 2257.21 & 2248.49 & 8.7215 & 12.6868 \tabularnewline
20 & 2227.4 & 2231.6 & 2231.15 & 0.451711 & -4.20171 \tabularnewline
21 & 2195.6 & 2215.05 & 2220.01 & -4.96168 & -19.4467 \tabularnewline
22 & 2204.1 & 2212.15 & 2206.39 & 5.759 & -8.05067 \tabularnewline
23 & 2195.6 & 2182.11 & 2189.94 & -7.83266 & 13.491 \tabularnewline
24 & 2202 & 2174.89 & 2177.02 & -2.13787 & 27.1129 \tabularnewline
25 & 2157.4 & 2172.12 & 2163.4 & 8.7215 & -14.7215 \tabularnewline
26 & 2142.5 & 2145.8 & 2145.35 & 0.451711 & -3.30171 \tabularnewline
27 & 2125.5 & 2119.68 & 2124.64 & -4.96168 & 5.82001 \tabularnewline
28 & 2110.7 & 2114.83 & 2109.07 & 5.759 & -4.12567 \tabularnewline
29 & 2072.4 & 2086.19 & 2094.02 & -7.83266 & -13.7923 \tabularnewline
30 & 2076.7 & 2071.9 & 2074.03 & -2.13787 & 4.80454 \tabularnewline
31 & 2095.8 & 2062.23 & 2053.51 & 8.7215 & 33.5702 \tabularnewline
32 & 2023.6 & 2033.61 & 2033.16 & 0.451711 & -10.01 \tabularnewline
33 & 2004.5 & 2004.84 & 2009.8 & -4.96168 & -0.338318 \tabularnewline
34 & 1985.4 & 1984.23 & 1978.48 & 5.759 & 1.166 \tabularnewline
35 & 1953.5 & 1935.96 & 1943.79 & -7.83266 & 17.541 \tabularnewline
36 & 1915.3 & 1905.74 & 1907.87 & -2.13787 & 9.56287 \tabularnewline
37 & 1881.3 & 1881.2 & 1872.48 & 8.7215 & 0.0951637 \tabularnewline
38 & 1821.9 & 1840.38 & 1839.93 & 0.451711 & -18.4767 \tabularnewline
39 & 1775.2 & 1804.71 & 1809.68 & -4.96168 & -29.5133 \tabularnewline
40 & 1790 & 1784.65 & 1778.89 & 5.759 & 5.34933 \tabularnewline
41 & 1758.2 & 1743.45 & 1751.28 & -7.83266 & 14.7493 \tabularnewline
42 & 1747.6 & 1730.03 & 1732.17 & -2.13787 & 17.5712 \tabularnewline
43 & 1679.6 & 1720.01 & 1711.29 & 8.7215 & -40.4132 \tabularnewline
44 & 1692.3 & 1687.86 & 1687.41 & 0.451711 & 4.43996 \tabularnewline
45 & 1675.4 & 1656.96 & 1661.92 & -4.96168 & 18.4367 \tabularnewline
46 & 1639.3 & 1645.38 & 1639.62 & 5.759 & -6.084 \tabularnewline
47 & 1622.3 & 1612.86 & 1620.69 & -7.83266 & 9.441 \tabularnewline
48 & 1577.7 & 1597.5 & 1599.63 & -2.13787 & -19.7955 \tabularnewline
49 & 1581.9 & 1589.41 & 1580.69 & 8.7215 & -7.51317 \tabularnewline
50 & 1562.8 & 1562.91 & 1562.46 & 0.451711 & -0.110045 \tabularnewline
51 & 1552.2 & NA & NA & -4.96168 & NA \tabularnewline
52 & 1535.2 & NA & NA & 5.759 & NA \tabularnewline
53 & 1507.6 & NA & NA & -7.83266 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=298775&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]2622.4[/C][C]NA[/C][C]NA[/C][C]8.7215[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]2607.5[/C][C]NA[/C][C]NA[/C][C]0.451711[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]2556.6[/C][C]NA[/C][C]NA[/C][C]-4.96168[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]2569.3[/C][C]2571.71[/C][C]2565.95[/C][C]5.759[/C][C]-2.409[/C][/ROW]
[ROW][C]5[/C][C]2533.2[/C][C]2550.16[/C][C]2557.99[/C][C]-7.83266[/C][C]-16.959[/C][/ROW]
[ROW][C]6[/C][C]2529[/C][C]2551.79[/C][C]2553.93[/C][C]-2.13787[/C][C]-22.7871[/C][/ROW]
[ROW][C]7[/C][C]2577.8[/C][C]2560.52[/C][C]2551.8[/C][C]8.7215[/C][C]17.2785[/C][/ROW]
[ROW][C]8[/C][C]2556.6[/C][C]2545[/C][C]2544.55[/C][C]0.451711[/C][C]11.5983[/C][/ROW]
[ROW][C]9[/C][C]2558.7[/C][C]2528.97[/C][C]2533.93[/C][C]-4.96168[/C][C]29.7283[/C][/ROW]
[ROW][C]10[/C][C]2541.7[/C][C]2522.17[/C][C]2516.41[/C][C]5.759[/C][C]19.5327[/C][/ROW]
[ROW][C]11[/C][C]2473.8[/C][C]2484.86[/C][C]2492.69[/C][C]-7.83266[/C][C]-11.059[/C][/ROW]
[ROW][C]12[/C][C]2461[/C][C]2461.35[/C][C]2463.49[/C][C]-2.13787[/C][C]-0.353795[/C][/ROW]
[ROW][C]13[/C][C]2435.5[/C][C]2437.18[/C][C]2428.46[/C][C]8.7215[/C][C]-1.67984[/C][/ROW]
[ROW][C]14[/C][C]2414.3[/C][C]2394.94[/C][C]2394.48[/C][C]0.451711[/C][C]19.365[/C][/ROW]
[ROW][C]15[/C][C]2350.6[/C][C]2355.9[/C][C]2360.86[/C][C]-4.96168[/C][C]-5.29665[/C][/ROW]
[ROW][C]16[/C][C]2329.4[/C][C]2335.48[/C][C]2329.72[/C][C]5.759[/C][C]-6.07567[/C][/ROW]
[ROW][C]17[/C][C]2278.4[/C][C]2292.51[/C][C]2300.34[/C][C]-7.83266[/C][C]-14.109[/C][/ROW]
[ROW][C]18[/C][C]2252.9[/C][C]2269.71[/C][C]2271.85[/C][C]-2.13787[/C][C]-16.8121[/C][/ROW]
[ROW][C]19[/C][C]2269.9[/C][C]2257.21[/C][C]2248.49[/C][C]8.7215[/C][C]12.6868[/C][/ROW]
[ROW][C]20[/C][C]2227.4[/C][C]2231.6[/C][C]2231.15[/C][C]0.451711[/C][C]-4.20171[/C][/ROW]
[ROW][C]21[/C][C]2195.6[/C][C]2215.05[/C][C]2220.01[/C][C]-4.96168[/C][C]-19.4467[/C][/ROW]
[ROW][C]22[/C][C]2204.1[/C][C]2212.15[/C][C]2206.39[/C][C]5.759[/C][C]-8.05067[/C][/ROW]
[ROW][C]23[/C][C]2195.6[/C][C]2182.11[/C][C]2189.94[/C][C]-7.83266[/C][C]13.491[/C][/ROW]
[ROW][C]24[/C][C]2202[/C][C]2174.89[/C][C]2177.02[/C][C]-2.13787[/C][C]27.1129[/C][/ROW]
[ROW][C]25[/C][C]2157.4[/C][C]2172.12[/C][C]2163.4[/C][C]8.7215[/C][C]-14.7215[/C][/ROW]
[ROW][C]26[/C][C]2142.5[/C][C]2145.8[/C][C]2145.35[/C][C]0.451711[/C][C]-3.30171[/C][/ROW]
[ROW][C]27[/C][C]2125.5[/C][C]2119.68[/C][C]2124.64[/C][C]-4.96168[/C][C]5.82001[/C][/ROW]
[ROW][C]28[/C][C]2110.7[/C][C]2114.83[/C][C]2109.07[/C][C]5.759[/C][C]-4.12567[/C][/ROW]
[ROW][C]29[/C][C]2072.4[/C][C]2086.19[/C][C]2094.02[/C][C]-7.83266[/C][C]-13.7923[/C][/ROW]
[ROW][C]30[/C][C]2076.7[/C][C]2071.9[/C][C]2074.03[/C][C]-2.13787[/C][C]4.80454[/C][/ROW]
[ROW][C]31[/C][C]2095.8[/C][C]2062.23[/C][C]2053.51[/C][C]8.7215[/C][C]33.5702[/C][/ROW]
[ROW][C]32[/C][C]2023.6[/C][C]2033.61[/C][C]2033.16[/C][C]0.451711[/C][C]-10.01[/C][/ROW]
[ROW][C]33[/C][C]2004.5[/C][C]2004.84[/C][C]2009.8[/C][C]-4.96168[/C][C]-0.338318[/C][/ROW]
[ROW][C]34[/C][C]1985.4[/C][C]1984.23[/C][C]1978.48[/C][C]5.759[/C][C]1.166[/C][/ROW]
[ROW][C]35[/C][C]1953.5[/C][C]1935.96[/C][C]1943.79[/C][C]-7.83266[/C][C]17.541[/C][/ROW]
[ROW][C]36[/C][C]1915.3[/C][C]1905.74[/C][C]1907.87[/C][C]-2.13787[/C][C]9.56287[/C][/ROW]
[ROW][C]37[/C][C]1881.3[/C][C]1881.2[/C][C]1872.48[/C][C]8.7215[/C][C]0.0951637[/C][/ROW]
[ROW][C]38[/C][C]1821.9[/C][C]1840.38[/C][C]1839.93[/C][C]0.451711[/C][C]-18.4767[/C][/ROW]
[ROW][C]39[/C][C]1775.2[/C][C]1804.71[/C][C]1809.68[/C][C]-4.96168[/C][C]-29.5133[/C][/ROW]
[ROW][C]40[/C][C]1790[/C][C]1784.65[/C][C]1778.89[/C][C]5.759[/C][C]5.34933[/C][/ROW]
[ROW][C]41[/C][C]1758.2[/C][C]1743.45[/C][C]1751.28[/C][C]-7.83266[/C][C]14.7493[/C][/ROW]
[ROW][C]42[/C][C]1747.6[/C][C]1730.03[/C][C]1732.17[/C][C]-2.13787[/C][C]17.5712[/C][/ROW]
[ROW][C]43[/C][C]1679.6[/C][C]1720.01[/C][C]1711.29[/C][C]8.7215[/C][C]-40.4132[/C][/ROW]
[ROW][C]44[/C][C]1692.3[/C][C]1687.86[/C][C]1687.41[/C][C]0.451711[/C][C]4.43996[/C][/ROW]
[ROW][C]45[/C][C]1675.4[/C][C]1656.96[/C][C]1661.92[/C][C]-4.96168[/C][C]18.4367[/C][/ROW]
[ROW][C]46[/C][C]1639.3[/C][C]1645.38[/C][C]1639.62[/C][C]5.759[/C][C]-6.084[/C][/ROW]
[ROW][C]47[/C][C]1622.3[/C][C]1612.86[/C][C]1620.69[/C][C]-7.83266[/C][C]9.441[/C][/ROW]
[ROW][C]48[/C][C]1577.7[/C][C]1597.5[/C][C]1599.63[/C][C]-2.13787[/C][C]-19.7955[/C][/ROW]
[ROW][C]49[/C][C]1581.9[/C][C]1589.41[/C][C]1580.69[/C][C]8.7215[/C][C]-7.51317[/C][/ROW]
[ROW][C]50[/C][C]1562.8[/C][C]1562.91[/C][C]1562.46[/C][C]0.451711[/C][C]-0.110045[/C][/ROW]
[ROW][C]51[/C][C]1552.2[/C][C]NA[/C][C]NA[/C][C]-4.96168[/C][C]NA[/C][/ROW]
[ROW][C]52[/C][C]1535.2[/C][C]NA[/C][C]NA[/C][C]5.759[/C][C]NA[/C][/ROW]
[ROW][C]53[/C][C]1507.6[/C][C]NA[/C][C]NA[/C][C]-7.83266[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=298775&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=298775&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
12622.4NANA8.7215NA
22607.5NANA0.451711NA
32556.6NANA-4.96168NA
42569.32571.712565.955.759-2.409
52533.22550.162557.99-7.83266-16.959
625292551.792553.93-2.13787-22.7871
72577.82560.522551.88.721517.2785
82556.625452544.550.45171111.5983
92558.72528.972533.93-4.9616829.7283
102541.72522.172516.415.75919.5327
112473.82484.862492.69-7.83266-11.059
1224612461.352463.49-2.13787-0.353795
132435.52437.182428.468.7215-1.67984
142414.32394.942394.480.45171119.365
152350.62355.92360.86-4.96168-5.29665
162329.42335.482329.725.759-6.07567
172278.42292.512300.34-7.83266-14.109
182252.92269.712271.85-2.13787-16.8121
192269.92257.212248.498.721512.6868
202227.42231.62231.150.451711-4.20171
212195.62215.052220.01-4.96168-19.4467
222204.12212.152206.395.759-8.05067
232195.62182.112189.94-7.8326613.491
2422022174.892177.02-2.1378727.1129
252157.42172.122163.48.7215-14.7215
262142.52145.82145.350.451711-3.30171
272125.52119.682124.64-4.961685.82001
282110.72114.832109.075.759-4.12567
292072.42086.192094.02-7.83266-13.7923
302076.72071.92074.03-2.137874.80454
312095.82062.232053.518.721533.5702
322023.62033.612033.160.451711-10.01
332004.52004.842009.8-4.96168-0.338318
341985.41984.231978.485.7591.166
351953.51935.961943.79-7.8326617.541
361915.31905.741907.87-2.137879.56287
371881.31881.21872.488.72150.0951637
381821.91840.381839.930.451711-18.4767
391775.21804.711809.68-4.96168-29.5133
4017901784.651778.895.7595.34933
411758.21743.451751.28-7.8326614.7493
421747.61730.031732.17-2.1378717.5712
431679.61720.011711.298.7215-40.4132
441692.31687.861687.410.4517114.43996
451675.41656.961661.92-4.9616818.4367
461639.31645.381639.625.759-6.084
471622.31612.861620.69-7.832669.441
481577.71597.51599.63-2.13787-19.7955
491581.91589.411580.698.7215-7.51317
501562.81562.911562.460.451711-0.110045
511552.2NANA-4.96168NA
521535.2NANA5.759NA
531507.6NANA-7.83266NA



Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = additive ; par4 = 12 ;
Parameters (R input):
par1 = additive ; par2 = 6 ;
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')