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, 22 Nov 2013 10:57:05 -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/22/t1385135856mppzwfd32innrst.htm/, Retrieved Mon, 29 Apr 2024 17:20:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=227632, Retrieved Mon, 29 Apr 2024 17:20:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact59
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [WS8: Retail Sales...] [2013-11-22 15:57:05] [0d4b5c001fcd12491258e86d922016e4] [Current]
Feedback Forum

Post a new message
Dataseries X:
1954
2302
3054
2414
2226
2725
2589
3470
2400
3180
4009
3924
2072
2434
2956
2828
2687
2629
3150
4119
3030
3055
3821
4001
2529
2472
3134
2789
2758
2993
3282
3437
2804
3076
3782
3889
2271
2452
3084
2522
2769
3438
2839
3746
2632
2851
3871
3618
2389
2344
2678
2492
2858
2246
2800
3869
3007
3023
3907
4209




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=227632&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 time4 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11954NANA0.771277NA
22302NANA0.806524NA
33054NANA0.980721NA
42414NANA0.878536NA
52226NANA0.917017NA
62725NANA0.934315NA
725892823.252858.830.9875550.917027
834703527.522869.251.229420.983695
924002596.12870.670.9043530.924465
1031802929.992883.831.0161.08533
1140093767.762920.291.29021.06403
1239243769.412935.51.284081.04101
1320722279.032954.880.7712770.90916
1424342423.843005.290.8065241.00419
1529562999.623058.580.9807210.985459
1628282705.563079.620.8785361.04525
1726872812.113066.580.9170170.95551
1826292860.833061.960.9343150.918963
1931503045.833084.210.9875551.0342
2041193817.153104.831.229421.07908
2130302816.013113.830.9043531.07599
2230553169.553119.621.0160.963858
2338214026.663120.961.29020.948926
2440014030.823139.081.284080.992601
2525292437.043159.750.7712771.03773
2624722529.933136.830.8065240.977101
2731343039.2630990.9807211.03117
2827892715.083090.460.8785361.02723
2927582833.323089.710.9170170.973418
3029932880.883083.420.9343151.03892
3132823029.8230680.9875551.08323
3234373757.623056.421.229420.914674
3328042761.443053.50.9043531.01541
3430763088.953040.291.0160.995807
3537823908.823029.621.29020.967555
3638893914.673048.621.284080.993443
3722712351.43048.710.7712770.965809
3824522454.353043.120.8065240.999041
3930842990.063048.830.9807211.03142
4025222663.983032.290.8785360.946705
4127692775.473026.630.9170170.99767
4234382820.743019.040.9343151.21883
4328392975.173012.670.9875550.95423
4437463704.353013.081.229421.01124
4526322705.522991.670.9043530.972825
4628513021.092973.51.0160.943699
4738713839.582975.961.29021.00818
4836183762.3429301.284080.961635
4923892220.282878.710.7712771.07599
5023442324.572882.210.8065241.00836
5126782846.992902.960.9807210.940641
5224922570.382925.750.8785360.969508
5328582690.912934.420.9170171.06209
5422462766.082960.540.9343150.81198
552800NANA0.987555NA
563869NANA1.22942NA
573007NANA0.904353NA
583023NANA1.016NA
593907NANA1.2902NA
604209NANA1.28408NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 1954 & NA & NA & 0.771277 & NA \tabularnewline
2 & 2302 & NA & NA & 0.806524 & NA \tabularnewline
3 & 3054 & NA & NA & 0.980721 & NA \tabularnewline
4 & 2414 & NA & NA & 0.878536 & NA \tabularnewline
5 & 2226 & NA & NA & 0.917017 & NA \tabularnewline
6 & 2725 & NA & NA & 0.934315 & NA \tabularnewline
7 & 2589 & 2823.25 & 2858.83 & 0.987555 & 0.917027 \tabularnewline
8 & 3470 & 3527.52 & 2869.25 & 1.22942 & 0.983695 \tabularnewline
9 & 2400 & 2596.1 & 2870.67 & 0.904353 & 0.924465 \tabularnewline
10 & 3180 & 2929.99 & 2883.83 & 1.016 & 1.08533 \tabularnewline
11 & 4009 & 3767.76 & 2920.29 & 1.2902 & 1.06403 \tabularnewline
12 & 3924 & 3769.41 & 2935.5 & 1.28408 & 1.04101 \tabularnewline
13 & 2072 & 2279.03 & 2954.88 & 0.771277 & 0.90916 \tabularnewline
14 & 2434 & 2423.84 & 3005.29 & 0.806524 & 1.00419 \tabularnewline
15 & 2956 & 2999.62 & 3058.58 & 0.980721 & 0.985459 \tabularnewline
16 & 2828 & 2705.56 & 3079.62 & 0.878536 & 1.04525 \tabularnewline
17 & 2687 & 2812.11 & 3066.58 & 0.917017 & 0.95551 \tabularnewline
18 & 2629 & 2860.83 & 3061.96 & 0.934315 & 0.918963 \tabularnewline
19 & 3150 & 3045.83 & 3084.21 & 0.987555 & 1.0342 \tabularnewline
20 & 4119 & 3817.15 & 3104.83 & 1.22942 & 1.07908 \tabularnewline
21 & 3030 & 2816.01 & 3113.83 & 0.904353 & 1.07599 \tabularnewline
22 & 3055 & 3169.55 & 3119.62 & 1.016 & 0.963858 \tabularnewline
23 & 3821 & 4026.66 & 3120.96 & 1.2902 & 0.948926 \tabularnewline
24 & 4001 & 4030.82 & 3139.08 & 1.28408 & 0.992601 \tabularnewline
25 & 2529 & 2437.04 & 3159.75 & 0.771277 & 1.03773 \tabularnewline
26 & 2472 & 2529.93 & 3136.83 & 0.806524 & 0.977101 \tabularnewline
27 & 3134 & 3039.26 & 3099 & 0.980721 & 1.03117 \tabularnewline
28 & 2789 & 2715.08 & 3090.46 & 0.878536 & 1.02723 \tabularnewline
29 & 2758 & 2833.32 & 3089.71 & 0.917017 & 0.973418 \tabularnewline
30 & 2993 & 2880.88 & 3083.42 & 0.934315 & 1.03892 \tabularnewline
31 & 3282 & 3029.82 & 3068 & 0.987555 & 1.08323 \tabularnewline
32 & 3437 & 3757.62 & 3056.42 & 1.22942 & 0.914674 \tabularnewline
33 & 2804 & 2761.44 & 3053.5 & 0.904353 & 1.01541 \tabularnewline
34 & 3076 & 3088.95 & 3040.29 & 1.016 & 0.995807 \tabularnewline
35 & 3782 & 3908.82 & 3029.62 & 1.2902 & 0.967555 \tabularnewline
36 & 3889 & 3914.67 & 3048.62 & 1.28408 & 0.993443 \tabularnewline
37 & 2271 & 2351.4 & 3048.71 & 0.771277 & 0.965809 \tabularnewline
38 & 2452 & 2454.35 & 3043.12 & 0.806524 & 0.999041 \tabularnewline
39 & 3084 & 2990.06 & 3048.83 & 0.980721 & 1.03142 \tabularnewline
40 & 2522 & 2663.98 & 3032.29 & 0.878536 & 0.946705 \tabularnewline
41 & 2769 & 2775.47 & 3026.63 & 0.917017 & 0.99767 \tabularnewline
42 & 3438 & 2820.74 & 3019.04 & 0.934315 & 1.21883 \tabularnewline
43 & 2839 & 2975.17 & 3012.67 & 0.987555 & 0.95423 \tabularnewline
44 & 3746 & 3704.35 & 3013.08 & 1.22942 & 1.01124 \tabularnewline
45 & 2632 & 2705.52 & 2991.67 & 0.904353 & 0.972825 \tabularnewline
46 & 2851 & 3021.09 & 2973.5 & 1.016 & 0.943699 \tabularnewline
47 & 3871 & 3839.58 & 2975.96 & 1.2902 & 1.00818 \tabularnewline
48 & 3618 & 3762.34 & 2930 & 1.28408 & 0.961635 \tabularnewline
49 & 2389 & 2220.28 & 2878.71 & 0.771277 & 1.07599 \tabularnewline
50 & 2344 & 2324.57 & 2882.21 & 0.806524 & 1.00836 \tabularnewline
51 & 2678 & 2846.99 & 2902.96 & 0.980721 & 0.940641 \tabularnewline
52 & 2492 & 2570.38 & 2925.75 & 0.878536 & 0.969508 \tabularnewline
53 & 2858 & 2690.91 & 2934.42 & 0.917017 & 1.06209 \tabularnewline
54 & 2246 & 2766.08 & 2960.54 & 0.934315 & 0.81198 \tabularnewline
55 & 2800 & NA & NA & 0.987555 & NA \tabularnewline
56 & 3869 & NA & NA & 1.22942 & NA \tabularnewline
57 & 3007 & NA & NA & 0.904353 & NA \tabularnewline
58 & 3023 & NA & NA & 1.016 & NA \tabularnewline
59 & 3907 & NA & NA & 1.2902 & NA \tabularnewline
60 & 4209 & NA & NA & 1.28408 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=227632&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]1954[/C][C]NA[/C][C]NA[/C][C]0.771277[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]2302[/C][C]NA[/C][C]NA[/C][C]0.806524[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]3054[/C][C]NA[/C][C]NA[/C][C]0.980721[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]2414[/C][C]NA[/C][C]NA[/C][C]0.878536[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]2226[/C][C]NA[/C][C]NA[/C][C]0.917017[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]2725[/C][C]NA[/C][C]NA[/C][C]0.934315[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]2589[/C][C]2823.25[/C][C]2858.83[/C][C]0.987555[/C][C]0.917027[/C][/ROW]
[ROW][C]8[/C][C]3470[/C][C]3527.52[/C][C]2869.25[/C][C]1.22942[/C][C]0.983695[/C][/ROW]
[ROW][C]9[/C][C]2400[/C][C]2596.1[/C][C]2870.67[/C][C]0.904353[/C][C]0.924465[/C][/ROW]
[ROW][C]10[/C][C]3180[/C][C]2929.99[/C][C]2883.83[/C][C]1.016[/C][C]1.08533[/C][/ROW]
[ROW][C]11[/C][C]4009[/C][C]3767.76[/C][C]2920.29[/C][C]1.2902[/C][C]1.06403[/C][/ROW]
[ROW][C]12[/C][C]3924[/C][C]3769.41[/C][C]2935.5[/C][C]1.28408[/C][C]1.04101[/C][/ROW]
[ROW][C]13[/C][C]2072[/C][C]2279.03[/C][C]2954.88[/C][C]0.771277[/C][C]0.90916[/C][/ROW]
[ROW][C]14[/C][C]2434[/C][C]2423.84[/C][C]3005.29[/C][C]0.806524[/C][C]1.00419[/C][/ROW]
[ROW][C]15[/C][C]2956[/C][C]2999.62[/C][C]3058.58[/C][C]0.980721[/C][C]0.985459[/C][/ROW]
[ROW][C]16[/C][C]2828[/C][C]2705.56[/C][C]3079.62[/C][C]0.878536[/C][C]1.04525[/C][/ROW]
[ROW][C]17[/C][C]2687[/C][C]2812.11[/C][C]3066.58[/C][C]0.917017[/C][C]0.95551[/C][/ROW]
[ROW][C]18[/C][C]2629[/C][C]2860.83[/C][C]3061.96[/C][C]0.934315[/C][C]0.918963[/C][/ROW]
[ROW][C]19[/C][C]3150[/C][C]3045.83[/C][C]3084.21[/C][C]0.987555[/C][C]1.0342[/C][/ROW]
[ROW][C]20[/C][C]4119[/C][C]3817.15[/C][C]3104.83[/C][C]1.22942[/C][C]1.07908[/C][/ROW]
[ROW][C]21[/C][C]3030[/C][C]2816.01[/C][C]3113.83[/C][C]0.904353[/C][C]1.07599[/C][/ROW]
[ROW][C]22[/C][C]3055[/C][C]3169.55[/C][C]3119.62[/C][C]1.016[/C][C]0.963858[/C][/ROW]
[ROW][C]23[/C][C]3821[/C][C]4026.66[/C][C]3120.96[/C][C]1.2902[/C][C]0.948926[/C][/ROW]
[ROW][C]24[/C][C]4001[/C][C]4030.82[/C][C]3139.08[/C][C]1.28408[/C][C]0.992601[/C][/ROW]
[ROW][C]25[/C][C]2529[/C][C]2437.04[/C][C]3159.75[/C][C]0.771277[/C][C]1.03773[/C][/ROW]
[ROW][C]26[/C][C]2472[/C][C]2529.93[/C][C]3136.83[/C][C]0.806524[/C][C]0.977101[/C][/ROW]
[ROW][C]27[/C][C]3134[/C][C]3039.26[/C][C]3099[/C][C]0.980721[/C][C]1.03117[/C][/ROW]
[ROW][C]28[/C][C]2789[/C][C]2715.08[/C][C]3090.46[/C][C]0.878536[/C][C]1.02723[/C][/ROW]
[ROW][C]29[/C][C]2758[/C][C]2833.32[/C][C]3089.71[/C][C]0.917017[/C][C]0.973418[/C][/ROW]
[ROW][C]30[/C][C]2993[/C][C]2880.88[/C][C]3083.42[/C][C]0.934315[/C][C]1.03892[/C][/ROW]
[ROW][C]31[/C][C]3282[/C][C]3029.82[/C][C]3068[/C][C]0.987555[/C][C]1.08323[/C][/ROW]
[ROW][C]32[/C][C]3437[/C][C]3757.62[/C][C]3056.42[/C][C]1.22942[/C][C]0.914674[/C][/ROW]
[ROW][C]33[/C][C]2804[/C][C]2761.44[/C][C]3053.5[/C][C]0.904353[/C][C]1.01541[/C][/ROW]
[ROW][C]34[/C][C]3076[/C][C]3088.95[/C][C]3040.29[/C][C]1.016[/C][C]0.995807[/C][/ROW]
[ROW][C]35[/C][C]3782[/C][C]3908.82[/C][C]3029.62[/C][C]1.2902[/C][C]0.967555[/C][/ROW]
[ROW][C]36[/C][C]3889[/C][C]3914.67[/C][C]3048.62[/C][C]1.28408[/C][C]0.993443[/C][/ROW]
[ROW][C]37[/C][C]2271[/C][C]2351.4[/C][C]3048.71[/C][C]0.771277[/C][C]0.965809[/C][/ROW]
[ROW][C]38[/C][C]2452[/C][C]2454.35[/C][C]3043.12[/C][C]0.806524[/C][C]0.999041[/C][/ROW]
[ROW][C]39[/C][C]3084[/C][C]2990.06[/C][C]3048.83[/C][C]0.980721[/C][C]1.03142[/C][/ROW]
[ROW][C]40[/C][C]2522[/C][C]2663.98[/C][C]3032.29[/C][C]0.878536[/C][C]0.946705[/C][/ROW]
[ROW][C]41[/C][C]2769[/C][C]2775.47[/C][C]3026.63[/C][C]0.917017[/C][C]0.99767[/C][/ROW]
[ROW][C]42[/C][C]3438[/C][C]2820.74[/C][C]3019.04[/C][C]0.934315[/C][C]1.21883[/C][/ROW]
[ROW][C]43[/C][C]2839[/C][C]2975.17[/C][C]3012.67[/C][C]0.987555[/C][C]0.95423[/C][/ROW]
[ROW][C]44[/C][C]3746[/C][C]3704.35[/C][C]3013.08[/C][C]1.22942[/C][C]1.01124[/C][/ROW]
[ROW][C]45[/C][C]2632[/C][C]2705.52[/C][C]2991.67[/C][C]0.904353[/C][C]0.972825[/C][/ROW]
[ROW][C]46[/C][C]2851[/C][C]3021.09[/C][C]2973.5[/C][C]1.016[/C][C]0.943699[/C][/ROW]
[ROW][C]47[/C][C]3871[/C][C]3839.58[/C][C]2975.96[/C][C]1.2902[/C][C]1.00818[/C][/ROW]
[ROW][C]48[/C][C]3618[/C][C]3762.34[/C][C]2930[/C][C]1.28408[/C][C]0.961635[/C][/ROW]
[ROW][C]49[/C][C]2389[/C][C]2220.28[/C][C]2878.71[/C][C]0.771277[/C][C]1.07599[/C][/ROW]
[ROW][C]50[/C][C]2344[/C][C]2324.57[/C][C]2882.21[/C][C]0.806524[/C][C]1.00836[/C][/ROW]
[ROW][C]51[/C][C]2678[/C][C]2846.99[/C][C]2902.96[/C][C]0.980721[/C][C]0.940641[/C][/ROW]
[ROW][C]52[/C][C]2492[/C][C]2570.38[/C][C]2925.75[/C][C]0.878536[/C][C]0.969508[/C][/ROW]
[ROW][C]53[/C][C]2858[/C][C]2690.91[/C][C]2934.42[/C][C]0.917017[/C][C]1.06209[/C][/ROW]
[ROW][C]54[/C][C]2246[/C][C]2766.08[/C][C]2960.54[/C][C]0.934315[/C][C]0.81198[/C][/ROW]
[ROW][C]55[/C][C]2800[/C][C]NA[/C][C]NA[/C][C]0.987555[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]3869[/C][C]NA[/C][C]NA[/C][C]1.22942[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]3007[/C][C]NA[/C][C]NA[/C][C]0.904353[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]3023[/C][C]NA[/C][C]NA[/C][C]1.016[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]3907[/C][C]NA[/C][C]NA[/C][C]1.2902[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]4209[/C][C]NA[/C][C]NA[/C][C]1.28408[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=227632&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=227632&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
11954NANA0.771277NA
22302NANA0.806524NA
33054NANA0.980721NA
42414NANA0.878536NA
52226NANA0.917017NA
62725NANA0.934315NA
725892823.252858.830.9875550.917027
834703527.522869.251.229420.983695
924002596.12870.670.9043530.924465
1031802929.992883.831.0161.08533
1140093767.762920.291.29021.06403
1239243769.412935.51.284081.04101
1320722279.032954.880.7712770.90916
1424342423.843005.290.8065241.00419
1529562999.623058.580.9807210.985459
1628282705.563079.620.8785361.04525
1726872812.113066.580.9170170.95551
1826292860.833061.960.9343150.918963
1931503045.833084.210.9875551.0342
2041193817.153104.831.229421.07908
2130302816.013113.830.9043531.07599
2230553169.553119.621.0160.963858
2338214026.663120.961.29020.948926
2440014030.823139.081.284080.992601
2525292437.043159.750.7712771.03773
2624722529.933136.830.8065240.977101
2731343039.2630990.9807211.03117
2827892715.083090.460.8785361.02723
2927582833.323089.710.9170170.973418
3029932880.883083.420.9343151.03892
3132823029.8230680.9875551.08323
3234373757.623056.421.229420.914674
3328042761.443053.50.9043531.01541
3430763088.953040.291.0160.995807
3537823908.823029.621.29020.967555
3638893914.673048.621.284080.993443
3722712351.43048.710.7712770.965809
3824522454.353043.120.8065240.999041
3930842990.063048.830.9807211.03142
4025222663.983032.290.8785360.946705
4127692775.473026.630.9170170.99767
4234382820.743019.040.9343151.21883
4328392975.173012.670.9875550.95423
4437463704.353013.081.229421.01124
4526322705.522991.670.9043530.972825
4628513021.092973.51.0160.943699
4738713839.582975.961.29021.00818
4836183762.3429301.284080.961635
4923892220.282878.710.7712771.07599
5023442324.572882.210.8065241.00836
5126782846.992902.960.9807210.940641
5224922570.382925.750.8785360.969508
5328582690.912934.420.9170171.06209
5422462766.082960.540.9343150.81198
552800NANA0.987555NA
563869NANA1.22942NA
573007NANA0.904353NA
583023NANA1.016NA
593907NANA1.2902NA
604209NANA1.28408NA



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