Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationSun, 27 Nov 2016 16:49:26 +0000
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/Nov/27/t1480265512np8ll66ppz2x095.htm/, Retrieved Mon, 29 Apr 2024 22:46:58 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Mon, 29 Apr 2024 22:46:58 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
209305
161498
126542
100278
168677
143277
127573
90760
160404
132039
117053
101248
152336
135356
119590
81695
155847
129364
111902
86772
150695
123177
114397
76927
160032
126833
110054
87080
161472
133737
121069
89365
163837
136276
120950
78858
124634
96579
94974
71028
145065
125041
120555
92507
180404
147940
125532
101901
166452
164909
95859
75225
115418
95535
90178
115685
107032
91924
85095
103517
109702
91594
99712
148342




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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 time1 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1209305NANA31209.8NA
2161498NANA11395.5NA
3126542NANA-14108.2NA
4100278NANA-39496.6NA
5168677NANA26947.6NA
6143277NANA3725.65NA
7127573128324134181-5856.84-750.956
890760107036130718-23681.9-16276
916040416392012933934580.8-3515.76
101320391364761282758200.69-4436.65
11117053124856126966-2109.6-7803.48
1210124895044.8125852-308076203.22
1315233615582912461931209.8-3492.96
1413535613519512380011395.5160.517
15119590109121123229-14108.210468.9
168169582958.9122456-39496.6-1263.88
1715584714892312197626947.66923.78
181293641245771208523725.654786.81
19111902114302120159-5856.84-2400
208677296442.5120124-23681.9-9670.5
2115069515395311937234580.8-3257.76
221231771274001191998200.69-4222.65
23114397117548119658-2109.6-3151.11
247692789267.3120074-30807-12340.3
2516003215184812063831209.88183.7
2612683313252412112811395.5-5690.94
27110054107676121784-14108.22378.11
288708083380.8122877-39496.63699.16
2916147215064412369626947.610828.1
301337371277751240503725.655961.56
31121069116798122655-5856.844270.5
328936596238119920-23681.9-6872.96
3316383715261211803134580.811225.2
341362761249341167348200.6911341.6
35120950113272115381-2109.67678.31
367885883528.3114335-30807-4670.33
3712463414516111395231209.8-20527.4
389657912545711406111395.5-28877.6
3994974100774114882-14108.2-5800.1
407102876562116059-39496.6-5533.96
4114506514368311673626947.61381.86
421250411216121178873725.653428.81
43120555114732120589-5856.845822.75
4492507101497125179-23681.9-8989.71
4518040416264312806334580.817760.6
461479401364751282748200.6911465
47125532125104127214-2109.6427.726
4810190193942.2124749-308077958.84
4916645215346412225431209.812988.1
5016490913335012195411395.531559.4
5195859105754119863-14108.2-9895.47
527522574974.9114472-39496.6250.121
5311541813740011045326947.6-21982.3
54955351125611088353725.65-17025.7
5590178100681106538-5856.84-10503
5611568577436.6101118-23681.938248.4
5710703213280598224.234580.8-25773
58919241096321014318200.69-17708
5985095NANA-2109.6NA
60103517NANA-30807NA
61109702NANA31209.8NA
6291594NANA11395.5NA
6399712NANA-14108.2NA
64148342NANA-39496.6NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 209305 & NA & NA & 31209.8 & NA \tabularnewline
2 & 161498 & NA & NA & 11395.5 & NA \tabularnewline
3 & 126542 & NA & NA & -14108.2 & NA \tabularnewline
4 & 100278 & NA & NA & -39496.6 & NA \tabularnewline
5 & 168677 & NA & NA & 26947.6 & NA \tabularnewline
6 & 143277 & NA & NA & 3725.65 & NA \tabularnewline
7 & 127573 & 128324 & 134181 & -5856.84 & -750.956 \tabularnewline
8 & 90760 & 107036 & 130718 & -23681.9 & -16276 \tabularnewline
9 & 160404 & 163920 & 129339 & 34580.8 & -3515.76 \tabularnewline
10 & 132039 & 136476 & 128275 & 8200.69 & -4436.65 \tabularnewline
11 & 117053 & 124856 & 126966 & -2109.6 & -7803.48 \tabularnewline
12 & 101248 & 95044.8 & 125852 & -30807 & 6203.22 \tabularnewline
13 & 152336 & 155829 & 124619 & 31209.8 & -3492.96 \tabularnewline
14 & 135356 & 135195 & 123800 & 11395.5 & 160.517 \tabularnewline
15 & 119590 & 109121 & 123229 & -14108.2 & 10468.9 \tabularnewline
16 & 81695 & 82958.9 & 122456 & -39496.6 & -1263.88 \tabularnewline
17 & 155847 & 148923 & 121976 & 26947.6 & 6923.78 \tabularnewline
18 & 129364 & 124577 & 120852 & 3725.65 & 4786.81 \tabularnewline
19 & 111902 & 114302 & 120159 & -5856.84 & -2400 \tabularnewline
20 & 86772 & 96442.5 & 120124 & -23681.9 & -9670.5 \tabularnewline
21 & 150695 & 153953 & 119372 & 34580.8 & -3257.76 \tabularnewline
22 & 123177 & 127400 & 119199 & 8200.69 & -4222.65 \tabularnewline
23 & 114397 & 117548 & 119658 & -2109.6 & -3151.11 \tabularnewline
24 & 76927 & 89267.3 & 120074 & -30807 & -12340.3 \tabularnewline
25 & 160032 & 151848 & 120638 & 31209.8 & 8183.7 \tabularnewline
26 & 126833 & 132524 & 121128 & 11395.5 & -5690.94 \tabularnewline
27 & 110054 & 107676 & 121784 & -14108.2 & 2378.11 \tabularnewline
28 & 87080 & 83380.8 & 122877 & -39496.6 & 3699.16 \tabularnewline
29 & 161472 & 150644 & 123696 & 26947.6 & 10828.1 \tabularnewline
30 & 133737 & 127775 & 124050 & 3725.65 & 5961.56 \tabularnewline
31 & 121069 & 116798 & 122655 & -5856.84 & 4270.5 \tabularnewline
32 & 89365 & 96238 & 119920 & -23681.9 & -6872.96 \tabularnewline
33 & 163837 & 152612 & 118031 & 34580.8 & 11225.2 \tabularnewline
34 & 136276 & 124934 & 116734 & 8200.69 & 11341.6 \tabularnewline
35 & 120950 & 113272 & 115381 & -2109.6 & 7678.31 \tabularnewline
36 & 78858 & 83528.3 & 114335 & -30807 & -4670.33 \tabularnewline
37 & 124634 & 145161 & 113952 & 31209.8 & -20527.4 \tabularnewline
38 & 96579 & 125457 & 114061 & 11395.5 & -28877.6 \tabularnewline
39 & 94974 & 100774 & 114882 & -14108.2 & -5800.1 \tabularnewline
40 & 71028 & 76562 & 116059 & -39496.6 & -5533.96 \tabularnewline
41 & 145065 & 143683 & 116736 & 26947.6 & 1381.86 \tabularnewline
42 & 125041 & 121612 & 117887 & 3725.65 & 3428.81 \tabularnewline
43 & 120555 & 114732 & 120589 & -5856.84 & 5822.75 \tabularnewline
44 & 92507 & 101497 & 125179 & -23681.9 & -8989.71 \tabularnewline
45 & 180404 & 162643 & 128063 & 34580.8 & 17760.6 \tabularnewline
46 & 147940 & 136475 & 128274 & 8200.69 & 11465 \tabularnewline
47 & 125532 & 125104 & 127214 & -2109.6 & 427.726 \tabularnewline
48 & 101901 & 93942.2 & 124749 & -30807 & 7958.84 \tabularnewline
49 & 166452 & 153464 & 122254 & 31209.8 & 12988.1 \tabularnewline
50 & 164909 & 133350 & 121954 & 11395.5 & 31559.4 \tabularnewline
51 & 95859 & 105754 & 119863 & -14108.2 & -9895.47 \tabularnewline
52 & 75225 & 74974.9 & 114472 & -39496.6 & 250.121 \tabularnewline
53 & 115418 & 137400 & 110453 & 26947.6 & -21982.3 \tabularnewline
54 & 95535 & 112561 & 108835 & 3725.65 & -17025.7 \tabularnewline
55 & 90178 & 100681 & 106538 & -5856.84 & -10503 \tabularnewline
56 & 115685 & 77436.6 & 101118 & -23681.9 & 38248.4 \tabularnewline
57 & 107032 & 132805 & 98224.2 & 34580.8 & -25773 \tabularnewline
58 & 91924 & 109632 & 101431 & 8200.69 & -17708 \tabularnewline
59 & 85095 & NA & NA & -2109.6 & NA \tabularnewline
60 & 103517 & NA & NA & -30807 & NA \tabularnewline
61 & 109702 & NA & NA & 31209.8 & NA \tabularnewline
62 & 91594 & NA & NA & 11395.5 & NA \tabularnewline
63 & 99712 & NA & NA & -14108.2 & NA \tabularnewline
64 & 148342 & NA & NA & -39496.6 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&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]209305[/C][C]NA[/C][C]NA[/C][C]31209.8[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]161498[/C][C]NA[/C][C]NA[/C][C]11395.5[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]126542[/C][C]NA[/C][C]NA[/C][C]-14108.2[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]100278[/C][C]NA[/C][C]NA[/C][C]-39496.6[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]168677[/C][C]NA[/C][C]NA[/C][C]26947.6[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]143277[/C][C]NA[/C][C]NA[/C][C]3725.65[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]127573[/C][C]128324[/C][C]134181[/C][C]-5856.84[/C][C]-750.956[/C][/ROW]
[ROW][C]8[/C][C]90760[/C][C]107036[/C][C]130718[/C][C]-23681.9[/C][C]-16276[/C][/ROW]
[ROW][C]9[/C][C]160404[/C][C]163920[/C][C]129339[/C][C]34580.8[/C][C]-3515.76[/C][/ROW]
[ROW][C]10[/C][C]132039[/C][C]136476[/C][C]128275[/C][C]8200.69[/C][C]-4436.65[/C][/ROW]
[ROW][C]11[/C][C]117053[/C][C]124856[/C][C]126966[/C][C]-2109.6[/C][C]-7803.48[/C][/ROW]
[ROW][C]12[/C][C]101248[/C][C]95044.8[/C][C]125852[/C][C]-30807[/C][C]6203.22[/C][/ROW]
[ROW][C]13[/C][C]152336[/C][C]155829[/C][C]124619[/C][C]31209.8[/C][C]-3492.96[/C][/ROW]
[ROW][C]14[/C][C]135356[/C][C]135195[/C][C]123800[/C][C]11395.5[/C][C]160.517[/C][/ROW]
[ROW][C]15[/C][C]119590[/C][C]109121[/C][C]123229[/C][C]-14108.2[/C][C]10468.9[/C][/ROW]
[ROW][C]16[/C][C]81695[/C][C]82958.9[/C][C]122456[/C][C]-39496.6[/C][C]-1263.88[/C][/ROW]
[ROW][C]17[/C][C]155847[/C][C]148923[/C][C]121976[/C][C]26947.6[/C][C]6923.78[/C][/ROW]
[ROW][C]18[/C][C]129364[/C][C]124577[/C][C]120852[/C][C]3725.65[/C][C]4786.81[/C][/ROW]
[ROW][C]19[/C][C]111902[/C][C]114302[/C][C]120159[/C][C]-5856.84[/C][C]-2400[/C][/ROW]
[ROW][C]20[/C][C]86772[/C][C]96442.5[/C][C]120124[/C][C]-23681.9[/C][C]-9670.5[/C][/ROW]
[ROW][C]21[/C][C]150695[/C][C]153953[/C][C]119372[/C][C]34580.8[/C][C]-3257.76[/C][/ROW]
[ROW][C]22[/C][C]123177[/C][C]127400[/C][C]119199[/C][C]8200.69[/C][C]-4222.65[/C][/ROW]
[ROW][C]23[/C][C]114397[/C][C]117548[/C][C]119658[/C][C]-2109.6[/C][C]-3151.11[/C][/ROW]
[ROW][C]24[/C][C]76927[/C][C]89267.3[/C][C]120074[/C][C]-30807[/C][C]-12340.3[/C][/ROW]
[ROW][C]25[/C][C]160032[/C][C]151848[/C][C]120638[/C][C]31209.8[/C][C]8183.7[/C][/ROW]
[ROW][C]26[/C][C]126833[/C][C]132524[/C][C]121128[/C][C]11395.5[/C][C]-5690.94[/C][/ROW]
[ROW][C]27[/C][C]110054[/C][C]107676[/C][C]121784[/C][C]-14108.2[/C][C]2378.11[/C][/ROW]
[ROW][C]28[/C][C]87080[/C][C]83380.8[/C][C]122877[/C][C]-39496.6[/C][C]3699.16[/C][/ROW]
[ROW][C]29[/C][C]161472[/C][C]150644[/C][C]123696[/C][C]26947.6[/C][C]10828.1[/C][/ROW]
[ROW][C]30[/C][C]133737[/C][C]127775[/C][C]124050[/C][C]3725.65[/C][C]5961.56[/C][/ROW]
[ROW][C]31[/C][C]121069[/C][C]116798[/C][C]122655[/C][C]-5856.84[/C][C]4270.5[/C][/ROW]
[ROW][C]32[/C][C]89365[/C][C]96238[/C][C]119920[/C][C]-23681.9[/C][C]-6872.96[/C][/ROW]
[ROW][C]33[/C][C]163837[/C][C]152612[/C][C]118031[/C][C]34580.8[/C][C]11225.2[/C][/ROW]
[ROW][C]34[/C][C]136276[/C][C]124934[/C][C]116734[/C][C]8200.69[/C][C]11341.6[/C][/ROW]
[ROW][C]35[/C][C]120950[/C][C]113272[/C][C]115381[/C][C]-2109.6[/C][C]7678.31[/C][/ROW]
[ROW][C]36[/C][C]78858[/C][C]83528.3[/C][C]114335[/C][C]-30807[/C][C]-4670.33[/C][/ROW]
[ROW][C]37[/C][C]124634[/C][C]145161[/C][C]113952[/C][C]31209.8[/C][C]-20527.4[/C][/ROW]
[ROW][C]38[/C][C]96579[/C][C]125457[/C][C]114061[/C][C]11395.5[/C][C]-28877.6[/C][/ROW]
[ROW][C]39[/C][C]94974[/C][C]100774[/C][C]114882[/C][C]-14108.2[/C][C]-5800.1[/C][/ROW]
[ROW][C]40[/C][C]71028[/C][C]76562[/C][C]116059[/C][C]-39496.6[/C][C]-5533.96[/C][/ROW]
[ROW][C]41[/C][C]145065[/C][C]143683[/C][C]116736[/C][C]26947.6[/C][C]1381.86[/C][/ROW]
[ROW][C]42[/C][C]125041[/C][C]121612[/C][C]117887[/C][C]3725.65[/C][C]3428.81[/C][/ROW]
[ROW][C]43[/C][C]120555[/C][C]114732[/C][C]120589[/C][C]-5856.84[/C][C]5822.75[/C][/ROW]
[ROW][C]44[/C][C]92507[/C][C]101497[/C][C]125179[/C][C]-23681.9[/C][C]-8989.71[/C][/ROW]
[ROW][C]45[/C][C]180404[/C][C]162643[/C][C]128063[/C][C]34580.8[/C][C]17760.6[/C][/ROW]
[ROW][C]46[/C][C]147940[/C][C]136475[/C][C]128274[/C][C]8200.69[/C][C]11465[/C][/ROW]
[ROW][C]47[/C][C]125532[/C][C]125104[/C][C]127214[/C][C]-2109.6[/C][C]427.726[/C][/ROW]
[ROW][C]48[/C][C]101901[/C][C]93942.2[/C][C]124749[/C][C]-30807[/C][C]7958.84[/C][/ROW]
[ROW][C]49[/C][C]166452[/C][C]153464[/C][C]122254[/C][C]31209.8[/C][C]12988.1[/C][/ROW]
[ROW][C]50[/C][C]164909[/C][C]133350[/C][C]121954[/C][C]11395.5[/C][C]31559.4[/C][/ROW]
[ROW][C]51[/C][C]95859[/C][C]105754[/C][C]119863[/C][C]-14108.2[/C][C]-9895.47[/C][/ROW]
[ROW][C]52[/C][C]75225[/C][C]74974.9[/C][C]114472[/C][C]-39496.6[/C][C]250.121[/C][/ROW]
[ROW][C]53[/C][C]115418[/C][C]137400[/C][C]110453[/C][C]26947.6[/C][C]-21982.3[/C][/ROW]
[ROW][C]54[/C][C]95535[/C][C]112561[/C][C]108835[/C][C]3725.65[/C][C]-17025.7[/C][/ROW]
[ROW][C]55[/C][C]90178[/C][C]100681[/C][C]106538[/C][C]-5856.84[/C][C]-10503[/C][/ROW]
[ROW][C]56[/C][C]115685[/C][C]77436.6[/C][C]101118[/C][C]-23681.9[/C][C]38248.4[/C][/ROW]
[ROW][C]57[/C][C]107032[/C][C]132805[/C][C]98224.2[/C][C]34580.8[/C][C]-25773[/C][/ROW]
[ROW][C]58[/C][C]91924[/C][C]109632[/C][C]101431[/C][C]8200.69[/C][C]-17708[/C][/ROW]
[ROW][C]59[/C][C]85095[/C][C]NA[/C][C]NA[/C][C]-2109.6[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]103517[/C][C]NA[/C][C]NA[/C][C]-30807[/C][C]NA[/C][/ROW]
[ROW][C]61[/C][C]109702[/C][C]NA[/C][C]NA[/C][C]31209.8[/C][C]NA[/C][/ROW]
[ROW][C]62[/C][C]91594[/C][C]NA[/C][C]NA[/C][C]11395.5[/C][C]NA[/C][/ROW]
[ROW][C]63[/C][C]99712[/C][C]NA[/C][C]NA[/C][C]-14108.2[/C][C]NA[/C][/ROW]
[ROW][C]64[/C][C]148342[/C][C]NA[/C][C]NA[/C][C]-39496.6[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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
1209305NANA31209.8NA
2161498NANA11395.5NA
3126542NANA-14108.2NA
4100278NANA-39496.6NA
5168677NANA26947.6NA
6143277NANA3725.65NA
7127573128324134181-5856.84-750.956
890760107036130718-23681.9-16276
916040416392012933934580.8-3515.76
101320391364761282758200.69-4436.65
11117053124856126966-2109.6-7803.48
1210124895044.8125852-308076203.22
1315233615582912461931209.8-3492.96
1413535613519512380011395.5160.517
15119590109121123229-14108.210468.9
168169582958.9122456-39496.6-1263.88
1715584714892312197626947.66923.78
181293641245771208523725.654786.81
19111902114302120159-5856.84-2400
208677296442.5120124-23681.9-9670.5
2115069515395311937234580.8-3257.76
221231771274001191998200.69-4222.65
23114397117548119658-2109.6-3151.11
247692789267.3120074-30807-12340.3
2516003215184812063831209.88183.7
2612683313252412112811395.5-5690.94
27110054107676121784-14108.22378.11
288708083380.8122877-39496.63699.16
2916147215064412369626947.610828.1
301337371277751240503725.655961.56
31121069116798122655-5856.844270.5
328936596238119920-23681.9-6872.96
3316383715261211803134580.811225.2
341362761249341167348200.6911341.6
35120950113272115381-2109.67678.31
367885883528.3114335-30807-4670.33
3712463414516111395231209.8-20527.4
389657912545711406111395.5-28877.6
3994974100774114882-14108.2-5800.1
407102876562116059-39496.6-5533.96
4114506514368311673626947.61381.86
421250411216121178873725.653428.81
43120555114732120589-5856.845822.75
4492507101497125179-23681.9-8989.71
4518040416264312806334580.817760.6
461479401364751282748200.6911465
47125532125104127214-2109.6427.726
4810190193942.2124749-308077958.84
4916645215346412225431209.812988.1
5016490913335012195411395.531559.4
5195859105754119863-14108.2-9895.47
527522574974.9114472-39496.6250.121
5311541813740011045326947.6-21982.3
54955351125611088353725.65-17025.7
5590178100681106538-5856.84-10503
5611568577436.6101118-23681.938248.4
5710703213280598224.234580.8-25773
58919241096321014318200.69-17708
5985095NANA-2109.6NA
60103517NANA-30807NA
61109702NANA31209.8NA
6291594NANA11395.5NA
6399712NANA-14108.2NA
64148342NANA-39496.6NA



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