Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationTue, 18 Aug 2009 12:29:56 -0600
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2009/Aug/18/t1250620423xu3iaw8r7dwg8uc.htm/, Retrieved Mon, 06 May 2024 15:46:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=42866, Retrieved Mon, 06 May 2024 15:46:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact129
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [opgave 9.1] [2009-08-18 18:29:56] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
108,87
106,38
104,77
105,38
106,74
110
110,73
115,7
115,44
113,66
118,4
116,71
119,7
114,17
110,52
111,27
111,41
111,62
113,91
118,54
122,26
120,44
121,37
121,49
125
117,24
117,18
115,15
115,27
114,6
117,48
120,8
118,62
116,79
115,46
112,83
115,56
106,66
103,39
102,65
103,22
104,1
104,32




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=42866&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=42866&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=42866&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 time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1108.87NANA5.48772569444444NA
2106.38NANA-1.40414930555555NA
3104.77NANA-3.43164930555555NA
4105.38NANA-4.20310763888889NA
5106.74NANA-4.07706597222223NA
6110NANA-4.16498263888889NA
7110.73110.103350694444111.51625-1.412899305555550.62664930555556
8115.7115.096892361111112.2920833333332.804809027777790.603107638888872
9115.44116.736059027778112.856253.87980902777778-1.29605902777776
10113.66115.724184027778113.341252.38293402777778-2.06418402777777
11118.4116.314392361111113.781252.53314236111112.08560763888887
12116.71115.648767361111114.0433333333331.605434027777761.06123263888890
13119.7119.731059027778114.2433333333335.48772569444444-0.0310590277777862
14114.17113.090017361111114.494166666667-1.404149305555551.07998263888891
15110.52111.465017361111114.896666666667-3.43164930555555-0.945017361111098
16111.27111.260225694444115.463333333333-4.203107638888890.0097743055555668
17111.41111.792517361111115.869583333333-4.07706597222223-0.382517361111084
18111.62112.027517361111116.1925-4.16498263888889-0.40751736111109
19113.91115.199600694444116.6125-1.41289930555555-1.28960069444443
20118.54119.766059027778116.961252.80480902777779-1.22605902777775
21122.26121.246475694444117.3666666666673.879809027777781.01352430555556
22120.44120.188767361111117.8058333333332.382934027777780.251232638888908
23121.37120.661475694444118.1283333333332.53314236111110.70852430555557
24121.49120.018767361111118.4133333333331.605434027777761.47123263888891
25125124.173975694444118.686255.487725694444440.826024305555578
26117.24117.525017361111118.929166666667-1.40414930555555-0.285017361111116
27117.18115.440017361111118.871666666667-3.431649305555551.73998263888890
28115.15114.364809027778118.567916666667-4.203107638888890.785190972222239
29115.27114.092517361111118.169583333333-4.077065972222231.17748263888889
30114.6113.397517361111117.5625-4.164982638888891.20248263888890
31117.48115.395434027778116.808333333333-1.412899305555552.08456597222222
32120.8118.778975694444115.9741666666672.804809027777792.02102430555554
33118.62118.838559027778114.958753.87980902777778-0.218559027777758
34116.79116.246267361111113.8633333333332.382934027777780.543732638888898
35115.46115.373559027778112.8404166666672.53314236111110.0864409722222206
36112.83113.506267361111111.9008333333331.60543402777776-0.676267361111101
37115.56NA110.915NANA
38106.66NANANANA
39103.39NANANANA
40102.65NANANANA
41103.22NANANANA
42104.1NANANANA
43104.32NANANANA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 108.87 & NA & NA & 5.48772569444444 & NA \tabularnewline
2 & 106.38 & NA & NA & -1.40414930555555 & NA \tabularnewline
3 & 104.77 & NA & NA & -3.43164930555555 & NA \tabularnewline
4 & 105.38 & NA & NA & -4.20310763888889 & NA \tabularnewline
5 & 106.74 & NA & NA & -4.07706597222223 & NA \tabularnewline
6 & 110 & NA & NA & -4.16498263888889 & NA \tabularnewline
7 & 110.73 & 110.103350694444 & 111.51625 & -1.41289930555555 & 0.62664930555556 \tabularnewline
8 & 115.7 & 115.096892361111 & 112.292083333333 & 2.80480902777779 & 0.603107638888872 \tabularnewline
9 & 115.44 & 116.736059027778 & 112.85625 & 3.87980902777778 & -1.29605902777776 \tabularnewline
10 & 113.66 & 115.724184027778 & 113.34125 & 2.38293402777778 & -2.06418402777777 \tabularnewline
11 & 118.4 & 116.314392361111 & 113.78125 & 2.5331423611111 & 2.08560763888887 \tabularnewline
12 & 116.71 & 115.648767361111 & 114.043333333333 & 1.60543402777776 & 1.06123263888890 \tabularnewline
13 & 119.7 & 119.731059027778 & 114.243333333333 & 5.48772569444444 & -0.0310590277777862 \tabularnewline
14 & 114.17 & 113.090017361111 & 114.494166666667 & -1.40414930555555 & 1.07998263888891 \tabularnewline
15 & 110.52 & 111.465017361111 & 114.896666666667 & -3.43164930555555 & -0.945017361111098 \tabularnewline
16 & 111.27 & 111.260225694444 & 115.463333333333 & -4.20310763888889 & 0.0097743055555668 \tabularnewline
17 & 111.41 & 111.792517361111 & 115.869583333333 & -4.07706597222223 & -0.382517361111084 \tabularnewline
18 & 111.62 & 112.027517361111 & 116.1925 & -4.16498263888889 & -0.40751736111109 \tabularnewline
19 & 113.91 & 115.199600694444 & 116.6125 & -1.41289930555555 & -1.28960069444443 \tabularnewline
20 & 118.54 & 119.766059027778 & 116.96125 & 2.80480902777779 & -1.22605902777775 \tabularnewline
21 & 122.26 & 121.246475694444 & 117.366666666667 & 3.87980902777778 & 1.01352430555556 \tabularnewline
22 & 120.44 & 120.188767361111 & 117.805833333333 & 2.38293402777778 & 0.251232638888908 \tabularnewline
23 & 121.37 & 120.661475694444 & 118.128333333333 & 2.5331423611111 & 0.70852430555557 \tabularnewline
24 & 121.49 & 120.018767361111 & 118.413333333333 & 1.60543402777776 & 1.47123263888891 \tabularnewline
25 & 125 & 124.173975694444 & 118.68625 & 5.48772569444444 & 0.826024305555578 \tabularnewline
26 & 117.24 & 117.525017361111 & 118.929166666667 & -1.40414930555555 & -0.285017361111116 \tabularnewline
27 & 117.18 & 115.440017361111 & 118.871666666667 & -3.43164930555555 & 1.73998263888890 \tabularnewline
28 & 115.15 & 114.364809027778 & 118.567916666667 & -4.20310763888889 & 0.785190972222239 \tabularnewline
29 & 115.27 & 114.092517361111 & 118.169583333333 & -4.07706597222223 & 1.17748263888889 \tabularnewline
30 & 114.6 & 113.397517361111 & 117.5625 & -4.16498263888889 & 1.20248263888890 \tabularnewline
31 & 117.48 & 115.395434027778 & 116.808333333333 & -1.41289930555555 & 2.08456597222222 \tabularnewline
32 & 120.8 & 118.778975694444 & 115.974166666667 & 2.80480902777779 & 2.02102430555554 \tabularnewline
33 & 118.62 & 118.838559027778 & 114.95875 & 3.87980902777778 & -0.218559027777758 \tabularnewline
34 & 116.79 & 116.246267361111 & 113.863333333333 & 2.38293402777778 & 0.543732638888898 \tabularnewline
35 & 115.46 & 115.373559027778 & 112.840416666667 & 2.5331423611111 & 0.0864409722222206 \tabularnewline
36 & 112.83 & 113.506267361111 & 111.900833333333 & 1.60543402777776 & -0.676267361111101 \tabularnewline
37 & 115.56 & NA & 110.915 & NA & NA \tabularnewline
38 & 106.66 & NA & NA & NA & NA \tabularnewline
39 & 103.39 & NA & NA & NA & NA \tabularnewline
40 & 102.65 & NA & NA & NA & NA \tabularnewline
41 & 103.22 & NA & NA & NA & NA \tabularnewline
42 & 104.1 & NA & NA & NA & NA \tabularnewline
43 & 104.32 & NA & NA & NA & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=42866&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]108.87[/C][C]NA[/C][C]NA[/C][C]5.48772569444444[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]106.38[/C][C]NA[/C][C]NA[/C][C]-1.40414930555555[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]104.77[/C][C]NA[/C][C]NA[/C][C]-3.43164930555555[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]105.38[/C][C]NA[/C][C]NA[/C][C]-4.20310763888889[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]106.74[/C][C]NA[/C][C]NA[/C][C]-4.07706597222223[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]110[/C][C]NA[/C][C]NA[/C][C]-4.16498263888889[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]110.73[/C][C]110.103350694444[/C][C]111.51625[/C][C]-1.41289930555555[/C][C]0.62664930555556[/C][/ROW]
[ROW][C]8[/C][C]115.7[/C][C]115.096892361111[/C][C]112.292083333333[/C][C]2.80480902777779[/C][C]0.603107638888872[/C][/ROW]
[ROW][C]9[/C][C]115.44[/C][C]116.736059027778[/C][C]112.85625[/C][C]3.87980902777778[/C][C]-1.29605902777776[/C][/ROW]
[ROW][C]10[/C][C]113.66[/C][C]115.724184027778[/C][C]113.34125[/C][C]2.38293402777778[/C][C]-2.06418402777777[/C][/ROW]
[ROW][C]11[/C][C]118.4[/C][C]116.314392361111[/C][C]113.78125[/C][C]2.5331423611111[/C][C]2.08560763888887[/C][/ROW]
[ROW][C]12[/C][C]116.71[/C][C]115.648767361111[/C][C]114.043333333333[/C][C]1.60543402777776[/C][C]1.06123263888890[/C][/ROW]
[ROW][C]13[/C][C]119.7[/C][C]119.731059027778[/C][C]114.243333333333[/C][C]5.48772569444444[/C][C]-0.0310590277777862[/C][/ROW]
[ROW][C]14[/C][C]114.17[/C][C]113.090017361111[/C][C]114.494166666667[/C][C]-1.40414930555555[/C][C]1.07998263888891[/C][/ROW]
[ROW][C]15[/C][C]110.52[/C][C]111.465017361111[/C][C]114.896666666667[/C][C]-3.43164930555555[/C][C]-0.945017361111098[/C][/ROW]
[ROW][C]16[/C][C]111.27[/C][C]111.260225694444[/C][C]115.463333333333[/C][C]-4.20310763888889[/C][C]0.0097743055555668[/C][/ROW]
[ROW][C]17[/C][C]111.41[/C][C]111.792517361111[/C][C]115.869583333333[/C][C]-4.07706597222223[/C][C]-0.382517361111084[/C][/ROW]
[ROW][C]18[/C][C]111.62[/C][C]112.027517361111[/C][C]116.1925[/C][C]-4.16498263888889[/C][C]-0.40751736111109[/C][/ROW]
[ROW][C]19[/C][C]113.91[/C][C]115.199600694444[/C][C]116.6125[/C][C]-1.41289930555555[/C][C]-1.28960069444443[/C][/ROW]
[ROW][C]20[/C][C]118.54[/C][C]119.766059027778[/C][C]116.96125[/C][C]2.80480902777779[/C][C]-1.22605902777775[/C][/ROW]
[ROW][C]21[/C][C]122.26[/C][C]121.246475694444[/C][C]117.366666666667[/C][C]3.87980902777778[/C][C]1.01352430555556[/C][/ROW]
[ROW][C]22[/C][C]120.44[/C][C]120.188767361111[/C][C]117.805833333333[/C][C]2.38293402777778[/C][C]0.251232638888908[/C][/ROW]
[ROW][C]23[/C][C]121.37[/C][C]120.661475694444[/C][C]118.128333333333[/C][C]2.5331423611111[/C][C]0.70852430555557[/C][/ROW]
[ROW][C]24[/C][C]121.49[/C][C]120.018767361111[/C][C]118.413333333333[/C][C]1.60543402777776[/C][C]1.47123263888891[/C][/ROW]
[ROW][C]25[/C][C]125[/C][C]124.173975694444[/C][C]118.68625[/C][C]5.48772569444444[/C][C]0.826024305555578[/C][/ROW]
[ROW][C]26[/C][C]117.24[/C][C]117.525017361111[/C][C]118.929166666667[/C][C]-1.40414930555555[/C][C]-0.285017361111116[/C][/ROW]
[ROW][C]27[/C][C]117.18[/C][C]115.440017361111[/C][C]118.871666666667[/C][C]-3.43164930555555[/C][C]1.73998263888890[/C][/ROW]
[ROW][C]28[/C][C]115.15[/C][C]114.364809027778[/C][C]118.567916666667[/C][C]-4.20310763888889[/C][C]0.785190972222239[/C][/ROW]
[ROW][C]29[/C][C]115.27[/C][C]114.092517361111[/C][C]118.169583333333[/C][C]-4.07706597222223[/C][C]1.17748263888889[/C][/ROW]
[ROW][C]30[/C][C]114.6[/C][C]113.397517361111[/C][C]117.5625[/C][C]-4.16498263888889[/C][C]1.20248263888890[/C][/ROW]
[ROW][C]31[/C][C]117.48[/C][C]115.395434027778[/C][C]116.808333333333[/C][C]-1.41289930555555[/C][C]2.08456597222222[/C][/ROW]
[ROW][C]32[/C][C]120.8[/C][C]118.778975694444[/C][C]115.974166666667[/C][C]2.80480902777779[/C][C]2.02102430555554[/C][/ROW]
[ROW][C]33[/C][C]118.62[/C][C]118.838559027778[/C][C]114.95875[/C][C]3.87980902777778[/C][C]-0.218559027777758[/C][/ROW]
[ROW][C]34[/C][C]116.79[/C][C]116.246267361111[/C][C]113.863333333333[/C][C]2.38293402777778[/C][C]0.543732638888898[/C][/ROW]
[ROW][C]35[/C][C]115.46[/C][C]115.373559027778[/C][C]112.840416666667[/C][C]2.5331423611111[/C][C]0.0864409722222206[/C][/ROW]
[ROW][C]36[/C][C]112.83[/C][C]113.506267361111[/C][C]111.900833333333[/C][C]1.60543402777776[/C][C]-0.676267361111101[/C][/ROW]
[ROW][C]37[/C][C]115.56[/C][C]NA[/C][C]110.915[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]38[/C][C]106.66[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]39[/C][C]103.39[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]40[/C][C]102.65[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]41[/C][C]103.22[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]42[/C][C]104.1[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]43[/C][C]104.32[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=42866&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=42866&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
1108.87NANA5.48772569444444NA
2106.38NANA-1.40414930555555NA
3104.77NANA-3.43164930555555NA
4105.38NANA-4.20310763888889NA
5106.74NANA-4.07706597222223NA
6110NANA-4.16498263888889NA
7110.73110.103350694444111.51625-1.412899305555550.62664930555556
8115.7115.096892361111112.2920833333332.804809027777790.603107638888872
9115.44116.736059027778112.856253.87980902777778-1.29605902777776
10113.66115.724184027778113.341252.38293402777778-2.06418402777777
11118.4116.314392361111113.781252.53314236111112.08560763888887
12116.71115.648767361111114.0433333333331.605434027777761.06123263888890
13119.7119.731059027778114.2433333333335.48772569444444-0.0310590277777862
14114.17113.090017361111114.494166666667-1.404149305555551.07998263888891
15110.52111.465017361111114.896666666667-3.43164930555555-0.945017361111098
16111.27111.260225694444115.463333333333-4.203107638888890.0097743055555668
17111.41111.792517361111115.869583333333-4.07706597222223-0.382517361111084
18111.62112.027517361111116.1925-4.16498263888889-0.40751736111109
19113.91115.199600694444116.6125-1.41289930555555-1.28960069444443
20118.54119.766059027778116.961252.80480902777779-1.22605902777775
21122.26121.246475694444117.3666666666673.879809027777781.01352430555556
22120.44120.188767361111117.8058333333332.382934027777780.251232638888908
23121.37120.661475694444118.1283333333332.53314236111110.70852430555557
24121.49120.018767361111118.4133333333331.605434027777761.47123263888891
25125124.173975694444118.686255.487725694444440.826024305555578
26117.24117.525017361111118.929166666667-1.40414930555555-0.285017361111116
27117.18115.440017361111118.871666666667-3.431649305555551.73998263888890
28115.15114.364809027778118.567916666667-4.203107638888890.785190972222239
29115.27114.092517361111118.169583333333-4.077065972222231.17748263888889
30114.6113.397517361111117.5625-4.164982638888891.20248263888890
31117.48115.395434027778116.808333333333-1.412899305555552.08456597222222
32120.8118.778975694444115.9741666666672.804809027777792.02102430555554
33118.62118.838559027778114.958753.87980902777778-0.218559027777758
34116.79116.246267361111113.8633333333332.382934027777780.543732638888898
35115.46115.373559027778112.8404166666672.53314236111110.0864409722222206
36112.83113.506267361111111.9008333333331.60543402777776-0.676267361111101
37115.56NA110.915NANA
38106.66NANANANA
39103.39NANANANA
40102.65NANANANA
41103.22NANANANA
42104.1NANANANA
43104.32NANANANA



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,m$trend[i]+m$seasonal[i]) else a<-table.element(a,m$trend[i]*m$seasonal[i])
a<-table.element(a,m$trend[i])
a<-table.element(a,m$seasonal[i])
a<-table.element(a,m$random[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')