Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationThu, 24 Nov 2016 15:36:40 +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/24/t1480001815gwlwu3hpx60jsp7.htm/, Retrieved Tue, 07 May 2024 07:49:42 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Tue, 07 May 2024 07:49:42 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
154
156
152
150
152
138
140
138
141
152
158
146
166
167
163
169
168
158
159
161
166
177
186
182
203
213
215
216
219
217
216
222
224
234
237
233
253
257
254
258
253
241
238
240
240
245
249
247
263
265
261
257
252
245
235
240
243
255
252
240




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Maurice George Kendall' @ kendall.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 & 'Sir Maurice George Kendall' @ kendall.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]'Sir Maurice George Kendall' @ kendall.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'Sir Maurice George Kendall' @ kendall.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1154NANA10.3863NA
2156NANA12.5842NA
3152NANA8.2092NA
4150NANA7.82378NA
5152NANA3.7717NA
6138NANA-5.93663NA
7140139.178148.583-9.405380.822049
8138139.865149.542-9.67622-1.86545
9141141.011150.458-9.44705-0.0112847
10152149.261151.708-2.447052.73872
11158154.063153.1670.8967013.93663
12146147.907154.667-6.75955-1.90712
13166166.678156.29210.3863-0.677951
14167170.626158.04212.5842-3.62587
15163168.251160.0428.2092-5.25087
16169169.949162.1257.82378-0.948785
17168168.105164.3333.7717-0.105035
18158161.063167-5.93663-3.06337
19159160.636170.042-9.40538-1.63628
20161163.824173.5-9.67622-2.82378
21166168.136177.583-9.44705-2.13628
22177179.261181.708-2.44705-2.26128
23186186.688185.7920.896701-0.688368
24182183.615190.375-6.75955-1.61545
25203205.595195.20810.3863-2.59462
26213212.709200.12512.58420.290799
27215213.293205.0838.20921.70747
28216217.699209.8757.82378-1.69878
29219218.147214.3753.77170.853299
30217212.688218.625-5.936634.31163
31216213.428222.833-9.405382.57205
32222217.074226.75-9.676224.92622
33224220.761230.208-9.447053.23872
34234231.136233.583-2.447052.86372
35237237.647236.750.896701-0.646701
36233232.407239.167-6.759550.592882
37253251.47241.08310.38631.53038
38257255.334242.7512.58421.6658
39254252.376244.1678.20921.62413
40258253.115245.2927.823784.88455
41253250.022246.253.77172.9783
42241241.397247.333-5.93663-0.396701
43238238.928248.333-9.40538-0.927951
44240239.407249.083-9.676220.592882
45240240.261249.708-9.44705-0.261285
46245247.511249.958-2.44705-2.51128
47249250.772249.8750.896701-1.7717
48247243.24250-6.759553.75955
49263260.428250.04210.38632.57205
50265262.501249.91712.58422.49913
51261258.251250.0428.20922.74913
52257258.407250.5837.82378-1.40712
53252254.897251.1253.7717-2.8967
54245245.022250.958-5.93663-0.0217014
55235NANA-9.40538NA
56240NANA-9.67622NA
57243NANA-9.44705NA
58255NANA-2.44705NA
59252NANA0.896701NA
60240NANA-6.75955NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 154 & NA & NA & 10.3863 & NA \tabularnewline
2 & 156 & NA & NA & 12.5842 & NA \tabularnewline
3 & 152 & NA & NA & 8.2092 & NA \tabularnewline
4 & 150 & NA & NA & 7.82378 & NA \tabularnewline
5 & 152 & NA & NA & 3.7717 & NA \tabularnewline
6 & 138 & NA & NA & -5.93663 & NA \tabularnewline
7 & 140 & 139.178 & 148.583 & -9.40538 & 0.822049 \tabularnewline
8 & 138 & 139.865 & 149.542 & -9.67622 & -1.86545 \tabularnewline
9 & 141 & 141.011 & 150.458 & -9.44705 & -0.0112847 \tabularnewline
10 & 152 & 149.261 & 151.708 & -2.44705 & 2.73872 \tabularnewline
11 & 158 & 154.063 & 153.167 & 0.896701 & 3.93663 \tabularnewline
12 & 146 & 147.907 & 154.667 & -6.75955 & -1.90712 \tabularnewline
13 & 166 & 166.678 & 156.292 & 10.3863 & -0.677951 \tabularnewline
14 & 167 & 170.626 & 158.042 & 12.5842 & -3.62587 \tabularnewline
15 & 163 & 168.251 & 160.042 & 8.2092 & -5.25087 \tabularnewline
16 & 169 & 169.949 & 162.125 & 7.82378 & -0.948785 \tabularnewline
17 & 168 & 168.105 & 164.333 & 3.7717 & -0.105035 \tabularnewline
18 & 158 & 161.063 & 167 & -5.93663 & -3.06337 \tabularnewline
19 & 159 & 160.636 & 170.042 & -9.40538 & -1.63628 \tabularnewline
20 & 161 & 163.824 & 173.5 & -9.67622 & -2.82378 \tabularnewline
21 & 166 & 168.136 & 177.583 & -9.44705 & -2.13628 \tabularnewline
22 & 177 & 179.261 & 181.708 & -2.44705 & -2.26128 \tabularnewline
23 & 186 & 186.688 & 185.792 & 0.896701 & -0.688368 \tabularnewline
24 & 182 & 183.615 & 190.375 & -6.75955 & -1.61545 \tabularnewline
25 & 203 & 205.595 & 195.208 & 10.3863 & -2.59462 \tabularnewline
26 & 213 & 212.709 & 200.125 & 12.5842 & 0.290799 \tabularnewline
27 & 215 & 213.293 & 205.083 & 8.2092 & 1.70747 \tabularnewline
28 & 216 & 217.699 & 209.875 & 7.82378 & -1.69878 \tabularnewline
29 & 219 & 218.147 & 214.375 & 3.7717 & 0.853299 \tabularnewline
30 & 217 & 212.688 & 218.625 & -5.93663 & 4.31163 \tabularnewline
31 & 216 & 213.428 & 222.833 & -9.40538 & 2.57205 \tabularnewline
32 & 222 & 217.074 & 226.75 & -9.67622 & 4.92622 \tabularnewline
33 & 224 & 220.761 & 230.208 & -9.44705 & 3.23872 \tabularnewline
34 & 234 & 231.136 & 233.583 & -2.44705 & 2.86372 \tabularnewline
35 & 237 & 237.647 & 236.75 & 0.896701 & -0.646701 \tabularnewline
36 & 233 & 232.407 & 239.167 & -6.75955 & 0.592882 \tabularnewline
37 & 253 & 251.47 & 241.083 & 10.3863 & 1.53038 \tabularnewline
38 & 257 & 255.334 & 242.75 & 12.5842 & 1.6658 \tabularnewline
39 & 254 & 252.376 & 244.167 & 8.2092 & 1.62413 \tabularnewline
40 & 258 & 253.115 & 245.292 & 7.82378 & 4.88455 \tabularnewline
41 & 253 & 250.022 & 246.25 & 3.7717 & 2.9783 \tabularnewline
42 & 241 & 241.397 & 247.333 & -5.93663 & -0.396701 \tabularnewline
43 & 238 & 238.928 & 248.333 & -9.40538 & -0.927951 \tabularnewline
44 & 240 & 239.407 & 249.083 & -9.67622 & 0.592882 \tabularnewline
45 & 240 & 240.261 & 249.708 & -9.44705 & -0.261285 \tabularnewline
46 & 245 & 247.511 & 249.958 & -2.44705 & -2.51128 \tabularnewline
47 & 249 & 250.772 & 249.875 & 0.896701 & -1.7717 \tabularnewline
48 & 247 & 243.24 & 250 & -6.75955 & 3.75955 \tabularnewline
49 & 263 & 260.428 & 250.042 & 10.3863 & 2.57205 \tabularnewline
50 & 265 & 262.501 & 249.917 & 12.5842 & 2.49913 \tabularnewline
51 & 261 & 258.251 & 250.042 & 8.2092 & 2.74913 \tabularnewline
52 & 257 & 258.407 & 250.583 & 7.82378 & -1.40712 \tabularnewline
53 & 252 & 254.897 & 251.125 & 3.7717 & -2.8967 \tabularnewline
54 & 245 & 245.022 & 250.958 & -5.93663 & -0.0217014 \tabularnewline
55 & 235 & NA & NA & -9.40538 & NA \tabularnewline
56 & 240 & NA & NA & -9.67622 & NA \tabularnewline
57 & 243 & NA & NA & -9.44705 & NA \tabularnewline
58 & 255 & NA & NA & -2.44705 & NA \tabularnewline
59 & 252 & NA & NA & 0.896701 & NA \tabularnewline
60 & 240 & NA & NA & -6.75955 & 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]154[/C][C]NA[/C][C]NA[/C][C]10.3863[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]156[/C][C]NA[/C][C]NA[/C][C]12.5842[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]152[/C][C]NA[/C][C]NA[/C][C]8.2092[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]150[/C][C]NA[/C][C]NA[/C][C]7.82378[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]152[/C][C]NA[/C][C]NA[/C][C]3.7717[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]138[/C][C]NA[/C][C]NA[/C][C]-5.93663[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]140[/C][C]139.178[/C][C]148.583[/C][C]-9.40538[/C][C]0.822049[/C][/ROW]
[ROW][C]8[/C][C]138[/C][C]139.865[/C][C]149.542[/C][C]-9.67622[/C][C]-1.86545[/C][/ROW]
[ROW][C]9[/C][C]141[/C][C]141.011[/C][C]150.458[/C][C]-9.44705[/C][C]-0.0112847[/C][/ROW]
[ROW][C]10[/C][C]152[/C][C]149.261[/C][C]151.708[/C][C]-2.44705[/C][C]2.73872[/C][/ROW]
[ROW][C]11[/C][C]158[/C][C]154.063[/C][C]153.167[/C][C]0.896701[/C][C]3.93663[/C][/ROW]
[ROW][C]12[/C][C]146[/C][C]147.907[/C][C]154.667[/C][C]-6.75955[/C][C]-1.90712[/C][/ROW]
[ROW][C]13[/C][C]166[/C][C]166.678[/C][C]156.292[/C][C]10.3863[/C][C]-0.677951[/C][/ROW]
[ROW][C]14[/C][C]167[/C][C]170.626[/C][C]158.042[/C][C]12.5842[/C][C]-3.62587[/C][/ROW]
[ROW][C]15[/C][C]163[/C][C]168.251[/C][C]160.042[/C][C]8.2092[/C][C]-5.25087[/C][/ROW]
[ROW][C]16[/C][C]169[/C][C]169.949[/C][C]162.125[/C][C]7.82378[/C][C]-0.948785[/C][/ROW]
[ROW][C]17[/C][C]168[/C][C]168.105[/C][C]164.333[/C][C]3.7717[/C][C]-0.105035[/C][/ROW]
[ROW][C]18[/C][C]158[/C][C]161.063[/C][C]167[/C][C]-5.93663[/C][C]-3.06337[/C][/ROW]
[ROW][C]19[/C][C]159[/C][C]160.636[/C][C]170.042[/C][C]-9.40538[/C][C]-1.63628[/C][/ROW]
[ROW][C]20[/C][C]161[/C][C]163.824[/C][C]173.5[/C][C]-9.67622[/C][C]-2.82378[/C][/ROW]
[ROW][C]21[/C][C]166[/C][C]168.136[/C][C]177.583[/C][C]-9.44705[/C][C]-2.13628[/C][/ROW]
[ROW][C]22[/C][C]177[/C][C]179.261[/C][C]181.708[/C][C]-2.44705[/C][C]-2.26128[/C][/ROW]
[ROW][C]23[/C][C]186[/C][C]186.688[/C][C]185.792[/C][C]0.896701[/C][C]-0.688368[/C][/ROW]
[ROW][C]24[/C][C]182[/C][C]183.615[/C][C]190.375[/C][C]-6.75955[/C][C]-1.61545[/C][/ROW]
[ROW][C]25[/C][C]203[/C][C]205.595[/C][C]195.208[/C][C]10.3863[/C][C]-2.59462[/C][/ROW]
[ROW][C]26[/C][C]213[/C][C]212.709[/C][C]200.125[/C][C]12.5842[/C][C]0.290799[/C][/ROW]
[ROW][C]27[/C][C]215[/C][C]213.293[/C][C]205.083[/C][C]8.2092[/C][C]1.70747[/C][/ROW]
[ROW][C]28[/C][C]216[/C][C]217.699[/C][C]209.875[/C][C]7.82378[/C][C]-1.69878[/C][/ROW]
[ROW][C]29[/C][C]219[/C][C]218.147[/C][C]214.375[/C][C]3.7717[/C][C]0.853299[/C][/ROW]
[ROW][C]30[/C][C]217[/C][C]212.688[/C][C]218.625[/C][C]-5.93663[/C][C]4.31163[/C][/ROW]
[ROW][C]31[/C][C]216[/C][C]213.428[/C][C]222.833[/C][C]-9.40538[/C][C]2.57205[/C][/ROW]
[ROW][C]32[/C][C]222[/C][C]217.074[/C][C]226.75[/C][C]-9.67622[/C][C]4.92622[/C][/ROW]
[ROW][C]33[/C][C]224[/C][C]220.761[/C][C]230.208[/C][C]-9.44705[/C][C]3.23872[/C][/ROW]
[ROW][C]34[/C][C]234[/C][C]231.136[/C][C]233.583[/C][C]-2.44705[/C][C]2.86372[/C][/ROW]
[ROW][C]35[/C][C]237[/C][C]237.647[/C][C]236.75[/C][C]0.896701[/C][C]-0.646701[/C][/ROW]
[ROW][C]36[/C][C]233[/C][C]232.407[/C][C]239.167[/C][C]-6.75955[/C][C]0.592882[/C][/ROW]
[ROW][C]37[/C][C]253[/C][C]251.47[/C][C]241.083[/C][C]10.3863[/C][C]1.53038[/C][/ROW]
[ROW][C]38[/C][C]257[/C][C]255.334[/C][C]242.75[/C][C]12.5842[/C][C]1.6658[/C][/ROW]
[ROW][C]39[/C][C]254[/C][C]252.376[/C][C]244.167[/C][C]8.2092[/C][C]1.62413[/C][/ROW]
[ROW][C]40[/C][C]258[/C][C]253.115[/C][C]245.292[/C][C]7.82378[/C][C]4.88455[/C][/ROW]
[ROW][C]41[/C][C]253[/C][C]250.022[/C][C]246.25[/C][C]3.7717[/C][C]2.9783[/C][/ROW]
[ROW][C]42[/C][C]241[/C][C]241.397[/C][C]247.333[/C][C]-5.93663[/C][C]-0.396701[/C][/ROW]
[ROW][C]43[/C][C]238[/C][C]238.928[/C][C]248.333[/C][C]-9.40538[/C][C]-0.927951[/C][/ROW]
[ROW][C]44[/C][C]240[/C][C]239.407[/C][C]249.083[/C][C]-9.67622[/C][C]0.592882[/C][/ROW]
[ROW][C]45[/C][C]240[/C][C]240.261[/C][C]249.708[/C][C]-9.44705[/C][C]-0.261285[/C][/ROW]
[ROW][C]46[/C][C]245[/C][C]247.511[/C][C]249.958[/C][C]-2.44705[/C][C]-2.51128[/C][/ROW]
[ROW][C]47[/C][C]249[/C][C]250.772[/C][C]249.875[/C][C]0.896701[/C][C]-1.7717[/C][/ROW]
[ROW][C]48[/C][C]247[/C][C]243.24[/C][C]250[/C][C]-6.75955[/C][C]3.75955[/C][/ROW]
[ROW][C]49[/C][C]263[/C][C]260.428[/C][C]250.042[/C][C]10.3863[/C][C]2.57205[/C][/ROW]
[ROW][C]50[/C][C]265[/C][C]262.501[/C][C]249.917[/C][C]12.5842[/C][C]2.49913[/C][/ROW]
[ROW][C]51[/C][C]261[/C][C]258.251[/C][C]250.042[/C][C]8.2092[/C][C]2.74913[/C][/ROW]
[ROW][C]52[/C][C]257[/C][C]258.407[/C][C]250.583[/C][C]7.82378[/C][C]-1.40712[/C][/ROW]
[ROW][C]53[/C][C]252[/C][C]254.897[/C][C]251.125[/C][C]3.7717[/C][C]-2.8967[/C][/ROW]
[ROW][C]54[/C][C]245[/C][C]245.022[/C][C]250.958[/C][C]-5.93663[/C][C]-0.0217014[/C][/ROW]
[ROW][C]55[/C][C]235[/C][C]NA[/C][C]NA[/C][C]-9.40538[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]240[/C][C]NA[/C][C]NA[/C][C]-9.67622[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]243[/C][C]NA[/C][C]NA[/C][C]-9.44705[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]255[/C][C]NA[/C][C]NA[/C][C]-2.44705[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]252[/C][C]NA[/C][C]NA[/C][C]0.896701[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]240[/C][C]NA[/C][C]NA[/C][C]-6.75955[/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
1154NANA10.3863NA
2156NANA12.5842NA
3152NANA8.2092NA
4150NANA7.82378NA
5152NANA3.7717NA
6138NANA-5.93663NA
7140139.178148.583-9.405380.822049
8138139.865149.542-9.67622-1.86545
9141141.011150.458-9.44705-0.0112847
10152149.261151.708-2.447052.73872
11158154.063153.1670.8967013.93663
12146147.907154.667-6.75955-1.90712
13166166.678156.29210.3863-0.677951
14167170.626158.04212.5842-3.62587
15163168.251160.0428.2092-5.25087
16169169.949162.1257.82378-0.948785
17168168.105164.3333.7717-0.105035
18158161.063167-5.93663-3.06337
19159160.636170.042-9.40538-1.63628
20161163.824173.5-9.67622-2.82378
21166168.136177.583-9.44705-2.13628
22177179.261181.708-2.44705-2.26128
23186186.688185.7920.896701-0.688368
24182183.615190.375-6.75955-1.61545
25203205.595195.20810.3863-2.59462
26213212.709200.12512.58420.290799
27215213.293205.0838.20921.70747
28216217.699209.8757.82378-1.69878
29219218.147214.3753.77170.853299
30217212.688218.625-5.936634.31163
31216213.428222.833-9.405382.57205
32222217.074226.75-9.676224.92622
33224220.761230.208-9.447053.23872
34234231.136233.583-2.447052.86372
35237237.647236.750.896701-0.646701
36233232.407239.167-6.759550.592882
37253251.47241.08310.38631.53038
38257255.334242.7512.58421.6658
39254252.376244.1678.20921.62413
40258253.115245.2927.823784.88455
41253250.022246.253.77172.9783
42241241.397247.333-5.93663-0.396701
43238238.928248.333-9.40538-0.927951
44240239.407249.083-9.676220.592882
45240240.261249.708-9.44705-0.261285
46245247.511249.958-2.44705-2.51128
47249250.772249.8750.896701-1.7717
48247243.24250-6.759553.75955
49263260.428250.04210.38632.57205
50265262.501249.91712.58422.49913
51261258.251250.0428.20922.74913
52257258.407250.5837.82378-1.40712
53252254.897251.1253.7717-2.8967
54245245.022250.958-5.93663-0.0217014
55235NANA-9.40538NA
56240NANA-9.67622NA
57243NANA-9.44705NA
58255NANA-2.44705NA
59252NANA0.896701NA
60240NANA-6.75955NA



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