Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationTue, 26 Apr 2016 16:59:35 +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/Apr/26/t1461686437rkd4wwfjvpczn53.htm/, Retrieved Fri, 03 May 2024 23:05:51 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=294910, Retrieved Fri, 03 May 2024 23:05:51 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact55
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [] [2016-04-26 15:59:35] [808bf237864283e5d6c581b9d5be65c1] [Current]
Feedback Forum

Post a new message
Dataseries X:
4
7
9
6
9
13
18
8
15
4
8
14
8
3
5
6
12
7
3
11
6
9
6
10
10
6
13
10
9
15
8
12
13
9
6
7
8
7
6
8
3
7
8
8
7
12
7
5
9
9
8
11
9
8
9
11
8
9
9
5




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=294910&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
14NANA0.204861NA
27NANA-2.23264NA
39NANA-0.440972NA
46NANA0.329861NA
59NANA-0.232639NA
613NANA0.850694NA
71810.4349.750.6840287.56597
8810.86119.751.11111-2.86111
91511.01749.416671.600693.98264
1049.059039.25-0.190972-5.05903
1187.381949.375-1.993060.618056
12149.559039.250.3090284.44097
1388.579868.3750.204861-0.579861
1435.642367.875-2.23264-2.64236
1557.184037.625-0.440972-2.18403
1667.788197.458330.329861-1.78819
17127.350697.58333-0.2326394.64931
1878.184037.333330.850694-1.18403
1937.934037.250.684028-4.93403
20118.569447.458331.111112.43056
2169.517367.916671.60069-3.51736
2298.225698.41667-0.1909720.774306
2366.465288.45833-1.99306-0.465278
24108.975698.666670.3090281.02431
25109.413199.208330.2048610.586806
2667.225699.45833-2.23264-1.22569
27139.350699.79167-0.4409723.64931
281010.413210.08330.329861-0.413194
2999.8506910.0833-0.232639-0.850694
301510.8099.958330.8506944.19097
31810.4349.750.684028-2.43403
321210.81949.708331.111111.18056
331311.0599.458331.600691.94097
3498.892369.08333-0.1909720.107639
3566.756948.75-1.99306-0.756944
3678.475698.166670.309028-1.47569
3788.038197.833330.204861-0.0381944
3875.434037.66667-2.232641.56597
3966.809037.25-0.440972-0.809028
4087.454867.1250.3298610.545139
4137.059037.29167-0.232639-4.05903
4278.100697.250.850694-1.10069
4387.892367.208330.6840280.107639
4488.444447.333331.11111-0.444444
4579.100697.51.60069-2.10069
46127.517367.70833-0.1909724.48264
4776.090288.08333-1.993060.909722
4858.684038.3750.309028-3.68403
4998.663198.458330.2048610.336806
5096.392368.625-2.232642.60764
5188.350698.79167-0.440972-0.350694
52119.038198.708330.3298611.96181
5398.434038.66667-0.2326390.565972
5489.600698.750.850694-1.60069
559NANA0.684028NA
5611NANA1.11111NA
578NANA1.60069NA
589NANA-0.190972NA
599NANA-1.99306NA
605NANA0.309028NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 4 & NA & NA & 0.204861 & NA \tabularnewline
2 & 7 & NA & NA & -2.23264 & NA \tabularnewline
3 & 9 & NA & NA & -0.440972 & NA \tabularnewline
4 & 6 & NA & NA & 0.329861 & NA \tabularnewline
5 & 9 & NA & NA & -0.232639 & NA \tabularnewline
6 & 13 & NA & NA & 0.850694 & NA \tabularnewline
7 & 18 & 10.434 & 9.75 & 0.684028 & 7.56597 \tabularnewline
8 & 8 & 10.8611 & 9.75 & 1.11111 & -2.86111 \tabularnewline
9 & 15 & 11.0174 & 9.41667 & 1.60069 & 3.98264 \tabularnewline
10 & 4 & 9.05903 & 9.25 & -0.190972 & -5.05903 \tabularnewline
11 & 8 & 7.38194 & 9.375 & -1.99306 & 0.618056 \tabularnewline
12 & 14 & 9.55903 & 9.25 & 0.309028 & 4.44097 \tabularnewline
13 & 8 & 8.57986 & 8.375 & 0.204861 & -0.579861 \tabularnewline
14 & 3 & 5.64236 & 7.875 & -2.23264 & -2.64236 \tabularnewline
15 & 5 & 7.18403 & 7.625 & -0.440972 & -2.18403 \tabularnewline
16 & 6 & 7.78819 & 7.45833 & 0.329861 & -1.78819 \tabularnewline
17 & 12 & 7.35069 & 7.58333 & -0.232639 & 4.64931 \tabularnewline
18 & 7 & 8.18403 & 7.33333 & 0.850694 & -1.18403 \tabularnewline
19 & 3 & 7.93403 & 7.25 & 0.684028 & -4.93403 \tabularnewline
20 & 11 & 8.56944 & 7.45833 & 1.11111 & 2.43056 \tabularnewline
21 & 6 & 9.51736 & 7.91667 & 1.60069 & -3.51736 \tabularnewline
22 & 9 & 8.22569 & 8.41667 & -0.190972 & 0.774306 \tabularnewline
23 & 6 & 6.46528 & 8.45833 & -1.99306 & -0.465278 \tabularnewline
24 & 10 & 8.97569 & 8.66667 & 0.309028 & 1.02431 \tabularnewline
25 & 10 & 9.41319 & 9.20833 & 0.204861 & 0.586806 \tabularnewline
26 & 6 & 7.22569 & 9.45833 & -2.23264 & -1.22569 \tabularnewline
27 & 13 & 9.35069 & 9.79167 & -0.440972 & 3.64931 \tabularnewline
28 & 10 & 10.4132 & 10.0833 & 0.329861 & -0.413194 \tabularnewline
29 & 9 & 9.85069 & 10.0833 & -0.232639 & -0.850694 \tabularnewline
30 & 15 & 10.809 & 9.95833 & 0.850694 & 4.19097 \tabularnewline
31 & 8 & 10.434 & 9.75 & 0.684028 & -2.43403 \tabularnewline
32 & 12 & 10.8194 & 9.70833 & 1.11111 & 1.18056 \tabularnewline
33 & 13 & 11.059 & 9.45833 & 1.60069 & 1.94097 \tabularnewline
34 & 9 & 8.89236 & 9.08333 & -0.190972 & 0.107639 \tabularnewline
35 & 6 & 6.75694 & 8.75 & -1.99306 & -0.756944 \tabularnewline
36 & 7 & 8.47569 & 8.16667 & 0.309028 & -1.47569 \tabularnewline
37 & 8 & 8.03819 & 7.83333 & 0.204861 & -0.0381944 \tabularnewline
38 & 7 & 5.43403 & 7.66667 & -2.23264 & 1.56597 \tabularnewline
39 & 6 & 6.80903 & 7.25 & -0.440972 & -0.809028 \tabularnewline
40 & 8 & 7.45486 & 7.125 & 0.329861 & 0.545139 \tabularnewline
41 & 3 & 7.05903 & 7.29167 & -0.232639 & -4.05903 \tabularnewline
42 & 7 & 8.10069 & 7.25 & 0.850694 & -1.10069 \tabularnewline
43 & 8 & 7.89236 & 7.20833 & 0.684028 & 0.107639 \tabularnewline
44 & 8 & 8.44444 & 7.33333 & 1.11111 & -0.444444 \tabularnewline
45 & 7 & 9.10069 & 7.5 & 1.60069 & -2.10069 \tabularnewline
46 & 12 & 7.51736 & 7.70833 & -0.190972 & 4.48264 \tabularnewline
47 & 7 & 6.09028 & 8.08333 & -1.99306 & 0.909722 \tabularnewline
48 & 5 & 8.68403 & 8.375 & 0.309028 & -3.68403 \tabularnewline
49 & 9 & 8.66319 & 8.45833 & 0.204861 & 0.336806 \tabularnewline
50 & 9 & 6.39236 & 8.625 & -2.23264 & 2.60764 \tabularnewline
51 & 8 & 8.35069 & 8.79167 & -0.440972 & -0.350694 \tabularnewline
52 & 11 & 9.03819 & 8.70833 & 0.329861 & 1.96181 \tabularnewline
53 & 9 & 8.43403 & 8.66667 & -0.232639 & 0.565972 \tabularnewline
54 & 8 & 9.60069 & 8.75 & 0.850694 & -1.60069 \tabularnewline
55 & 9 & NA & NA & 0.684028 & NA \tabularnewline
56 & 11 & NA & NA & 1.11111 & NA \tabularnewline
57 & 8 & NA & NA & 1.60069 & NA \tabularnewline
58 & 9 & NA & NA & -0.190972 & NA \tabularnewline
59 & 9 & NA & NA & -1.99306 & NA \tabularnewline
60 & 5 & NA & NA & 0.309028 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=294910&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]4[/C][C]NA[/C][C]NA[/C][C]0.204861[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]7[/C][C]NA[/C][C]NA[/C][C]-2.23264[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]9[/C][C]NA[/C][C]NA[/C][C]-0.440972[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]6[/C][C]NA[/C][C]NA[/C][C]0.329861[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]9[/C][C]NA[/C][C]NA[/C][C]-0.232639[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]13[/C][C]NA[/C][C]NA[/C][C]0.850694[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]18[/C][C]10.434[/C][C]9.75[/C][C]0.684028[/C][C]7.56597[/C][/ROW]
[ROW][C]8[/C][C]8[/C][C]10.8611[/C][C]9.75[/C][C]1.11111[/C][C]-2.86111[/C][/ROW]
[ROW][C]9[/C][C]15[/C][C]11.0174[/C][C]9.41667[/C][C]1.60069[/C][C]3.98264[/C][/ROW]
[ROW][C]10[/C][C]4[/C][C]9.05903[/C][C]9.25[/C][C]-0.190972[/C][C]-5.05903[/C][/ROW]
[ROW][C]11[/C][C]8[/C][C]7.38194[/C][C]9.375[/C][C]-1.99306[/C][C]0.618056[/C][/ROW]
[ROW][C]12[/C][C]14[/C][C]9.55903[/C][C]9.25[/C][C]0.309028[/C][C]4.44097[/C][/ROW]
[ROW][C]13[/C][C]8[/C][C]8.57986[/C][C]8.375[/C][C]0.204861[/C][C]-0.579861[/C][/ROW]
[ROW][C]14[/C][C]3[/C][C]5.64236[/C][C]7.875[/C][C]-2.23264[/C][C]-2.64236[/C][/ROW]
[ROW][C]15[/C][C]5[/C][C]7.18403[/C][C]7.625[/C][C]-0.440972[/C][C]-2.18403[/C][/ROW]
[ROW][C]16[/C][C]6[/C][C]7.78819[/C][C]7.45833[/C][C]0.329861[/C][C]-1.78819[/C][/ROW]
[ROW][C]17[/C][C]12[/C][C]7.35069[/C][C]7.58333[/C][C]-0.232639[/C][C]4.64931[/C][/ROW]
[ROW][C]18[/C][C]7[/C][C]8.18403[/C][C]7.33333[/C][C]0.850694[/C][C]-1.18403[/C][/ROW]
[ROW][C]19[/C][C]3[/C][C]7.93403[/C][C]7.25[/C][C]0.684028[/C][C]-4.93403[/C][/ROW]
[ROW][C]20[/C][C]11[/C][C]8.56944[/C][C]7.45833[/C][C]1.11111[/C][C]2.43056[/C][/ROW]
[ROW][C]21[/C][C]6[/C][C]9.51736[/C][C]7.91667[/C][C]1.60069[/C][C]-3.51736[/C][/ROW]
[ROW][C]22[/C][C]9[/C][C]8.22569[/C][C]8.41667[/C][C]-0.190972[/C][C]0.774306[/C][/ROW]
[ROW][C]23[/C][C]6[/C][C]6.46528[/C][C]8.45833[/C][C]-1.99306[/C][C]-0.465278[/C][/ROW]
[ROW][C]24[/C][C]10[/C][C]8.97569[/C][C]8.66667[/C][C]0.309028[/C][C]1.02431[/C][/ROW]
[ROW][C]25[/C][C]10[/C][C]9.41319[/C][C]9.20833[/C][C]0.204861[/C][C]0.586806[/C][/ROW]
[ROW][C]26[/C][C]6[/C][C]7.22569[/C][C]9.45833[/C][C]-2.23264[/C][C]-1.22569[/C][/ROW]
[ROW][C]27[/C][C]13[/C][C]9.35069[/C][C]9.79167[/C][C]-0.440972[/C][C]3.64931[/C][/ROW]
[ROW][C]28[/C][C]10[/C][C]10.4132[/C][C]10.0833[/C][C]0.329861[/C][C]-0.413194[/C][/ROW]
[ROW][C]29[/C][C]9[/C][C]9.85069[/C][C]10.0833[/C][C]-0.232639[/C][C]-0.850694[/C][/ROW]
[ROW][C]30[/C][C]15[/C][C]10.809[/C][C]9.95833[/C][C]0.850694[/C][C]4.19097[/C][/ROW]
[ROW][C]31[/C][C]8[/C][C]10.434[/C][C]9.75[/C][C]0.684028[/C][C]-2.43403[/C][/ROW]
[ROW][C]32[/C][C]12[/C][C]10.8194[/C][C]9.70833[/C][C]1.11111[/C][C]1.18056[/C][/ROW]
[ROW][C]33[/C][C]13[/C][C]11.059[/C][C]9.45833[/C][C]1.60069[/C][C]1.94097[/C][/ROW]
[ROW][C]34[/C][C]9[/C][C]8.89236[/C][C]9.08333[/C][C]-0.190972[/C][C]0.107639[/C][/ROW]
[ROW][C]35[/C][C]6[/C][C]6.75694[/C][C]8.75[/C][C]-1.99306[/C][C]-0.756944[/C][/ROW]
[ROW][C]36[/C][C]7[/C][C]8.47569[/C][C]8.16667[/C][C]0.309028[/C][C]-1.47569[/C][/ROW]
[ROW][C]37[/C][C]8[/C][C]8.03819[/C][C]7.83333[/C][C]0.204861[/C][C]-0.0381944[/C][/ROW]
[ROW][C]38[/C][C]7[/C][C]5.43403[/C][C]7.66667[/C][C]-2.23264[/C][C]1.56597[/C][/ROW]
[ROW][C]39[/C][C]6[/C][C]6.80903[/C][C]7.25[/C][C]-0.440972[/C][C]-0.809028[/C][/ROW]
[ROW][C]40[/C][C]8[/C][C]7.45486[/C][C]7.125[/C][C]0.329861[/C][C]0.545139[/C][/ROW]
[ROW][C]41[/C][C]3[/C][C]7.05903[/C][C]7.29167[/C][C]-0.232639[/C][C]-4.05903[/C][/ROW]
[ROW][C]42[/C][C]7[/C][C]8.10069[/C][C]7.25[/C][C]0.850694[/C][C]-1.10069[/C][/ROW]
[ROW][C]43[/C][C]8[/C][C]7.89236[/C][C]7.20833[/C][C]0.684028[/C][C]0.107639[/C][/ROW]
[ROW][C]44[/C][C]8[/C][C]8.44444[/C][C]7.33333[/C][C]1.11111[/C][C]-0.444444[/C][/ROW]
[ROW][C]45[/C][C]7[/C][C]9.10069[/C][C]7.5[/C][C]1.60069[/C][C]-2.10069[/C][/ROW]
[ROW][C]46[/C][C]12[/C][C]7.51736[/C][C]7.70833[/C][C]-0.190972[/C][C]4.48264[/C][/ROW]
[ROW][C]47[/C][C]7[/C][C]6.09028[/C][C]8.08333[/C][C]-1.99306[/C][C]0.909722[/C][/ROW]
[ROW][C]48[/C][C]5[/C][C]8.68403[/C][C]8.375[/C][C]0.309028[/C][C]-3.68403[/C][/ROW]
[ROW][C]49[/C][C]9[/C][C]8.66319[/C][C]8.45833[/C][C]0.204861[/C][C]0.336806[/C][/ROW]
[ROW][C]50[/C][C]9[/C][C]6.39236[/C][C]8.625[/C][C]-2.23264[/C][C]2.60764[/C][/ROW]
[ROW][C]51[/C][C]8[/C][C]8.35069[/C][C]8.79167[/C][C]-0.440972[/C][C]-0.350694[/C][/ROW]
[ROW][C]52[/C][C]11[/C][C]9.03819[/C][C]8.70833[/C][C]0.329861[/C][C]1.96181[/C][/ROW]
[ROW][C]53[/C][C]9[/C][C]8.43403[/C][C]8.66667[/C][C]-0.232639[/C][C]0.565972[/C][/ROW]
[ROW][C]54[/C][C]8[/C][C]9.60069[/C][C]8.75[/C][C]0.850694[/C][C]-1.60069[/C][/ROW]
[ROW][C]55[/C][C]9[/C][C]NA[/C][C]NA[/C][C]0.684028[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]11[/C][C]NA[/C][C]NA[/C][C]1.11111[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]8[/C][C]NA[/C][C]NA[/C][C]1.60069[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]9[/C][C]NA[/C][C]NA[/C][C]-0.190972[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]9[/C][C]NA[/C][C]NA[/C][C]-1.99306[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]5[/C][C]NA[/C][C]NA[/C][C]0.309028[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=294910&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=294910&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
14NANA0.204861NA
27NANA-2.23264NA
39NANA-0.440972NA
46NANA0.329861NA
59NANA-0.232639NA
613NANA0.850694NA
71810.4349.750.6840287.56597
8810.86119.751.11111-2.86111
91511.01749.416671.600693.98264
1049.059039.25-0.190972-5.05903
1187.381949.375-1.993060.618056
12149.559039.250.3090284.44097
1388.579868.3750.204861-0.579861
1435.642367.875-2.23264-2.64236
1557.184037.625-0.440972-2.18403
1667.788197.458330.329861-1.78819
17127.350697.58333-0.2326394.64931
1878.184037.333330.850694-1.18403
1937.934037.250.684028-4.93403
20118.569447.458331.111112.43056
2169.517367.916671.60069-3.51736
2298.225698.41667-0.1909720.774306
2366.465288.45833-1.99306-0.465278
24108.975698.666670.3090281.02431
25109.413199.208330.2048610.586806
2667.225699.45833-2.23264-1.22569
27139.350699.79167-0.4409723.64931
281010.413210.08330.329861-0.413194
2999.8506910.0833-0.232639-0.850694
301510.8099.958330.8506944.19097
31810.4349.750.684028-2.43403
321210.81949.708331.111111.18056
331311.0599.458331.600691.94097
3498.892369.08333-0.1909720.107639
3566.756948.75-1.99306-0.756944
3678.475698.166670.309028-1.47569
3788.038197.833330.204861-0.0381944
3875.434037.66667-2.232641.56597
3966.809037.25-0.440972-0.809028
4087.454867.1250.3298610.545139
4137.059037.29167-0.232639-4.05903
4278.100697.250.850694-1.10069
4387.892367.208330.6840280.107639
4488.444447.333331.11111-0.444444
4579.100697.51.60069-2.10069
46127.517367.70833-0.1909724.48264
4776.090288.08333-1.993060.909722
4858.684038.3750.309028-3.68403
4998.663198.458330.2048610.336806
5096.392368.625-2.232642.60764
5188.350698.79167-0.440972-0.350694
52119.038198.708330.3298611.96181
5398.434038.66667-0.2326390.565972
5489.600698.750.850694-1.60069
559NANA0.684028NA
5611NANA1.11111NA
578NANA1.60069NA
589NANA-0.190972NA
599NANA-1.99306NA
605NANA0.309028NA



Parameters (Session):
par1 = additive ; par2 = 12 ;
Parameters (R input):
par1 = additive ; par2 = 12 ;
R code (references can be found in the software module):
par2 <- '12'
par1 <- 'multiplicative'
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')