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 computationThu, 10 Dec 2015 17:25:24 +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/2015/Dec/10/t1449768355bg7mk3p3elwd80g.htm/, Retrieved Thu, 16 May 2024 08:17:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=285826, Retrieved Thu, 16 May 2024 08:17:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact113
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [Klassieke decompo...] [2015-12-10 17:25:24] [3c36ff81d38607067ba7784098af4691] [Current]
Feedback Forum

Post a new message
Dataseries X:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1




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=285826&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=285826&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=285826&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
10NANA-0.0288462NA
20NANA0.0288462NA
300.0096153800.00961538-0.00961538
40-0.009615380-0.009615380.00961538
50-0.02884620-0.02884620.0288462
600.028846200.0288462-0.0288462
700.0096153800.00961538-0.00961538
80-0.009615380-0.009615380.00961538
90-0.02884620-0.02884620.0288462
1000.028846200.0288462-0.0288462
1100.0096153800.00961538-0.00961538
120-0.009615380-0.009615380.00961538
1300.09615380.125-0.0288462-0.0961538
1400.4038460.3750.0288462-0.403846
1510.5096150.50.009615380.490385
1610.4903850.5-0.009615380.509615
1700.3461540.375-0.0288462-0.346154
1800.1538460.1250.0288462-0.153846
1900.0096153800.00961538-0.00961538
200-0.009615380-0.009615380.00961538
210-0.02884620-0.02884620.0288462
2200.028846200.0288462-0.0288462
2300.0096153800.00961538-0.00961538
2400.1153850.125-0.00961538-0.115385
2500.2211540.25-0.0288462-0.221154
2610.2788460.250.02884620.721154
2700.2596150.250.00961538-0.259615
2800.1153850.125-0.00961538-0.115385
290-0.02884620-0.02884620.0288462
3000.028846200.0288462-0.0288462
3100.0096153800.00961538-0.00961538
320-0.009615380-0.009615380.00961538
330-0.02884620-0.02884620.0288462
3400.028846200.0288462-0.0288462
3500.1346150.1250.00961538-0.134615
3600.3653850.375-0.00961538-0.365385
3710.5961540.625-0.02884620.403846
3810.9038460.8750.02884620.0961538
3911.0096210.00961538-0.00961538
4010.9903851-0.009615380.00961538
4110.9711541-0.02884620.0288462
4211.0288510.0288462-0.0288462
4311.0096210.00961538-0.00961538
4410.9903851-0.009615380.00961538
4510.9711541-0.02884620.0288462
4611.0288510.0288462-0.0288462
4711.0096210.00961538-0.00961538
4810.9903851-0.009615380.00961538
4910.9711541-0.02884620.0288462
5011.0288510.0288462-0.0288462
5111.0096210.00961538-0.00961538
5210.9903851-0.009615380.00961538
5310.9711541-0.02884620.0288462
5411.0288510.0288462-0.0288462
551NANA0.00961538NA
561NANA-0.00961538NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 0 & NA & NA & -0.0288462 & NA \tabularnewline
2 & 0 & NA & NA & 0.0288462 & NA \tabularnewline
3 & 0 & 0.00961538 & 0 & 0.00961538 & -0.00961538 \tabularnewline
4 & 0 & -0.00961538 & 0 & -0.00961538 & 0.00961538 \tabularnewline
5 & 0 & -0.0288462 & 0 & -0.0288462 & 0.0288462 \tabularnewline
6 & 0 & 0.0288462 & 0 & 0.0288462 & -0.0288462 \tabularnewline
7 & 0 & 0.00961538 & 0 & 0.00961538 & -0.00961538 \tabularnewline
8 & 0 & -0.00961538 & 0 & -0.00961538 & 0.00961538 \tabularnewline
9 & 0 & -0.0288462 & 0 & -0.0288462 & 0.0288462 \tabularnewline
10 & 0 & 0.0288462 & 0 & 0.0288462 & -0.0288462 \tabularnewline
11 & 0 & 0.00961538 & 0 & 0.00961538 & -0.00961538 \tabularnewline
12 & 0 & -0.00961538 & 0 & -0.00961538 & 0.00961538 \tabularnewline
13 & 0 & 0.0961538 & 0.125 & -0.0288462 & -0.0961538 \tabularnewline
14 & 0 & 0.403846 & 0.375 & 0.0288462 & -0.403846 \tabularnewline
15 & 1 & 0.509615 & 0.5 & 0.00961538 & 0.490385 \tabularnewline
16 & 1 & 0.490385 & 0.5 & -0.00961538 & 0.509615 \tabularnewline
17 & 0 & 0.346154 & 0.375 & -0.0288462 & -0.346154 \tabularnewline
18 & 0 & 0.153846 & 0.125 & 0.0288462 & -0.153846 \tabularnewline
19 & 0 & 0.00961538 & 0 & 0.00961538 & -0.00961538 \tabularnewline
20 & 0 & -0.00961538 & 0 & -0.00961538 & 0.00961538 \tabularnewline
21 & 0 & -0.0288462 & 0 & -0.0288462 & 0.0288462 \tabularnewline
22 & 0 & 0.0288462 & 0 & 0.0288462 & -0.0288462 \tabularnewline
23 & 0 & 0.00961538 & 0 & 0.00961538 & -0.00961538 \tabularnewline
24 & 0 & 0.115385 & 0.125 & -0.00961538 & -0.115385 \tabularnewline
25 & 0 & 0.221154 & 0.25 & -0.0288462 & -0.221154 \tabularnewline
26 & 1 & 0.278846 & 0.25 & 0.0288462 & 0.721154 \tabularnewline
27 & 0 & 0.259615 & 0.25 & 0.00961538 & -0.259615 \tabularnewline
28 & 0 & 0.115385 & 0.125 & -0.00961538 & -0.115385 \tabularnewline
29 & 0 & -0.0288462 & 0 & -0.0288462 & 0.0288462 \tabularnewline
30 & 0 & 0.0288462 & 0 & 0.0288462 & -0.0288462 \tabularnewline
31 & 0 & 0.00961538 & 0 & 0.00961538 & -0.00961538 \tabularnewline
32 & 0 & -0.00961538 & 0 & -0.00961538 & 0.00961538 \tabularnewline
33 & 0 & -0.0288462 & 0 & -0.0288462 & 0.0288462 \tabularnewline
34 & 0 & 0.0288462 & 0 & 0.0288462 & -0.0288462 \tabularnewline
35 & 0 & 0.134615 & 0.125 & 0.00961538 & -0.134615 \tabularnewline
36 & 0 & 0.365385 & 0.375 & -0.00961538 & -0.365385 \tabularnewline
37 & 1 & 0.596154 & 0.625 & -0.0288462 & 0.403846 \tabularnewline
38 & 1 & 0.903846 & 0.875 & 0.0288462 & 0.0961538 \tabularnewline
39 & 1 & 1.00962 & 1 & 0.00961538 & -0.00961538 \tabularnewline
40 & 1 & 0.990385 & 1 & -0.00961538 & 0.00961538 \tabularnewline
41 & 1 & 0.971154 & 1 & -0.0288462 & 0.0288462 \tabularnewline
42 & 1 & 1.02885 & 1 & 0.0288462 & -0.0288462 \tabularnewline
43 & 1 & 1.00962 & 1 & 0.00961538 & -0.00961538 \tabularnewline
44 & 1 & 0.990385 & 1 & -0.00961538 & 0.00961538 \tabularnewline
45 & 1 & 0.971154 & 1 & -0.0288462 & 0.0288462 \tabularnewline
46 & 1 & 1.02885 & 1 & 0.0288462 & -0.0288462 \tabularnewline
47 & 1 & 1.00962 & 1 & 0.00961538 & -0.00961538 \tabularnewline
48 & 1 & 0.990385 & 1 & -0.00961538 & 0.00961538 \tabularnewline
49 & 1 & 0.971154 & 1 & -0.0288462 & 0.0288462 \tabularnewline
50 & 1 & 1.02885 & 1 & 0.0288462 & -0.0288462 \tabularnewline
51 & 1 & 1.00962 & 1 & 0.00961538 & -0.00961538 \tabularnewline
52 & 1 & 0.990385 & 1 & -0.00961538 & 0.00961538 \tabularnewline
53 & 1 & 0.971154 & 1 & -0.0288462 & 0.0288462 \tabularnewline
54 & 1 & 1.02885 & 1 & 0.0288462 & -0.0288462 \tabularnewline
55 & 1 & NA & NA & 0.00961538 & NA \tabularnewline
56 & 1 & NA & NA & -0.00961538 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=285826&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]0[/C][C]NA[/C][C]NA[/C][C]-0.0288462[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]0[/C][C]NA[/C][C]NA[/C][C]0.0288462[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]0[/C][C]0.00961538[/C][C]0[/C][C]0.00961538[/C][C]-0.00961538[/C][/ROW]
[ROW][C]4[/C][C]0[/C][C]-0.00961538[/C][C]0[/C][C]-0.00961538[/C][C]0.00961538[/C][/ROW]
[ROW][C]5[/C][C]0[/C][C]-0.0288462[/C][C]0[/C][C]-0.0288462[/C][C]0.0288462[/C][/ROW]
[ROW][C]6[/C][C]0[/C][C]0.0288462[/C][C]0[/C][C]0.0288462[/C][C]-0.0288462[/C][/ROW]
[ROW][C]7[/C][C]0[/C][C]0.00961538[/C][C]0[/C][C]0.00961538[/C][C]-0.00961538[/C][/ROW]
[ROW][C]8[/C][C]0[/C][C]-0.00961538[/C][C]0[/C][C]-0.00961538[/C][C]0.00961538[/C][/ROW]
[ROW][C]9[/C][C]0[/C][C]-0.0288462[/C][C]0[/C][C]-0.0288462[/C][C]0.0288462[/C][/ROW]
[ROW][C]10[/C][C]0[/C][C]0.0288462[/C][C]0[/C][C]0.0288462[/C][C]-0.0288462[/C][/ROW]
[ROW][C]11[/C][C]0[/C][C]0.00961538[/C][C]0[/C][C]0.00961538[/C][C]-0.00961538[/C][/ROW]
[ROW][C]12[/C][C]0[/C][C]-0.00961538[/C][C]0[/C][C]-0.00961538[/C][C]0.00961538[/C][/ROW]
[ROW][C]13[/C][C]0[/C][C]0.0961538[/C][C]0.125[/C][C]-0.0288462[/C][C]-0.0961538[/C][/ROW]
[ROW][C]14[/C][C]0[/C][C]0.403846[/C][C]0.375[/C][C]0.0288462[/C][C]-0.403846[/C][/ROW]
[ROW][C]15[/C][C]1[/C][C]0.509615[/C][C]0.5[/C][C]0.00961538[/C][C]0.490385[/C][/ROW]
[ROW][C]16[/C][C]1[/C][C]0.490385[/C][C]0.5[/C][C]-0.00961538[/C][C]0.509615[/C][/ROW]
[ROW][C]17[/C][C]0[/C][C]0.346154[/C][C]0.375[/C][C]-0.0288462[/C][C]-0.346154[/C][/ROW]
[ROW][C]18[/C][C]0[/C][C]0.153846[/C][C]0.125[/C][C]0.0288462[/C][C]-0.153846[/C][/ROW]
[ROW][C]19[/C][C]0[/C][C]0.00961538[/C][C]0[/C][C]0.00961538[/C][C]-0.00961538[/C][/ROW]
[ROW][C]20[/C][C]0[/C][C]-0.00961538[/C][C]0[/C][C]-0.00961538[/C][C]0.00961538[/C][/ROW]
[ROW][C]21[/C][C]0[/C][C]-0.0288462[/C][C]0[/C][C]-0.0288462[/C][C]0.0288462[/C][/ROW]
[ROW][C]22[/C][C]0[/C][C]0.0288462[/C][C]0[/C][C]0.0288462[/C][C]-0.0288462[/C][/ROW]
[ROW][C]23[/C][C]0[/C][C]0.00961538[/C][C]0[/C][C]0.00961538[/C][C]-0.00961538[/C][/ROW]
[ROW][C]24[/C][C]0[/C][C]0.115385[/C][C]0.125[/C][C]-0.00961538[/C][C]-0.115385[/C][/ROW]
[ROW][C]25[/C][C]0[/C][C]0.221154[/C][C]0.25[/C][C]-0.0288462[/C][C]-0.221154[/C][/ROW]
[ROW][C]26[/C][C]1[/C][C]0.278846[/C][C]0.25[/C][C]0.0288462[/C][C]0.721154[/C][/ROW]
[ROW][C]27[/C][C]0[/C][C]0.259615[/C][C]0.25[/C][C]0.00961538[/C][C]-0.259615[/C][/ROW]
[ROW][C]28[/C][C]0[/C][C]0.115385[/C][C]0.125[/C][C]-0.00961538[/C][C]-0.115385[/C][/ROW]
[ROW][C]29[/C][C]0[/C][C]-0.0288462[/C][C]0[/C][C]-0.0288462[/C][C]0.0288462[/C][/ROW]
[ROW][C]30[/C][C]0[/C][C]0.0288462[/C][C]0[/C][C]0.0288462[/C][C]-0.0288462[/C][/ROW]
[ROW][C]31[/C][C]0[/C][C]0.00961538[/C][C]0[/C][C]0.00961538[/C][C]-0.00961538[/C][/ROW]
[ROW][C]32[/C][C]0[/C][C]-0.00961538[/C][C]0[/C][C]-0.00961538[/C][C]0.00961538[/C][/ROW]
[ROW][C]33[/C][C]0[/C][C]-0.0288462[/C][C]0[/C][C]-0.0288462[/C][C]0.0288462[/C][/ROW]
[ROW][C]34[/C][C]0[/C][C]0.0288462[/C][C]0[/C][C]0.0288462[/C][C]-0.0288462[/C][/ROW]
[ROW][C]35[/C][C]0[/C][C]0.134615[/C][C]0.125[/C][C]0.00961538[/C][C]-0.134615[/C][/ROW]
[ROW][C]36[/C][C]0[/C][C]0.365385[/C][C]0.375[/C][C]-0.00961538[/C][C]-0.365385[/C][/ROW]
[ROW][C]37[/C][C]1[/C][C]0.596154[/C][C]0.625[/C][C]-0.0288462[/C][C]0.403846[/C][/ROW]
[ROW][C]38[/C][C]1[/C][C]0.903846[/C][C]0.875[/C][C]0.0288462[/C][C]0.0961538[/C][/ROW]
[ROW][C]39[/C][C]1[/C][C]1.00962[/C][C]1[/C][C]0.00961538[/C][C]-0.00961538[/C][/ROW]
[ROW][C]40[/C][C]1[/C][C]0.990385[/C][C]1[/C][C]-0.00961538[/C][C]0.00961538[/C][/ROW]
[ROW][C]41[/C][C]1[/C][C]0.971154[/C][C]1[/C][C]-0.0288462[/C][C]0.0288462[/C][/ROW]
[ROW][C]42[/C][C]1[/C][C]1.02885[/C][C]1[/C][C]0.0288462[/C][C]-0.0288462[/C][/ROW]
[ROW][C]43[/C][C]1[/C][C]1.00962[/C][C]1[/C][C]0.00961538[/C][C]-0.00961538[/C][/ROW]
[ROW][C]44[/C][C]1[/C][C]0.990385[/C][C]1[/C][C]-0.00961538[/C][C]0.00961538[/C][/ROW]
[ROW][C]45[/C][C]1[/C][C]0.971154[/C][C]1[/C][C]-0.0288462[/C][C]0.0288462[/C][/ROW]
[ROW][C]46[/C][C]1[/C][C]1.02885[/C][C]1[/C][C]0.0288462[/C][C]-0.0288462[/C][/ROW]
[ROW][C]47[/C][C]1[/C][C]1.00962[/C][C]1[/C][C]0.00961538[/C][C]-0.00961538[/C][/ROW]
[ROW][C]48[/C][C]1[/C][C]0.990385[/C][C]1[/C][C]-0.00961538[/C][C]0.00961538[/C][/ROW]
[ROW][C]49[/C][C]1[/C][C]0.971154[/C][C]1[/C][C]-0.0288462[/C][C]0.0288462[/C][/ROW]
[ROW][C]50[/C][C]1[/C][C]1.02885[/C][C]1[/C][C]0.0288462[/C][C]-0.0288462[/C][/ROW]
[ROW][C]51[/C][C]1[/C][C]1.00962[/C][C]1[/C][C]0.00961538[/C][C]-0.00961538[/C][/ROW]
[ROW][C]52[/C][C]1[/C][C]0.990385[/C][C]1[/C][C]-0.00961538[/C][C]0.00961538[/C][/ROW]
[ROW][C]53[/C][C]1[/C][C]0.971154[/C][C]1[/C][C]-0.0288462[/C][C]0.0288462[/C][/ROW]
[ROW][C]54[/C][C]1[/C][C]1.02885[/C][C]1[/C][C]0.0288462[/C][C]-0.0288462[/C][/ROW]
[ROW][C]55[/C][C]1[/C][C]NA[/C][C]NA[/C][C]0.00961538[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]1[/C][C]NA[/C][C]NA[/C][C]-0.00961538[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=285826&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=285826&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
10NANA-0.0288462NA
20NANA0.0288462NA
300.0096153800.00961538-0.00961538
40-0.009615380-0.009615380.00961538
50-0.02884620-0.02884620.0288462
600.028846200.0288462-0.0288462
700.0096153800.00961538-0.00961538
80-0.009615380-0.009615380.00961538
90-0.02884620-0.02884620.0288462
1000.028846200.0288462-0.0288462
1100.0096153800.00961538-0.00961538
120-0.009615380-0.009615380.00961538
1300.09615380.125-0.0288462-0.0961538
1400.4038460.3750.0288462-0.403846
1510.5096150.50.009615380.490385
1610.4903850.5-0.009615380.509615
1700.3461540.375-0.0288462-0.346154
1800.1538460.1250.0288462-0.153846
1900.0096153800.00961538-0.00961538
200-0.009615380-0.009615380.00961538
210-0.02884620-0.02884620.0288462
2200.028846200.0288462-0.0288462
2300.0096153800.00961538-0.00961538
2400.1153850.125-0.00961538-0.115385
2500.2211540.25-0.0288462-0.221154
2610.2788460.250.02884620.721154
2700.2596150.250.00961538-0.259615
2800.1153850.125-0.00961538-0.115385
290-0.02884620-0.02884620.0288462
3000.028846200.0288462-0.0288462
3100.0096153800.00961538-0.00961538
320-0.009615380-0.009615380.00961538
330-0.02884620-0.02884620.0288462
3400.028846200.0288462-0.0288462
3500.1346150.1250.00961538-0.134615
3600.3653850.375-0.00961538-0.365385
3710.5961540.625-0.02884620.403846
3810.9038460.8750.02884620.0961538
3911.0096210.00961538-0.00961538
4010.9903851-0.009615380.00961538
4110.9711541-0.02884620.0288462
4211.0288510.0288462-0.0288462
4311.0096210.00961538-0.00961538
4410.9903851-0.009615380.00961538
4510.9711541-0.02884620.0288462
4611.0288510.0288462-0.0288462
4711.0096210.00961538-0.00961538
4810.9903851-0.009615380.00961538
4910.9711541-0.02884620.0288462
5011.0288510.0288462-0.0288462
5111.0096210.00961538-0.00961538
5210.9903851-0.009615380.00961538
5310.9711541-0.02884620.0288462
5411.0288510.0288462-0.0288462
551NANA0.00961538NA
561NANA-0.00961538NA



Parameters (Session):
par1 = additive ; par2 = 4 ;
Parameters (R input):
par1 = additive ; par2 = 4 ;
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')