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, 07 Dec 2016 16:20:45 +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/07/t1481124063qpi24s9345l2cd5.htm/, Retrieved Wed, 08 May 2024 02:52:48 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=298194, Retrieved Wed, 08 May 2024 02:52:48 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact76
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [Classical Decompo...] [2016-12-07 15:20:45] [3b055ff671ad33431c4331443bac114d] [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 time1 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 time1 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=298194&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]1 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=298194&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=298194&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 time1 seconds
R ServerBig Analytics Cloud Computing Center







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
19137.8NANA91.9547NA
29009.4NANA8.54427NA
38926.6NANA-99.3259NA
49145NANA-13.6786NA
59186.2NANA98.0102NA
69152.2NANA23.263NA
79093.69092.099183.59-91.49951.50781
89199.29205.259215.66-10.412-6.04635
99310.69343.499252.1891.3068-32.8901
1092829292.829285.177.64219-10.8172
119248.49227.129318.07-90.951621.2849
129341.69339.959354.81-14.85361.64531
139478.89482.489390.5291.9547-3.67969
1494389434.289425.738.544273.7224
159374.69362.169461.48-99.325912.4425
169488.89482.719496.39-13.67866.08698
179631.89625.799527.7898.01026.00642
189588.49580.699557.4223.2637.71198
199514.69495.139586.62-91.499519.4745
209623.29603.869614.28-10.41219.337
219744.69731.49640.0991.306813.2016
229685.89672.549664.97.6421913.2578
2395989598.379689.32-90.9516-0.365104
249703.49697.869712.72-14.85365.53698
259817.89827.29735.2491.9547-9.39635
269762.69766.299757.758.54427-3.69427
279669.69682.589781.91-99.3259-12.9825
289789.29793.39806.98-13.6786-4.10469
299917.49930.549832.5298.0102-13.1352
309864.49882.69859.3423.263-18.2047
319779.29796.89888.3-91.4995-17.6005
329898.89908.279918.68-10.412-9.47135
3310048.810041.69950.2891.30687.21823
349983.49991.059983.417.64219-7.65052
359913.49927.1410018.1-90.9516-13.7401
3610031.610040.310055.1-14.8536-8.68802
3710184.6101851009391.9547-0.396354
381012510139.6101318.54427-14.5776
3910065.410070.410169.8-99.3259-5.04913
4010188.610196.210209.9-13.6786-7.57135
4110350.410348.910250.898.01021.53976
4210320.610315.710292.423.2634.90365
4310232.610243.410334.9-91.4995-10.8339
4410357.210368.510378.9-10.412-11.2714
4510520.210515.210423.991.30685.01823
4610473.81047610468.47.64219-2.24219
471040710421.610512.6-90.9516-14.6318
481053610541.910556.8-14.8536-5.94635
4910700.210694.210602.291.95476.02031
5010664.210657.110648.68.544277.0974
5110606NANA-99.3259NA
5210716.6NANA-13.6786NA
5310882.8NANA98.0102NA
5410849.4NANA23.263NA
5510794NANA-91.4995NA
5610907.8NANA-10.412NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 9137.8 & NA & NA & 91.9547 & NA \tabularnewline
2 & 9009.4 & NA & NA & 8.54427 & NA \tabularnewline
3 & 8926.6 & NA & NA & -99.3259 & NA \tabularnewline
4 & 9145 & NA & NA & -13.6786 & NA \tabularnewline
5 & 9186.2 & NA & NA & 98.0102 & NA \tabularnewline
6 & 9152.2 & NA & NA & 23.263 & NA \tabularnewline
7 & 9093.6 & 9092.09 & 9183.59 & -91.4995 & 1.50781 \tabularnewline
8 & 9199.2 & 9205.25 & 9215.66 & -10.412 & -6.04635 \tabularnewline
9 & 9310.6 & 9343.49 & 9252.18 & 91.3068 & -32.8901 \tabularnewline
10 & 9282 & 9292.82 & 9285.17 & 7.64219 & -10.8172 \tabularnewline
11 & 9248.4 & 9227.12 & 9318.07 & -90.9516 & 21.2849 \tabularnewline
12 & 9341.6 & 9339.95 & 9354.81 & -14.8536 & 1.64531 \tabularnewline
13 & 9478.8 & 9482.48 & 9390.52 & 91.9547 & -3.67969 \tabularnewline
14 & 9438 & 9434.28 & 9425.73 & 8.54427 & 3.7224 \tabularnewline
15 & 9374.6 & 9362.16 & 9461.48 & -99.3259 & 12.4425 \tabularnewline
16 & 9488.8 & 9482.71 & 9496.39 & -13.6786 & 6.08698 \tabularnewline
17 & 9631.8 & 9625.79 & 9527.78 & 98.0102 & 6.00642 \tabularnewline
18 & 9588.4 & 9580.69 & 9557.42 & 23.263 & 7.71198 \tabularnewline
19 & 9514.6 & 9495.13 & 9586.62 & -91.4995 & 19.4745 \tabularnewline
20 & 9623.2 & 9603.86 & 9614.28 & -10.412 & 19.337 \tabularnewline
21 & 9744.6 & 9731.4 & 9640.09 & 91.3068 & 13.2016 \tabularnewline
22 & 9685.8 & 9672.54 & 9664.9 & 7.64219 & 13.2578 \tabularnewline
23 & 9598 & 9598.37 & 9689.32 & -90.9516 & -0.365104 \tabularnewline
24 & 9703.4 & 9697.86 & 9712.72 & -14.8536 & 5.53698 \tabularnewline
25 & 9817.8 & 9827.2 & 9735.24 & 91.9547 & -9.39635 \tabularnewline
26 & 9762.6 & 9766.29 & 9757.75 & 8.54427 & -3.69427 \tabularnewline
27 & 9669.6 & 9682.58 & 9781.91 & -99.3259 & -12.9825 \tabularnewline
28 & 9789.2 & 9793.3 & 9806.98 & -13.6786 & -4.10469 \tabularnewline
29 & 9917.4 & 9930.54 & 9832.52 & 98.0102 & -13.1352 \tabularnewline
30 & 9864.4 & 9882.6 & 9859.34 & 23.263 & -18.2047 \tabularnewline
31 & 9779.2 & 9796.8 & 9888.3 & -91.4995 & -17.6005 \tabularnewline
32 & 9898.8 & 9908.27 & 9918.68 & -10.412 & -9.47135 \tabularnewline
33 & 10048.8 & 10041.6 & 9950.28 & 91.3068 & 7.21823 \tabularnewline
34 & 9983.4 & 9991.05 & 9983.41 & 7.64219 & -7.65052 \tabularnewline
35 & 9913.4 & 9927.14 & 10018.1 & -90.9516 & -13.7401 \tabularnewline
36 & 10031.6 & 10040.3 & 10055.1 & -14.8536 & -8.68802 \tabularnewline
37 & 10184.6 & 10185 & 10093 & 91.9547 & -0.396354 \tabularnewline
38 & 10125 & 10139.6 & 10131 & 8.54427 & -14.5776 \tabularnewline
39 & 10065.4 & 10070.4 & 10169.8 & -99.3259 & -5.04913 \tabularnewline
40 & 10188.6 & 10196.2 & 10209.9 & -13.6786 & -7.57135 \tabularnewline
41 & 10350.4 & 10348.9 & 10250.8 & 98.0102 & 1.53976 \tabularnewline
42 & 10320.6 & 10315.7 & 10292.4 & 23.263 & 4.90365 \tabularnewline
43 & 10232.6 & 10243.4 & 10334.9 & -91.4995 & -10.8339 \tabularnewline
44 & 10357.2 & 10368.5 & 10378.9 & -10.412 & -11.2714 \tabularnewline
45 & 10520.2 & 10515.2 & 10423.9 & 91.3068 & 5.01823 \tabularnewline
46 & 10473.8 & 10476 & 10468.4 & 7.64219 & -2.24219 \tabularnewline
47 & 10407 & 10421.6 & 10512.6 & -90.9516 & -14.6318 \tabularnewline
48 & 10536 & 10541.9 & 10556.8 & -14.8536 & -5.94635 \tabularnewline
49 & 10700.2 & 10694.2 & 10602.2 & 91.9547 & 6.02031 \tabularnewline
50 & 10664.2 & 10657.1 & 10648.6 & 8.54427 & 7.0974 \tabularnewline
51 & 10606 & NA & NA & -99.3259 & NA \tabularnewline
52 & 10716.6 & NA & NA & -13.6786 & NA \tabularnewline
53 & 10882.8 & NA & NA & 98.0102 & NA \tabularnewline
54 & 10849.4 & NA & NA & 23.263 & NA \tabularnewline
55 & 10794 & NA & NA & -91.4995 & NA \tabularnewline
56 & 10907.8 & NA & NA & -10.412 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=298194&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.9547[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]9009.4[/C][C]NA[/C][C]NA[/C][C]8.54427[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]8926.6[/C][C]NA[/C][C]NA[/C][C]-99.3259[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]9145[/C][C]NA[/C][C]NA[/C][C]-13.6786[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]9186.2[/C][C]NA[/C][C]NA[/C][C]98.0102[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]9152.2[/C][C]NA[/C][C]NA[/C][C]23.263[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]9093.6[/C][C]9092.09[/C][C]9183.59[/C][C]-91.4995[/C][C]1.50781[/C][/ROW]
[ROW][C]8[/C][C]9199.2[/C][C]9205.25[/C][C]9215.66[/C][C]-10.412[/C][C]-6.04635[/C][/ROW]
[ROW][C]9[/C][C]9310.6[/C][C]9343.49[/C][C]9252.18[/C][C]91.3068[/C][C]-32.8901[/C][/ROW]
[ROW][C]10[/C][C]9282[/C][C]9292.82[/C][C]9285.17[/C][C]7.64219[/C][C]-10.8172[/C][/ROW]
[ROW][C]11[/C][C]9248.4[/C][C]9227.12[/C][C]9318.07[/C][C]-90.9516[/C][C]21.2849[/C][/ROW]
[ROW][C]12[/C][C]9341.6[/C][C]9339.95[/C][C]9354.81[/C][C]-14.8536[/C][C]1.64531[/C][/ROW]
[ROW][C]13[/C][C]9478.8[/C][C]9482.48[/C][C]9390.52[/C][C]91.9547[/C][C]-3.67969[/C][/ROW]
[ROW][C]14[/C][C]9438[/C][C]9434.28[/C][C]9425.73[/C][C]8.54427[/C][C]3.7224[/C][/ROW]
[ROW][C]15[/C][C]9374.6[/C][C]9362.16[/C][C]9461.48[/C][C]-99.3259[/C][C]12.4425[/C][/ROW]
[ROW][C]16[/C][C]9488.8[/C][C]9482.71[/C][C]9496.39[/C][C]-13.6786[/C][C]6.08698[/C][/ROW]
[ROW][C]17[/C][C]9631.8[/C][C]9625.79[/C][C]9527.78[/C][C]98.0102[/C][C]6.00642[/C][/ROW]
[ROW][C]18[/C][C]9588.4[/C][C]9580.69[/C][C]9557.42[/C][C]23.263[/C][C]7.71198[/C][/ROW]
[ROW][C]19[/C][C]9514.6[/C][C]9495.13[/C][C]9586.62[/C][C]-91.4995[/C][C]19.4745[/C][/ROW]
[ROW][C]20[/C][C]9623.2[/C][C]9603.86[/C][C]9614.28[/C][C]-10.412[/C][C]19.337[/C][/ROW]
[ROW][C]21[/C][C]9744.6[/C][C]9731.4[/C][C]9640.09[/C][C]91.3068[/C][C]13.2016[/C][/ROW]
[ROW][C]22[/C][C]9685.8[/C][C]9672.54[/C][C]9664.9[/C][C]7.64219[/C][C]13.2578[/C][/ROW]
[ROW][C]23[/C][C]9598[/C][C]9598.37[/C][C]9689.32[/C][C]-90.9516[/C][C]-0.365104[/C][/ROW]
[ROW][C]24[/C][C]9703.4[/C][C]9697.86[/C][C]9712.72[/C][C]-14.8536[/C][C]5.53698[/C][/ROW]
[ROW][C]25[/C][C]9817.8[/C][C]9827.2[/C][C]9735.24[/C][C]91.9547[/C][C]-9.39635[/C][/ROW]
[ROW][C]26[/C][C]9762.6[/C][C]9766.29[/C][C]9757.75[/C][C]8.54427[/C][C]-3.69427[/C][/ROW]
[ROW][C]27[/C][C]9669.6[/C][C]9682.58[/C][C]9781.91[/C][C]-99.3259[/C][C]-12.9825[/C][/ROW]
[ROW][C]28[/C][C]9789.2[/C][C]9793.3[/C][C]9806.98[/C][C]-13.6786[/C][C]-4.10469[/C][/ROW]
[ROW][C]29[/C][C]9917.4[/C][C]9930.54[/C][C]9832.52[/C][C]98.0102[/C][C]-13.1352[/C][/ROW]
[ROW][C]30[/C][C]9864.4[/C][C]9882.6[/C][C]9859.34[/C][C]23.263[/C][C]-18.2047[/C][/ROW]
[ROW][C]31[/C][C]9779.2[/C][C]9796.8[/C][C]9888.3[/C][C]-91.4995[/C][C]-17.6005[/C][/ROW]
[ROW][C]32[/C][C]9898.8[/C][C]9908.27[/C][C]9918.68[/C][C]-10.412[/C][C]-9.47135[/C][/ROW]
[ROW][C]33[/C][C]10048.8[/C][C]10041.6[/C][C]9950.28[/C][C]91.3068[/C][C]7.21823[/C][/ROW]
[ROW][C]34[/C][C]9983.4[/C][C]9991.05[/C][C]9983.41[/C][C]7.64219[/C][C]-7.65052[/C][/ROW]
[ROW][C]35[/C][C]9913.4[/C][C]9927.14[/C][C]10018.1[/C][C]-90.9516[/C][C]-13.7401[/C][/ROW]
[ROW][C]36[/C][C]10031.6[/C][C]10040.3[/C][C]10055.1[/C][C]-14.8536[/C][C]-8.68802[/C][/ROW]
[ROW][C]37[/C][C]10184.6[/C][C]10185[/C][C]10093[/C][C]91.9547[/C][C]-0.396354[/C][/ROW]
[ROW][C]38[/C][C]10125[/C][C]10139.6[/C][C]10131[/C][C]8.54427[/C][C]-14.5776[/C][/ROW]
[ROW][C]39[/C][C]10065.4[/C][C]10070.4[/C][C]10169.8[/C][C]-99.3259[/C][C]-5.04913[/C][/ROW]
[ROW][C]40[/C][C]10188.6[/C][C]10196.2[/C][C]10209.9[/C][C]-13.6786[/C][C]-7.57135[/C][/ROW]
[ROW][C]41[/C][C]10350.4[/C][C]10348.9[/C][C]10250.8[/C][C]98.0102[/C][C]1.53976[/C][/ROW]
[ROW][C]42[/C][C]10320.6[/C][C]10315.7[/C][C]10292.4[/C][C]23.263[/C][C]4.90365[/C][/ROW]
[ROW][C]43[/C][C]10232.6[/C][C]10243.4[/C][C]10334.9[/C][C]-91.4995[/C][C]-10.8339[/C][/ROW]
[ROW][C]44[/C][C]10357.2[/C][C]10368.5[/C][C]10378.9[/C][C]-10.412[/C][C]-11.2714[/C][/ROW]
[ROW][C]45[/C][C]10520.2[/C][C]10515.2[/C][C]10423.9[/C][C]91.3068[/C][C]5.01823[/C][/ROW]
[ROW][C]46[/C][C]10473.8[/C][C]10476[/C][C]10468.4[/C][C]7.64219[/C][C]-2.24219[/C][/ROW]
[ROW][C]47[/C][C]10407[/C][C]10421.6[/C][C]10512.6[/C][C]-90.9516[/C][C]-14.6318[/C][/ROW]
[ROW][C]48[/C][C]10536[/C][C]10541.9[/C][C]10556.8[/C][C]-14.8536[/C][C]-5.94635[/C][/ROW]
[ROW][C]49[/C][C]10700.2[/C][C]10694.2[/C][C]10602.2[/C][C]91.9547[/C][C]6.02031[/C][/ROW]
[ROW][C]50[/C][C]10664.2[/C][C]10657.1[/C][C]10648.6[/C][C]8.54427[/C][C]7.0974[/C][/ROW]
[ROW][C]51[/C][C]10606[/C][C]NA[/C][C]NA[/C][C]-99.3259[/C][C]NA[/C][/ROW]
[ROW][C]52[/C][C]10716.6[/C][C]NA[/C][C]NA[/C][C]-13.6786[/C][C]NA[/C][/ROW]
[ROW][C]53[/C][C]10882.8[/C][C]NA[/C][C]NA[/C][C]98.0102[/C][C]NA[/C][/ROW]
[ROW][C]54[/C][C]10849.4[/C][C]NA[/C][C]NA[/C][C]23.263[/C][C]NA[/C][/ROW]
[ROW][C]55[/C][C]10794[/C][C]NA[/C][C]NA[/C][C]-91.4995[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]10907.8[/C][C]NA[/C][C]NA[/C][C]-10.412[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=298194&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=298194&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.9547NA
29009.4NANA8.54427NA
38926.6NANA-99.3259NA
49145NANA-13.6786NA
59186.2NANA98.0102NA
69152.2NANA23.263NA
79093.69092.099183.59-91.49951.50781
89199.29205.259215.66-10.412-6.04635
99310.69343.499252.1891.3068-32.8901
1092829292.829285.177.64219-10.8172
119248.49227.129318.07-90.951621.2849
129341.69339.959354.81-14.85361.64531
139478.89482.489390.5291.9547-3.67969
1494389434.289425.738.544273.7224
159374.69362.169461.48-99.325912.4425
169488.89482.719496.39-13.67866.08698
179631.89625.799527.7898.01026.00642
189588.49580.699557.4223.2637.71198
199514.69495.139586.62-91.499519.4745
209623.29603.869614.28-10.41219.337
219744.69731.49640.0991.306813.2016
229685.89672.549664.97.6421913.2578
2395989598.379689.32-90.9516-0.365104
249703.49697.869712.72-14.85365.53698
259817.89827.29735.2491.9547-9.39635
269762.69766.299757.758.54427-3.69427
279669.69682.589781.91-99.3259-12.9825
289789.29793.39806.98-13.6786-4.10469
299917.49930.549832.5298.0102-13.1352
309864.49882.69859.3423.263-18.2047
319779.29796.89888.3-91.4995-17.6005
329898.89908.279918.68-10.412-9.47135
3310048.810041.69950.2891.30687.21823
349983.49991.059983.417.64219-7.65052
359913.49927.1410018.1-90.9516-13.7401
3610031.610040.310055.1-14.8536-8.68802
3710184.6101851009391.9547-0.396354
381012510139.6101318.54427-14.5776
3910065.410070.410169.8-99.3259-5.04913
4010188.610196.210209.9-13.6786-7.57135
4110350.410348.910250.898.01021.53976
4210320.610315.710292.423.2634.90365
4310232.610243.410334.9-91.4995-10.8339
4410357.210368.510378.9-10.412-11.2714
4510520.210515.210423.991.30685.01823
4610473.81047610468.47.64219-2.24219
471040710421.610512.6-90.9516-14.6318
481053610541.910556.8-14.8536-5.94635
4910700.210694.210602.291.95476.02031
5010664.210657.110648.68.544277.0974
5110606NANA-99.3259NA
5210716.6NANA-13.6786NA
5310882.8NANA98.0102NA
5410849.4NANA23.263NA
5510794NANA-91.4995NA
5610907.8NANA-10.412NA



Parameters (Session):
Parameters (R input):
par1 = additive ; 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')