Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationMon, 12 May 2014 06:39:50 -0400
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2014/May/12/t1399891202ilfpoo83xk4h3z0.htm/, Retrieved Wed, 15 May 2024 08:55:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=234806, Retrieved Wed, 15 May 2024 08:55:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact131
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [] [2014-05-12 10:39:50] [a9350bbdd7016e8c1644512486dec5d2] [Current]
Feedback Forum

Post a new message
Dataseries X:
99,7
107,5
107,5
114,5
118,7
117,8
111,7
112,3
104,9
102,4
100,3
106,6
94,2
96,9
94,7
104,9
108,3
104,7
108,3
105,2
99,2
99,3
92,3
98,6
88,4
89,5
90,5
103,5
105,1
107,1
111,6
104,6
103,3
104,6
94,1
97,7
92,4
89,5
100,1
109,6
105,5
108,9
108,8
103,9
104,3
102,1
96,6
101,4
90,4
91,8
100,4
105,3
105,1
107,6
103,7
102,7
99,2
95,6
96,3
104,1




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ jenkins.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 & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=234806&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=234806&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=234806&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 time3 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
199.7NANA0.902241NA
2107.5NANA0.909529NA
3107.5NANA0.955615NA
4114.5NANA1.05021NA
5118.7NANA1.05314NA
6117.8NANA1.06456NA
7111.7116.477108.4291.074220.958988
8112.3112.17107.7581.040941.00116
9104.9107.699106.7831.008580.974008
10102.4106.087105.851.002240.965244
11100.398.9593105.0170.942321.01355
12106.6103.663104.0380.9964031.02833
1394.293.2466103.350.9022411.01022
1496.993.6019102.9120.9095291.03523
1594.797.8351102.3790.9556150.967955
16104.9107.135102.0121.050210.979139
17108.3106.946101.551.053141.01266
18104.7107.397100.8831.064560.974889
19108.3107.753100.3081.074221.00507
20105.2103.84299.75831.040941.01308
2199.2100.12799.2751.008580.990746
2299.399.263699.04171.002241.00037
2392.393.148398.850.942320.990893
2498.698.461298.81670.9964031.00141
2588.489.370799.05420.9022410.989138
2689.590.19599.16670.9095290.992295
2790.594.904599.31250.9556150.95359
28103.5104.71199.70421.050210.988438
29105.1105.3141001.053140.997971
30107.1106.496100.0371.064561.00567
31111.6107.601100.1671.074221.03716
32104.6104.441100.3331.040941.00153
33103.3101.597100.7331.008581.01676
34104.6101.615101.3871.002241.02938
3594.195.7947101.6580.942320.982309
3697.7101.384101.750.9964030.963663
3792.491.7654101.7080.9022411.00692
3889.592.3741101.5630.9095290.968887
39100.197.0666101.5750.9556151.03125
40109.6106.61101.5121.050211.02805
41105.5106.907101.5121.053140.986843
42108.9108.342101.7711.064561.00515
43108.8109.4101.8421.074220.994511
44103.9106.024101.8541.040940.97997
45104.3102.837101.9621.008581.01422
46102.1102.024101.7961.002241.00075
4796.695.7397101.60.942321.00899
48101.4101.164101.5290.9964031.00233
4990.491.3632101.2620.9022410.989458
5091.891.86251010.9095290.99932
51100.496.2663100.7370.9556151.04294
52105.3105.288100.2541.050211.00011
53105.1105.28399.97081.053140.998262
54107.6106.532100.0711.064561.01003
55103.7NANA1.07422NA
56102.7NANA1.04094NA
5799.2NANA1.00858NA
5895.6NANA1.00224NA
5996.3NANA0.94232NA
60104.1NANA0.996403NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 99.7 & NA & NA & 0.902241 & NA \tabularnewline
2 & 107.5 & NA & NA & 0.909529 & NA \tabularnewline
3 & 107.5 & NA & NA & 0.955615 & NA \tabularnewline
4 & 114.5 & NA & NA & 1.05021 & NA \tabularnewline
5 & 118.7 & NA & NA & 1.05314 & NA \tabularnewline
6 & 117.8 & NA & NA & 1.06456 & NA \tabularnewline
7 & 111.7 & 116.477 & 108.429 & 1.07422 & 0.958988 \tabularnewline
8 & 112.3 & 112.17 & 107.758 & 1.04094 & 1.00116 \tabularnewline
9 & 104.9 & 107.699 & 106.783 & 1.00858 & 0.974008 \tabularnewline
10 & 102.4 & 106.087 & 105.85 & 1.00224 & 0.965244 \tabularnewline
11 & 100.3 & 98.9593 & 105.017 & 0.94232 & 1.01355 \tabularnewline
12 & 106.6 & 103.663 & 104.038 & 0.996403 & 1.02833 \tabularnewline
13 & 94.2 & 93.2466 & 103.35 & 0.902241 & 1.01022 \tabularnewline
14 & 96.9 & 93.6019 & 102.912 & 0.909529 & 1.03523 \tabularnewline
15 & 94.7 & 97.8351 & 102.379 & 0.955615 & 0.967955 \tabularnewline
16 & 104.9 & 107.135 & 102.012 & 1.05021 & 0.979139 \tabularnewline
17 & 108.3 & 106.946 & 101.55 & 1.05314 & 1.01266 \tabularnewline
18 & 104.7 & 107.397 & 100.883 & 1.06456 & 0.974889 \tabularnewline
19 & 108.3 & 107.753 & 100.308 & 1.07422 & 1.00507 \tabularnewline
20 & 105.2 & 103.842 & 99.7583 & 1.04094 & 1.01308 \tabularnewline
21 & 99.2 & 100.127 & 99.275 & 1.00858 & 0.990746 \tabularnewline
22 & 99.3 & 99.2636 & 99.0417 & 1.00224 & 1.00037 \tabularnewline
23 & 92.3 & 93.1483 & 98.85 & 0.94232 & 0.990893 \tabularnewline
24 & 98.6 & 98.4612 & 98.8167 & 0.996403 & 1.00141 \tabularnewline
25 & 88.4 & 89.3707 & 99.0542 & 0.902241 & 0.989138 \tabularnewline
26 & 89.5 & 90.195 & 99.1667 & 0.909529 & 0.992295 \tabularnewline
27 & 90.5 & 94.9045 & 99.3125 & 0.955615 & 0.95359 \tabularnewline
28 & 103.5 & 104.711 & 99.7042 & 1.05021 & 0.988438 \tabularnewline
29 & 105.1 & 105.314 & 100 & 1.05314 & 0.997971 \tabularnewline
30 & 107.1 & 106.496 & 100.037 & 1.06456 & 1.00567 \tabularnewline
31 & 111.6 & 107.601 & 100.167 & 1.07422 & 1.03716 \tabularnewline
32 & 104.6 & 104.441 & 100.333 & 1.04094 & 1.00153 \tabularnewline
33 & 103.3 & 101.597 & 100.733 & 1.00858 & 1.01676 \tabularnewline
34 & 104.6 & 101.615 & 101.387 & 1.00224 & 1.02938 \tabularnewline
35 & 94.1 & 95.7947 & 101.658 & 0.94232 & 0.982309 \tabularnewline
36 & 97.7 & 101.384 & 101.75 & 0.996403 & 0.963663 \tabularnewline
37 & 92.4 & 91.7654 & 101.708 & 0.902241 & 1.00692 \tabularnewline
38 & 89.5 & 92.3741 & 101.563 & 0.909529 & 0.968887 \tabularnewline
39 & 100.1 & 97.0666 & 101.575 & 0.955615 & 1.03125 \tabularnewline
40 & 109.6 & 106.61 & 101.512 & 1.05021 & 1.02805 \tabularnewline
41 & 105.5 & 106.907 & 101.512 & 1.05314 & 0.986843 \tabularnewline
42 & 108.9 & 108.342 & 101.771 & 1.06456 & 1.00515 \tabularnewline
43 & 108.8 & 109.4 & 101.842 & 1.07422 & 0.994511 \tabularnewline
44 & 103.9 & 106.024 & 101.854 & 1.04094 & 0.97997 \tabularnewline
45 & 104.3 & 102.837 & 101.962 & 1.00858 & 1.01422 \tabularnewline
46 & 102.1 & 102.024 & 101.796 & 1.00224 & 1.00075 \tabularnewline
47 & 96.6 & 95.7397 & 101.6 & 0.94232 & 1.00899 \tabularnewline
48 & 101.4 & 101.164 & 101.529 & 0.996403 & 1.00233 \tabularnewline
49 & 90.4 & 91.3632 & 101.262 & 0.902241 & 0.989458 \tabularnewline
50 & 91.8 & 91.8625 & 101 & 0.909529 & 0.99932 \tabularnewline
51 & 100.4 & 96.2663 & 100.737 & 0.955615 & 1.04294 \tabularnewline
52 & 105.3 & 105.288 & 100.254 & 1.05021 & 1.00011 \tabularnewline
53 & 105.1 & 105.283 & 99.9708 & 1.05314 & 0.998262 \tabularnewline
54 & 107.6 & 106.532 & 100.071 & 1.06456 & 1.01003 \tabularnewline
55 & 103.7 & NA & NA & 1.07422 & NA \tabularnewline
56 & 102.7 & NA & NA & 1.04094 & NA \tabularnewline
57 & 99.2 & NA & NA & 1.00858 & NA \tabularnewline
58 & 95.6 & NA & NA & 1.00224 & NA \tabularnewline
59 & 96.3 & NA & NA & 0.94232 & NA \tabularnewline
60 & 104.1 & NA & NA & 0.996403 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=234806&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]99.7[/C][C]NA[/C][C]NA[/C][C]0.902241[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]107.5[/C][C]NA[/C][C]NA[/C][C]0.909529[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]107.5[/C][C]NA[/C][C]NA[/C][C]0.955615[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]114.5[/C][C]NA[/C][C]NA[/C][C]1.05021[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]118.7[/C][C]NA[/C][C]NA[/C][C]1.05314[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]117.8[/C][C]NA[/C][C]NA[/C][C]1.06456[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]111.7[/C][C]116.477[/C][C]108.429[/C][C]1.07422[/C][C]0.958988[/C][/ROW]
[ROW][C]8[/C][C]112.3[/C][C]112.17[/C][C]107.758[/C][C]1.04094[/C][C]1.00116[/C][/ROW]
[ROW][C]9[/C][C]104.9[/C][C]107.699[/C][C]106.783[/C][C]1.00858[/C][C]0.974008[/C][/ROW]
[ROW][C]10[/C][C]102.4[/C][C]106.087[/C][C]105.85[/C][C]1.00224[/C][C]0.965244[/C][/ROW]
[ROW][C]11[/C][C]100.3[/C][C]98.9593[/C][C]105.017[/C][C]0.94232[/C][C]1.01355[/C][/ROW]
[ROW][C]12[/C][C]106.6[/C][C]103.663[/C][C]104.038[/C][C]0.996403[/C][C]1.02833[/C][/ROW]
[ROW][C]13[/C][C]94.2[/C][C]93.2466[/C][C]103.35[/C][C]0.902241[/C][C]1.01022[/C][/ROW]
[ROW][C]14[/C][C]96.9[/C][C]93.6019[/C][C]102.912[/C][C]0.909529[/C][C]1.03523[/C][/ROW]
[ROW][C]15[/C][C]94.7[/C][C]97.8351[/C][C]102.379[/C][C]0.955615[/C][C]0.967955[/C][/ROW]
[ROW][C]16[/C][C]104.9[/C][C]107.135[/C][C]102.012[/C][C]1.05021[/C][C]0.979139[/C][/ROW]
[ROW][C]17[/C][C]108.3[/C][C]106.946[/C][C]101.55[/C][C]1.05314[/C][C]1.01266[/C][/ROW]
[ROW][C]18[/C][C]104.7[/C][C]107.397[/C][C]100.883[/C][C]1.06456[/C][C]0.974889[/C][/ROW]
[ROW][C]19[/C][C]108.3[/C][C]107.753[/C][C]100.308[/C][C]1.07422[/C][C]1.00507[/C][/ROW]
[ROW][C]20[/C][C]105.2[/C][C]103.842[/C][C]99.7583[/C][C]1.04094[/C][C]1.01308[/C][/ROW]
[ROW][C]21[/C][C]99.2[/C][C]100.127[/C][C]99.275[/C][C]1.00858[/C][C]0.990746[/C][/ROW]
[ROW][C]22[/C][C]99.3[/C][C]99.2636[/C][C]99.0417[/C][C]1.00224[/C][C]1.00037[/C][/ROW]
[ROW][C]23[/C][C]92.3[/C][C]93.1483[/C][C]98.85[/C][C]0.94232[/C][C]0.990893[/C][/ROW]
[ROW][C]24[/C][C]98.6[/C][C]98.4612[/C][C]98.8167[/C][C]0.996403[/C][C]1.00141[/C][/ROW]
[ROW][C]25[/C][C]88.4[/C][C]89.3707[/C][C]99.0542[/C][C]0.902241[/C][C]0.989138[/C][/ROW]
[ROW][C]26[/C][C]89.5[/C][C]90.195[/C][C]99.1667[/C][C]0.909529[/C][C]0.992295[/C][/ROW]
[ROW][C]27[/C][C]90.5[/C][C]94.9045[/C][C]99.3125[/C][C]0.955615[/C][C]0.95359[/C][/ROW]
[ROW][C]28[/C][C]103.5[/C][C]104.711[/C][C]99.7042[/C][C]1.05021[/C][C]0.988438[/C][/ROW]
[ROW][C]29[/C][C]105.1[/C][C]105.314[/C][C]100[/C][C]1.05314[/C][C]0.997971[/C][/ROW]
[ROW][C]30[/C][C]107.1[/C][C]106.496[/C][C]100.037[/C][C]1.06456[/C][C]1.00567[/C][/ROW]
[ROW][C]31[/C][C]111.6[/C][C]107.601[/C][C]100.167[/C][C]1.07422[/C][C]1.03716[/C][/ROW]
[ROW][C]32[/C][C]104.6[/C][C]104.441[/C][C]100.333[/C][C]1.04094[/C][C]1.00153[/C][/ROW]
[ROW][C]33[/C][C]103.3[/C][C]101.597[/C][C]100.733[/C][C]1.00858[/C][C]1.01676[/C][/ROW]
[ROW][C]34[/C][C]104.6[/C][C]101.615[/C][C]101.387[/C][C]1.00224[/C][C]1.02938[/C][/ROW]
[ROW][C]35[/C][C]94.1[/C][C]95.7947[/C][C]101.658[/C][C]0.94232[/C][C]0.982309[/C][/ROW]
[ROW][C]36[/C][C]97.7[/C][C]101.384[/C][C]101.75[/C][C]0.996403[/C][C]0.963663[/C][/ROW]
[ROW][C]37[/C][C]92.4[/C][C]91.7654[/C][C]101.708[/C][C]0.902241[/C][C]1.00692[/C][/ROW]
[ROW][C]38[/C][C]89.5[/C][C]92.3741[/C][C]101.563[/C][C]0.909529[/C][C]0.968887[/C][/ROW]
[ROW][C]39[/C][C]100.1[/C][C]97.0666[/C][C]101.575[/C][C]0.955615[/C][C]1.03125[/C][/ROW]
[ROW][C]40[/C][C]109.6[/C][C]106.61[/C][C]101.512[/C][C]1.05021[/C][C]1.02805[/C][/ROW]
[ROW][C]41[/C][C]105.5[/C][C]106.907[/C][C]101.512[/C][C]1.05314[/C][C]0.986843[/C][/ROW]
[ROW][C]42[/C][C]108.9[/C][C]108.342[/C][C]101.771[/C][C]1.06456[/C][C]1.00515[/C][/ROW]
[ROW][C]43[/C][C]108.8[/C][C]109.4[/C][C]101.842[/C][C]1.07422[/C][C]0.994511[/C][/ROW]
[ROW][C]44[/C][C]103.9[/C][C]106.024[/C][C]101.854[/C][C]1.04094[/C][C]0.97997[/C][/ROW]
[ROW][C]45[/C][C]104.3[/C][C]102.837[/C][C]101.962[/C][C]1.00858[/C][C]1.01422[/C][/ROW]
[ROW][C]46[/C][C]102.1[/C][C]102.024[/C][C]101.796[/C][C]1.00224[/C][C]1.00075[/C][/ROW]
[ROW][C]47[/C][C]96.6[/C][C]95.7397[/C][C]101.6[/C][C]0.94232[/C][C]1.00899[/C][/ROW]
[ROW][C]48[/C][C]101.4[/C][C]101.164[/C][C]101.529[/C][C]0.996403[/C][C]1.00233[/C][/ROW]
[ROW][C]49[/C][C]90.4[/C][C]91.3632[/C][C]101.262[/C][C]0.902241[/C][C]0.989458[/C][/ROW]
[ROW][C]50[/C][C]91.8[/C][C]91.8625[/C][C]101[/C][C]0.909529[/C][C]0.99932[/C][/ROW]
[ROW][C]51[/C][C]100.4[/C][C]96.2663[/C][C]100.737[/C][C]0.955615[/C][C]1.04294[/C][/ROW]
[ROW][C]52[/C][C]105.3[/C][C]105.288[/C][C]100.254[/C][C]1.05021[/C][C]1.00011[/C][/ROW]
[ROW][C]53[/C][C]105.1[/C][C]105.283[/C][C]99.9708[/C][C]1.05314[/C][C]0.998262[/C][/ROW]
[ROW][C]54[/C][C]107.6[/C][C]106.532[/C][C]100.071[/C][C]1.06456[/C][C]1.01003[/C][/ROW]
[ROW][C]55[/C][C]103.7[/C][C]NA[/C][C]NA[/C][C]1.07422[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]102.7[/C][C]NA[/C][C]NA[/C][C]1.04094[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]99.2[/C][C]NA[/C][C]NA[/C][C]1.00858[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]95.6[/C][C]NA[/C][C]NA[/C][C]1.00224[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]96.3[/C][C]NA[/C][C]NA[/C][C]0.94232[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]104.1[/C][C]NA[/C][C]NA[/C][C]0.996403[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=234806&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=234806&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
199.7NANA0.902241NA
2107.5NANA0.909529NA
3107.5NANA0.955615NA
4114.5NANA1.05021NA
5118.7NANA1.05314NA
6117.8NANA1.06456NA
7111.7116.477108.4291.074220.958988
8112.3112.17107.7581.040941.00116
9104.9107.699106.7831.008580.974008
10102.4106.087105.851.002240.965244
11100.398.9593105.0170.942321.01355
12106.6103.663104.0380.9964031.02833
1394.293.2466103.350.9022411.01022
1496.993.6019102.9120.9095291.03523
1594.797.8351102.3790.9556150.967955
16104.9107.135102.0121.050210.979139
17108.3106.946101.551.053141.01266
18104.7107.397100.8831.064560.974889
19108.3107.753100.3081.074221.00507
20105.2103.84299.75831.040941.01308
2199.2100.12799.2751.008580.990746
2299.399.263699.04171.002241.00037
2392.393.148398.850.942320.990893
2498.698.461298.81670.9964031.00141
2588.489.370799.05420.9022410.989138
2689.590.19599.16670.9095290.992295
2790.594.904599.31250.9556150.95359
28103.5104.71199.70421.050210.988438
29105.1105.3141001.053140.997971
30107.1106.496100.0371.064561.00567
31111.6107.601100.1671.074221.03716
32104.6104.441100.3331.040941.00153
33103.3101.597100.7331.008581.01676
34104.6101.615101.3871.002241.02938
3594.195.7947101.6580.942320.982309
3697.7101.384101.750.9964030.963663
3792.491.7654101.7080.9022411.00692
3889.592.3741101.5630.9095290.968887
39100.197.0666101.5750.9556151.03125
40109.6106.61101.5121.050211.02805
41105.5106.907101.5121.053140.986843
42108.9108.342101.7711.064561.00515
43108.8109.4101.8421.074220.994511
44103.9106.024101.8541.040940.97997
45104.3102.837101.9621.008581.01422
46102.1102.024101.7961.002241.00075
4796.695.7397101.60.942321.00899
48101.4101.164101.5290.9964031.00233
4990.491.3632101.2620.9022410.989458
5091.891.86251010.9095290.99932
51100.496.2663100.7370.9556151.04294
52105.3105.288100.2541.050211.00011
53105.1105.28399.97081.053140.998262
54107.6106.532100.0711.064561.01003
55103.7NANA1.07422NA
56102.7NANA1.04094NA
5799.2NANA1.00858NA
5895.6NANA1.00224NA
5996.3NANA0.94232NA
60104.1NANA0.996403NA



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