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 computationFri, 16 Dec 2016 10:18:39 +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/Dec/16/t14818800331wzq4rvl9rntgw9.htm/, Retrieved Fri, 01 Nov 2024 03:34:30 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=300161, Retrieved Fri, 01 Nov 2024 03:34:30 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact80
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [Classical Decompo...] [2016-12-16 09:18:39] [f9bc84b6ee189f10a7b2ad2152f37fb9] [Current]
Feedback Forum

Post a new message
Dataseries X:
9137.8
9009.4
8926.6
9145
9186.2
9152.2
9093.6
9199.2
9310.6
9282
9248.4
9341.6
9478.8
9438
9374.6
9488.8
9631.8
9588.4
9514.6
9623.2
9744.6
9685.8
9598
9703.4
9817.8
9762.6
9669.6
9789.2
9917.4
9864.4
9779.2
9898.8
10048.8
9983.4
9913.4
10031.6
10184.6
10125
10065.4
10188.6
10350.4
10320.6
10232.6
10357.2
10520.2
10473.8
10407
10536
10700.2
10664.2
10606
10716.6
10882.8
10849.4
10794
10907.8




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time2 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300161&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]2 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=300161&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300161&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
19137.8NANA91.6038NA
29009.4NANA11.7442NA
38926.68965.159060.75-95.6-38.55
491459076.99084.65-7.7480868.0981
59186.29214.989123.3891.6038-28.7788
69152.29162.779151.0311.7442-10.5692
79093.69077.759173.35-95.615.85
89199.29197.389205.12-7.748081.82308
99310.69332.39240.791.6038-21.7038
1092829289.599277.8511.7442-7.59423
119248.49221.089316.68-95.627.325
129341.69349.459357.2-7.74808-7.85192
139478.89484.089392.4791.6038-5.27885
1494389438.399426.6511.7442-0.394231
159374.69368.589464.18-95.66.025
169488.89494.359502.1-7.74808-5.55192
179631.896309538.491.60381.79615
189588.49584.449572.711.74423.95577
199514.695089603.6-95.66.6
209623.29622.139629.88-7.748081.07308
219744.69744.089652.4891.60380.521154
229685.89684.679672.9211.74421.13077
2395989596.59692.1-95.61.5
249703.49703.19710.85-7.748080.298077
259817.898219729.491.6038-3.20385
269762.69760.829749.0811.74421.78077
279669.69676.659772.25-95.6-7.05
289789.29789.689797.43-7.74808-0.476923
299917.49915.459823.8591.60381.94615
309864.49862.999851.2511.74421.40577
319779.29785.789881.38-95.6-6.575
329898.89904.939912.67-7.74808-6.12692
3310048.810035.99944.3291.603812.8712
349983.49989.449977.711.7442-6.04423
359913.49915.6810011.3-95.6-2.275
3610031.610038.210045.9-7.74808-6.60192
3710184.610174.310082.691.603810.3462
38101251013310121.311.7442-8.01923
3910065.41006610161.6-95.6-0.625
4010188.610199.110206.8-7.74808-10.4519
4110350.410343.810252.291.60386.64615
4210320.610305.910294.111.744214.7308
4310232.610240.810336.4-95.6-8.225
4410357.210369.110376.8-7.74808-11.8519
4510520.210509.410417.891.603810.8462
4610473.810473.610461.911.74420.155769
471040710411.110506.7-95.6-4.15
481053610545.310553.1-7.74808-9.30192
4910700.210693.310601.791.60386.87115
5010664.210660.910649.211.74423.28077
51106061059910694.6-95.67.025
5210716.610732.810740.6-7.74808-16.2019
5310882.810878.810787.291.60383.99615
5410849.410846.310834.611.74423.05577
5510794NANA-95.6NA
5610907.8NANA-7.74808NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 9137.8 & NA & NA & 91.6038 & NA \tabularnewline
2 & 9009.4 & NA & NA & 11.7442 & NA \tabularnewline
3 & 8926.6 & 8965.15 & 9060.75 & -95.6 & -38.55 \tabularnewline
4 & 9145 & 9076.9 & 9084.65 & -7.74808 & 68.0981 \tabularnewline
5 & 9186.2 & 9214.98 & 9123.38 & 91.6038 & -28.7788 \tabularnewline
6 & 9152.2 & 9162.77 & 9151.03 & 11.7442 & -10.5692 \tabularnewline
7 & 9093.6 & 9077.75 & 9173.35 & -95.6 & 15.85 \tabularnewline
8 & 9199.2 & 9197.38 & 9205.12 & -7.74808 & 1.82308 \tabularnewline
9 & 9310.6 & 9332.3 & 9240.7 & 91.6038 & -21.7038 \tabularnewline
10 & 9282 & 9289.59 & 9277.85 & 11.7442 & -7.59423 \tabularnewline
11 & 9248.4 & 9221.08 & 9316.68 & -95.6 & 27.325 \tabularnewline
12 & 9341.6 & 9349.45 & 9357.2 & -7.74808 & -7.85192 \tabularnewline
13 & 9478.8 & 9484.08 & 9392.47 & 91.6038 & -5.27885 \tabularnewline
14 & 9438 & 9438.39 & 9426.65 & 11.7442 & -0.394231 \tabularnewline
15 & 9374.6 & 9368.58 & 9464.18 & -95.6 & 6.025 \tabularnewline
16 & 9488.8 & 9494.35 & 9502.1 & -7.74808 & -5.55192 \tabularnewline
17 & 9631.8 & 9630 & 9538.4 & 91.6038 & 1.79615 \tabularnewline
18 & 9588.4 & 9584.44 & 9572.7 & 11.7442 & 3.95577 \tabularnewline
19 & 9514.6 & 9508 & 9603.6 & -95.6 & 6.6 \tabularnewline
20 & 9623.2 & 9622.13 & 9629.88 & -7.74808 & 1.07308 \tabularnewline
21 & 9744.6 & 9744.08 & 9652.48 & 91.6038 & 0.521154 \tabularnewline
22 & 9685.8 & 9684.67 & 9672.92 & 11.7442 & 1.13077 \tabularnewline
23 & 9598 & 9596.5 & 9692.1 & -95.6 & 1.5 \tabularnewline
24 & 9703.4 & 9703.1 & 9710.85 & -7.74808 & 0.298077 \tabularnewline
25 & 9817.8 & 9821 & 9729.4 & 91.6038 & -3.20385 \tabularnewline
26 & 9762.6 & 9760.82 & 9749.08 & 11.7442 & 1.78077 \tabularnewline
27 & 9669.6 & 9676.65 & 9772.25 & -95.6 & -7.05 \tabularnewline
28 & 9789.2 & 9789.68 & 9797.43 & -7.74808 & -0.476923 \tabularnewline
29 & 9917.4 & 9915.45 & 9823.85 & 91.6038 & 1.94615 \tabularnewline
30 & 9864.4 & 9862.99 & 9851.25 & 11.7442 & 1.40577 \tabularnewline
31 & 9779.2 & 9785.78 & 9881.38 & -95.6 & -6.575 \tabularnewline
32 & 9898.8 & 9904.93 & 9912.67 & -7.74808 & -6.12692 \tabularnewline
33 & 10048.8 & 10035.9 & 9944.32 & 91.6038 & 12.8712 \tabularnewline
34 & 9983.4 & 9989.44 & 9977.7 & 11.7442 & -6.04423 \tabularnewline
35 & 9913.4 & 9915.68 & 10011.3 & -95.6 & -2.275 \tabularnewline
36 & 10031.6 & 10038.2 & 10045.9 & -7.74808 & -6.60192 \tabularnewline
37 & 10184.6 & 10174.3 & 10082.6 & 91.6038 & 10.3462 \tabularnewline
38 & 10125 & 10133 & 10121.3 & 11.7442 & -8.01923 \tabularnewline
39 & 10065.4 & 10066 & 10161.6 & -95.6 & -0.625 \tabularnewline
40 & 10188.6 & 10199.1 & 10206.8 & -7.74808 & -10.4519 \tabularnewline
41 & 10350.4 & 10343.8 & 10252.2 & 91.6038 & 6.64615 \tabularnewline
42 & 10320.6 & 10305.9 & 10294.1 & 11.7442 & 14.7308 \tabularnewline
43 & 10232.6 & 10240.8 & 10336.4 & -95.6 & -8.225 \tabularnewline
44 & 10357.2 & 10369.1 & 10376.8 & -7.74808 & -11.8519 \tabularnewline
45 & 10520.2 & 10509.4 & 10417.8 & 91.6038 & 10.8462 \tabularnewline
46 & 10473.8 & 10473.6 & 10461.9 & 11.7442 & 0.155769 \tabularnewline
47 & 10407 & 10411.1 & 10506.7 & -95.6 & -4.15 \tabularnewline
48 & 10536 & 10545.3 & 10553.1 & -7.74808 & -9.30192 \tabularnewline
49 & 10700.2 & 10693.3 & 10601.7 & 91.6038 & 6.87115 \tabularnewline
50 & 10664.2 & 10660.9 & 10649.2 & 11.7442 & 3.28077 \tabularnewline
51 & 10606 & 10599 & 10694.6 & -95.6 & 7.025 \tabularnewline
52 & 10716.6 & 10732.8 & 10740.6 & -7.74808 & -16.2019 \tabularnewline
53 & 10882.8 & 10878.8 & 10787.2 & 91.6038 & 3.99615 \tabularnewline
54 & 10849.4 & 10846.3 & 10834.6 & 11.7442 & 3.05577 \tabularnewline
55 & 10794 & NA & NA & -95.6 & NA \tabularnewline
56 & 10907.8 & NA & NA & -7.74808 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300161&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]9137.8[/C][C]NA[/C][C]NA[/C][C]91.6038[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]9009.4[/C][C]NA[/C][C]NA[/C][C]11.7442[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]8926.6[/C][C]8965.15[/C][C]9060.75[/C][C]-95.6[/C][C]-38.55[/C][/ROW]
[ROW][C]4[/C][C]9145[/C][C]9076.9[/C][C]9084.65[/C][C]-7.74808[/C][C]68.0981[/C][/ROW]
[ROW][C]5[/C][C]9186.2[/C][C]9214.98[/C][C]9123.38[/C][C]91.6038[/C][C]-28.7788[/C][/ROW]
[ROW][C]6[/C][C]9152.2[/C][C]9162.77[/C][C]9151.03[/C][C]11.7442[/C][C]-10.5692[/C][/ROW]
[ROW][C]7[/C][C]9093.6[/C][C]9077.75[/C][C]9173.35[/C][C]-95.6[/C][C]15.85[/C][/ROW]
[ROW][C]8[/C][C]9199.2[/C][C]9197.38[/C][C]9205.12[/C][C]-7.74808[/C][C]1.82308[/C][/ROW]
[ROW][C]9[/C][C]9310.6[/C][C]9332.3[/C][C]9240.7[/C][C]91.6038[/C][C]-21.7038[/C][/ROW]
[ROW][C]10[/C][C]9282[/C][C]9289.59[/C][C]9277.85[/C][C]11.7442[/C][C]-7.59423[/C][/ROW]
[ROW][C]11[/C][C]9248.4[/C][C]9221.08[/C][C]9316.68[/C][C]-95.6[/C][C]27.325[/C][/ROW]
[ROW][C]12[/C][C]9341.6[/C][C]9349.45[/C][C]9357.2[/C][C]-7.74808[/C][C]-7.85192[/C][/ROW]
[ROW][C]13[/C][C]9478.8[/C][C]9484.08[/C][C]9392.47[/C][C]91.6038[/C][C]-5.27885[/C][/ROW]
[ROW][C]14[/C][C]9438[/C][C]9438.39[/C][C]9426.65[/C][C]11.7442[/C][C]-0.394231[/C][/ROW]
[ROW][C]15[/C][C]9374.6[/C][C]9368.58[/C][C]9464.18[/C][C]-95.6[/C][C]6.025[/C][/ROW]
[ROW][C]16[/C][C]9488.8[/C][C]9494.35[/C][C]9502.1[/C][C]-7.74808[/C][C]-5.55192[/C][/ROW]
[ROW][C]17[/C][C]9631.8[/C][C]9630[/C][C]9538.4[/C][C]91.6038[/C][C]1.79615[/C][/ROW]
[ROW][C]18[/C][C]9588.4[/C][C]9584.44[/C][C]9572.7[/C][C]11.7442[/C][C]3.95577[/C][/ROW]
[ROW][C]19[/C][C]9514.6[/C][C]9508[/C][C]9603.6[/C][C]-95.6[/C][C]6.6[/C][/ROW]
[ROW][C]20[/C][C]9623.2[/C][C]9622.13[/C][C]9629.88[/C][C]-7.74808[/C][C]1.07308[/C][/ROW]
[ROW][C]21[/C][C]9744.6[/C][C]9744.08[/C][C]9652.48[/C][C]91.6038[/C][C]0.521154[/C][/ROW]
[ROW][C]22[/C][C]9685.8[/C][C]9684.67[/C][C]9672.92[/C][C]11.7442[/C][C]1.13077[/C][/ROW]
[ROW][C]23[/C][C]9598[/C][C]9596.5[/C][C]9692.1[/C][C]-95.6[/C][C]1.5[/C][/ROW]
[ROW][C]24[/C][C]9703.4[/C][C]9703.1[/C][C]9710.85[/C][C]-7.74808[/C][C]0.298077[/C][/ROW]
[ROW][C]25[/C][C]9817.8[/C][C]9821[/C][C]9729.4[/C][C]91.6038[/C][C]-3.20385[/C][/ROW]
[ROW][C]26[/C][C]9762.6[/C][C]9760.82[/C][C]9749.08[/C][C]11.7442[/C][C]1.78077[/C][/ROW]
[ROW][C]27[/C][C]9669.6[/C][C]9676.65[/C][C]9772.25[/C][C]-95.6[/C][C]-7.05[/C][/ROW]
[ROW][C]28[/C][C]9789.2[/C][C]9789.68[/C][C]9797.43[/C][C]-7.74808[/C][C]-0.476923[/C][/ROW]
[ROW][C]29[/C][C]9917.4[/C][C]9915.45[/C][C]9823.85[/C][C]91.6038[/C][C]1.94615[/C][/ROW]
[ROW][C]30[/C][C]9864.4[/C][C]9862.99[/C][C]9851.25[/C][C]11.7442[/C][C]1.40577[/C][/ROW]
[ROW][C]31[/C][C]9779.2[/C][C]9785.78[/C][C]9881.38[/C][C]-95.6[/C][C]-6.575[/C][/ROW]
[ROW][C]32[/C][C]9898.8[/C][C]9904.93[/C][C]9912.67[/C][C]-7.74808[/C][C]-6.12692[/C][/ROW]
[ROW][C]33[/C][C]10048.8[/C][C]10035.9[/C][C]9944.32[/C][C]91.6038[/C][C]12.8712[/C][/ROW]
[ROW][C]34[/C][C]9983.4[/C][C]9989.44[/C][C]9977.7[/C][C]11.7442[/C][C]-6.04423[/C][/ROW]
[ROW][C]35[/C][C]9913.4[/C][C]9915.68[/C][C]10011.3[/C][C]-95.6[/C][C]-2.275[/C][/ROW]
[ROW][C]36[/C][C]10031.6[/C][C]10038.2[/C][C]10045.9[/C][C]-7.74808[/C][C]-6.60192[/C][/ROW]
[ROW][C]37[/C][C]10184.6[/C][C]10174.3[/C][C]10082.6[/C][C]91.6038[/C][C]10.3462[/C][/ROW]
[ROW][C]38[/C][C]10125[/C][C]10133[/C][C]10121.3[/C][C]11.7442[/C][C]-8.01923[/C][/ROW]
[ROW][C]39[/C][C]10065.4[/C][C]10066[/C][C]10161.6[/C][C]-95.6[/C][C]-0.625[/C][/ROW]
[ROW][C]40[/C][C]10188.6[/C][C]10199.1[/C][C]10206.8[/C][C]-7.74808[/C][C]-10.4519[/C][/ROW]
[ROW][C]41[/C][C]10350.4[/C][C]10343.8[/C][C]10252.2[/C][C]91.6038[/C][C]6.64615[/C][/ROW]
[ROW][C]42[/C][C]10320.6[/C][C]10305.9[/C][C]10294.1[/C][C]11.7442[/C][C]14.7308[/C][/ROW]
[ROW][C]43[/C][C]10232.6[/C][C]10240.8[/C][C]10336.4[/C][C]-95.6[/C][C]-8.225[/C][/ROW]
[ROW][C]44[/C][C]10357.2[/C][C]10369.1[/C][C]10376.8[/C][C]-7.74808[/C][C]-11.8519[/C][/ROW]
[ROW][C]45[/C][C]10520.2[/C][C]10509.4[/C][C]10417.8[/C][C]91.6038[/C][C]10.8462[/C][/ROW]
[ROW][C]46[/C][C]10473.8[/C][C]10473.6[/C][C]10461.9[/C][C]11.7442[/C][C]0.155769[/C][/ROW]
[ROW][C]47[/C][C]10407[/C][C]10411.1[/C][C]10506.7[/C][C]-95.6[/C][C]-4.15[/C][/ROW]
[ROW][C]48[/C][C]10536[/C][C]10545.3[/C][C]10553.1[/C][C]-7.74808[/C][C]-9.30192[/C][/ROW]
[ROW][C]49[/C][C]10700.2[/C][C]10693.3[/C][C]10601.7[/C][C]91.6038[/C][C]6.87115[/C][/ROW]
[ROW][C]50[/C][C]10664.2[/C][C]10660.9[/C][C]10649.2[/C][C]11.7442[/C][C]3.28077[/C][/ROW]
[ROW][C]51[/C][C]10606[/C][C]10599[/C][C]10694.6[/C][C]-95.6[/C][C]7.025[/C][/ROW]
[ROW][C]52[/C][C]10716.6[/C][C]10732.8[/C][C]10740.6[/C][C]-7.74808[/C][C]-16.2019[/C][/ROW]
[ROW][C]53[/C][C]10882.8[/C][C]10878.8[/C][C]10787.2[/C][C]91.6038[/C][C]3.99615[/C][/ROW]
[ROW][C]54[/C][C]10849.4[/C][C]10846.3[/C][C]10834.6[/C][C]11.7442[/C][C]3.05577[/C][/ROW]
[ROW][C]55[/C][C]10794[/C][C]NA[/C][C]NA[/C][C]-95.6[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]10907.8[/C][C]NA[/C][C]NA[/C][C]-7.74808[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=300161&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300161&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
19137.8NANA91.6038NA
29009.4NANA11.7442NA
38926.68965.159060.75-95.6-38.55
491459076.99084.65-7.7480868.0981
59186.29214.989123.3891.6038-28.7788
69152.29162.779151.0311.7442-10.5692
79093.69077.759173.35-95.615.85
89199.29197.389205.12-7.748081.82308
99310.69332.39240.791.6038-21.7038
1092829289.599277.8511.7442-7.59423
119248.49221.089316.68-95.627.325
129341.69349.459357.2-7.74808-7.85192
139478.89484.089392.4791.6038-5.27885
1494389438.399426.6511.7442-0.394231
159374.69368.589464.18-95.66.025
169488.89494.359502.1-7.74808-5.55192
179631.896309538.491.60381.79615
189588.49584.449572.711.74423.95577
199514.695089603.6-95.66.6
209623.29622.139629.88-7.748081.07308
219744.69744.089652.4891.60380.521154
229685.89684.679672.9211.74421.13077
2395989596.59692.1-95.61.5
249703.49703.19710.85-7.748080.298077
259817.898219729.491.6038-3.20385
269762.69760.829749.0811.74421.78077
279669.69676.659772.25-95.6-7.05
289789.29789.689797.43-7.74808-0.476923
299917.49915.459823.8591.60381.94615
309864.49862.999851.2511.74421.40577
319779.29785.789881.38-95.6-6.575
329898.89904.939912.67-7.74808-6.12692
3310048.810035.99944.3291.603812.8712
349983.49989.449977.711.7442-6.04423
359913.49915.6810011.3-95.6-2.275
3610031.610038.210045.9-7.74808-6.60192
3710184.610174.310082.691.603810.3462
38101251013310121.311.7442-8.01923
3910065.41006610161.6-95.6-0.625
4010188.610199.110206.8-7.74808-10.4519
4110350.410343.810252.291.60386.64615
4210320.610305.910294.111.744214.7308
4310232.610240.810336.4-95.6-8.225
4410357.210369.110376.8-7.74808-11.8519
4510520.210509.410417.891.603810.8462
4610473.810473.610461.911.74420.155769
471040710411.110506.7-95.6-4.15
481053610545.310553.1-7.74808-9.30192
4910700.210693.310601.791.60386.87115
5010664.210660.910649.211.74423.28077
51106061059910694.6-95.67.025
5210716.610732.810740.6-7.74808-16.2019
5310882.810878.810787.291.60383.99615
5410849.410846.310834.611.74423.05577
5510794NANA-95.6NA
5610907.8NANA-7.74808NA



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