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 19:43:34 +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/t1461696270mj71cleikiwtbxi.htm/, Retrieved Fri, 03 May 2024 21:09:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=294961, Retrieved Fri, 03 May 2024 21:09:13 +0000
QR Codes:

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

Post a new message
Dataseries X:
81432
81935
82229
82963
82975
82892
82692
82648
83479
84176
84589
84857
84586
84635
84927
85563
86962
87780
88515
88800
89218
89626
89939
90663
91302
91560
92290
93281
94535
94855
95536
96008
96627
96738
96212
94198
93123
93022
93993
94876
95251
96216
96632
97023
97799
98001
98069
98172
98448
98157
98009
98020
97802
98006
98262
98629
99043
99289
99682
99979




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

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







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
181432NANA-526.299NA
281935NANA-876.206NA
382229NANA-743.549NA
482963NANA-432.852NA
582975NANA-44.9974NA
682892NANA217.013NA
7826928360083203.7396.305-907.971
88264883773.783447.6326.076-1125.66
98347984326.283672.5653.721-847.221
108417684580.383893.3687.003-404.253
118458984610.484167.7442.711-21.4193
128485784438.684537.5-98.9245418.424
138458684457.584983.8-526.299128.508
148463584606.585482.8-876.20628.4557
158492785234.785978.2-743.549-307.659
168556386011.686444.4-432.852-448.565
178696286849.486894.4-44.9974112.581
188778087576.387359.2217.013203.737
198851588277.387881396.305237.695
208880088775.588449.4326.07624.5495
218921889698.489044.7653.721-480.43
228962690360.189673.1687.003-734.086
238993990752.990310.2442.711-813.919
249066390821.690920.5-98.9245-158.617
259130290981.691507.9-526.299320.424
269156091224.592100.7-876.206335.456
279229091966.292709.8-743.549323.758
28932819288293314.8-432.852399.018
299453593827.593872.5-44.9974707.456
309485594498.294281.2217.013356.779
319553694900.794504.4396.305635.32
329600894967.294641.2326.0761040.76
339662795426.894773653.7211200.24
349673895597.594910.5687.0031140.54
359621295449.595006.7442.711762.539
369419894994.495093.3-98.9245-796.367
379312394669.495195.7-526.299-1546.37
389302294407.495283.6-876.206-1385.42
399399394631.295374.8-743.549-638.201
409487695043.495476.2-432.852-167.357
419525195561.295606.2-44.9974-310.211
429621696066.295849.2217.013149.82
439663296632.996236.6396.305-0.929687
449702396998.596672.5326.07624.4661
459779997707.597053.7653.72191.5286
469800198039.197352.1687.003-38.0859
479806998032.197589.4442.71136.9141
489817297671.397770.2-98.9245500.674
499844897386.597912.8-526.2991061.55
509815797171.498047.6-876.206985.622
519800997422.898166.3-743.549586.216
52980209783998271.8-432.852181.018
539780298347.798392.7-44.9974-545.711
549800698752.298535.2217.013-746.221
5598262NANA396.305NA
5698629NANA326.076NA
5799043NANA653.721NA
5899289NANA687.003NA
5999682NANA442.711NA
6099979NANA-98.9245NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 81432 & NA & NA & -526.299 & NA \tabularnewline
2 & 81935 & NA & NA & -876.206 & NA \tabularnewline
3 & 82229 & NA & NA & -743.549 & NA \tabularnewline
4 & 82963 & NA & NA & -432.852 & NA \tabularnewline
5 & 82975 & NA & NA & -44.9974 & NA \tabularnewline
6 & 82892 & NA & NA & 217.013 & NA \tabularnewline
7 & 82692 & 83600 & 83203.7 & 396.305 & -907.971 \tabularnewline
8 & 82648 & 83773.7 & 83447.6 & 326.076 & -1125.66 \tabularnewline
9 & 83479 & 84326.2 & 83672.5 & 653.721 & -847.221 \tabularnewline
10 & 84176 & 84580.3 & 83893.3 & 687.003 & -404.253 \tabularnewline
11 & 84589 & 84610.4 & 84167.7 & 442.711 & -21.4193 \tabularnewline
12 & 84857 & 84438.6 & 84537.5 & -98.9245 & 418.424 \tabularnewline
13 & 84586 & 84457.5 & 84983.8 & -526.299 & 128.508 \tabularnewline
14 & 84635 & 84606.5 & 85482.8 & -876.206 & 28.4557 \tabularnewline
15 & 84927 & 85234.7 & 85978.2 & -743.549 & -307.659 \tabularnewline
16 & 85563 & 86011.6 & 86444.4 & -432.852 & -448.565 \tabularnewline
17 & 86962 & 86849.4 & 86894.4 & -44.9974 & 112.581 \tabularnewline
18 & 87780 & 87576.3 & 87359.2 & 217.013 & 203.737 \tabularnewline
19 & 88515 & 88277.3 & 87881 & 396.305 & 237.695 \tabularnewline
20 & 88800 & 88775.5 & 88449.4 & 326.076 & 24.5495 \tabularnewline
21 & 89218 & 89698.4 & 89044.7 & 653.721 & -480.43 \tabularnewline
22 & 89626 & 90360.1 & 89673.1 & 687.003 & -734.086 \tabularnewline
23 & 89939 & 90752.9 & 90310.2 & 442.711 & -813.919 \tabularnewline
24 & 90663 & 90821.6 & 90920.5 & -98.9245 & -158.617 \tabularnewline
25 & 91302 & 90981.6 & 91507.9 & -526.299 & 320.424 \tabularnewline
26 & 91560 & 91224.5 & 92100.7 & -876.206 & 335.456 \tabularnewline
27 & 92290 & 91966.2 & 92709.8 & -743.549 & 323.758 \tabularnewline
28 & 93281 & 92882 & 93314.8 & -432.852 & 399.018 \tabularnewline
29 & 94535 & 93827.5 & 93872.5 & -44.9974 & 707.456 \tabularnewline
30 & 94855 & 94498.2 & 94281.2 & 217.013 & 356.779 \tabularnewline
31 & 95536 & 94900.7 & 94504.4 & 396.305 & 635.32 \tabularnewline
32 & 96008 & 94967.2 & 94641.2 & 326.076 & 1040.76 \tabularnewline
33 & 96627 & 95426.8 & 94773 & 653.721 & 1200.24 \tabularnewline
34 & 96738 & 95597.5 & 94910.5 & 687.003 & 1140.54 \tabularnewline
35 & 96212 & 95449.5 & 95006.7 & 442.711 & 762.539 \tabularnewline
36 & 94198 & 94994.4 & 95093.3 & -98.9245 & -796.367 \tabularnewline
37 & 93123 & 94669.4 & 95195.7 & -526.299 & -1546.37 \tabularnewline
38 & 93022 & 94407.4 & 95283.6 & -876.206 & -1385.42 \tabularnewline
39 & 93993 & 94631.2 & 95374.8 & -743.549 & -638.201 \tabularnewline
40 & 94876 & 95043.4 & 95476.2 & -432.852 & -167.357 \tabularnewline
41 & 95251 & 95561.2 & 95606.2 & -44.9974 & -310.211 \tabularnewline
42 & 96216 & 96066.2 & 95849.2 & 217.013 & 149.82 \tabularnewline
43 & 96632 & 96632.9 & 96236.6 & 396.305 & -0.929687 \tabularnewline
44 & 97023 & 96998.5 & 96672.5 & 326.076 & 24.4661 \tabularnewline
45 & 97799 & 97707.5 & 97053.7 & 653.721 & 91.5286 \tabularnewline
46 & 98001 & 98039.1 & 97352.1 & 687.003 & -38.0859 \tabularnewline
47 & 98069 & 98032.1 & 97589.4 & 442.711 & 36.9141 \tabularnewline
48 & 98172 & 97671.3 & 97770.2 & -98.9245 & 500.674 \tabularnewline
49 & 98448 & 97386.5 & 97912.8 & -526.299 & 1061.55 \tabularnewline
50 & 98157 & 97171.4 & 98047.6 & -876.206 & 985.622 \tabularnewline
51 & 98009 & 97422.8 & 98166.3 & -743.549 & 586.216 \tabularnewline
52 & 98020 & 97839 & 98271.8 & -432.852 & 181.018 \tabularnewline
53 & 97802 & 98347.7 & 98392.7 & -44.9974 & -545.711 \tabularnewline
54 & 98006 & 98752.2 & 98535.2 & 217.013 & -746.221 \tabularnewline
55 & 98262 & NA & NA & 396.305 & NA \tabularnewline
56 & 98629 & NA & NA & 326.076 & NA \tabularnewline
57 & 99043 & NA & NA & 653.721 & NA \tabularnewline
58 & 99289 & NA & NA & 687.003 & NA \tabularnewline
59 & 99682 & NA & NA & 442.711 & NA \tabularnewline
60 & 99979 & NA & NA & -98.9245 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=294961&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]81432[/C][C]NA[/C][C]NA[/C][C]-526.299[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]81935[/C][C]NA[/C][C]NA[/C][C]-876.206[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]82229[/C][C]NA[/C][C]NA[/C][C]-743.549[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]82963[/C][C]NA[/C][C]NA[/C][C]-432.852[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]82975[/C][C]NA[/C][C]NA[/C][C]-44.9974[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]82892[/C][C]NA[/C][C]NA[/C][C]217.013[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]82692[/C][C]83600[/C][C]83203.7[/C][C]396.305[/C][C]-907.971[/C][/ROW]
[ROW][C]8[/C][C]82648[/C][C]83773.7[/C][C]83447.6[/C][C]326.076[/C][C]-1125.66[/C][/ROW]
[ROW][C]9[/C][C]83479[/C][C]84326.2[/C][C]83672.5[/C][C]653.721[/C][C]-847.221[/C][/ROW]
[ROW][C]10[/C][C]84176[/C][C]84580.3[/C][C]83893.3[/C][C]687.003[/C][C]-404.253[/C][/ROW]
[ROW][C]11[/C][C]84589[/C][C]84610.4[/C][C]84167.7[/C][C]442.711[/C][C]-21.4193[/C][/ROW]
[ROW][C]12[/C][C]84857[/C][C]84438.6[/C][C]84537.5[/C][C]-98.9245[/C][C]418.424[/C][/ROW]
[ROW][C]13[/C][C]84586[/C][C]84457.5[/C][C]84983.8[/C][C]-526.299[/C][C]128.508[/C][/ROW]
[ROW][C]14[/C][C]84635[/C][C]84606.5[/C][C]85482.8[/C][C]-876.206[/C][C]28.4557[/C][/ROW]
[ROW][C]15[/C][C]84927[/C][C]85234.7[/C][C]85978.2[/C][C]-743.549[/C][C]-307.659[/C][/ROW]
[ROW][C]16[/C][C]85563[/C][C]86011.6[/C][C]86444.4[/C][C]-432.852[/C][C]-448.565[/C][/ROW]
[ROW][C]17[/C][C]86962[/C][C]86849.4[/C][C]86894.4[/C][C]-44.9974[/C][C]112.581[/C][/ROW]
[ROW][C]18[/C][C]87780[/C][C]87576.3[/C][C]87359.2[/C][C]217.013[/C][C]203.737[/C][/ROW]
[ROW][C]19[/C][C]88515[/C][C]88277.3[/C][C]87881[/C][C]396.305[/C][C]237.695[/C][/ROW]
[ROW][C]20[/C][C]88800[/C][C]88775.5[/C][C]88449.4[/C][C]326.076[/C][C]24.5495[/C][/ROW]
[ROW][C]21[/C][C]89218[/C][C]89698.4[/C][C]89044.7[/C][C]653.721[/C][C]-480.43[/C][/ROW]
[ROW][C]22[/C][C]89626[/C][C]90360.1[/C][C]89673.1[/C][C]687.003[/C][C]-734.086[/C][/ROW]
[ROW][C]23[/C][C]89939[/C][C]90752.9[/C][C]90310.2[/C][C]442.711[/C][C]-813.919[/C][/ROW]
[ROW][C]24[/C][C]90663[/C][C]90821.6[/C][C]90920.5[/C][C]-98.9245[/C][C]-158.617[/C][/ROW]
[ROW][C]25[/C][C]91302[/C][C]90981.6[/C][C]91507.9[/C][C]-526.299[/C][C]320.424[/C][/ROW]
[ROW][C]26[/C][C]91560[/C][C]91224.5[/C][C]92100.7[/C][C]-876.206[/C][C]335.456[/C][/ROW]
[ROW][C]27[/C][C]92290[/C][C]91966.2[/C][C]92709.8[/C][C]-743.549[/C][C]323.758[/C][/ROW]
[ROW][C]28[/C][C]93281[/C][C]92882[/C][C]93314.8[/C][C]-432.852[/C][C]399.018[/C][/ROW]
[ROW][C]29[/C][C]94535[/C][C]93827.5[/C][C]93872.5[/C][C]-44.9974[/C][C]707.456[/C][/ROW]
[ROW][C]30[/C][C]94855[/C][C]94498.2[/C][C]94281.2[/C][C]217.013[/C][C]356.779[/C][/ROW]
[ROW][C]31[/C][C]95536[/C][C]94900.7[/C][C]94504.4[/C][C]396.305[/C][C]635.32[/C][/ROW]
[ROW][C]32[/C][C]96008[/C][C]94967.2[/C][C]94641.2[/C][C]326.076[/C][C]1040.76[/C][/ROW]
[ROW][C]33[/C][C]96627[/C][C]95426.8[/C][C]94773[/C][C]653.721[/C][C]1200.24[/C][/ROW]
[ROW][C]34[/C][C]96738[/C][C]95597.5[/C][C]94910.5[/C][C]687.003[/C][C]1140.54[/C][/ROW]
[ROW][C]35[/C][C]96212[/C][C]95449.5[/C][C]95006.7[/C][C]442.711[/C][C]762.539[/C][/ROW]
[ROW][C]36[/C][C]94198[/C][C]94994.4[/C][C]95093.3[/C][C]-98.9245[/C][C]-796.367[/C][/ROW]
[ROW][C]37[/C][C]93123[/C][C]94669.4[/C][C]95195.7[/C][C]-526.299[/C][C]-1546.37[/C][/ROW]
[ROW][C]38[/C][C]93022[/C][C]94407.4[/C][C]95283.6[/C][C]-876.206[/C][C]-1385.42[/C][/ROW]
[ROW][C]39[/C][C]93993[/C][C]94631.2[/C][C]95374.8[/C][C]-743.549[/C][C]-638.201[/C][/ROW]
[ROW][C]40[/C][C]94876[/C][C]95043.4[/C][C]95476.2[/C][C]-432.852[/C][C]-167.357[/C][/ROW]
[ROW][C]41[/C][C]95251[/C][C]95561.2[/C][C]95606.2[/C][C]-44.9974[/C][C]-310.211[/C][/ROW]
[ROW][C]42[/C][C]96216[/C][C]96066.2[/C][C]95849.2[/C][C]217.013[/C][C]149.82[/C][/ROW]
[ROW][C]43[/C][C]96632[/C][C]96632.9[/C][C]96236.6[/C][C]396.305[/C][C]-0.929687[/C][/ROW]
[ROW][C]44[/C][C]97023[/C][C]96998.5[/C][C]96672.5[/C][C]326.076[/C][C]24.4661[/C][/ROW]
[ROW][C]45[/C][C]97799[/C][C]97707.5[/C][C]97053.7[/C][C]653.721[/C][C]91.5286[/C][/ROW]
[ROW][C]46[/C][C]98001[/C][C]98039.1[/C][C]97352.1[/C][C]687.003[/C][C]-38.0859[/C][/ROW]
[ROW][C]47[/C][C]98069[/C][C]98032.1[/C][C]97589.4[/C][C]442.711[/C][C]36.9141[/C][/ROW]
[ROW][C]48[/C][C]98172[/C][C]97671.3[/C][C]97770.2[/C][C]-98.9245[/C][C]500.674[/C][/ROW]
[ROW][C]49[/C][C]98448[/C][C]97386.5[/C][C]97912.8[/C][C]-526.299[/C][C]1061.55[/C][/ROW]
[ROW][C]50[/C][C]98157[/C][C]97171.4[/C][C]98047.6[/C][C]-876.206[/C][C]985.622[/C][/ROW]
[ROW][C]51[/C][C]98009[/C][C]97422.8[/C][C]98166.3[/C][C]-743.549[/C][C]586.216[/C][/ROW]
[ROW][C]52[/C][C]98020[/C][C]97839[/C][C]98271.8[/C][C]-432.852[/C][C]181.018[/C][/ROW]
[ROW][C]53[/C][C]97802[/C][C]98347.7[/C][C]98392.7[/C][C]-44.9974[/C][C]-545.711[/C][/ROW]
[ROW][C]54[/C][C]98006[/C][C]98752.2[/C][C]98535.2[/C][C]217.013[/C][C]-746.221[/C][/ROW]
[ROW][C]55[/C][C]98262[/C][C]NA[/C][C]NA[/C][C]396.305[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]98629[/C][C]NA[/C][C]NA[/C][C]326.076[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]99043[/C][C]NA[/C][C]NA[/C][C]653.721[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]99289[/C][C]NA[/C][C]NA[/C][C]687.003[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]99682[/C][C]NA[/C][C]NA[/C][C]442.711[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]99979[/C][C]NA[/C][C]NA[/C][C]-98.9245[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=294961&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=294961&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
181432NANA-526.299NA
281935NANA-876.206NA
382229NANA-743.549NA
482963NANA-432.852NA
582975NANA-44.9974NA
682892NANA217.013NA
7826928360083203.7396.305-907.971
88264883773.783447.6326.076-1125.66
98347984326.283672.5653.721-847.221
108417684580.383893.3687.003-404.253
118458984610.484167.7442.711-21.4193
128485784438.684537.5-98.9245418.424
138458684457.584983.8-526.299128.508
148463584606.585482.8-876.20628.4557
158492785234.785978.2-743.549-307.659
168556386011.686444.4-432.852-448.565
178696286849.486894.4-44.9974112.581
188778087576.387359.2217.013203.737
198851588277.387881396.305237.695
208880088775.588449.4326.07624.5495
218921889698.489044.7653.721-480.43
228962690360.189673.1687.003-734.086
238993990752.990310.2442.711-813.919
249066390821.690920.5-98.9245-158.617
259130290981.691507.9-526.299320.424
269156091224.592100.7-876.206335.456
279229091966.292709.8-743.549323.758
28932819288293314.8-432.852399.018
299453593827.593872.5-44.9974707.456
309485594498.294281.2217.013356.779
319553694900.794504.4396.305635.32
329600894967.294641.2326.0761040.76
339662795426.894773653.7211200.24
349673895597.594910.5687.0031140.54
359621295449.595006.7442.711762.539
369419894994.495093.3-98.9245-796.367
379312394669.495195.7-526.299-1546.37
389302294407.495283.6-876.206-1385.42
399399394631.295374.8-743.549-638.201
409487695043.495476.2-432.852-167.357
419525195561.295606.2-44.9974-310.211
429621696066.295849.2217.013149.82
439663296632.996236.6396.305-0.929687
449702396998.596672.5326.07624.4661
459779997707.597053.7653.72191.5286
469800198039.197352.1687.003-38.0859
479806998032.197589.4442.71136.9141
489817297671.397770.2-98.9245500.674
499844897386.597912.8-526.2991061.55
509815797171.498047.6-876.206985.622
519800997422.898166.3-743.549586.216
52980209783998271.8-432.852181.018
539780298347.798392.7-44.9974-545.711
549800698752.298535.2217.013-746.221
5598262NANA396.305NA
5698629NANA326.076NA
5799043NANA653.721NA
5899289NANA687.003NA
5999682NANA442.711NA
6099979NANA-98.9245NA



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