Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationTue, 03 Jan 2017 19:37:18 +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/2017/Jan/03/t1483472284yfs5iwykhozen5i.htm/, Retrieved Tue, 14 May 2024 13:00:16 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Tue, 14 May 2024 13:00:16 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
103.75
103.89
104.01
104.28
104.34
104.48
104.56
104.71
104.79
104.87
104.95
105
105.05
105.57
105.98
106.45
107.13
107.87
108.56
109.04
109.98
110.4
110.99
111.23
111.76
112.18
112.88
113.54
114.11
114.8
115.56
116.03
116.98
117.65
118.12
118.6
119.03
119.82
120.76
121.4
122.12
123.08
123.86
124.46
125.14
125.89
126.32
126.93
127.48
128.28
129.11
130.23
131.04
132.2
133.12
134.48
135.74
136.88
138.12
139.99




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gertrude Mary Cox' @ cox.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 & 'Gertrude Mary Cox' @ cox.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]'Gertrude Mary Cox' @ cox.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'Gertrude Mary Cox' @ cox.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1103.75NANA0.997282NA
2103.89NANA0.997532NA
3104.01NANA0.9983NA
4104.28NANA0.998849NA
5104.34NANA0.999064NA
6104.48NANA1.00058NA
7104.56104.742104.5231.002090.998261
8104.71104.798104.6481.001440.999157
9104.79105.087104.81.002740.997178
10104.87105.207104.9721.002240.996798
11104.95105.275105.1791.000920.99691
12105105.327105.4360.9989640.996895
13105.05105.457105.7440.9972820.996143
14105.57105.829106.0910.9975320.997548
15105.98106.307106.4880.99830.996925
16106.45106.811106.9350.9988490.996616
17107.13107.316107.4170.9990640.998266
18107.87107.991107.9281.000580.998883
19108.56108.694108.4671.002090.998766
20109.04109.179109.0221.001440.998725
21109.98109.885109.5851.002741.00086
22110.4110.414110.1681.002240.99987
23110.99110.856110.7541.000921.00121
24111.23111.218111.3340.9989641.0001
25111.76111.61111.9140.9972821.00134
26112.18112.219112.4970.9975320.999648
27112.88112.888113.080.99830.999931
28113.54113.543113.6740.9988490.999975
29114.11114.166114.2730.9990640.99951
30114.8114.944114.8771.000580.998749
31115.56115.729115.4871.002090.998541
32116.03116.276116.1081.001440.997887
33116.98117.075116.7551.002740.999191
34117.65117.673117.4111.002240.999801
35118.12118.181118.0721.000920.999488
36118.6118.628118.7510.9989640.999765
37119.03119.117119.4420.9972820.99927
38119.82119.842120.1390.9975320.999814
39120.76120.625120.830.99831.00112
40121.4121.373121.5130.9988491.00022
41122.12122.084122.1980.9990641.0003
42123.08122.958122.8871.000581.00099
43123.86123.845123.5861.002091.00012
44124.46124.47124.2911.001440.99992
45125.14125.334124.9911.002740.998456
46125.89125.988125.7071.002240.99922
47126.32126.563126.4471.000920.998082
48126.93127.067127.1980.9989640.998925
49127.48127.616127.9640.9972820.998932
50128.28128.45128.7670.9975320.998679
51129.11129.406129.6270.99830.99771
52130.23130.376130.5260.9988490.99888
53131.04131.353131.4760.9990640.997619
54132.2132.589132.5121.000580.997069
55133.12NANA1.00209NA
56134.48NANA1.00144NA
57135.74NANA1.00274NA
58136.88NANA1.00224NA
59138.12NANA1.00092NA
60139.99NANA0.998964NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 103.75 & NA & NA & 0.997282 & NA \tabularnewline
2 & 103.89 & NA & NA & 0.997532 & NA \tabularnewline
3 & 104.01 & NA & NA & 0.9983 & NA \tabularnewline
4 & 104.28 & NA & NA & 0.998849 & NA \tabularnewline
5 & 104.34 & NA & NA & 0.999064 & NA \tabularnewline
6 & 104.48 & NA & NA & 1.00058 & NA \tabularnewline
7 & 104.56 & 104.742 & 104.523 & 1.00209 & 0.998261 \tabularnewline
8 & 104.71 & 104.798 & 104.648 & 1.00144 & 0.999157 \tabularnewline
9 & 104.79 & 105.087 & 104.8 & 1.00274 & 0.997178 \tabularnewline
10 & 104.87 & 105.207 & 104.972 & 1.00224 & 0.996798 \tabularnewline
11 & 104.95 & 105.275 & 105.179 & 1.00092 & 0.99691 \tabularnewline
12 & 105 & 105.327 & 105.436 & 0.998964 & 0.996895 \tabularnewline
13 & 105.05 & 105.457 & 105.744 & 0.997282 & 0.996143 \tabularnewline
14 & 105.57 & 105.829 & 106.091 & 0.997532 & 0.997548 \tabularnewline
15 & 105.98 & 106.307 & 106.488 & 0.9983 & 0.996925 \tabularnewline
16 & 106.45 & 106.811 & 106.935 & 0.998849 & 0.996616 \tabularnewline
17 & 107.13 & 107.316 & 107.417 & 0.999064 & 0.998266 \tabularnewline
18 & 107.87 & 107.991 & 107.928 & 1.00058 & 0.998883 \tabularnewline
19 & 108.56 & 108.694 & 108.467 & 1.00209 & 0.998766 \tabularnewline
20 & 109.04 & 109.179 & 109.022 & 1.00144 & 0.998725 \tabularnewline
21 & 109.98 & 109.885 & 109.585 & 1.00274 & 1.00086 \tabularnewline
22 & 110.4 & 110.414 & 110.168 & 1.00224 & 0.99987 \tabularnewline
23 & 110.99 & 110.856 & 110.754 & 1.00092 & 1.00121 \tabularnewline
24 & 111.23 & 111.218 & 111.334 & 0.998964 & 1.0001 \tabularnewline
25 & 111.76 & 111.61 & 111.914 & 0.997282 & 1.00134 \tabularnewline
26 & 112.18 & 112.219 & 112.497 & 0.997532 & 0.999648 \tabularnewline
27 & 112.88 & 112.888 & 113.08 & 0.9983 & 0.999931 \tabularnewline
28 & 113.54 & 113.543 & 113.674 & 0.998849 & 0.999975 \tabularnewline
29 & 114.11 & 114.166 & 114.273 & 0.999064 & 0.99951 \tabularnewline
30 & 114.8 & 114.944 & 114.877 & 1.00058 & 0.998749 \tabularnewline
31 & 115.56 & 115.729 & 115.487 & 1.00209 & 0.998541 \tabularnewline
32 & 116.03 & 116.276 & 116.108 & 1.00144 & 0.997887 \tabularnewline
33 & 116.98 & 117.075 & 116.755 & 1.00274 & 0.999191 \tabularnewline
34 & 117.65 & 117.673 & 117.411 & 1.00224 & 0.999801 \tabularnewline
35 & 118.12 & 118.181 & 118.072 & 1.00092 & 0.999488 \tabularnewline
36 & 118.6 & 118.628 & 118.751 & 0.998964 & 0.999765 \tabularnewline
37 & 119.03 & 119.117 & 119.442 & 0.997282 & 0.99927 \tabularnewline
38 & 119.82 & 119.842 & 120.139 & 0.997532 & 0.999814 \tabularnewline
39 & 120.76 & 120.625 & 120.83 & 0.9983 & 1.00112 \tabularnewline
40 & 121.4 & 121.373 & 121.513 & 0.998849 & 1.00022 \tabularnewline
41 & 122.12 & 122.084 & 122.198 & 0.999064 & 1.0003 \tabularnewline
42 & 123.08 & 122.958 & 122.887 & 1.00058 & 1.00099 \tabularnewline
43 & 123.86 & 123.845 & 123.586 & 1.00209 & 1.00012 \tabularnewline
44 & 124.46 & 124.47 & 124.291 & 1.00144 & 0.99992 \tabularnewline
45 & 125.14 & 125.334 & 124.991 & 1.00274 & 0.998456 \tabularnewline
46 & 125.89 & 125.988 & 125.707 & 1.00224 & 0.99922 \tabularnewline
47 & 126.32 & 126.563 & 126.447 & 1.00092 & 0.998082 \tabularnewline
48 & 126.93 & 127.067 & 127.198 & 0.998964 & 0.998925 \tabularnewline
49 & 127.48 & 127.616 & 127.964 & 0.997282 & 0.998932 \tabularnewline
50 & 128.28 & 128.45 & 128.767 & 0.997532 & 0.998679 \tabularnewline
51 & 129.11 & 129.406 & 129.627 & 0.9983 & 0.99771 \tabularnewline
52 & 130.23 & 130.376 & 130.526 & 0.998849 & 0.99888 \tabularnewline
53 & 131.04 & 131.353 & 131.476 & 0.999064 & 0.997619 \tabularnewline
54 & 132.2 & 132.589 & 132.512 & 1.00058 & 0.997069 \tabularnewline
55 & 133.12 & NA & NA & 1.00209 & NA \tabularnewline
56 & 134.48 & NA & NA & 1.00144 & NA \tabularnewline
57 & 135.74 & NA & NA & 1.00274 & NA \tabularnewline
58 & 136.88 & NA & NA & 1.00224 & NA \tabularnewline
59 & 138.12 & NA & NA & 1.00092 & NA \tabularnewline
60 & 139.99 & NA & NA & 0.998964 & 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]103.75[/C][C]NA[/C][C]NA[/C][C]0.997282[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]103.89[/C][C]NA[/C][C]NA[/C][C]0.997532[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]104.01[/C][C]NA[/C][C]NA[/C][C]0.9983[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]104.28[/C][C]NA[/C][C]NA[/C][C]0.998849[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]104.34[/C][C]NA[/C][C]NA[/C][C]0.999064[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]104.48[/C][C]NA[/C][C]NA[/C][C]1.00058[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]104.56[/C][C]104.742[/C][C]104.523[/C][C]1.00209[/C][C]0.998261[/C][/ROW]
[ROW][C]8[/C][C]104.71[/C][C]104.798[/C][C]104.648[/C][C]1.00144[/C][C]0.999157[/C][/ROW]
[ROW][C]9[/C][C]104.79[/C][C]105.087[/C][C]104.8[/C][C]1.00274[/C][C]0.997178[/C][/ROW]
[ROW][C]10[/C][C]104.87[/C][C]105.207[/C][C]104.972[/C][C]1.00224[/C][C]0.996798[/C][/ROW]
[ROW][C]11[/C][C]104.95[/C][C]105.275[/C][C]105.179[/C][C]1.00092[/C][C]0.99691[/C][/ROW]
[ROW][C]12[/C][C]105[/C][C]105.327[/C][C]105.436[/C][C]0.998964[/C][C]0.996895[/C][/ROW]
[ROW][C]13[/C][C]105.05[/C][C]105.457[/C][C]105.744[/C][C]0.997282[/C][C]0.996143[/C][/ROW]
[ROW][C]14[/C][C]105.57[/C][C]105.829[/C][C]106.091[/C][C]0.997532[/C][C]0.997548[/C][/ROW]
[ROW][C]15[/C][C]105.98[/C][C]106.307[/C][C]106.488[/C][C]0.9983[/C][C]0.996925[/C][/ROW]
[ROW][C]16[/C][C]106.45[/C][C]106.811[/C][C]106.935[/C][C]0.998849[/C][C]0.996616[/C][/ROW]
[ROW][C]17[/C][C]107.13[/C][C]107.316[/C][C]107.417[/C][C]0.999064[/C][C]0.998266[/C][/ROW]
[ROW][C]18[/C][C]107.87[/C][C]107.991[/C][C]107.928[/C][C]1.00058[/C][C]0.998883[/C][/ROW]
[ROW][C]19[/C][C]108.56[/C][C]108.694[/C][C]108.467[/C][C]1.00209[/C][C]0.998766[/C][/ROW]
[ROW][C]20[/C][C]109.04[/C][C]109.179[/C][C]109.022[/C][C]1.00144[/C][C]0.998725[/C][/ROW]
[ROW][C]21[/C][C]109.98[/C][C]109.885[/C][C]109.585[/C][C]1.00274[/C][C]1.00086[/C][/ROW]
[ROW][C]22[/C][C]110.4[/C][C]110.414[/C][C]110.168[/C][C]1.00224[/C][C]0.99987[/C][/ROW]
[ROW][C]23[/C][C]110.99[/C][C]110.856[/C][C]110.754[/C][C]1.00092[/C][C]1.00121[/C][/ROW]
[ROW][C]24[/C][C]111.23[/C][C]111.218[/C][C]111.334[/C][C]0.998964[/C][C]1.0001[/C][/ROW]
[ROW][C]25[/C][C]111.76[/C][C]111.61[/C][C]111.914[/C][C]0.997282[/C][C]1.00134[/C][/ROW]
[ROW][C]26[/C][C]112.18[/C][C]112.219[/C][C]112.497[/C][C]0.997532[/C][C]0.999648[/C][/ROW]
[ROW][C]27[/C][C]112.88[/C][C]112.888[/C][C]113.08[/C][C]0.9983[/C][C]0.999931[/C][/ROW]
[ROW][C]28[/C][C]113.54[/C][C]113.543[/C][C]113.674[/C][C]0.998849[/C][C]0.999975[/C][/ROW]
[ROW][C]29[/C][C]114.11[/C][C]114.166[/C][C]114.273[/C][C]0.999064[/C][C]0.99951[/C][/ROW]
[ROW][C]30[/C][C]114.8[/C][C]114.944[/C][C]114.877[/C][C]1.00058[/C][C]0.998749[/C][/ROW]
[ROW][C]31[/C][C]115.56[/C][C]115.729[/C][C]115.487[/C][C]1.00209[/C][C]0.998541[/C][/ROW]
[ROW][C]32[/C][C]116.03[/C][C]116.276[/C][C]116.108[/C][C]1.00144[/C][C]0.997887[/C][/ROW]
[ROW][C]33[/C][C]116.98[/C][C]117.075[/C][C]116.755[/C][C]1.00274[/C][C]0.999191[/C][/ROW]
[ROW][C]34[/C][C]117.65[/C][C]117.673[/C][C]117.411[/C][C]1.00224[/C][C]0.999801[/C][/ROW]
[ROW][C]35[/C][C]118.12[/C][C]118.181[/C][C]118.072[/C][C]1.00092[/C][C]0.999488[/C][/ROW]
[ROW][C]36[/C][C]118.6[/C][C]118.628[/C][C]118.751[/C][C]0.998964[/C][C]0.999765[/C][/ROW]
[ROW][C]37[/C][C]119.03[/C][C]119.117[/C][C]119.442[/C][C]0.997282[/C][C]0.99927[/C][/ROW]
[ROW][C]38[/C][C]119.82[/C][C]119.842[/C][C]120.139[/C][C]0.997532[/C][C]0.999814[/C][/ROW]
[ROW][C]39[/C][C]120.76[/C][C]120.625[/C][C]120.83[/C][C]0.9983[/C][C]1.00112[/C][/ROW]
[ROW][C]40[/C][C]121.4[/C][C]121.373[/C][C]121.513[/C][C]0.998849[/C][C]1.00022[/C][/ROW]
[ROW][C]41[/C][C]122.12[/C][C]122.084[/C][C]122.198[/C][C]0.999064[/C][C]1.0003[/C][/ROW]
[ROW][C]42[/C][C]123.08[/C][C]122.958[/C][C]122.887[/C][C]1.00058[/C][C]1.00099[/C][/ROW]
[ROW][C]43[/C][C]123.86[/C][C]123.845[/C][C]123.586[/C][C]1.00209[/C][C]1.00012[/C][/ROW]
[ROW][C]44[/C][C]124.46[/C][C]124.47[/C][C]124.291[/C][C]1.00144[/C][C]0.99992[/C][/ROW]
[ROW][C]45[/C][C]125.14[/C][C]125.334[/C][C]124.991[/C][C]1.00274[/C][C]0.998456[/C][/ROW]
[ROW][C]46[/C][C]125.89[/C][C]125.988[/C][C]125.707[/C][C]1.00224[/C][C]0.99922[/C][/ROW]
[ROW][C]47[/C][C]126.32[/C][C]126.563[/C][C]126.447[/C][C]1.00092[/C][C]0.998082[/C][/ROW]
[ROW][C]48[/C][C]126.93[/C][C]127.067[/C][C]127.198[/C][C]0.998964[/C][C]0.998925[/C][/ROW]
[ROW][C]49[/C][C]127.48[/C][C]127.616[/C][C]127.964[/C][C]0.997282[/C][C]0.998932[/C][/ROW]
[ROW][C]50[/C][C]128.28[/C][C]128.45[/C][C]128.767[/C][C]0.997532[/C][C]0.998679[/C][/ROW]
[ROW][C]51[/C][C]129.11[/C][C]129.406[/C][C]129.627[/C][C]0.9983[/C][C]0.99771[/C][/ROW]
[ROW][C]52[/C][C]130.23[/C][C]130.376[/C][C]130.526[/C][C]0.998849[/C][C]0.99888[/C][/ROW]
[ROW][C]53[/C][C]131.04[/C][C]131.353[/C][C]131.476[/C][C]0.999064[/C][C]0.997619[/C][/ROW]
[ROW][C]54[/C][C]132.2[/C][C]132.589[/C][C]132.512[/C][C]1.00058[/C][C]0.997069[/C][/ROW]
[ROW][C]55[/C][C]133.12[/C][C]NA[/C][C]NA[/C][C]1.00209[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]134.48[/C][C]NA[/C][C]NA[/C][C]1.00144[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]135.74[/C][C]NA[/C][C]NA[/C][C]1.00274[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]136.88[/C][C]NA[/C][C]NA[/C][C]1.00224[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]138.12[/C][C]NA[/C][C]NA[/C][C]1.00092[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]139.99[/C][C]NA[/C][C]NA[/C][C]0.998964[/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
1103.75NANA0.997282NA
2103.89NANA0.997532NA
3104.01NANA0.9983NA
4104.28NANA0.998849NA
5104.34NANA0.999064NA
6104.48NANA1.00058NA
7104.56104.742104.5231.002090.998261
8104.71104.798104.6481.001440.999157
9104.79105.087104.81.002740.997178
10104.87105.207104.9721.002240.996798
11104.95105.275105.1791.000920.99691
12105105.327105.4360.9989640.996895
13105.05105.457105.7440.9972820.996143
14105.57105.829106.0910.9975320.997548
15105.98106.307106.4880.99830.996925
16106.45106.811106.9350.9988490.996616
17107.13107.316107.4170.9990640.998266
18107.87107.991107.9281.000580.998883
19108.56108.694108.4671.002090.998766
20109.04109.179109.0221.001440.998725
21109.98109.885109.5851.002741.00086
22110.4110.414110.1681.002240.99987
23110.99110.856110.7541.000921.00121
24111.23111.218111.3340.9989641.0001
25111.76111.61111.9140.9972821.00134
26112.18112.219112.4970.9975320.999648
27112.88112.888113.080.99830.999931
28113.54113.543113.6740.9988490.999975
29114.11114.166114.2730.9990640.99951
30114.8114.944114.8771.000580.998749
31115.56115.729115.4871.002090.998541
32116.03116.276116.1081.001440.997887
33116.98117.075116.7551.002740.999191
34117.65117.673117.4111.002240.999801
35118.12118.181118.0721.000920.999488
36118.6118.628118.7510.9989640.999765
37119.03119.117119.4420.9972820.99927
38119.82119.842120.1390.9975320.999814
39120.76120.625120.830.99831.00112
40121.4121.373121.5130.9988491.00022
41122.12122.084122.1980.9990641.0003
42123.08122.958122.8871.000581.00099
43123.86123.845123.5861.002091.00012
44124.46124.47124.2911.001440.99992
45125.14125.334124.9911.002740.998456
46125.89125.988125.7071.002240.99922
47126.32126.563126.4471.000920.998082
48126.93127.067127.1980.9989640.998925
49127.48127.616127.9640.9972820.998932
50128.28128.45128.7670.9975320.998679
51129.11129.406129.6270.99830.99771
52130.23130.376130.5260.9988490.99888
53131.04131.353131.4760.9990640.997619
54132.2132.589132.5121.000580.997069
55133.12NANA1.00209NA
56134.48NANA1.00144NA
57135.74NANA1.00274NA
58136.88NANA1.00224NA
59138.12NANA1.00092NA
60139.99NANA0.998964NA



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