Free Statistics

of Irreproducible Research!

Author's title

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

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact81
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [] [2016-04-26 12:47:06] [4661a511bc27dc3517a7b8e15be46886] [Current]
Feedback Forum

Post a new message
Dataseries X:
17887
17118
15945
15085
14027
15158
23783
25166
21839
18522
16850
16679
17806
17542
16380
15434
14478
15506
22357
27204
24182
20760
18731
18377
18775
18943
17974
17192
1604
17101
25972
28139
26131
22600
20320
19662
20440
19694
18260
16832
15539
16676
25216
26994
24865
21793
19505
18696
19221
18742
17633
16379
15007
15762
24146
25720
23731
20542
18807
18459




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

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







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
117887NANA-385.561NA
217118NANA-725.363NA
315945NANA-1919.34NA
415085NANA-3062.59NA
514027NANA-7906.27NA
615158NANA-3340.95NA
72378323200.818168.25032.57582.217
8251662572818182.57545.51-562.012
92183923107.818218.34889.51-1268.8
101852219773.9182511522.95-1251.91
111685017716.318284.3-567.988-866.304
121667917235.118317.6-1082.49-556.095
131780617887.118272.7-385.561-81.1059
141754217572.818298.2-725.363-30.8038
151638016561.418480.7-1919.34-181.366
16154341560918671.6-3062.59-174.991
171447810936.918843.2-7906.273541.06
181550615651.418992.3-3340.95-145.387
19223572413619103.55032.57-1779.03
202720426747.719202.27545.51456.28
212418224216.5193274889.51-34.5122
222076020989.619466.71522.95-229.616
231873118435.519003.5-567.988295.488
241837717451.118533.5-1082.49925.946
251877518365.118750.6-385.561409.936
261894318214.818940.2-725.363728.155
27179741714119060.4-1919.34832.967
281719216155.719218.2-3062.591036.34
29160411454.919361.1-7906.27-9850.86
301710116139.919480.9-3340.95961.071
312597224636.419603.85032.571335.63
32281392725019704.57545.51889.03
332613124637.219747.74889.511493.82
342260021267.519744.61522.951332.47
352032019742.220310.2-567.988577.78
361966219790.620873.1-1082.49-128.637
372044020438.420823.9-385.5611.6441
381969420019.320744.7-725.363-325.345
391826018724.920644.2-1919.34-464.908
401683217495.320557.9-3062.59-663.283
41155391258420490.3-7906.272954.98
421667617075.120416.1-3340.95-399.137
432521625357.6203255032.57-141.616
442699427780.120234.67545.51-786.095
452486525058.320168.84889.51-193.304
462179321646.720123.81522.95146.259
471950519514.820082.8-567.988-9.76215
48186961894020022.5-1082.49-244.012
491922119554.319939.8-385.561-333.273
501874219116.819842.2-725.363-374.804
511763317822.519741.8-1919.34-189.491
521637916579.919642.5-3062.59-200.866
53150071165519561.2-7906.273352.02
541576216181.319522.3-3340.95-419.345
5524146NANA5032.57NA
5625720NANA7545.51NA
5723731NANA4889.51NA
5820542NANA1522.95NA
5918807NANA-567.988NA
6018459NANA-1082.49NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 17887 & NA & NA & -385.561 & NA \tabularnewline
2 & 17118 & NA & NA & -725.363 & NA \tabularnewline
3 & 15945 & NA & NA & -1919.34 & NA \tabularnewline
4 & 15085 & NA & NA & -3062.59 & NA \tabularnewline
5 & 14027 & NA & NA & -7906.27 & NA \tabularnewline
6 & 15158 & NA & NA & -3340.95 & NA \tabularnewline
7 & 23783 & 23200.8 & 18168.2 & 5032.57 & 582.217 \tabularnewline
8 & 25166 & 25728 & 18182.5 & 7545.51 & -562.012 \tabularnewline
9 & 21839 & 23107.8 & 18218.3 & 4889.51 & -1268.8 \tabularnewline
10 & 18522 & 19773.9 & 18251 & 1522.95 & -1251.91 \tabularnewline
11 & 16850 & 17716.3 & 18284.3 & -567.988 & -866.304 \tabularnewline
12 & 16679 & 17235.1 & 18317.6 & -1082.49 & -556.095 \tabularnewline
13 & 17806 & 17887.1 & 18272.7 & -385.561 & -81.1059 \tabularnewline
14 & 17542 & 17572.8 & 18298.2 & -725.363 & -30.8038 \tabularnewline
15 & 16380 & 16561.4 & 18480.7 & -1919.34 & -181.366 \tabularnewline
16 & 15434 & 15609 & 18671.6 & -3062.59 & -174.991 \tabularnewline
17 & 14478 & 10936.9 & 18843.2 & -7906.27 & 3541.06 \tabularnewline
18 & 15506 & 15651.4 & 18992.3 & -3340.95 & -145.387 \tabularnewline
19 & 22357 & 24136 & 19103.5 & 5032.57 & -1779.03 \tabularnewline
20 & 27204 & 26747.7 & 19202.2 & 7545.51 & 456.28 \tabularnewline
21 & 24182 & 24216.5 & 19327 & 4889.51 & -34.5122 \tabularnewline
22 & 20760 & 20989.6 & 19466.7 & 1522.95 & -229.616 \tabularnewline
23 & 18731 & 18435.5 & 19003.5 & -567.988 & 295.488 \tabularnewline
24 & 18377 & 17451.1 & 18533.5 & -1082.49 & 925.946 \tabularnewline
25 & 18775 & 18365.1 & 18750.6 & -385.561 & 409.936 \tabularnewline
26 & 18943 & 18214.8 & 18940.2 & -725.363 & 728.155 \tabularnewline
27 & 17974 & 17141 & 19060.4 & -1919.34 & 832.967 \tabularnewline
28 & 17192 & 16155.7 & 19218.2 & -3062.59 & 1036.34 \tabularnewline
29 & 1604 & 11454.9 & 19361.1 & -7906.27 & -9850.86 \tabularnewline
30 & 17101 & 16139.9 & 19480.9 & -3340.95 & 961.071 \tabularnewline
31 & 25972 & 24636.4 & 19603.8 & 5032.57 & 1335.63 \tabularnewline
32 & 28139 & 27250 & 19704.5 & 7545.51 & 889.03 \tabularnewline
33 & 26131 & 24637.2 & 19747.7 & 4889.51 & 1493.82 \tabularnewline
34 & 22600 & 21267.5 & 19744.6 & 1522.95 & 1332.47 \tabularnewline
35 & 20320 & 19742.2 & 20310.2 & -567.988 & 577.78 \tabularnewline
36 & 19662 & 19790.6 & 20873.1 & -1082.49 & -128.637 \tabularnewline
37 & 20440 & 20438.4 & 20823.9 & -385.561 & 1.6441 \tabularnewline
38 & 19694 & 20019.3 & 20744.7 & -725.363 & -325.345 \tabularnewline
39 & 18260 & 18724.9 & 20644.2 & -1919.34 & -464.908 \tabularnewline
40 & 16832 & 17495.3 & 20557.9 & -3062.59 & -663.283 \tabularnewline
41 & 15539 & 12584 & 20490.3 & -7906.27 & 2954.98 \tabularnewline
42 & 16676 & 17075.1 & 20416.1 & -3340.95 & -399.137 \tabularnewline
43 & 25216 & 25357.6 & 20325 & 5032.57 & -141.616 \tabularnewline
44 & 26994 & 27780.1 & 20234.6 & 7545.51 & -786.095 \tabularnewline
45 & 24865 & 25058.3 & 20168.8 & 4889.51 & -193.304 \tabularnewline
46 & 21793 & 21646.7 & 20123.8 & 1522.95 & 146.259 \tabularnewline
47 & 19505 & 19514.8 & 20082.8 & -567.988 & -9.76215 \tabularnewline
48 & 18696 & 18940 & 20022.5 & -1082.49 & -244.012 \tabularnewline
49 & 19221 & 19554.3 & 19939.8 & -385.561 & -333.273 \tabularnewline
50 & 18742 & 19116.8 & 19842.2 & -725.363 & -374.804 \tabularnewline
51 & 17633 & 17822.5 & 19741.8 & -1919.34 & -189.491 \tabularnewline
52 & 16379 & 16579.9 & 19642.5 & -3062.59 & -200.866 \tabularnewline
53 & 15007 & 11655 & 19561.2 & -7906.27 & 3352.02 \tabularnewline
54 & 15762 & 16181.3 & 19522.3 & -3340.95 & -419.345 \tabularnewline
55 & 24146 & NA & NA & 5032.57 & NA \tabularnewline
56 & 25720 & NA & NA & 7545.51 & NA \tabularnewline
57 & 23731 & NA & NA & 4889.51 & NA \tabularnewline
58 & 20542 & NA & NA & 1522.95 & NA \tabularnewline
59 & 18807 & NA & NA & -567.988 & NA \tabularnewline
60 & 18459 & NA & NA & -1082.49 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=294871&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]17887[/C][C]NA[/C][C]NA[/C][C]-385.561[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]17118[/C][C]NA[/C][C]NA[/C][C]-725.363[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]15945[/C][C]NA[/C][C]NA[/C][C]-1919.34[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]15085[/C][C]NA[/C][C]NA[/C][C]-3062.59[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]14027[/C][C]NA[/C][C]NA[/C][C]-7906.27[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]15158[/C][C]NA[/C][C]NA[/C][C]-3340.95[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]23783[/C][C]23200.8[/C][C]18168.2[/C][C]5032.57[/C][C]582.217[/C][/ROW]
[ROW][C]8[/C][C]25166[/C][C]25728[/C][C]18182.5[/C][C]7545.51[/C][C]-562.012[/C][/ROW]
[ROW][C]9[/C][C]21839[/C][C]23107.8[/C][C]18218.3[/C][C]4889.51[/C][C]-1268.8[/C][/ROW]
[ROW][C]10[/C][C]18522[/C][C]19773.9[/C][C]18251[/C][C]1522.95[/C][C]-1251.91[/C][/ROW]
[ROW][C]11[/C][C]16850[/C][C]17716.3[/C][C]18284.3[/C][C]-567.988[/C][C]-866.304[/C][/ROW]
[ROW][C]12[/C][C]16679[/C][C]17235.1[/C][C]18317.6[/C][C]-1082.49[/C][C]-556.095[/C][/ROW]
[ROW][C]13[/C][C]17806[/C][C]17887.1[/C][C]18272.7[/C][C]-385.561[/C][C]-81.1059[/C][/ROW]
[ROW][C]14[/C][C]17542[/C][C]17572.8[/C][C]18298.2[/C][C]-725.363[/C][C]-30.8038[/C][/ROW]
[ROW][C]15[/C][C]16380[/C][C]16561.4[/C][C]18480.7[/C][C]-1919.34[/C][C]-181.366[/C][/ROW]
[ROW][C]16[/C][C]15434[/C][C]15609[/C][C]18671.6[/C][C]-3062.59[/C][C]-174.991[/C][/ROW]
[ROW][C]17[/C][C]14478[/C][C]10936.9[/C][C]18843.2[/C][C]-7906.27[/C][C]3541.06[/C][/ROW]
[ROW][C]18[/C][C]15506[/C][C]15651.4[/C][C]18992.3[/C][C]-3340.95[/C][C]-145.387[/C][/ROW]
[ROW][C]19[/C][C]22357[/C][C]24136[/C][C]19103.5[/C][C]5032.57[/C][C]-1779.03[/C][/ROW]
[ROW][C]20[/C][C]27204[/C][C]26747.7[/C][C]19202.2[/C][C]7545.51[/C][C]456.28[/C][/ROW]
[ROW][C]21[/C][C]24182[/C][C]24216.5[/C][C]19327[/C][C]4889.51[/C][C]-34.5122[/C][/ROW]
[ROW][C]22[/C][C]20760[/C][C]20989.6[/C][C]19466.7[/C][C]1522.95[/C][C]-229.616[/C][/ROW]
[ROW][C]23[/C][C]18731[/C][C]18435.5[/C][C]19003.5[/C][C]-567.988[/C][C]295.488[/C][/ROW]
[ROW][C]24[/C][C]18377[/C][C]17451.1[/C][C]18533.5[/C][C]-1082.49[/C][C]925.946[/C][/ROW]
[ROW][C]25[/C][C]18775[/C][C]18365.1[/C][C]18750.6[/C][C]-385.561[/C][C]409.936[/C][/ROW]
[ROW][C]26[/C][C]18943[/C][C]18214.8[/C][C]18940.2[/C][C]-725.363[/C][C]728.155[/C][/ROW]
[ROW][C]27[/C][C]17974[/C][C]17141[/C][C]19060.4[/C][C]-1919.34[/C][C]832.967[/C][/ROW]
[ROW][C]28[/C][C]17192[/C][C]16155.7[/C][C]19218.2[/C][C]-3062.59[/C][C]1036.34[/C][/ROW]
[ROW][C]29[/C][C]1604[/C][C]11454.9[/C][C]19361.1[/C][C]-7906.27[/C][C]-9850.86[/C][/ROW]
[ROW][C]30[/C][C]17101[/C][C]16139.9[/C][C]19480.9[/C][C]-3340.95[/C][C]961.071[/C][/ROW]
[ROW][C]31[/C][C]25972[/C][C]24636.4[/C][C]19603.8[/C][C]5032.57[/C][C]1335.63[/C][/ROW]
[ROW][C]32[/C][C]28139[/C][C]27250[/C][C]19704.5[/C][C]7545.51[/C][C]889.03[/C][/ROW]
[ROW][C]33[/C][C]26131[/C][C]24637.2[/C][C]19747.7[/C][C]4889.51[/C][C]1493.82[/C][/ROW]
[ROW][C]34[/C][C]22600[/C][C]21267.5[/C][C]19744.6[/C][C]1522.95[/C][C]1332.47[/C][/ROW]
[ROW][C]35[/C][C]20320[/C][C]19742.2[/C][C]20310.2[/C][C]-567.988[/C][C]577.78[/C][/ROW]
[ROW][C]36[/C][C]19662[/C][C]19790.6[/C][C]20873.1[/C][C]-1082.49[/C][C]-128.637[/C][/ROW]
[ROW][C]37[/C][C]20440[/C][C]20438.4[/C][C]20823.9[/C][C]-385.561[/C][C]1.6441[/C][/ROW]
[ROW][C]38[/C][C]19694[/C][C]20019.3[/C][C]20744.7[/C][C]-725.363[/C][C]-325.345[/C][/ROW]
[ROW][C]39[/C][C]18260[/C][C]18724.9[/C][C]20644.2[/C][C]-1919.34[/C][C]-464.908[/C][/ROW]
[ROW][C]40[/C][C]16832[/C][C]17495.3[/C][C]20557.9[/C][C]-3062.59[/C][C]-663.283[/C][/ROW]
[ROW][C]41[/C][C]15539[/C][C]12584[/C][C]20490.3[/C][C]-7906.27[/C][C]2954.98[/C][/ROW]
[ROW][C]42[/C][C]16676[/C][C]17075.1[/C][C]20416.1[/C][C]-3340.95[/C][C]-399.137[/C][/ROW]
[ROW][C]43[/C][C]25216[/C][C]25357.6[/C][C]20325[/C][C]5032.57[/C][C]-141.616[/C][/ROW]
[ROW][C]44[/C][C]26994[/C][C]27780.1[/C][C]20234.6[/C][C]7545.51[/C][C]-786.095[/C][/ROW]
[ROW][C]45[/C][C]24865[/C][C]25058.3[/C][C]20168.8[/C][C]4889.51[/C][C]-193.304[/C][/ROW]
[ROW][C]46[/C][C]21793[/C][C]21646.7[/C][C]20123.8[/C][C]1522.95[/C][C]146.259[/C][/ROW]
[ROW][C]47[/C][C]19505[/C][C]19514.8[/C][C]20082.8[/C][C]-567.988[/C][C]-9.76215[/C][/ROW]
[ROW][C]48[/C][C]18696[/C][C]18940[/C][C]20022.5[/C][C]-1082.49[/C][C]-244.012[/C][/ROW]
[ROW][C]49[/C][C]19221[/C][C]19554.3[/C][C]19939.8[/C][C]-385.561[/C][C]-333.273[/C][/ROW]
[ROW][C]50[/C][C]18742[/C][C]19116.8[/C][C]19842.2[/C][C]-725.363[/C][C]-374.804[/C][/ROW]
[ROW][C]51[/C][C]17633[/C][C]17822.5[/C][C]19741.8[/C][C]-1919.34[/C][C]-189.491[/C][/ROW]
[ROW][C]52[/C][C]16379[/C][C]16579.9[/C][C]19642.5[/C][C]-3062.59[/C][C]-200.866[/C][/ROW]
[ROW][C]53[/C][C]15007[/C][C]11655[/C][C]19561.2[/C][C]-7906.27[/C][C]3352.02[/C][/ROW]
[ROW][C]54[/C][C]15762[/C][C]16181.3[/C][C]19522.3[/C][C]-3340.95[/C][C]-419.345[/C][/ROW]
[ROW][C]55[/C][C]24146[/C][C]NA[/C][C]NA[/C][C]5032.57[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]25720[/C][C]NA[/C][C]NA[/C][C]7545.51[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]23731[/C][C]NA[/C][C]NA[/C][C]4889.51[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]20542[/C][C]NA[/C][C]NA[/C][C]1522.95[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]18807[/C][C]NA[/C][C]NA[/C][C]-567.988[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]18459[/C][C]NA[/C][C]NA[/C][C]-1082.49[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=294871&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=294871&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
117887NANA-385.561NA
217118NANA-725.363NA
315945NANA-1919.34NA
415085NANA-3062.59NA
514027NANA-7906.27NA
615158NANA-3340.95NA
72378323200.818168.25032.57582.217
8251662572818182.57545.51-562.012
92183923107.818218.34889.51-1268.8
101852219773.9182511522.95-1251.91
111685017716.318284.3-567.988-866.304
121667917235.118317.6-1082.49-556.095
131780617887.118272.7-385.561-81.1059
141754217572.818298.2-725.363-30.8038
151638016561.418480.7-1919.34-181.366
16154341560918671.6-3062.59-174.991
171447810936.918843.2-7906.273541.06
181550615651.418992.3-3340.95-145.387
19223572413619103.55032.57-1779.03
202720426747.719202.27545.51456.28
212418224216.5193274889.51-34.5122
222076020989.619466.71522.95-229.616
231873118435.519003.5-567.988295.488
241837717451.118533.5-1082.49925.946
251877518365.118750.6-385.561409.936
261894318214.818940.2-725.363728.155
27179741714119060.4-1919.34832.967
281719216155.719218.2-3062.591036.34
29160411454.919361.1-7906.27-9850.86
301710116139.919480.9-3340.95961.071
312597224636.419603.85032.571335.63
32281392725019704.57545.51889.03
332613124637.219747.74889.511493.82
342260021267.519744.61522.951332.47
352032019742.220310.2-567.988577.78
361966219790.620873.1-1082.49-128.637
372044020438.420823.9-385.5611.6441
381969420019.320744.7-725.363-325.345
391826018724.920644.2-1919.34-464.908
401683217495.320557.9-3062.59-663.283
41155391258420490.3-7906.272954.98
421667617075.120416.1-3340.95-399.137
432521625357.6203255032.57-141.616
442699427780.120234.67545.51-786.095
452486525058.320168.84889.51-193.304
462179321646.720123.81522.95146.259
471950519514.820082.8-567.988-9.76215
48186961894020022.5-1082.49-244.012
491922119554.319939.8-385.561-333.273
501874219116.819842.2-725.363-374.804
511763317822.519741.8-1919.34-189.491
521637916579.919642.5-3062.59-200.866
53150071165519561.2-7906.273352.02
541576216181.319522.3-3340.95-419.345
5524146NANA5032.57NA
5625720NANA7545.51NA
5723731NANA4889.51NA
5820542NANA1522.95NA
5918807NANA-567.988NA
6018459NANA-1082.49NA



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