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:54:24 -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/t1385135708igbqq3sjynzqne8.htm/, Retrieved Mon, 29 Apr 2024 17:25:51 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=227629, Retrieved Mon, 29 Apr 2024 17:25:51 +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] [WS8: Retail Sales...] [2013-11-22 15:54:24] [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 time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ fisher.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 Ronald Aylmer Fisher' @ fisher.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=227629&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 Ronald Aylmer Fisher' @ fisher.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=227629&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=227629&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 Ronald Aylmer Fisher' @ fisher.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11954NANA-686.832NA
22302NANA-582.937NA
33054NANA-55.9158NA
42414NANA-365.853NA
52226NANA-252.905NA
62725NANA-196.312NA
725892826.332858.83-32.4991-237.334
834703559.782869.25690.532-89.7821
924002588.182870.67-282.489-188.178
1031802928.452883.8344.6155251.551
1140093787.762920.29867.47221.239
1239243788.632935.5853.126135.374
1320722268.042954.88-686.832-196.043
1424342422.363005.29-582.93711.645
1529563002.673058.58-55.9158-46.6675
1628282713.773079.62-365.853114.228
1726872813.683066.58-252.905-126.678
1826292865.653061.96-196.312-236.647
1931503051.713084.21-32.499198.2908
2041193795.373104.83690.532323.635
2130302831.343113.83-282.489198.655
2230553164.243119.6244.6155-109.24
2338213988.433120.96867.47-167.428
2440013992.213139.08853.1268.7908
2525292472.923159.75-686.83256.0825
2624722553.93136.83-582.937-81.8967
2731343043.083099-55.915890.9158
2827892724.613090.46-365.85364.395
2927582836.83089.71-252.905-78.803
3029932887.113083.42-196.312105.895
3132823035.53068-32.4991246.499
3234373746.953056.42690.532-309.949
3328042771.013053.5-282.48932.9887
3430763084.913040.2944.6155-8.90712
3537823897.093029.62867.47-115.095
3638893901.753048.62853.126-12.7509
3722712361.883048.71-686.832-90.8759
3824522460.193043.12-582.937-8.18837
3930842992.923048.83-55.915891.0825
4025222666.443032.29-365.853-144.438
4127692773.723026.63-252.905-4.71962
4234382822.733019.04-196.312615.27
4328392980.173012.67-32.4991-141.168
4437463703.623013.08690.53242.3845
4526322709.182991.67-282.489-77.178
4628513018.122973.544.6155-167.115
4738713843.432975.96867.4727.572
4836183783.132930853.126-165.126
4923892191.882878.71-686.832197.124
5023442299.272882.21-582.93744.7283
5126782847.042902.96-55.9158-169.043
5224922559.92925.75-365.853-67.8967
5328582681.512934.42-252.905176.489
5422462764.232960.54-196.312-518.23
552800NANA-32.4991NA
563869NANA690.532NA
573007NANA-282.489NA
583023NANA44.6155NA
593907NANA867.47NA
604209NANA853.126NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 1954 & NA & NA & -686.832 & NA \tabularnewline
2 & 2302 & NA & NA & -582.937 & NA \tabularnewline
3 & 3054 & NA & NA & -55.9158 & NA \tabularnewline
4 & 2414 & NA & NA & -365.853 & NA \tabularnewline
5 & 2226 & NA & NA & -252.905 & NA \tabularnewline
6 & 2725 & NA & NA & -196.312 & NA \tabularnewline
7 & 2589 & 2826.33 & 2858.83 & -32.4991 & -237.334 \tabularnewline
8 & 3470 & 3559.78 & 2869.25 & 690.532 & -89.7821 \tabularnewline
9 & 2400 & 2588.18 & 2870.67 & -282.489 & -188.178 \tabularnewline
10 & 3180 & 2928.45 & 2883.83 & 44.6155 & 251.551 \tabularnewline
11 & 4009 & 3787.76 & 2920.29 & 867.47 & 221.239 \tabularnewline
12 & 3924 & 3788.63 & 2935.5 & 853.126 & 135.374 \tabularnewline
13 & 2072 & 2268.04 & 2954.88 & -686.832 & -196.043 \tabularnewline
14 & 2434 & 2422.36 & 3005.29 & -582.937 & 11.645 \tabularnewline
15 & 2956 & 3002.67 & 3058.58 & -55.9158 & -46.6675 \tabularnewline
16 & 2828 & 2713.77 & 3079.62 & -365.853 & 114.228 \tabularnewline
17 & 2687 & 2813.68 & 3066.58 & -252.905 & -126.678 \tabularnewline
18 & 2629 & 2865.65 & 3061.96 & -196.312 & -236.647 \tabularnewline
19 & 3150 & 3051.71 & 3084.21 & -32.4991 & 98.2908 \tabularnewline
20 & 4119 & 3795.37 & 3104.83 & 690.532 & 323.635 \tabularnewline
21 & 3030 & 2831.34 & 3113.83 & -282.489 & 198.655 \tabularnewline
22 & 3055 & 3164.24 & 3119.62 & 44.6155 & -109.24 \tabularnewline
23 & 3821 & 3988.43 & 3120.96 & 867.47 & -167.428 \tabularnewline
24 & 4001 & 3992.21 & 3139.08 & 853.126 & 8.7908 \tabularnewline
25 & 2529 & 2472.92 & 3159.75 & -686.832 & 56.0825 \tabularnewline
26 & 2472 & 2553.9 & 3136.83 & -582.937 & -81.8967 \tabularnewline
27 & 3134 & 3043.08 & 3099 & -55.9158 & 90.9158 \tabularnewline
28 & 2789 & 2724.61 & 3090.46 & -365.853 & 64.395 \tabularnewline
29 & 2758 & 2836.8 & 3089.71 & -252.905 & -78.803 \tabularnewline
30 & 2993 & 2887.11 & 3083.42 & -196.312 & 105.895 \tabularnewline
31 & 3282 & 3035.5 & 3068 & -32.4991 & 246.499 \tabularnewline
32 & 3437 & 3746.95 & 3056.42 & 690.532 & -309.949 \tabularnewline
33 & 2804 & 2771.01 & 3053.5 & -282.489 & 32.9887 \tabularnewline
34 & 3076 & 3084.91 & 3040.29 & 44.6155 & -8.90712 \tabularnewline
35 & 3782 & 3897.09 & 3029.62 & 867.47 & -115.095 \tabularnewline
36 & 3889 & 3901.75 & 3048.62 & 853.126 & -12.7509 \tabularnewline
37 & 2271 & 2361.88 & 3048.71 & -686.832 & -90.8759 \tabularnewline
38 & 2452 & 2460.19 & 3043.12 & -582.937 & -8.18837 \tabularnewline
39 & 3084 & 2992.92 & 3048.83 & -55.9158 & 91.0825 \tabularnewline
40 & 2522 & 2666.44 & 3032.29 & -365.853 & -144.438 \tabularnewline
41 & 2769 & 2773.72 & 3026.63 & -252.905 & -4.71962 \tabularnewline
42 & 3438 & 2822.73 & 3019.04 & -196.312 & 615.27 \tabularnewline
43 & 2839 & 2980.17 & 3012.67 & -32.4991 & -141.168 \tabularnewline
44 & 3746 & 3703.62 & 3013.08 & 690.532 & 42.3845 \tabularnewline
45 & 2632 & 2709.18 & 2991.67 & -282.489 & -77.178 \tabularnewline
46 & 2851 & 3018.12 & 2973.5 & 44.6155 & -167.115 \tabularnewline
47 & 3871 & 3843.43 & 2975.96 & 867.47 & 27.572 \tabularnewline
48 & 3618 & 3783.13 & 2930 & 853.126 & -165.126 \tabularnewline
49 & 2389 & 2191.88 & 2878.71 & -686.832 & 197.124 \tabularnewline
50 & 2344 & 2299.27 & 2882.21 & -582.937 & 44.7283 \tabularnewline
51 & 2678 & 2847.04 & 2902.96 & -55.9158 & -169.043 \tabularnewline
52 & 2492 & 2559.9 & 2925.75 & -365.853 & -67.8967 \tabularnewline
53 & 2858 & 2681.51 & 2934.42 & -252.905 & 176.489 \tabularnewline
54 & 2246 & 2764.23 & 2960.54 & -196.312 & -518.23 \tabularnewline
55 & 2800 & NA & NA & -32.4991 & NA \tabularnewline
56 & 3869 & NA & NA & 690.532 & NA \tabularnewline
57 & 3007 & NA & NA & -282.489 & NA \tabularnewline
58 & 3023 & NA & NA & 44.6155 & NA \tabularnewline
59 & 3907 & NA & NA & 867.47 & NA \tabularnewline
60 & 4209 & NA & NA & 853.126 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=227629&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]-686.832[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]2302[/C][C]NA[/C][C]NA[/C][C]-582.937[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]3054[/C][C]NA[/C][C]NA[/C][C]-55.9158[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]2414[/C][C]NA[/C][C]NA[/C][C]-365.853[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]2226[/C][C]NA[/C][C]NA[/C][C]-252.905[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]2725[/C][C]NA[/C][C]NA[/C][C]-196.312[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]2589[/C][C]2826.33[/C][C]2858.83[/C][C]-32.4991[/C][C]-237.334[/C][/ROW]
[ROW][C]8[/C][C]3470[/C][C]3559.78[/C][C]2869.25[/C][C]690.532[/C][C]-89.7821[/C][/ROW]
[ROW][C]9[/C][C]2400[/C][C]2588.18[/C][C]2870.67[/C][C]-282.489[/C][C]-188.178[/C][/ROW]
[ROW][C]10[/C][C]3180[/C][C]2928.45[/C][C]2883.83[/C][C]44.6155[/C][C]251.551[/C][/ROW]
[ROW][C]11[/C][C]4009[/C][C]3787.76[/C][C]2920.29[/C][C]867.47[/C][C]221.239[/C][/ROW]
[ROW][C]12[/C][C]3924[/C][C]3788.63[/C][C]2935.5[/C][C]853.126[/C][C]135.374[/C][/ROW]
[ROW][C]13[/C][C]2072[/C][C]2268.04[/C][C]2954.88[/C][C]-686.832[/C][C]-196.043[/C][/ROW]
[ROW][C]14[/C][C]2434[/C][C]2422.36[/C][C]3005.29[/C][C]-582.937[/C][C]11.645[/C][/ROW]
[ROW][C]15[/C][C]2956[/C][C]3002.67[/C][C]3058.58[/C][C]-55.9158[/C][C]-46.6675[/C][/ROW]
[ROW][C]16[/C][C]2828[/C][C]2713.77[/C][C]3079.62[/C][C]-365.853[/C][C]114.228[/C][/ROW]
[ROW][C]17[/C][C]2687[/C][C]2813.68[/C][C]3066.58[/C][C]-252.905[/C][C]-126.678[/C][/ROW]
[ROW][C]18[/C][C]2629[/C][C]2865.65[/C][C]3061.96[/C][C]-196.312[/C][C]-236.647[/C][/ROW]
[ROW][C]19[/C][C]3150[/C][C]3051.71[/C][C]3084.21[/C][C]-32.4991[/C][C]98.2908[/C][/ROW]
[ROW][C]20[/C][C]4119[/C][C]3795.37[/C][C]3104.83[/C][C]690.532[/C][C]323.635[/C][/ROW]
[ROW][C]21[/C][C]3030[/C][C]2831.34[/C][C]3113.83[/C][C]-282.489[/C][C]198.655[/C][/ROW]
[ROW][C]22[/C][C]3055[/C][C]3164.24[/C][C]3119.62[/C][C]44.6155[/C][C]-109.24[/C][/ROW]
[ROW][C]23[/C][C]3821[/C][C]3988.43[/C][C]3120.96[/C][C]867.47[/C][C]-167.428[/C][/ROW]
[ROW][C]24[/C][C]4001[/C][C]3992.21[/C][C]3139.08[/C][C]853.126[/C][C]8.7908[/C][/ROW]
[ROW][C]25[/C][C]2529[/C][C]2472.92[/C][C]3159.75[/C][C]-686.832[/C][C]56.0825[/C][/ROW]
[ROW][C]26[/C][C]2472[/C][C]2553.9[/C][C]3136.83[/C][C]-582.937[/C][C]-81.8967[/C][/ROW]
[ROW][C]27[/C][C]3134[/C][C]3043.08[/C][C]3099[/C][C]-55.9158[/C][C]90.9158[/C][/ROW]
[ROW][C]28[/C][C]2789[/C][C]2724.61[/C][C]3090.46[/C][C]-365.853[/C][C]64.395[/C][/ROW]
[ROW][C]29[/C][C]2758[/C][C]2836.8[/C][C]3089.71[/C][C]-252.905[/C][C]-78.803[/C][/ROW]
[ROW][C]30[/C][C]2993[/C][C]2887.11[/C][C]3083.42[/C][C]-196.312[/C][C]105.895[/C][/ROW]
[ROW][C]31[/C][C]3282[/C][C]3035.5[/C][C]3068[/C][C]-32.4991[/C][C]246.499[/C][/ROW]
[ROW][C]32[/C][C]3437[/C][C]3746.95[/C][C]3056.42[/C][C]690.532[/C][C]-309.949[/C][/ROW]
[ROW][C]33[/C][C]2804[/C][C]2771.01[/C][C]3053.5[/C][C]-282.489[/C][C]32.9887[/C][/ROW]
[ROW][C]34[/C][C]3076[/C][C]3084.91[/C][C]3040.29[/C][C]44.6155[/C][C]-8.90712[/C][/ROW]
[ROW][C]35[/C][C]3782[/C][C]3897.09[/C][C]3029.62[/C][C]867.47[/C][C]-115.095[/C][/ROW]
[ROW][C]36[/C][C]3889[/C][C]3901.75[/C][C]3048.62[/C][C]853.126[/C][C]-12.7509[/C][/ROW]
[ROW][C]37[/C][C]2271[/C][C]2361.88[/C][C]3048.71[/C][C]-686.832[/C][C]-90.8759[/C][/ROW]
[ROW][C]38[/C][C]2452[/C][C]2460.19[/C][C]3043.12[/C][C]-582.937[/C][C]-8.18837[/C][/ROW]
[ROW][C]39[/C][C]3084[/C][C]2992.92[/C][C]3048.83[/C][C]-55.9158[/C][C]91.0825[/C][/ROW]
[ROW][C]40[/C][C]2522[/C][C]2666.44[/C][C]3032.29[/C][C]-365.853[/C][C]-144.438[/C][/ROW]
[ROW][C]41[/C][C]2769[/C][C]2773.72[/C][C]3026.63[/C][C]-252.905[/C][C]-4.71962[/C][/ROW]
[ROW][C]42[/C][C]3438[/C][C]2822.73[/C][C]3019.04[/C][C]-196.312[/C][C]615.27[/C][/ROW]
[ROW][C]43[/C][C]2839[/C][C]2980.17[/C][C]3012.67[/C][C]-32.4991[/C][C]-141.168[/C][/ROW]
[ROW][C]44[/C][C]3746[/C][C]3703.62[/C][C]3013.08[/C][C]690.532[/C][C]42.3845[/C][/ROW]
[ROW][C]45[/C][C]2632[/C][C]2709.18[/C][C]2991.67[/C][C]-282.489[/C][C]-77.178[/C][/ROW]
[ROW][C]46[/C][C]2851[/C][C]3018.12[/C][C]2973.5[/C][C]44.6155[/C][C]-167.115[/C][/ROW]
[ROW][C]47[/C][C]3871[/C][C]3843.43[/C][C]2975.96[/C][C]867.47[/C][C]27.572[/C][/ROW]
[ROW][C]48[/C][C]3618[/C][C]3783.13[/C][C]2930[/C][C]853.126[/C][C]-165.126[/C][/ROW]
[ROW][C]49[/C][C]2389[/C][C]2191.88[/C][C]2878.71[/C][C]-686.832[/C][C]197.124[/C][/ROW]
[ROW][C]50[/C][C]2344[/C][C]2299.27[/C][C]2882.21[/C][C]-582.937[/C][C]44.7283[/C][/ROW]
[ROW][C]51[/C][C]2678[/C][C]2847.04[/C][C]2902.96[/C][C]-55.9158[/C][C]-169.043[/C][/ROW]
[ROW][C]52[/C][C]2492[/C][C]2559.9[/C][C]2925.75[/C][C]-365.853[/C][C]-67.8967[/C][/ROW]
[ROW][C]53[/C][C]2858[/C][C]2681.51[/C][C]2934.42[/C][C]-252.905[/C][C]176.489[/C][/ROW]
[ROW][C]54[/C][C]2246[/C][C]2764.23[/C][C]2960.54[/C][C]-196.312[/C][C]-518.23[/C][/ROW]
[ROW][C]55[/C][C]2800[/C][C]NA[/C][C]NA[/C][C]-32.4991[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]3869[/C][C]NA[/C][C]NA[/C][C]690.532[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]3007[/C][C]NA[/C][C]NA[/C][C]-282.489[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]3023[/C][C]NA[/C][C]NA[/C][C]44.6155[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]3907[/C][C]NA[/C][C]NA[/C][C]867.47[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]4209[/C][C]NA[/C][C]NA[/C][C]853.126[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=227629&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=227629&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
11954NANA-686.832NA
22302NANA-582.937NA
33054NANA-55.9158NA
42414NANA-365.853NA
52226NANA-252.905NA
62725NANA-196.312NA
725892826.332858.83-32.4991-237.334
834703559.782869.25690.532-89.7821
924002588.182870.67-282.489-188.178
1031802928.452883.8344.6155251.551
1140093787.762920.29867.47221.239
1239243788.632935.5853.126135.374
1320722268.042954.88-686.832-196.043
1424342422.363005.29-582.93711.645
1529563002.673058.58-55.9158-46.6675
1628282713.773079.62-365.853114.228
1726872813.683066.58-252.905-126.678
1826292865.653061.96-196.312-236.647
1931503051.713084.21-32.499198.2908
2041193795.373104.83690.532323.635
2130302831.343113.83-282.489198.655
2230553164.243119.6244.6155-109.24
2338213988.433120.96867.47-167.428
2440013992.213139.08853.1268.7908
2525292472.923159.75-686.83256.0825
2624722553.93136.83-582.937-81.8967
2731343043.083099-55.915890.9158
2827892724.613090.46-365.85364.395
2927582836.83089.71-252.905-78.803
3029932887.113083.42-196.312105.895
3132823035.53068-32.4991246.499
3234373746.953056.42690.532-309.949
3328042771.013053.5-282.48932.9887
3430763084.913040.2944.6155-8.90712
3537823897.093029.62867.47-115.095
3638893901.753048.62853.126-12.7509
3722712361.883048.71-686.832-90.8759
3824522460.193043.12-582.937-8.18837
3930842992.923048.83-55.915891.0825
4025222666.443032.29-365.853-144.438
4127692773.723026.63-252.905-4.71962
4234382822.733019.04-196.312615.27
4328392980.173012.67-32.4991-141.168
4437463703.623013.08690.53242.3845
4526322709.182991.67-282.489-77.178
4628513018.122973.544.6155-167.115
4738713843.432975.96867.4727.572
4836183783.132930853.126-165.126
4923892191.882878.71-686.832197.124
5023442299.272882.21-582.93744.7283
5126782847.042902.96-55.9158-169.043
5224922559.92925.75-365.853-67.8967
5328582681.512934.42-252.905176.489
5422462764.232960.54-196.312-518.23
552800NANA-32.4991NA
563869NANA690.532NA
573007NANA-282.489NA
583023NANA44.6155NA
593907NANA867.47NA
604209NANA853.126NA



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