Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationThu, 26 Nov 2015 14:27:06 +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/Nov/26/t1448548116pn30vej80rqcgf7.htm/, Retrieved Tue, 14 May 2024 22:38:08 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=284234, Retrieved Tue, 14 May 2024 22:38:08 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact95
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [Decompositie Werk...] [2015-11-26 14:27:06] [ad5e328aab07d5d247de986d4dfd18ff] [Current]
- RMP     [Exponential Smoothing] [Exponential smoot...] [2015-11-26 17:29:37] [caeec4f3373338cbe0826e56549ed528]
Feedback Forum

Post a new message
Dataseries X:
467
475
470
442
433
427
410
406
429
425
431
408
454
459
441
420
416
400
401
398
442
458
476
447
511
514
513
511
498
490
495
486
530
539
555
548
615
634
645
634
630
635
642
637
675
679
676
660
716
730
717
694
670
641
626
604
630
634
635
619




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=284234&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=284234&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=284234&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
1467NANA32.4696NA
2475NANA38.4071NA
3470NANA29.0009NA
4442NANA10.48NA
5433NANA-5.07205NA
6427NANA-21.395NA
7410410.126434.708-24.5825-0.125868
8406398.418433.5-35.08257.58247
9429428.563431.625-3.061630.436632
10425427.49429.5-2.00955-2.49045
11431430.022427.8752.14670.978299
12408404.74426.042-21.30123.25955
13454457.011424.54232.4696-3.01128
14459462.24423.83338.4071-3.24045
15441453.043424.04229.0009-12.0425
16420436.438425.95810.48-16.4384
17416424.136429.208-5.07205-8.13628
18400411.313432.708-21.395-11.3134
19401412.126436.708-24.5825-11.1259
20398406.293441.375-35.0825-8.29253
21442443.605446.667-3.06163-1.60503
22458451.449453.458-2.009556.55122
23476462.813460.6672.146713.1866
24447446.532467.833-21.30120.467882
25511507.97475.532.46963.03038
26514521.49483.08338.4071-7.49045
27513519.418490.41729.0009-6.41753
28511507.938497.45810.483.06163
29498499.053504.125-5.07205-1.05295
30490490.23511.625-21.395-0.230035
31495495.584520.167-24.5825-0.584201
32486494.418529.5-35.0825-8.41753
33530536.938540-3.06163-6.93837
34539548.615550.625-2.00955-9.61545
35555563.397561.252.1467-8.3967
36548551.49572.792-21.3012-3.49045
37615617.428584.95832.4696-2.42795
38634635.782597.37538.4071-1.78212
39645638.709609.70829.00096.2908
40634632.063621.58310.481.93663
41630627.386632.458-5.072052.61372
42635620.772642.167-21.39514.2283
43642626.459651.042-24.582515.5408
44637624.168659.25-35.082512.8325
45675663.188666.25-3.0616311.8116
46679669.74671.75-2.009559.25955
47676678.063675.9172.1467-2.06337
48660656.532677.833-21.30123.46788
49716709.886677.41732.46966.11372
50730713.782675.37538.407116.2179
51717701.126672.12529.000915.8741
52694678.855668.37510.4815.145
53670659.72664.792-5.0720510.2804
54641639.98661.375-21.3951.01997
55626NANA-24.5825NA
56604NANA-35.0825NA
57630NANA-3.06163NA
58634NANA-2.00955NA
59635NANA2.1467NA
60619NANA-21.3012NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 467 & NA & NA & 32.4696 & NA \tabularnewline
2 & 475 & NA & NA & 38.4071 & NA \tabularnewline
3 & 470 & NA & NA & 29.0009 & NA \tabularnewline
4 & 442 & NA & NA & 10.48 & NA \tabularnewline
5 & 433 & NA & NA & -5.07205 & NA \tabularnewline
6 & 427 & NA & NA & -21.395 & NA \tabularnewline
7 & 410 & 410.126 & 434.708 & -24.5825 & -0.125868 \tabularnewline
8 & 406 & 398.418 & 433.5 & -35.0825 & 7.58247 \tabularnewline
9 & 429 & 428.563 & 431.625 & -3.06163 & 0.436632 \tabularnewline
10 & 425 & 427.49 & 429.5 & -2.00955 & -2.49045 \tabularnewline
11 & 431 & 430.022 & 427.875 & 2.1467 & 0.978299 \tabularnewline
12 & 408 & 404.74 & 426.042 & -21.3012 & 3.25955 \tabularnewline
13 & 454 & 457.011 & 424.542 & 32.4696 & -3.01128 \tabularnewline
14 & 459 & 462.24 & 423.833 & 38.4071 & -3.24045 \tabularnewline
15 & 441 & 453.043 & 424.042 & 29.0009 & -12.0425 \tabularnewline
16 & 420 & 436.438 & 425.958 & 10.48 & -16.4384 \tabularnewline
17 & 416 & 424.136 & 429.208 & -5.07205 & -8.13628 \tabularnewline
18 & 400 & 411.313 & 432.708 & -21.395 & -11.3134 \tabularnewline
19 & 401 & 412.126 & 436.708 & -24.5825 & -11.1259 \tabularnewline
20 & 398 & 406.293 & 441.375 & -35.0825 & -8.29253 \tabularnewline
21 & 442 & 443.605 & 446.667 & -3.06163 & -1.60503 \tabularnewline
22 & 458 & 451.449 & 453.458 & -2.00955 & 6.55122 \tabularnewline
23 & 476 & 462.813 & 460.667 & 2.1467 & 13.1866 \tabularnewline
24 & 447 & 446.532 & 467.833 & -21.3012 & 0.467882 \tabularnewline
25 & 511 & 507.97 & 475.5 & 32.4696 & 3.03038 \tabularnewline
26 & 514 & 521.49 & 483.083 & 38.4071 & -7.49045 \tabularnewline
27 & 513 & 519.418 & 490.417 & 29.0009 & -6.41753 \tabularnewline
28 & 511 & 507.938 & 497.458 & 10.48 & 3.06163 \tabularnewline
29 & 498 & 499.053 & 504.125 & -5.07205 & -1.05295 \tabularnewline
30 & 490 & 490.23 & 511.625 & -21.395 & -0.230035 \tabularnewline
31 & 495 & 495.584 & 520.167 & -24.5825 & -0.584201 \tabularnewline
32 & 486 & 494.418 & 529.5 & -35.0825 & -8.41753 \tabularnewline
33 & 530 & 536.938 & 540 & -3.06163 & -6.93837 \tabularnewline
34 & 539 & 548.615 & 550.625 & -2.00955 & -9.61545 \tabularnewline
35 & 555 & 563.397 & 561.25 & 2.1467 & -8.3967 \tabularnewline
36 & 548 & 551.49 & 572.792 & -21.3012 & -3.49045 \tabularnewline
37 & 615 & 617.428 & 584.958 & 32.4696 & -2.42795 \tabularnewline
38 & 634 & 635.782 & 597.375 & 38.4071 & -1.78212 \tabularnewline
39 & 645 & 638.709 & 609.708 & 29.0009 & 6.2908 \tabularnewline
40 & 634 & 632.063 & 621.583 & 10.48 & 1.93663 \tabularnewline
41 & 630 & 627.386 & 632.458 & -5.07205 & 2.61372 \tabularnewline
42 & 635 & 620.772 & 642.167 & -21.395 & 14.2283 \tabularnewline
43 & 642 & 626.459 & 651.042 & -24.5825 & 15.5408 \tabularnewline
44 & 637 & 624.168 & 659.25 & -35.0825 & 12.8325 \tabularnewline
45 & 675 & 663.188 & 666.25 & -3.06163 & 11.8116 \tabularnewline
46 & 679 & 669.74 & 671.75 & -2.00955 & 9.25955 \tabularnewline
47 & 676 & 678.063 & 675.917 & 2.1467 & -2.06337 \tabularnewline
48 & 660 & 656.532 & 677.833 & -21.3012 & 3.46788 \tabularnewline
49 & 716 & 709.886 & 677.417 & 32.4696 & 6.11372 \tabularnewline
50 & 730 & 713.782 & 675.375 & 38.4071 & 16.2179 \tabularnewline
51 & 717 & 701.126 & 672.125 & 29.0009 & 15.8741 \tabularnewline
52 & 694 & 678.855 & 668.375 & 10.48 & 15.145 \tabularnewline
53 & 670 & 659.72 & 664.792 & -5.07205 & 10.2804 \tabularnewline
54 & 641 & 639.98 & 661.375 & -21.395 & 1.01997 \tabularnewline
55 & 626 & NA & NA & -24.5825 & NA \tabularnewline
56 & 604 & NA & NA & -35.0825 & NA \tabularnewline
57 & 630 & NA & NA & -3.06163 & NA \tabularnewline
58 & 634 & NA & NA & -2.00955 & NA \tabularnewline
59 & 635 & NA & NA & 2.1467 & NA \tabularnewline
60 & 619 & NA & NA & -21.3012 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=284234&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]467[/C][C]NA[/C][C]NA[/C][C]32.4696[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]475[/C][C]NA[/C][C]NA[/C][C]38.4071[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]470[/C][C]NA[/C][C]NA[/C][C]29.0009[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]442[/C][C]NA[/C][C]NA[/C][C]10.48[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]433[/C][C]NA[/C][C]NA[/C][C]-5.07205[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]427[/C][C]NA[/C][C]NA[/C][C]-21.395[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]410[/C][C]410.126[/C][C]434.708[/C][C]-24.5825[/C][C]-0.125868[/C][/ROW]
[ROW][C]8[/C][C]406[/C][C]398.418[/C][C]433.5[/C][C]-35.0825[/C][C]7.58247[/C][/ROW]
[ROW][C]9[/C][C]429[/C][C]428.563[/C][C]431.625[/C][C]-3.06163[/C][C]0.436632[/C][/ROW]
[ROW][C]10[/C][C]425[/C][C]427.49[/C][C]429.5[/C][C]-2.00955[/C][C]-2.49045[/C][/ROW]
[ROW][C]11[/C][C]431[/C][C]430.022[/C][C]427.875[/C][C]2.1467[/C][C]0.978299[/C][/ROW]
[ROW][C]12[/C][C]408[/C][C]404.74[/C][C]426.042[/C][C]-21.3012[/C][C]3.25955[/C][/ROW]
[ROW][C]13[/C][C]454[/C][C]457.011[/C][C]424.542[/C][C]32.4696[/C][C]-3.01128[/C][/ROW]
[ROW][C]14[/C][C]459[/C][C]462.24[/C][C]423.833[/C][C]38.4071[/C][C]-3.24045[/C][/ROW]
[ROW][C]15[/C][C]441[/C][C]453.043[/C][C]424.042[/C][C]29.0009[/C][C]-12.0425[/C][/ROW]
[ROW][C]16[/C][C]420[/C][C]436.438[/C][C]425.958[/C][C]10.48[/C][C]-16.4384[/C][/ROW]
[ROW][C]17[/C][C]416[/C][C]424.136[/C][C]429.208[/C][C]-5.07205[/C][C]-8.13628[/C][/ROW]
[ROW][C]18[/C][C]400[/C][C]411.313[/C][C]432.708[/C][C]-21.395[/C][C]-11.3134[/C][/ROW]
[ROW][C]19[/C][C]401[/C][C]412.126[/C][C]436.708[/C][C]-24.5825[/C][C]-11.1259[/C][/ROW]
[ROW][C]20[/C][C]398[/C][C]406.293[/C][C]441.375[/C][C]-35.0825[/C][C]-8.29253[/C][/ROW]
[ROW][C]21[/C][C]442[/C][C]443.605[/C][C]446.667[/C][C]-3.06163[/C][C]-1.60503[/C][/ROW]
[ROW][C]22[/C][C]458[/C][C]451.449[/C][C]453.458[/C][C]-2.00955[/C][C]6.55122[/C][/ROW]
[ROW][C]23[/C][C]476[/C][C]462.813[/C][C]460.667[/C][C]2.1467[/C][C]13.1866[/C][/ROW]
[ROW][C]24[/C][C]447[/C][C]446.532[/C][C]467.833[/C][C]-21.3012[/C][C]0.467882[/C][/ROW]
[ROW][C]25[/C][C]511[/C][C]507.97[/C][C]475.5[/C][C]32.4696[/C][C]3.03038[/C][/ROW]
[ROW][C]26[/C][C]514[/C][C]521.49[/C][C]483.083[/C][C]38.4071[/C][C]-7.49045[/C][/ROW]
[ROW][C]27[/C][C]513[/C][C]519.418[/C][C]490.417[/C][C]29.0009[/C][C]-6.41753[/C][/ROW]
[ROW][C]28[/C][C]511[/C][C]507.938[/C][C]497.458[/C][C]10.48[/C][C]3.06163[/C][/ROW]
[ROW][C]29[/C][C]498[/C][C]499.053[/C][C]504.125[/C][C]-5.07205[/C][C]-1.05295[/C][/ROW]
[ROW][C]30[/C][C]490[/C][C]490.23[/C][C]511.625[/C][C]-21.395[/C][C]-0.230035[/C][/ROW]
[ROW][C]31[/C][C]495[/C][C]495.584[/C][C]520.167[/C][C]-24.5825[/C][C]-0.584201[/C][/ROW]
[ROW][C]32[/C][C]486[/C][C]494.418[/C][C]529.5[/C][C]-35.0825[/C][C]-8.41753[/C][/ROW]
[ROW][C]33[/C][C]530[/C][C]536.938[/C][C]540[/C][C]-3.06163[/C][C]-6.93837[/C][/ROW]
[ROW][C]34[/C][C]539[/C][C]548.615[/C][C]550.625[/C][C]-2.00955[/C][C]-9.61545[/C][/ROW]
[ROW][C]35[/C][C]555[/C][C]563.397[/C][C]561.25[/C][C]2.1467[/C][C]-8.3967[/C][/ROW]
[ROW][C]36[/C][C]548[/C][C]551.49[/C][C]572.792[/C][C]-21.3012[/C][C]-3.49045[/C][/ROW]
[ROW][C]37[/C][C]615[/C][C]617.428[/C][C]584.958[/C][C]32.4696[/C][C]-2.42795[/C][/ROW]
[ROW][C]38[/C][C]634[/C][C]635.782[/C][C]597.375[/C][C]38.4071[/C][C]-1.78212[/C][/ROW]
[ROW][C]39[/C][C]645[/C][C]638.709[/C][C]609.708[/C][C]29.0009[/C][C]6.2908[/C][/ROW]
[ROW][C]40[/C][C]634[/C][C]632.063[/C][C]621.583[/C][C]10.48[/C][C]1.93663[/C][/ROW]
[ROW][C]41[/C][C]630[/C][C]627.386[/C][C]632.458[/C][C]-5.07205[/C][C]2.61372[/C][/ROW]
[ROW][C]42[/C][C]635[/C][C]620.772[/C][C]642.167[/C][C]-21.395[/C][C]14.2283[/C][/ROW]
[ROW][C]43[/C][C]642[/C][C]626.459[/C][C]651.042[/C][C]-24.5825[/C][C]15.5408[/C][/ROW]
[ROW][C]44[/C][C]637[/C][C]624.168[/C][C]659.25[/C][C]-35.0825[/C][C]12.8325[/C][/ROW]
[ROW][C]45[/C][C]675[/C][C]663.188[/C][C]666.25[/C][C]-3.06163[/C][C]11.8116[/C][/ROW]
[ROW][C]46[/C][C]679[/C][C]669.74[/C][C]671.75[/C][C]-2.00955[/C][C]9.25955[/C][/ROW]
[ROW][C]47[/C][C]676[/C][C]678.063[/C][C]675.917[/C][C]2.1467[/C][C]-2.06337[/C][/ROW]
[ROW][C]48[/C][C]660[/C][C]656.532[/C][C]677.833[/C][C]-21.3012[/C][C]3.46788[/C][/ROW]
[ROW][C]49[/C][C]716[/C][C]709.886[/C][C]677.417[/C][C]32.4696[/C][C]6.11372[/C][/ROW]
[ROW][C]50[/C][C]730[/C][C]713.782[/C][C]675.375[/C][C]38.4071[/C][C]16.2179[/C][/ROW]
[ROW][C]51[/C][C]717[/C][C]701.126[/C][C]672.125[/C][C]29.0009[/C][C]15.8741[/C][/ROW]
[ROW][C]52[/C][C]694[/C][C]678.855[/C][C]668.375[/C][C]10.48[/C][C]15.145[/C][/ROW]
[ROW][C]53[/C][C]670[/C][C]659.72[/C][C]664.792[/C][C]-5.07205[/C][C]10.2804[/C][/ROW]
[ROW][C]54[/C][C]641[/C][C]639.98[/C][C]661.375[/C][C]-21.395[/C][C]1.01997[/C][/ROW]
[ROW][C]55[/C][C]626[/C][C]NA[/C][C]NA[/C][C]-24.5825[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]604[/C][C]NA[/C][C]NA[/C][C]-35.0825[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]630[/C][C]NA[/C][C]NA[/C][C]-3.06163[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]634[/C][C]NA[/C][C]NA[/C][C]-2.00955[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]635[/C][C]NA[/C][C]NA[/C][C]2.1467[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]619[/C][C]NA[/C][C]NA[/C][C]-21.3012[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=284234&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=284234&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
1467NANA32.4696NA
2475NANA38.4071NA
3470NANA29.0009NA
4442NANA10.48NA
5433NANA-5.07205NA
6427NANA-21.395NA
7410410.126434.708-24.5825-0.125868
8406398.418433.5-35.08257.58247
9429428.563431.625-3.061630.436632
10425427.49429.5-2.00955-2.49045
11431430.022427.8752.14670.978299
12408404.74426.042-21.30123.25955
13454457.011424.54232.4696-3.01128
14459462.24423.83338.4071-3.24045
15441453.043424.04229.0009-12.0425
16420436.438425.95810.48-16.4384
17416424.136429.208-5.07205-8.13628
18400411.313432.708-21.395-11.3134
19401412.126436.708-24.5825-11.1259
20398406.293441.375-35.0825-8.29253
21442443.605446.667-3.06163-1.60503
22458451.449453.458-2.009556.55122
23476462.813460.6672.146713.1866
24447446.532467.833-21.30120.467882
25511507.97475.532.46963.03038
26514521.49483.08338.4071-7.49045
27513519.418490.41729.0009-6.41753
28511507.938497.45810.483.06163
29498499.053504.125-5.07205-1.05295
30490490.23511.625-21.395-0.230035
31495495.584520.167-24.5825-0.584201
32486494.418529.5-35.0825-8.41753
33530536.938540-3.06163-6.93837
34539548.615550.625-2.00955-9.61545
35555563.397561.252.1467-8.3967
36548551.49572.792-21.3012-3.49045
37615617.428584.95832.4696-2.42795
38634635.782597.37538.4071-1.78212
39645638.709609.70829.00096.2908
40634632.063621.58310.481.93663
41630627.386632.458-5.072052.61372
42635620.772642.167-21.39514.2283
43642626.459651.042-24.582515.5408
44637624.168659.25-35.082512.8325
45675663.188666.25-3.0616311.8116
46679669.74671.75-2.009559.25955
47676678.063675.9172.1467-2.06337
48660656.532677.833-21.30123.46788
49716709.886677.41732.46966.11372
50730713.782675.37538.407116.2179
51717701.126672.12529.000915.8741
52694678.855668.37510.4815.145
53670659.72664.792-5.0720510.2804
54641639.98661.375-21.3951.01997
55626NANA-24.5825NA
56604NANA-35.0825NA
57630NANA-3.06163NA
58634NANA-2.00955NA
59635NANA2.1467NA
60619NANA-21.3012NA



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