Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationTue, 08 Dec 2015 17:17:05 +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/2015/Dec/08/t14495950673w55qbv8vvajn36.htm/, Retrieved Thu, 16 May 2024 15:02:21 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=285547, Retrieved Thu, 16 May 2024 15:02:21 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact86
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Classical Decomposition] [HPC Retail Sales] [2008-03-02 16:19:32] [74be16979710d4c4e7c6647856088456]
- R  D  [Classical Decomposition] [classical decompo...] [2015-12-08 14:52:05] [22b6f4a061c8797aa483199554a73d13]
- RMP     [Decomposition by Loess] [Loess totaal mannen] [2015-12-08 15:45:08] [22b6f4a061c8797aa483199554a73d13]
- RMP       [Structural Time Series Models] [structural time s...] [2015-12-08 16:02:26] [22b6f4a061c8797aa483199554a73d13]
- RMPD          [Classical Decomposition] [classical decompo...] [2015-12-08 17:17:05] [20fcaaf1d4bc4a12bf87c6c50d624c14] [Current]
- RMP             [Decomposition by Loess] [Loess totaal vrouwen] [2015-12-08 17:53:15] [22b6f4a061c8797aa483199554a73d13]
- RMP               [Structural Time Series Models] [structural time s...] [2015-12-08 18:02:34] [22b6f4a061c8797aa483199554a73d13]
Feedback Forum

Post a new message
Dataseries X:
276444
268606
267679
269879
265641
262525
258597
253849
256221
286895
294610
280363
269926
264341
263269
271045
267915
262078
257751
253271
257638
287452
298152
284793
274560
268270
267577
271866
268546
264722
262425
258973
262751
296186
304659
295442
285466
279575
279985
286012
281337
276270
271472
265637
268974
299299
305452
295468
285584
278204
276505
279732
276980
271832
263105
256162
260705
285857
291870
280358
270981




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

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







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1276444NANA3022.63NA
2268606NANA-3334.92NA
3267679NANA-4169.22NA
4269879NANA1124.63NA
5265641NANA-2305.26NA
6262525NANA-7245.67NA
7258597257708269838-12129.7889.204
8253849252426269388-16962.71423.45
9256221255336269027-13691.1885.325
1028689528606826889217176.4827.065
1129461029425126903525215.9359.231
1228036328241026911113299-2047.08
132699262720802690573022.63-2153.8
14264341265663268998-3334.92-1321.91
15263269264864269033-4169.22-1594.57
162710452702402691151124.63805.325
17267915266981269286-2305.26934.429
18262078262372269618-7245.67-294.331
19257751257866269996-12129.7-114.962
20253271253390270352-16962.7-118.8
21257638257005270696-13691.1633.409
2228745228808627090917176.4-633.727
2329815229618627097025215.91966.27
2428479328440527110613299387.627
252745602744342714113022.63126.117
26268270268509271844-3334.92-238.664
27267577268125272294-4169.22-547.987
282718662739962728711124.63-2129.8
29268546271201273506-2305.26-2654.95
30264722266975274221-7245.67-2253.37
31262425262989275119-12129.7-564.462
32258973259082276045-16962.7-108.966
33262751263342277033-13691.1-590.591
3429618629531527813917176.4870.565
3530465930447727926125215.9181.69
36295442293575280276132991867.38
372854662841562811343022.631309.66
38279575278453281788-3334.921121.59
39279985278156282325-4169.221828.93
402860122838392827141124.632173.08
41281337280572282877-2305.26765.221
42276270275665282911-7245.67604.502
43271472270787282917-12129.7684.538
44265637265902282865-16962.7-265.3
45268974268972282663-13691.12.24184
4629929929943328225617176.4-133.519
4730545230702928181325215.9-1576.81
4829546829474628144613299722.461
492855842839362809133022.631648.41
50278204276835280170-3334.921369.38
51276505275261279430-4169.221244.01
522797322796502785261124.6381.7835
53276980275094277400-2305.261885.68
54271832268958276204-7245.672873.59
55263105262836274966-12129.7268.663
56256162NANA-16962.7NA
57260705NANA-13691.1NA
58285857NANA17176.4NA
59291870NANA25215.9NA
60280358NANA13299NA
61270981NANA3022.63NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 276444 & NA & NA & 3022.63 & NA \tabularnewline
2 & 268606 & NA & NA & -3334.92 & NA \tabularnewline
3 & 267679 & NA & NA & -4169.22 & NA \tabularnewline
4 & 269879 & NA & NA & 1124.63 & NA \tabularnewline
5 & 265641 & NA & NA & -2305.26 & NA \tabularnewline
6 & 262525 & NA & NA & -7245.67 & NA \tabularnewline
7 & 258597 & 257708 & 269838 & -12129.7 & 889.204 \tabularnewline
8 & 253849 & 252426 & 269388 & -16962.7 & 1423.45 \tabularnewline
9 & 256221 & 255336 & 269027 & -13691.1 & 885.325 \tabularnewline
10 & 286895 & 286068 & 268892 & 17176.4 & 827.065 \tabularnewline
11 & 294610 & 294251 & 269035 & 25215.9 & 359.231 \tabularnewline
12 & 280363 & 282410 & 269111 & 13299 & -2047.08 \tabularnewline
13 & 269926 & 272080 & 269057 & 3022.63 & -2153.8 \tabularnewline
14 & 264341 & 265663 & 268998 & -3334.92 & -1321.91 \tabularnewline
15 & 263269 & 264864 & 269033 & -4169.22 & -1594.57 \tabularnewline
16 & 271045 & 270240 & 269115 & 1124.63 & 805.325 \tabularnewline
17 & 267915 & 266981 & 269286 & -2305.26 & 934.429 \tabularnewline
18 & 262078 & 262372 & 269618 & -7245.67 & -294.331 \tabularnewline
19 & 257751 & 257866 & 269996 & -12129.7 & -114.962 \tabularnewline
20 & 253271 & 253390 & 270352 & -16962.7 & -118.8 \tabularnewline
21 & 257638 & 257005 & 270696 & -13691.1 & 633.409 \tabularnewline
22 & 287452 & 288086 & 270909 & 17176.4 & -633.727 \tabularnewline
23 & 298152 & 296186 & 270970 & 25215.9 & 1966.27 \tabularnewline
24 & 284793 & 284405 & 271106 & 13299 & 387.627 \tabularnewline
25 & 274560 & 274434 & 271411 & 3022.63 & 126.117 \tabularnewline
26 & 268270 & 268509 & 271844 & -3334.92 & -238.664 \tabularnewline
27 & 267577 & 268125 & 272294 & -4169.22 & -547.987 \tabularnewline
28 & 271866 & 273996 & 272871 & 1124.63 & -2129.8 \tabularnewline
29 & 268546 & 271201 & 273506 & -2305.26 & -2654.95 \tabularnewline
30 & 264722 & 266975 & 274221 & -7245.67 & -2253.37 \tabularnewline
31 & 262425 & 262989 & 275119 & -12129.7 & -564.462 \tabularnewline
32 & 258973 & 259082 & 276045 & -16962.7 & -108.966 \tabularnewline
33 & 262751 & 263342 & 277033 & -13691.1 & -590.591 \tabularnewline
34 & 296186 & 295315 & 278139 & 17176.4 & 870.565 \tabularnewline
35 & 304659 & 304477 & 279261 & 25215.9 & 181.69 \tabularnewline
36 & 295442 & 293575 & 280276 & 13299 & 1867.38 \tabularnewline
37 & 285466 & 284156 & 281134 & 3022.63 & 1309.66 \tabularnewline
38 & 279575 & 278453 & 281788 & -3334.92 & 1121.59 \tabularnewline
39 & 279985 & 278156 & 282325 & -4169.22 & 1828.93 \tabularnewline
40 & 286012 & 283839 & 282714 & 1124.63 & 2173.08 \tabularnewline
41 & 281337 & 280572 & 282877 & -2305.26 & 765.221 \tabularnewline
42 & 276270 & 275665 & 282911 & -7245.67 & 604.502 \tabularnewline
43 & 271472 & 270787 & 282917 & -12129.7 & 684.538 \tabularnewline
44 & 265637 & 265902 & 282865 & -16962.7 & -265.3 \tabularnewline
45 & 268974 & 268972 & 282663 & -13691.1 & 2.24184 \tabularnewline
46 & 299299 & 299433 & 282256 & 17176.4 & -133.519 \tabularnewline
47 & 305452 & 307029 & 281813 & 25215.9 & -1576.81 \tabularnewline
48 & 295468 & 294746 & 281446 & 13299 & 722.461 \tabularnewline
49 & 285584 & 283936 & 280913 & 3022.63 & 1648.41 \tabularnewline
50 & 278204 & 276835 & 280170 & -3334.92 & 1369.38 \tabularnewline
51 & 276505 & 275261 & 279430 & -4169.22 & 1244.01 \tabularnewline
52 & 279732 & 279650 & 278526 & 1124.63 & 81.7835 \tabularnewline
53 & 276980 & 275094 & 277400 & -2305.26 & 1885.68 \tabularnewline
54 & 271832 & 268958 & 276204 & -7245.67 & 2873.59 \tabularnewline
55 & 263105 & 262836 & 274966 & -12129.7 & 268.663 \tabularnewline
56 & 256162 & NA & NA & -16962.7 & NA \tabularnewline
57 & 260705 & NA & NA & -13691.1 & NA \tabularnewline
58 & 285857 & NA & NA & 17176.4 & NA \tabularnewline
59 & 291870 & NA & NA & 25215.9 & NA \tabularnewline
60 & 280358 & NA & NA & 13299 & NA \tabularnewline
61 & 270981 & NA & NA & 3022.63 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=285547&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]276444[/C][C]NA[/C][C]NA[/C][C]3022.63[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]268606[/C][C]NA[/C][C]NA[/C][C]-3334.92[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]267679[/C][C]NA[/C][C]NA[/C][C]-4169.22[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]269879[/C][C]NA[/C][C]NA[/C][C]1124.63[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]265641[/C][C]NA[/C][C]NA[/C][C]-2305.26[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]262525[/C][C]NA[/C][C]NA[/C][C]-7245.67[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]258597[/C][C]257708[/C][C]269838[/C][C]-12129.7[/C][C]889.204[/C][/ROW]
[ROW][C]8[/C][C]253849[/C][C]252426[/C][C]269388[/C][C]-16962.7[/C][C]1423.45[/C][/ROW]
[ROW][C]9[/C][C]256221[/C][C]255336[/C][C]269027[/C][C]-13691.1[/C][C]885.325[/C][/ROW]
[ROW][C]10[/C][C]286895[/C][C]286068[/C][C]268892[/C][C]17176.4[/C][C]827.065[/C][/ROW]
[ROW][C]11[/C][C]294610[/C][C]294251[/C][C]269035[/C][C]25215.9[/C][C]359.231[/C][/ROW]
[ROW][C]12[/C][C]280363[/C][C]282410[/C][C]269111[/C][C]13299[/C][C]-2047.08[/C][/ROW]
[ROW][C]13[/C][C]269926[/C][C]272080[/C][C]269057[/C][C]3022.63[/C][C]-2153.8[/C][/ROW]
[ROW][C]14[/C][C]264341[/C][C]265663[/C][C]268998[/C][C]-3334.92[/C][C]-1321.91[/C][/ROW]
[ROW][C]15[/C][C]263269[/C][C]264864[/C][C]269033[/C][C]-4169.22[/C][C]-1594.57[/C][/ROW]
[ROW][C]16[/C][C]271045[/C][C]270240[/C][C]269115[/C][C]1124.63[/C][C]805.325[/C][/ROW]
[ROW][C]17[/C][C]267915[/C][C]266981[/C][C]269286[/C][C]-2305.26[/C][C]934.429[/C][/ROW]
[ROW][C]18[/C][C]262078[/C][C]262372[/C][C]269618[/C][C]-7245.67[/C][C]-294.331[/C][/ROW]
[ROW][C]19[/C][C]257751[/C][C]257866[/C][C]269996[/C][C]-12129.7[/C][C]-114.962[/C][/ROW]
[ROW][C]20[/C][C]253271[/C][C]253390[/C][C]270352[/C][C]-16962.7[/C][C]-118.8[/C][/ROW]
[ROW][C]21[/C][C]257638[/C][C]257005[/C][C]270696[/C][C]-13691.1[/C][C]633.409[/C][/ROW]
[ROW][C]22[/C][C]287452[/C][C]288086[/C][C]270909[/C][C]17176.4[/C][C]-633.727[/C][/ROW]
[ROW][C]23[/C][C]298152[/C][C]296186[/C][C]270970[/C][C]25215.9[/C][C]1966.27[/C][/ROW]
[ROW][C]24[/C][C]284793[/C][C]284405[/C][C]271106[/C][C]13299[/C][C]387.627[/C][/ROW]
[ROW][C]25[/C][C]274560[/C][C]274434[/C][C]271411[/C][C]3022.63[/C][C]126.117[/C][/ROW]
[ROW][C]26[/C][C]268270[/C][C]268509[/C][C]271844[/C][C]-3334.92[/C][C]-238.664[/C][/ROW]
[ROW][C]27[/C][C]267577[/C][C]268125[/C][C]272294[/C][C]-4169.22[/C][C]-547.987[/C][/ROW]
[ROW][C]28[/C][C]271866[/C][C]273996[/C][C]272871[/C][C]1124.63[/C][C]-2129.8[/C][/ROW]
[ROW][C]29[/C][C]268546[/C][C]271201[/C][C]273506[/C][C]-2305.26[/C][C]-2654.95[/C][/ROW]
[ROW][C]30[/C][C]264722[/C][C]266975[/C][C]274221[/C][C]-7245.67[/C][C]-2253.37[/C][/ROW]
[ROW][C]31[/C][C]262425[/C][C]262989[/C][C]275119[/C][C]-12129.7[/C][C]-564.462[/C][/ROW]
[ROW][C]32[/C][C]258973[/C][C]259082[/C][C]276045[/C][C]-16962.7[/C][C]-108.966[/C][/ROW]
[ROW][C]33[/C][C]262751[/C][C]263342[/C][C]277033[/C][C]-13691.1[/C][C]-590.591[/C][/ROW]
[ROW][C]34[/C][C]296186[/C][C]295315[/C][C]278139[/C][C]17176.4[/C][C]870.565[/C][/ROW]
[ROW][C]35[/C][C]304659[/C][C]304477[/C][C]279261[/C][C]25215.9[/C][C]181.69[/C][/ROW]
[ROW][C]36[/C][C]295442[/C][C]293575[/C][C]280276[/C][C]13299[/C][C]1867.38[/C][/ROW]
[ROW][C]37[/C][C]285466[/C][C]284156[/C][C]281134[/C][C]3022.63[/C][C]1309.66[/C][/ROW]
[ROW][C]38[/C][C]279575[/C][C]278453[/C][C]281788[/C][C]-3334.92[/C][C]1121.59[/C][/ROW]
[ROW][C]39[/C][C]279985[/C][C]278156[/C][C]282325[/C][C]-4169.22[/C][C]1828.93[/C][/ROW]
[ROW][C]40[/C][C]286012[/C][C]283839[/C][C]282714[/C][C]1124.63[/C][C]2173.08[/C][/ROW]
[ROW][C]41[/C][C]281337[/C][C]280572[/C][C]282877[/C][C]-2305.26[/C][C]765.221[/C][/ROW]
[ROW][C]42[/C][C]276270[/C][C]275665[/C][C]282911[/C][C]-7245.67[/C][C]604.502[/C][/ROW]
[ROW][C]43[/C][C]271472[/C][C]270787[/C][C]282917[/C][C]-12129.7[/C][C]684.538[/C][/ROW]
[ROW][C]44[/C][C]265637[/C][C]265902[/C][C]282865[/C][C]-16962.7[/C][C]-265.3[/C][/ROW]
[ROW][C]45[/C][C]268974[/C][C]268972[/C][C]282663[/C][C]-13691.1[/C][C]2.24184[/C][/ROW]
[ROW][C]46[/C][C]299299[/C][C]299433[/C][C]282256[/C][C]17176.4[/C][C]-133.519[/C][/ROW]
[ROW][C]47[/C][C]305452[/C][C]307029[/C][C]281813[/C][C]25215.9[/C][C]-1576.81[/C][/ROW]
[ROW][C]48[/C][C]295468[/C][C]294746[/C][C]281446[/C][C]13299[/C][C]722.461[/C][/ROW]
[ROW][C]49[/C][C]285584[/C][C]283936[/C][C]280913[/C][C]3022.63[/C][C]1648.41[/C][/ROW]
[ROW][C]50[/C][C]278204[/C][C]276835[/C][C]280170[/C][C]-3334.92[/C][C]1369.38[/C][/ROW]
[ROW][C]51[/C][C]276505[/C][C]275261[/C][C]279430[/C][C]-4169.22[/C][C]1244.01[/C][/ROW]
[ROW][C]52[/C][C]279732[/C][C]279650[/C][C]278526[/C][C]1124.63[/C][C]81.7835[/C][/ROW]
[ROW][C]53[/C][C]276980[/C][C]275094[/C][C]277400[/C][C]-2305.26[/C][C]1885.68[/C][/ROW]
[ROW][C]54[/C][C]271832[/C][C]268958[/C][C]276204[/C][C]-7245.67[/C][C]2873.59[/C][/ROW]
[ROW][C]55[/C][C]263105[/C][C]262836[/C][C]274966[/C][C]-12129.7[/C][C]268.663[/C][/ROW]
[ROW][C]56[/C][C]256162[/C][C]NA[/C][C]NA[/C][C]-16962.7[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]260705[/C][C]NA[/C][C]NA[/C][C]-13691.1[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]285857[/C][C]NA[/C][C]NA[/C][C]17176.4[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]291870[/C][C]NA[/C][C]NA[/C][C]25215.9[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]280358[/C][C]NA[/C][C]NA[/C][C]13299[/C][C]NA[/C][/ROW]
[ROW][C]61[/C][C]270981[/C][C]NA[/C][C]NA[/C][C]3022.63[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=285547&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=285547&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
1276444NANA3022.63NA
2268606NANA-3334.92NA
3267679NANA-4169.22NA
4269879NANA1124.63NA
5265641NANA-2305.26NA
6262525NANA-7245.67NA
7258597257708269838-12129.7889.204
8253849252426269388-16962.71423.45
9256221255336269027-13691.1885.325
1028689528606826889217176.4827.065
1129461029425126903525215.9359.231
1228036328241026911113299-2047.08
132699262720802690573022.63-2153.8
14264341265663268998-3334.92-1321.91
15263269264864269033-4169.22-1594.57
162710452702402691151124.63805.325
17267915266981269286-2305.26934.429
18262078262372269618-7245.67-294.331
19257751257866269996-12129.7-114.962
20253271253390270352-16962.7-118.8
21257638257005270696-13691.1633.409
2228745228808627090917176.4-633.727
2329815229618627097025215.91966.27
2428479328440527110613299387.627
252745602744342714113022.63126.117
26268270268509271844-3334.92-238.664
27267577268125272294-4169.22-547.987
282718662739962728711124.63-2129.8
29268546271201273506-2305.26-2654.95
30264722266975274221-7245.67-2253.37
31262425262989275119-12129.7-564.462
32258973259082276045-16962.7-108.966
33262751263342277033-13691.1-590.591
3429618629531527813917176.4870.565
3530465930447727926125215.9181.69
36295442293575280276132991867.38
372854662841562811343022.631309.66
38279575278453281788-3334.921121.59
39279985278156282325-4169.221828.93
402860122838392827141124.632173.08
41281337280572282877-2305.26765.221
42276270275665282911-7245.67604.502
43271472270787282917-12129.7684.538
44265637265902282865-16962.7-265.3
45268974268972282663-13691.12.24184
4629929929943328225617176.4-133.519
4730545230702928181325215.9-1576.81
4829546829474628144613299722.461
492855842839362809133022.631648.41
50278204276835280170-3334.921369.38
51276505275261279430-4169.221244.01
522797322796502785261124.6381.7835
53276980275094277400-2305.261885.68
54271832268958276204-7245.672873.59
55263105262836274966-12129.7268.663
56256162NANA-16962.7NA
57260705NANA-13691.1NA
58285857NANA17176.4NA
59291870NANA25215.9NA
60280358NANA13299NA
61270981NANA3022.63NA



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