Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationTue, 31 May 2016 10:10:35 +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/May/31/t14646858790zip2ss6juwhsvo.htm/, Retrieved Mon, 06 May 2024 17:13:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=295732, Retrieved Mon, 06 May 2024 17:13:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact117
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [] [2016-05-31 09:10:35] [60c466f2753cef60360c0cd0685abd02] [Current]
Feedback Forum

Post a new message
Dataseries X:
93,91
94,27
94,55
94,66
94,78
94,91
95,2
95,48
95,56
95,75
95,91
96,16
96,32
96,58
97,08
97,22
97,49
97,62
97,83
98,12
98,29
98,47
98,64
98,67
98,82
99,17
99,38
99,53
99,54
99,76
100,02
100,22
100,55
100,94
100,99
101,07
101,19
101,94
102,25
102,49
102,58
102,74
103,01
103,19
103,44
103,62
103,74
103,82
103,96
104,7
105,13
105,26
105,44
105,73
105,83
105,97
106,13
106,49
106,74
106,82




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

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







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
193.91NANA0.99744NA
294.27NANA1.00042NA
394.55NANA1.00185NA
494.66NANA1.00128NA
594.78NANA1.00042NA
694.91NANA1.00018NA
795.295.199195.19541.000041.00001
895.4895.420595.39211.00031.00062
995.5695.609695.59371.000170.999481
1095.7595.835495.80581.000310.999109
1195.9195.963296.02540.9993520.999445
1296.1696.081496.25120.9982361.00082
1396.3296.226796.47380.997441.00097
1496.5896.734496.69331.000420.998404
1597.0897.096596.91711.001850.99983
1697.2297.268797.14421.001280.999499
1797.4997.412697.37121.000421.00079
1897.6297.607197.58961.000181.00013
1997.8397.802197.79831.000041.00029
2098.1298.039698.01041.00031.00082
2198.2998.230498.21421.000171.00061
2298.4798.436698.40621.000311.00034
2398.6498.524198.58790.9993521.00118
2498.6798.588398.76250.9982361.00083
2598.8298.689698.94290.997441.00132
2699.1799.163899.12171.000421.00006
2799.3899.487199.30331.001850.998923
2899.5399.62899.50041.001280.999017
2999.5499.743699.70121.000420.997959
3099.7699.917199.89921.000180.998428
31100.02100.102100.0981.000040.999183
32100.22100.342100.3121.00030.998784
33100.55100.564100.5471.000170.999863
34100.94100.821100.791.000311.00118
35100.99100.975101.040.9993521.00015
36101.07101.112101.2910.9982360.999583
37101.19101.28101.540.997440.999115
38101.94101.831101.7881.000421.00107
39102.25102.221102.0321.001851.00028
40102.49102.395102.2641.001281.00093
41102.58102.534102.491.000421.00045
42102.74102.738102.721.000181.00002
43103.01102.954102.951.000041.00055
44103.19103.211103.181.00030.999799
45103.44103.432103.4151.000171.00008
46103.62103.682103.651.000310.999398
47103.74103.818103.8850.9993520.999251
48103.82103.945104.1290.9982360.998797
49103.96104.104104.3710.997440.998621
50104.7104.649104.6041.000421.00049
51105.13105.026104.8321.001851.00099
52105.26105.198105.0641.001281.00059
53105.44105.353105.3081.000421.00082
54105.73105.577105.5581.000181.00145
55105.83NANA1.00004NA
56105.97NANA1.0003NA
57106.13NANA1.00017NA
58106.49NANA1.00031NA
59106.74NANA0.999352NA
60106.82NANA0.998236NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 93.91 & NA & NA & 0.99744 & NA \tabularnewline
2 & 94.27 & NA & NA & 1.00042 & NA \tabularnewline
3 & 94.55 & NA & NA & 1.00185 & NA \tabularnewline
4 & 94.66 & NA & NA & 1.00128 & NA \tabularnewline
5 & 94.78 & NA & NA & 1.00042 & NA \tabularnewline
6 & 94.91 & NA & NA & 1.00018 & NA \tabularnewline
7 & 95.2 & 95.1991 & 95.1954 & 1.00004 & 1.00001 \tabularnewline
8 & 95.48 & 95.4205 & 95.3921 & 1.0003 & 1.00062 \tabularnewline
9 & 95.56 & 95.6096 & 95.5937 & 1.00017 & 0.999481 \tabularnewline
10 & 95.75 & 95.8354 & 95.8058 & 1.00031 & 0.999109 \tabularnewline
11 & 95.91 & 95.9632 & 96.0254 & 0.999352 & 0.999445 \tabularnewline
12 & 96.16 & 96.0814 & 96.2512 & 0.998236 & 1.00082 \tabularnewline
13 & 96.32 & 96.2267 & 96.4738 & 0.99744 & 1.00097 \tabularnewline
14 & 96.58 & 96.7344 & 96.6933 & 1.00042 & 0.998404 \tabularnewline
15 & 97.08 & 97.0965 & 96.9171 & 1.00185 & 0.99983 \tabularnewline
16 & 97.22 & 97.2687 & 97.1442 & 1.00128 & 0.999499 \tabularnewline
17 & 97.49 & 97.4126 & 97.3712 & 1.00042 & 1.00079 \tabularnewline
18 & 97.62 & 97.6071 & 97.5896 & 1.00018 & 1.00013 \tabularnewline
19 & 97.83 & 97.8021 & 97.7983 & 1.00004 & 1.00029 \tabularnewline
20 & 98.12 & 98.0396 & 98.0104 & 1.0003 & 1.00082 \tabularnewline
21 & 98.29 & 98.2304 & 98.2142 & 1.00017 & 1.00061 \tabularnewline
22 & 98.47 & 98.4366 & 98.4062 & 1.00031 & 1.00034 \tabularnewline
23 & 98.64 & 98.5241 & 98.5879 & 0.999352 & 1.00118 \tabularnewline
24 & 98.67 & 98.5883 & 98.7625 & 0.998236 & 1.00083 \tabularnewline
25 & 98.82 & 98.6896 & 98.9429 & 0.99744 & 1.00132 \tabularnewline
26 & 99.17 & 99.1638 & 99.1217 & 1.00042 & 1.00006 \tabularnewline
27 & 99.38 & 99.4871 & 99.3033 & 1.00185 & 0.998923 \tabularnewline
28 & 99.53 & 99.628 & 99.5004 & 1.00128 & 0.999017 \tabularnewline
29 & 99.54 & 99.7436 & 99.7012 & 1.00042 & 0.997959 \tabularnewline
30 & 99.76 & 99.9171 & 99.8992 & 1.00018 & 0.998428 \tabularnewline
31 & 100.02 & 100.102 & 100.098 & 1.00004 & 0.999183 \tabularnewline
32 & 100.22 & 100.342 & 100.312 & 1.0003 & 0.998784 \tabularnewline
33 & 100.55 & 100.564 & 100.547 & 1.00017 & 0.999863 \tabularnewline
34 & 100.94 & 100.821 & 100.79 & 1.00031 & 1.00118 \tabularnewline
35 & 100.99 & 100.975 & 101.04 & 0.999352 & 1.00015 \tabularnewline
36 & 101.07 & 101.112 & 101.291 & 0.998236 & 0.999583 \tabularnewline
37 & 101.19 & 101.28 & 101.54 & 0.99744 & 0.999115 \tabularnewline
38 & 101.94 & 101.831 & 101.788 & 1.00042 & 1.00107 \tabularnewline
39 & 102.25 & 102.221 & 102.032 & 1.00185 & 1.00028 \tabularnewline
40 & 102.49 & 102.395 & 102.264 & 1.00128 & 1.00093 \tabularnewline
41 & 102.58 & 102.534 & 102.49 & 1.00042 & 1.00045 \tabularnewline
42 & 102.74 & 102.738 & 102.72 & 1.00018 & 1.00002 \tabularnewline
43 & 103.01 & 102.954 & 102.95 & 1.00004 & 1.00055 \tabularnewline
44 & 103.19 & 103.211 & 103.18 & 1.0003 & 0.999799 \tabularnewline
45 & 103.44 & 103.432 & 103.415 & 1.00017 & 1.00008 \tabularnewline
46 & 103.62 & 103.682 & 103.65 & 1.00031 & 0.999398 \tabularnewline
47 & 103.74 & 103.818 & 103.885 & 0.999352 & 0.999251 \tabularnewline
48 & 103.82 & 103.945 & 104.129 & 0.998236 & 0.998797 \tabularnewline
49 & 103.96 & 104.104 & 104.371 & 0.99744 & 0.998621 \tabularnewline
50 & 104.7 & 104.649 & 104.604 & 1.00042 & 1.00049 \tabularnewline
51 & 105.13 & 105.026 & 104.832 & 1.00185 & 1.00099 \tabularnewline
52 & 105.26 & 105.198 & 105.064 & 1.00128 & 1.00059 \tabularnewline
53 & 105.44 & 105.353 & 105.308 & 1.00042 & 1.00082 \tabularnewline
54 & 105.73 & 105.577 & 105.558 & 1.00018 & 1.00145 \tabularnewline
55 & 105.83 & NA & NA & 1.00004 & NA \tabularnewline
56 & 105.97 & NA & NA & 1.0003 & NA \tabularnewline
57 & 106.13 & NA & NA & 1.00017 & NA \tabularnewline
58 & 106.49 & NA & NA & 1.00031 & NA \tabularnewline
59 & 106.74 & NA & NA & 0.999352 & NA \tabularnewline
60 & 106.82 & NA & NA & 0.998236 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=295732&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]93.91[/C][C]NA[/C][C]NA[/C][C]0.99744[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]94.27[/C][C]NA[/C][C]NA[/C][C]1.00042[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]94.55[/C][C]NA[/C][C]NA[/C][C]1.00185[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]94.66[/C][C]NA[/C][C]NA[/C][C]1.00128[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]94.78[/C][C]NA[/C][C]NA[/C][C]1.00042[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]94.91[/C][C]NA[/C][C]NA[/C][C]1.00018[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]95.2[/C][C]95.1991[/C][C]95.1954[/C][C]1.00004[/C][C]1.00001[/C][/ROW]
[ROW][C]8[/C][C]95.48[/C][C]95.4205[/C][C]95.3921[/C][C]1.0003[/C][C]1.00062[/C][/ROW]
[ROW][C]9[/C][C]95.56[/C][C]95.6096[/C][C]95.5937[/C][C]1.00017[/C][C]0.999481[/C][/ROW]
[ROW][C]10[/C][C]95.75[/C][C]95.8354[/C][C]95.8058[/C][C]1.00031[/C][C]0.999109[/C][/ROW]
[ROW][C]11[/C][C]95.91[/C][C]95.9632[/C][C]96.0254[/C][C]0.999352[/C][C]0.999445[/C][/ROW]
[ROW][C]12[/C][C]96.16[/C][C]96.0814[/C][C]96.2512[/C][C]0.998236[/C][C]1.00082[/C][/ROW]
[ROW][C]13[/C][C]96.32[/C][C]96.2267[/C][C]96.4738[/C][C]0.99744[/C][C]1.00097[/C][/ROW]
[ROW][C]14[/C][C]96.58[/C][C]96.7344[/C][C]96.6933[/C][C]1.00042[/C][C]0.998404[/C][/ROW]
[ROW][C]15[/C][C]97.08[/C][C]97.0965[/C][C]96.9171[/C][C]1.00185[/C][C]0.99983[/C][/ROW]
[ROW][C]16[/C][C]97.22[/C][C]97.2687[/C][C]97.1442[/C][C]1.00128[/C][C]0.999499[/C][/ROW]
[ROW][C]17[/C][C]97.49[/C][C]97.4126[/C][C]97.3712[/C][C]1.00042[/C][C]1.00079[/C][/ROW]
[ROW][C]18[/C][C]97.62[/C][C]97.6071[/C][C]97.5896[/C][C]1.00018[/C][C]1.00013[/C][/ROW]
[ROW][C]19[/C][C]97.83[/C][C]97.8021[/C][C]97.7983[/C][C]1.00004[/C][C]1.00029[/C][/ROW]
[ROW][C]20[/C][C]98.12[/C][C]98.0396[/C][C]98.0104[/C][C]1.0003[/C][C]1.00082[/C][/ROW]
[ROW][C]21[/C][C]98.29[/C][C]98.2304[/C][C]98.2142[/C][C]1.00017[/C][C]1.00061[/C][/ROW]
[ROW][C]22[/C][C]98.47[/C][C]98.4366[/C][C]98.4062[/C][C]1.00031[/C][C]1.00034[/C][/ROW]
[ROW][C]23[/C][C]98.64[/C][C]98.5241[/C][C]98.5879[/C][C]0.999352[/C][C]1.00118[/C][/ROW]
[ROW][C]24[/C][C]98.67[/C][C]98.5883[/C][C]98.7625[/C][C]0.998236[/C][C]1.00083[/C][/ROW]
[ROW][C]25[/C][C]98.82[/C][C]98.6896[/C][C]98.9429[/C][C]0.99744[/C][C]1.00132[/C][/ROW]
[ROW][C]26[/C][C]99.17[/C][C]99.1638[/C][C]99.1217[/C][C]1.00042[/C][C]1.00006[/C][/ROW]
[ROW][C]27[/C][C]99.38[/C][C]99.4871[/C][C]99.3033[/C][C]1.00185[/C][C]0.998923[/C][/ROW]
[ROW][C]28[/C][C]99.53[/C][C]99.628[/C][C]99.5004[/C][C]1.00128[/C][C]0.999017[/C][/ROW]
[ROW][C]29[/C][C]99.54[/C][C]99.7436[/C][C]99.7012[/C][C]1.00042[/C][C]0.997959[/C][/ROW]
[ROW][C]30[/C][C]99.76[/C][C]99.9171[/C][C]99.8992[/C][C]1.00018[/C][C]0.998428[/C][/ROW]
[ROW][C]31[/C][C]100.02[/C][C]100.102[/C][C]100.098[/C][C]1.00004[/C][C]0.999183[/C][/ROW]
[ROW][C]32[/C][C]100.22[/C][C]100.342[/C][C]100.312[/C][C]1.0003[/C][C]0.998784[/C][/ROW]
[ROW][C]33[/C][C]100.55[/C][C]100.564[/C][C]100.547[/C][C]1.00017[/C][C]0.999863[/C][/ROW]
[ROW][C]34[/C][C]100.94[/C][C]100.821[/C][C]100.79[/C][C]1.00031[/C][C]1.00118[/C][/ROW]
[ROW][C]35[/C][C]100.99[/C][C]100.975[/C][C]101.04[/C][C]0.999352[/C][C]1.00015[/C][/ROW]
[ROW][C]36[/C][C]101.07[/C][C]101.112[/C][C]101.291[/C][C]0.998236[/C][C]0.999583[/C][/ROW]
[ROW][C]37[/C][C]101.19[/C][C]101.28[/C][C]101.54[/C][C]0.99744[/C][C]0.999115[/C][/ROW]
[ROW][C]38[/C][C]101.94[/C][C]101.831[/C][C]101.788[/C][C]1.00042[/C][C]1.00107[/C][/ROW]
[ROW][C]39[/C][C]102.25[/C][C]102.221[/C][C]102.032[/C][C]1.00185[/C][C]1.00028[/C][/ROW]
[ROW][C]40[/C][C]102.49[/C][C]102.395[/C][C]102.264[/C][C]1.00128[/C][C]1.00093[/C][/ROW]
[ROW][C]41[/C][C]102.58[/C][C]102.534[/C][C]102.49[/C][C]1.00042[/C][C]1.00045[/C][/ROW]
[ROW][C]42[/C][C]102.74[/C][C]102.738[/C][C]102.72[/C][C]1.00018[/C][C]1.00002[/C][/ROW]
[ROW][C]43[/C][C]103.01[/C][C]102.954[/C][C]102.95[/C][C]1.00004[/C][C]1.00055[/C][/ROW]
[ROW][C]44[/C][C]103.19[/C][C]103.211[/C][C]103.18[/C][C]1.0003[/C][C]0.999799[/C][/ROW]
[ROW][C]45[/C][C]103.44[/C][C]103.432[/C][C]103.415[/C][C]1.00017[/C][C]1.00008[/C][/ROW]
[ROW][C]46[/C][C]103.62[/C][C]103.682[/C][C]103.65[/C][C]1.00031[/C][C]0.999398[/C][/ROW]
[ROW][C]47[/C][C]103.74[/C][C]103.818[/C][C]103.885[/C][C]0.999352[/C][C]0.999251[/C][/ROW]
[ROW][C]48[/C][C]103.82[/C][C]103.945[/C][C]104.129[/C][C]0.998236[/C][C]0.998797[/C][/ROW]
[ROW][C]49[/C][C]103.96[/C][C]104.104[/C][C]104.371[/C][C]0.99744[/C][C]0.998621[/C][/ROW]
[ROW][C]50[/C][C]104.7[/C][C]104.649[/C][C]104.604[/C][C]1.00042[/C][C]1.00049[/C][/ROW]
[ROW][C]51[/C][C]105.13[/C][C]105.026[/C][C]104.832[/C][C]1.00185[/C][C]1.00099[/C][/ROW]
[ROW][C]52[/C][C]105.26[/C][C]105.198[/C][C]105.064[/C][C]1.00128[/C][C]1.00059[/C][/ROW]
[ROW][C]53[/C][C]105.44[/C][C]105.353[/C][C]105.308[/C][C]1.00042[/C][C]1.00082[/C][/ROW]
[ROW][C]54[/C][C]105.73[/C][C]105.577[/C][C]105.558[/C][C]1.00018[/C][C]1.00145[/C][/ROW]
[ROW][C]55[/C][C]105.83[/C][C]NA[/C][C]NA[/C][C]1.00004[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]105.97[/C][C]NA[/C][C]NA[/C][C]1.0003[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]106.13[/C][C]NA[/C][C]NA[/C][C]1.00017[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]106.49[/C][C]NA[/C][C]NA[/C][C]1.00031[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]106.74[/C][C]NA[/C][C]NA[/C][C]0.999352[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]106.82[/C][C]NA[/C][C]NA[/C][C]0.998236[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=295732&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=295732&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
193.91NANA0.99744NA
294.27NANA1.00042NA
394.55NANA1.00185NA
494.66NANA1.00128NA
594.78NANA1.00042NA
694.91NANA1.00018NA
795.295.199195.19541.000041.00001
895.4895.420595.39211.00031.00062
995.5695.609695.59371.000170.999481
1095.7595.835495.80581.000310.999109
1195.9195.963296.02540.9993520.999445
1296.1696.081496.25120.9982361.00082
1396.3296.226796.47380.997441.00097
1496.5896.734496.69331.000420.998404
1597.0897.096596.91711.001850.99983
1697.2297.268797.14421.001280.999499
1797.4997.412697.37121.000421.00079
1897.6297.607197.58961.000181.00013
1997.8397.802197.79831.000041.00029
2098.1298.039698.01041.00031.00082
2198.2998.230498.21421.000171.00061
2298.4798.436698.40621.000311.00034
2398.6498.524198.58790.9993521.00118
2498.6798.588398.76250.9982361.00083
2598.8298.689698.94290.997441.00132
2699.1799.163899.12171.000421.00006
2799.3899.487199.30331.001850.998923
2899.5399.62899.50041.001280.999017
2999.5499.743699.70121.000420.997959
3099.7699.917199.89921.000180.998428
31100.02100.102100.0981.000040.999183
32100.22100.342100.3121.00030.998784
33100.55100.564100.5471.000170.999863
34100.94100.821100.791.000311.00118
35100.99100.975101.040.9993521.00015
36101.07101.112101.2910.9982360.999583
37101.19101.28101.540.997440.999115
38101.94101.831101.7881.000421.00107
39102.25102.221102.0321.001851.00028
40102.49102.395102.2641.001281.00093
41102.58102.534102.491.000421.00045
42102.74102.738102.721.000181.00002
43103.01102.954102.951.000041.00055
44103.19103.211103.181.00030.999799
45103.44103.432103.4151.000171.00008
46103.62103.682103.651.000310.999398
47103.74103.818103.8850.9993520.999251
48103.82103.945104.1290.9982360.998797
49103.96104.104104.3710.997440.998621
50104.7104.649104.6041.000421.00049
51105.13105.026104.8321.001851.00099
52105.26105.198105.0641.001281.00059
53105.44105.353105.3081.000421.00082
54105.73105.577105.5581.000181.00145
55105.83NANA1.00004NA
56105.97NANA1.0003NA
57106.13NANA1.00017NA
58106.49NANA1.00031NA
59106.74NANA0.999352NA
60106.82NANA0.998236NA



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