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 computationWed, 13 Nov 2013 07:42:45 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2013/Nov/13/t1384346948kp93x4kff9rk4ez.htm/, Retrieved Sun, 28 Apr 2024 23:15:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=224698, Retrieved Sun, 28 Apr 2024 23:15:16 +0000
QR Codes:

Original text written by user:Howard Van den Branden
IsPrivate?No (this computation is public)
User-defined keywordsHoward Van den Branden
Estimated Impact67
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [WS8: Multiplicati...] [2013-11-13 12:42:45] [c48df00dfd28bb130a7db97d228aa375] [Current]
Feedback Forum

Post a new message
Dataseries X:
6.02
5.62
4.87
4.24
4.02
3.74
3.45
3.34
3.21
3.12
3.04
2.97
2.93
2.95
2.92
2.9
2.95
2.91
2.89
2.84
2.82
2.78
2.86
2.87
2.94
3.04
3.12
3.19
3.27
3.34
3.4
3.55
3.64
3.76
3.78
3.77
3.81
3.81
3.82
3.96
3.86
3.84
3.68
3.56
3.48
3.4
3.42
3.2
3.11
3.1
2.99
3.1
3
3.05
3.1
3.2
3.1
3.3
3.13
3.14




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=224698&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'Sir Maurice George Kendall' @ kendall.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
16.02NANA0.990006NA
25.62NANA1.00084NA
34.87NANA0.997453NA
44.24NANA1.01926NA
54.02NANA1.01415NA
63.74NANA1.01787NA
73.453.793183.841250.9874860.909527
83.343.57183.601250.9918220.935103
93.213.386513.408750.9934770.947878
103.123.253963.271670.9945890.958831
113.043.186563.171251.004830.954006
122.973.055653.092080.9882160.971971
132.933.003843.034170.9900060.975417
142.952.99252.991.000840.985798
152.922.94542.952920.9974530.991378
162.92.978792.92251.019260.973549
172.952.941892.900831.014151.00276
182.912.940812.889171.017870.989525
192.892.849312.885420.9874861.01428
202.842.865952.889580.9918220.990945
212.822.882742.901670.9934770.978237
222.782.906272.922080.9945890.956552
232.862.961732.94751.004830.965651
242.872.943652.978750.9882160.97498
252.942.987753.017920.9900060.984016
263.043.071323.068751.000840.989804
273.123.124523.13250.9974530.998553
283.193.269283.20751.019260.97575
293.273.333183.286671.014150.981044
303.343.42263.36251.017870.975867
313.43.393253.436250.9874861.00199
323.553.475923.504580.9918221.02131
333.643.542573.565830.9934771.0275
343.763.607463.627080.9945891.04229
353.783.701543.683751.004831.0212
363.773.685223.729170.9882161.023
373.813.724073.761670.9900061.02307
383.813.77693.773751.000841.00876
393.823.75793.76750.9974531.01652
403.963.817983.745831.019261.0372
413.863.768423.715831.014151.0243
423.843.74283.677081.017871.02597
433.683.578813.624170.9874861.02827
443.563.536263.565420.9918221.00671
453.483.478413.501250.9934771.00046
463.43.412273.430830.9945890.996405
473.423.375393.359171.004831.01322
483.23.251643.290420.9882160.984118
493.113.201023.233330.9900060.971566
503.13.196843.194171.000840.969709
512.993.155283.163330.9974530.947619
523.13.203883.143331.019260.967577
5333.171343.127081.014150.945972
543.053.168133.11251.017870.962713
553.1NANA0.987486NA
563.2NANA0.991822NA
573.1NANA0.993477NA
583.3NANA0.994589NA
593.13NANA1.00483NA
603.14NANA0.988216NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 6.02 & NA & NA & 0.990006 & NA \tabularnewline
2 & 5.62 & NA & NA & 1.00084 & NA \tabularnewline
3 & 4.87 & NA & NA & 0.997453 & NA \tabularnewline
4 & 4.24 & NA & NA & 1.01926 & NA \tabularnewline
5 & 4.02 & NA & NA & 1.01415 & NA \tabularnewline
6 & 3.74 & NA & NA & 1.01787 & NA \tabularnewline
7 & 3.45 & 3.79318 & 3.84125 & 0.987486 & 0.909527 \tabularnewline
8 & 3.34 & 3.5718 & 3.60125 & 0.991822 & 0.935103 \tabularnewline
9 & 3.21 & 3.38651 & 3.40875 & 0.993477 & 0.947878 \tabularnewline
10 & 3.12 & 3.25396 & 3.27167 & 0.994589 & 0.958831 \tabularnewline
11 & 3.04 & 3.18656 & 3.17125 & 1.00483 & 0.954006 \tabularnewline
12 & 2.97 & 3.05565 & 3.09208 & 0.988216 & 0.971971 \tabularnewline
13 & 2.93 & 3.00384 & 3.03417 & 0.990006 & 0.975417 \tabularnewline
14 & 2.95 & 2.9925 & 2.99 & 1.00084 & 0.985798 \tabularnewline
15 & 2.92 & 2.9454 & 2.95292 & 0.997453 & 0.991378 \tabularnewline
16 & 2.9 & 2.97879 & 2.9225 & 1.01926 & 0.973549 \tabularnewline
17 & 2.95 & 2.94189 & 2.90083 & 1.01415 & 1.00276 \tabularnewline
18 & 2.91 & 2.94081 & 2.88917 & 1.01787 & 0.989525 \tabularnewline
19 & 2.89 & 2.84931 & 2.88542 & 0.987486 & 1.01428 \tabularnewline
20 & 2.84 & 2.86595 & 2.88958 & 0.991822 & 0.990945 \tabularnewline
21 & 2.82 & 2.88274 & 2.90167 & 0.993477 & 0.978237 \tabularnewline
22 & 2.78 & 2.90627 & 2.92208 & 0.994589 & 0.956552 \tabularnewline
23 & 2.86 & 2.96173 & 2.9475 & 1.00483 & 0.965651 \tabularnewline
24 & 2.87 & 2.94365 & 2.97875 & 0.988216 & 0.97498 \tabularnewline
25 & 2.94 & 2.98775 & 3.01792 & 0.990006 & 0.984016 \tabularnewline
26 & 3.04 & 3.07132 & 3.06875 & 1.00084 & 0.989804 \tabularnewline
27 & 3.12 & 3.12452 & 3.1325 & 0.997453 & 0.998553 \tabularnewline
28 & 3.19 & 3.26928 & 3.2075 & 1.01926 & 0.97575 \tabularnewline
29 & 3.27 & 3.33318 & 3.28667 & 1.01415 & 0.981044 \tabularnewline
30 & 3.34 & 3.4226 & 3.3625 & 1.01787 & 0.975867 \tabularnewline
31 & 3.4 & 3.39325 & 3.43625 & 0.987486 & 1.00199 \tabularnewline
32 & 3.55 & 3.47592 & 3.50458 & 0.991822 & 1.02131 \tabularnewline
33 & 3.64 & 3.54257 & 3.56583 & 0.993477 & 1.0275 \tabularnewline
34 & 3.76 & 3.60746 & 3.62708 & 0.994589 & 1.04229 \tabularnewline
35 & 3.78 & 3.70154 & 3.68375 & 1.00483 & 1.0212 \tabularnewline
36 & 3.77 & 3.68522 & 3.72917 & 0.988216 & 1.023 \tabularnewline
37 & 3.81 & 3.72407 & 3.76167 & 0.990006 & 1.02307 \tabularnewline
38 & 3.81 & 3.7769 & 3.77375 & 1.00084 & 1.00876 \tabularnewline
39 & 3.82 & 3.7579 & 3.7675 & 0.997453 & 1.01652 \tabularnewline
40 & 3.96 & 3.81798 & 3.74583 & 1.01926 & 1.0372 \tabularnewline
41 & 3.86 & 3.76842 & 3.71583 & 1.01415 & 1.0243 \tabularnewline
42 & 3.84 & 3.7428 & 3.67708 & 1.01787 & 1.02597 \tabularnewline
43 & 3.68 & 3.57881 & 3.62417 & 0.987486 & 1.02827 \tabularnewline
44 & 3.56 & 3.53626 & 3.56542 & 0.991822 & 1.00671 \tabularnewline
45 & 3.48 & 3.47841 & 3.50125 & 0.993477 & 1.00046 \tabularnewline
46 & 3.4 & 3.41227 & 3.43083 & 0.994589 & 0.996405 \tabularnewline
47 & 3.42 & 3.37539 & 3.35917 & 1.00483 & 1.01322 \tabularnewline
48 & 3.2 & 3.25164 & 3.29042 & 0.988216 & 0.984118 \tabularnewline
49 & 3.11 & 3.20102 & 3.23333 & 0.990006 & 0.971566 \tabularnewline
50 & 3.1 & 3.19684 & 3.19417 & 1.00084 & 0.969709 \tabularnewline
51 & 2.99 & 3.15528 & 3.16333 & 0.997453 & 0.947619 \tabularnewline
52 & 3.1 & 3.20388 & 3.14333 & 1.01926 & 0.967577 \tabularnewline
53 & 3 & 3.17134 & 3.12708 & 1.01415 & 0.945972 \tabularnewline
54 & 3.05 & 3.16813 & 3.1125 & 1.01787 & 0.962713 \tabularnewline
55 & 3.1 & NA & NA & 0.987486 & NA \tabularnewline
56 & 3.2 & NA & NA & 0.991822 & NA \tabularnewline
57 & 3.1 & NA & NA & 0.993477 & NA \tabularnewline
58 & 3.3 & NA & NA & 0.994589 & NA \tabularnewline
59 & 3.13 & NA & NA & 1.00483 & NA \tabularnewline
60 & 3.14 & NA & NA & 0.988216 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=224698&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]6.02[/C][C]NA[/C][C]NA[/C][C]0.990006[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]5.62[/C][C]NA[/C][C]NA[/C][C]1.00084[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]4.87[/C][C]NA[/C][C]NA[/C][C]0.997453[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]4.24[/C][C]NA[/C][C]NA[/C][C]1.01926[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]4.02[/C][C]NA[/C][C]NA[/C][C]1.01415[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]3.74[/C][C]NA[/C][C]NA[/C][C]1.01787[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]3.45[/C][C]3.79318[/C][C]3.84125[/C][C]0.987486[/C][C]0.909527[/C][/ROW]
[ROW][C]8[/C][C]3.34[/C][C]3.5718[/C][C]3.60125[/C][C]0.991822[/C][C]0.935103[/C][/ROW]
[ROW][C]9[/C][C]3.21[/C][C]3.38651[/C][C]3.40875[/C][C]0.993477[/C][C]0.947878[/C][/ROW]
[ROW][C]10[/C][C]3.12[/C][C]3.25396[/C][C]3.27167[/C][C]0.994589[/C][C]0.958831[/C][/ROW]
[ROW][C]11[/C][C]3.04[/C][C]3.18656[/C][C]3.17125[/C][C]1.00483[/C][C]0.954006[/C][/ROW]
[ROW][C]12[/C][C]2.97[/C][C]3.05565[/C][C]3.09208[/C][C]0.988216[/C][C]0.971971[/C][/ROW]
[ROW][C]13[/C][C]2.93[/C][C]3.00384[/C][C]3.03417[/C][C]0.990006[/C][C]0.975417[/C][/ROW]
[ROW][C]14[/C][C]2.95[/C][C]2.9925[/C][C]2.99[/C][C]1.00084[/C][C]0.985798[/C][/ROW]
[ROW][C]15[/C][C]2.92[/C][C]2.9454[/C][C]2.95292[/C][C]0.997453[/C][C]0.991378[/C][/ROW]
[ROW][C]16[/C][C]2.9[/C][C]2.97879[/C][C]2.9225[/C][C]1.01926[/C][C]0.973549[/C][/ROW]
[ROW][C]17[/C][C]2.95[/C][C]2.94189[/C][C]2.90083[/C][C]1.01415[/C][C]1.00276[/C][/ROW]
[ROW][C]18[/C][C]2.91[/C][C]2.94081[/C][C]2.88917[/C][C]1.01787[/C][C]0.989525[/C][/ROW]
[ROW][C]19[/C][C]2.89[/C][C]2.84931[/C][C]2.88542[/C][C]0.987486[/C][C]1.01428[/C][/ROW]
[ROW][C]20[/C][C]2.84[/C][C]2.86595[/C][C]2.88958[/C][C]0.991822[/C][C]0.990945[/C][/ROW]
[ROW][C]21[/C][C]2.82[/C][C]2.88274[/C][C]2.90167[/C][C]0.993477[/C][C]0.978237[/C][/ROW]
[ROW][C]22[/C][C]2.78[/C][C]2.90627[/C][C]2.92208[/C][C]0.994589[/C][C]0.956552[/C][/ROW]
[ROW][C]23[/C][C]2.86[/C][C]2.96173[/C][C]2.9475[/C][C]1.00483[/C][C]0.965651[/C][/ROW]
[ROW][C]24[/C][C]2.87[/C][C]2.94365[/C][C]2.97875[/C][C]0.988216[/C][C]0.97498[/C][/ROW]
[ROW][C]25[/C][C]2.94[/C][C]2.98775[/C][C]3.01792[/C][C]0.990006[/C][C]0.984016[/C][/ROW]
[ROW][C]26[/C][C]3.04[/C][C]3.07132[/C][C]3.06875[/C][C]1.00084[/C][C]0.989804[/C][/ROW]
[ROW][C]27[/C][C]3.12[/C][C]3.12452[/C][C]3.1325[/C][C]0.997453[/C][C]0.998553[/C][/ROW]
[ROW][C]28[/C][C]3.19[/C][C]3.26928[/C][C]3.2075[/C][C]1.01926[/C][C]0.97575[/C][/ROW]
[ROW][C]29[/C][C]3.27[/C][C]3.33318[/C][C]3.28667[/C][C]1.01415[/C][C]0.981044[/C][/ROW]
[ROW][C]30[/C][C]3.34[/C][C]3.4226[/C][C]3.3625[/C][C]1.01787[/C][C]0.975867[/C][/ROW]
[ROW][C]31[/C][C]3.4[/C][C]3.39325[/C][C]3.43625[/C][C]0.987486[/C][C]1.00199[/C][/ROW]
[ROW][C]32[/C][C]3.55[/C][C]3.47592[/C][C]3.50458[/C][C]0.991822[/C][C]1.02131[/C][/ROW]
[ROW][C]33[/C][C]3.64[/C][C]3.54257[/C][C]3.56583[/C][C]0.993477[/C][C]1.0275[/C][/ROW]
[ROW][C]34[/C][C]3.76[/C][C]3.60746[/C][C]3.62708[/C][C]0.994589[/C][C]1.04229[/C][/ROW]
[ROW][C]35[/C][C]3.78[/C][C]3.70154[/C][C]3.68375[/C][C]1.00483[/C][C]1.0212[/C][/ROW]
[ROW][C]36[/C][C]3.77[/C][C]3.68522[/C][C]3.72917[/C][C]0.988216[/C][C]1.023[/C][/ROW]
[ROW][C]37[/C][C]3.81[/C][C]3.72407[/C][C]3.76167[/C][C]0.990006[/C][C]1.02307[/C][/ROW]
[ROW][C]38[/C][C]3.81[/C][C]3.7769[/C][C]3.77375[/C][C]1.00084[/C][C]1.00876[/C][/ROW]
[ROW][C]39[/C][C]3.82[/C][C]3.7579[/C][C]3.7675[/C][C]0.997453[/C][C]1.01652[/C][/ROW]
[ROW][C]40[/C][C]3.96[/C][C]3.81798[/C][C]3.74583[/C][C]1.01926[/C][C]1.0372[/C][/ROW]
[ROW][C]41[/C][C]3.86[/C][C]3.76842[/C][C]3.71583[/C][C]1.01415[/C][C]1.0243[/C][/ROW]
[ROW][C]42[/C][C]3.84[/C][C]3.7428[/C][C]3.67708[/C][C]1.01787[/C][C]1.02597[/C][/ROW]
[ROW][C]43[/C][C]3.68[/C][C]3.57881[/C][C]3.62417[/C][C]0.987486[/C][C]1.02827[/C][/ROW]
[ROW][C]44[/C][C]3.56[/C][C]3.53626[/C][C]3.56542[/C][C]0.991822[/C][C]1.00671[/C][/ROW]
[ROW][C]45[/C][C]3.48[/C][C]3.47841[/C][C]3.50125[/C][C]0.993477[/C][C]1.00046[/C][/ROW]
[ROW][C]46[/C][C]3.4[/C][C]3.41227[/C][C]3.43083[/C][C]0.994589[/C][C]0.996405[/C][/ROW]
[ROW][C]47[/C][C]3.42[/C][C]3.37539[/C][C]3.35917[/C][C]1.00483[/C][C]1.01322[/C][/ROW]
[ROW][C]48[/C][C]3.2[/C][C]3.25164[/C][C]3.29042[/C][C]0.988216[/C][C]0.984118[/C][/ROW]
[ROW][C]49[/C][C]3.11[/C][C]3.20102[/C][C]3.23333[/C][C]0.990006[/C][C]0.971566[/C][/ROW]
[ROW][C]50[/C][C]3.1[/C][C]3.19684[/C][C]3.19417[/C][C]1.00084[/C][C]0.969709[/C][/ROW]
[ROW][C]51[/C][C]2.99[/C][C]3.15528[/C][C]3.16333[/C][C]0.997453[/C][C]0.947619[/C][/ROW]
[ROW][C]52[/C][C]3.1[/C][C]3.20388[/C][C]3.14333[/C][C]1.01926[/C][C]0.967577[/C][/ROW]
[ROW][C]53[/C][C]3[/C][C]3.17134[/C][C]3.12708[/C][C]1.01415[/C][C]0.945972[/C][/ROW]
[ROW][C]54[/C][C]3.05[/C][C]3.16813[/C][C]3.1125[/C][C]1.01787[/C][C]0.962713[/C][/ROW]
[ROW][C]55[/C][C]3.1[/C][C]NA[/C][C]NA[/C][C]0.987486[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]3.2[/C][C]NA[/C][C]NA[/C][C]0.991822[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]3.1[/C][C]NA[/C][C]NA[/C][C]0.993477[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]3.3[/C][C]NA[/C][C]NA[/C][C]0.994589[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]3.13[/C][C]NA[/C][C]NA[/C][C]1.00483[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]3.14[/C][C]NA[/C][C]NA[/C][C]0.988216[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=224698&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=224698&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
16.02NANA0.990006NA
25.62NANA1.00084NA
34.87NANA0.997453NA
44.24NANA1.01926NA
54.02NANA1.01415NA
63.74NANA1.01787NA
73.453.793183.841250.9874860.909527
83.343.57183.601250.9918220.935103
93.213.386513.408750.9934770.947878
103.123.253963.271670.9945890.958831
113.043.186563.171251.004830.954006
122.973.055653.092080.9882160.971971
132.933.003843.034170.9900060.975417
142.952.99252.991.000840.985798
152.922.94542.952920.9974530.991378
162.92.978792.92251.019260.973549
172.952.941892.900831.014151.00276
182.912.940812.889171.017870.989525
192.892.849312.885420.9874861.01428
202.842.865952.889580.9918220.990945
212.822.882742.901670.9934770.978237
222.782.906272.922080.9945890.956552
232.862.961732.94751.004830.965651
242.872.943652.978750.9882160.97498
252.942.987753.017920.9900060.984016
263.043.071323.068751.000840.989804
273.123.124523.13250.9974530.998553
283.193.269283.20751.019260.97575
293.273.333183.286671.014150.981044
303.343.42263.36251.017870.975867
313.43.393253.436250.9874861.00199
323.553.475923.504580.9918221.02131
333.643.542573.565830.9934771.0275
343.763.607463.627080.9945891.04229
353.783.701543.683751.004831.0212
363.773.685223.729170.9882161.023
373.813.724073.761670.9900061.02307
383.813.77693.773751.000841.00876
393.823.75793.76750.9974531.01652
403.963.817983.745831.019261.0372
413.863.768423.715831.014151.0243
423.843.74283.677081.017871.02597
433.683.578813.624170.9874861.02827
443.563.536263.565420.9918221.00671
453.483.478413.501250.9934771.00046
463.43.412273.430830.9945890.996405
473.423.375393.359171.004831.01322
483.23.251643.290420.9882160.984118
493.113.201023.233330.9900060.971566
503.13.196843.194171.000840.969709
512.993.155283.163330.9974530.947619
523.13.203883.143331.019260.967577
5333.171343.127081.014150.945972
543.053.168133.11251.017870.962713
553.1NANA0.987486NA
563.2NANA0.991822NA
573.1NANA0.993477NA
583.3NANA0.994589NA
593.13NANA1.00483NA
603.14NANA0.988216NA



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