Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationTue, 02 May 2017 16:19:32 +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/2017/May/02/t1493738409ttnfu3hbvjavrac.htm/, Retrieved Fri, 17 May 2024 07:35:20 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Fri, 17 May 2024 07:35:20 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
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
674
664
653
635
614
595
580
570
608
617
591
565
603
612
599
587
557
528
517
484
514
510
495
458




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.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]4 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=&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 time4 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1511NANA31.1181NA
2514NANA38.9097NA
3513NANA32.5972NA
4511NANA17.066NA
5498NANA-1.75694NA
6490NANA-18.1944NA
7495493.66520.167-26.50691.34028
8486489.514529.5-39.9861-3.51389
9530534.597540-5.40278-4.59722
10539550.035550.625-0.590278-11.0347
11555556.253561.25-4.99653-1.25347
12548550.535572.792-22.2569-2.53472
13615616.076584.95831.1181-1.07639
14634636.285597.37538.9097-2.28472
15645642.306609.70832.59722.69444
16634638.649621.58317.066-4.64931
17630630.701632.458-1.75694-0.701389
18635623.972642.167-18.194411.0278
19642624.535651.042-26.506917.4653
20637619.264659.25-39.986117.7361
21675660.847666.25-5.4027814.1528
22679671.16671.75-0.5902787.84028
23676670.92675.917-4.996535.07986
24660655.576677.833-22.25694.42361
25716708.535677.41731.11817.46528
26730714.285675.37538.909715.7153
27717704.722672.12532.597212.2778
28694685.441668.37517.0668.55903
29670663.035664.792-1.756946.96528
30641643.181661.375-18.1944-2.18056
31626631.41657.917-26.5069-5.40972
32604613.431653.417-39.9861-9.43056
33630642.597648-5.40278-12.5972
34634642.285642.875-0.590278-8.28472
35635633.087638.083-4.996531.91319
36619611.576633.833-22.25697.42361
37674661.11863031.118112.8819
38664665.576626.66738.9097-1.57639
39653656.931624.33332.5972-3.93056
40635639.774622.70817.066-4.77431
41614618.41620.167-1.75694-4.40972
42595597.889616.083-18.1944-2.88889
43580584.368610.875-26.5069-4.36806
44570565.764605.75-39.98614.23611
45608595.931601.333-5.4027812.0694
46617596.493597.083-0.59027820.5069
47591587.712592.708-4.996533.28819
48565565.285587.542-22.2569-0.284722
49603613.243582.12531.1181-10.2431
50612614.826575.91738.9097-2.82639
51599601.014568.41732.5972-2.01389
52587577.108560.04217.0669.89236
53557549.826551.583-1.756947.17361
54528524.931543.125-18.19443.06944
55517NANA-26.5069NA
56484NANA-39.9861NA
57514NANA-5.40278NA
58510NANA-0.590278NA
59495NANA-4.99653NA
60458NANA-22.2569NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 511 & NA & NA & 31.1181 & NA \tabularnewline
2 & 514 & NA & NA & 38.9097 & NA \tabularnewline
3 & 513 & NA & NA & 32.5972 & NA \tabularnewline
4 & 511 & NA & NA & 17.066 & NA \tabularnewline
5 & 498 & NA & NA & -1.75694 & NA \tabularnewline
6 & 490 & NA & NA & -18.1944 & NA \tabularnewline
7 & 495 & 493.66 & 520.167 & -26.5069 & 1.34028 \tabularnewline
8 & 486 & 489.514 & 529.5 & -39.9861 & -3.51389 \tabularnewline
9 & 530 & 534.597 & 540 & -5.40278 & -4.59722 \tabularnewline
10 & 539 & 550.035 & 550.625 & -0.590278 & -11.0347 \tabularnewline
11 & 555 & 556.253 & 561.25 & -4.99653 & -1.25347 \tabularnewline
12 & 548 & 550.535 & 572.792 & -22.2569 & -2.53472 \tabularnewline
13 & 615 & 616.076 & 584.958 & 31.1181 & -1.07639 \tabularnewline
14 & 634 & 636.285 & 597.375 & 38.9097 & -2.28472 \tabularnewline
15 & 645 & 642.306 & 609.708 & 32.5972 & 2.69444 \tabularnewline
16 & 634 & 638.649 & 621.583 & 17.066 & -4.64931 \tabularnewline
17 & 630 & 630.701 & 632.458 & -1.75694 & -0.701389 \tabularnewline
18 & 635 & 623.972 & 642.167 & -18.1944 & 11.0278 \tabularnewline
19 & 642 & 624.535 & 651.042 & -26.5069 & 17.4653 \tabularnewline
20 & 637 & 619.264 & 659.25 & -39.9861 & 17.7361 \tabularnewline
21 & 675 & 660.847 & 666.25 & -5.40278 & 14.1528 \tabularnewline
22 & 679 & 671.16 & 671.75 & -0.590278 & 7.84028 \tabularnewline
23 & 676 & 670.92 & 675.917 & -4.99653 & 5.07986 \tabularnewline
24 & 660 & 655.576 & 677.833 & -22.2569 & 4.42361 \tabularnewline
25 & 716 & 708.535 & 677.417 & 31.1181 & 7.46528 \tabularnewline
26 & 730 & 714.285 & 675.375 & 38.9097 & 15.7153 \tabularnewline
27 & 717 & 704.722 & 672.125 & 32.5972 & 12.2778 \tabularnewline
28 & 694 & 685.441 & 668.375 & 17.066 & 8.55903 \tabularnewline
29 & 670 & 663.035 & 664.792 & -1.75694 & 6.96528 \tabularnewline
30 & 641 & 643.181 & 661.375 & -18.1944 & -2.18056 \tabularnewline
31 & 626 & 631.41 & 657.917 & -26.5069 & -5.40972 \tabularnewline
32 & 604 & 613.431 & 653.417 & -39.9861 & -9.43056 \tabularnewline
33 & 630 & 642.597 & 648 & -5.40278 & -12.5972 \tabularnewline
34 & 634 & 642.285 & 642.875 & -0.590278 & -8.28472 \tabularnewline
35 & 635 & 633.087 & 638.083 & -4.99653 & 1.91319 \tabularnewline
36 & 619 & 611.576 & 633.833 & -22.2569 & 7.42361 \tabularnewline
37 & 674 & 661.118 & 630 & 31.1181 & 12.8819 \tabularnewline
38 & 664 & 665.576 & 626.667 & 38.9097 & -1.57639 \tabularnewline
39 & 653 & 656.931 & 624.333 & 32.5972 & -3.93056 \tabularnewline
40 & 635 & 639.774 & 622.708 & 17.066 & -4.77431 \tabularnewline
41 & 614 & 618.41 & 620.167 & -1.75694 & -4.40972 \tabularnewline
42 & 595 & 597.889 & 616.083 & -18.1944 & -2.88889 \tabularnewline
43 & 580 & 584.368 & 610.875 & -26.5069 & -4.36806 \tabularnewline
44 & 570 & 565.764 & 605.75 & -39.9861 & 4.23611 \tabularnewline
45 & 608 & 595.931 & 601.333 & -5.40278 & 12.0694 \tabularnewline
46 & 617 & 596.493 & 597.083 & -0.590278 & 20.5069 \tabularnewline
47 & 591 & 587.712 & 592.708 & -4.99653 & 3.28819 \tabularnewline
48 & 565 & 565.285 & 587.542 & -22.2569 & -0.284722 \tabularnewline
49 & 603 & 613.243 & 582.125 & 31.1181 & -10.2431 \tabularnewline
50 & 612 & 614.826 & 575.917 & 38.9097 & -2.82639 \tabularnewline
51 & 599 & 601.014 & 568.417 & 32.5972 & -2.01389 \tabularnewline
52 & 587 & 577.108 & 560.042 & 17.066 & 9.89236 \tabularnewline
53 & 557 & 549.826 & 551.583 & -1.75694 & 7.17361 \tabularnewline
54 & 528 & 524.931 & 543.125 & -18.1944 & 3.06944 \tabularnewline
55 & 517 & NA & NA & -26.5069 & NA \tabularnewline
56 & 484 & NA & NA & -39.9861 & NA \tabularnewline
57 & 514 & NA & NA & -5.40278 & NA \tabularnewline
58 & 510 & NA & NA & -0.590278 & NA \tabularnewline
59 & 495 & NA & NA & -4.99653 & NA \tabularnewline
60 & 458 & NA & NA & -22.2569 & 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]511[/C][C]NA[/C][C]NA[/C][C]31.1181[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]514[/C][C]NA[/C][C]NA[/C][C]38.9097[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]513[/C][C]NA[/C][C]NA[/C][C]32.5972[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]511[/C][C]NA[/C][C]NA[/C][C]17.066[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]498[/C][C]NA[/C][C]NA[/C][C]-1.75694[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]490[/C][C]NA[/C][C]NA[/C][C]-18.1944[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]495[/C][C]493.66[/C][C]520.167[/C][C]-26.5069[/C][C]1.34028[/C][/ROW]
[ROW][C]8[/C][C]486[/C][C]489.514[/C][C]529.5[/C][C]-39.9861[/C][C]-3.51389[/C][/ROW]
[ROW][C]9[/C][C]530[/C][C]534.597[/C][C]540[/C][C]-5.40278[/C][C]-4.59722[/C][/ROW]
[ROW][C]10[/C][C]539[/C][C]550.035[/C][C]550.625[/C][C]-0.590278[/C][C]-11.0347[/C][/ROW]
[ROW][C]11[/C][C]555[/C][C]556.253[/C][C]561.25[/C][C]-4.99653[/C][C]-1.25347[/C][/ROW]
[ROW][C]12[/C][C]548[/C][C]550.535[/C][C]572.792[/C][C]-22.2569[/C][C]-2.53472[/C][/ROW]
[ROW][C]13[/C][C]615[/C][C]616.076[/C][C]584.958[/C][C]31.1181[/C][C]-1.07639[/C][/ROW]
[ROW][C]14[/C][C]634[/C][C]636.285[/C][C]597.375[/C][C]38.9097[/C][C]-2.28472[/C][/ROW]
[ROW][C]15[/C][C]645[/C][C]642.306[/C][C]609.708[/C][C]32.5972[/C][C]2.69444[/C][/ROW]
[ROW][C]16[/C][C]634[/C][C]638.649[/C][C]621.583[/C][C]17.066[/C][C]-4.64931[/C][/ROW]
[ROW][C]17[/C][C]630[/C][C]630.701[/C][C]632.458[/C][C]-1.75694[/C][C]-0.701389[/C][/ROW]
[ROW][C]18[/C][C]635[/C][C]623.972[/C][C]642.167[/C][C]-18.1944[/C][C]11.0278[/C][/ROW]
[ROW][C]19[/C][C]642[/C][C]624.535[/C][C]651.042[/C][C]-26.5069[/C][C]17.4653[/C][/ROW]
[ROW][C]20[/C][C]637[/C][C]619.264[/C][C]659.25[/C][C]-39.9861[/C][C]17.7361[/C][/ROW]
[ROW][C]21[/C][C]675[/C][C]660.847[/C][C]666.25[/C][C]-5.40278[/C][C]14.1528[/C][/ROW]
[ROW][C]22[/C][C]679[/C][C]671.16[/C][C]671.75[/C][C]-0.590278[/C][C]7.84028[/C][/ROW]
[ROW][C]23[/C][C]676[/C][C]670.92[/C][C]675.917[/C][C]-4.99653[/C][C]5.07986[/C][/ROW]
[ROW][C]24[/C][C]660[/C][C]655.576[/C][C]677.833[/C][C]-22.2569[/C][C]4.42361[/C][/ROW]
[ROW][C]25[/C][C]716[/C][C]708.535[/C][C]677.417[/C][C]31.1181[/C][C]7.46528[/C][/ROW]
[ROW][C]26[/C][C]730[/C][C]714.285[/C][C]675.375[/C][C]38.9097[/C][C]15.7153[/C][/ROW]
[ROW][C]27[/C][C]717[/C][C]704.722[/C][C]672.125[/C][C]32.5972[/C][C]12.2778[/C][/ROW]
[ROW][C]28[/C][C]694[/C][C]685.441[/C][C]668.375[/C][C]17.066[/C][C]8.55903[/C][/ROW]
[ROW][C]29[/C][C]670[/C][C]663.035[/C][C]664.792[/C][C]-1.75694[/C][C]6.96528[/C][/ROW]
[ROW][C]30[/C][C]641[/C][C]643.181[/C][C]661.375[/C][C]-18.1944[/C][C]-2.18056[/C][/ROW]
[ROW][C]31[/C][C]626[/C][C]631.41[/C][C]657.917[/C][C]-26.5069[/C][C]-5.40972[/C][/ROW]
[ROW][C]32[/C][C]604[/C][C]613.431[/C][C]653.417[/C][C]-39.9861[/C][C]-9.43056[/C][/ROW]
[ROW][C]33[/C][C]630[/C][C]642.597[/C][C]648[/C][C]-5.40278[/C][C]-12.5972[/C][/ROW]
[ROW][C]34[/C][C]634[/C][C]642.285[/C][C]642.875[/C][C]-0.590278[/C][C]-8.28472[/C][/ROW]
[ROW][C]35[/C][C]635[/C][C]633.087[/C][C]638.083[/C][C]-4.99653[/C][C]1.91319[/C][/ROW]
[ROW][C]36[/C][C]619[/C][C]611.576[/C][C]633.833[/C][C]-22.2569[/C][C]7.42361[/C][/ROW]
[ROW][C]37[/C][C]674[/C][C]661.118[/C][C]630[/C][C]31.1181[/C][C]12.8819[/C][/ROW]
[ROW][C]38[/C][C]664[/C][C]665.576[/C][C]626.667[/C][C]38.9097[/C][C]-1.57639[/C][/ROW]
[ROW][C]39[/C][C]653[/C][C]656.931[/C][C]624.333[/C][C]32.5972[/C][C]-3.93056[/C][/ROW]
[ROW][C]40[/C][C]635[/C][C]639.774[/C][C]622.708[/C][C]17.066[/C][C]-4.77431[/C][/ROW]
[ROW][C]41[/C][C]614[/C][C]618.41[/C][C]620.167[/C][C]-1.75694[/C][C]-4.40972[/C][/ROW]
[ROW][C]42[/C][C]595[/C][C]597.889[/C][C]616.083[/C][C]-18.1944[/C][C]-2.88889[/C][/ROW]
[ROW][C]43[/C][C]580[/C][C]584.368[/C][C]610.875[/C][C]-26.5069[/C][C]-4.36806[/C][/ROW]
[ROW][C]44[/C][C]570[/C][C]565.764[/C][C]605.75[/C][C]-39.9861[/C][C]4.23611[/C][/ROW]
[ROW][C]45[/C][C]608[/C][C]595.931[/C][C]601.333[/C][C]-5.40278[/C][C]12.0694[/C][/ROW]
[ROW][C]46[/C][C]617[/C][C]596.493[/C][C]597.083[/C][C]-0.590278[/C][C]20.5069[/C][/ROW]
[ROW][C]47[/C][C]591[/C][C]587.712[/C][C]592.708[/C][C]-4.99653[/C][C]3.28819[/C][/ROW]
[ROW][C]48[/C][C]565[/C][C]565.285[/C][C]587.542[/C][C]-22.2569[/C][C]-0.284722[/C][/ROW]
[ROW][C]49[/C][C]603[/C][C]613.243[/C][C]582.125[/C][C]31.1181[/C][C]-10.2431[/C][/ROW]
[ROW][C]50[/C][C]612[/C][C]614.826[/C][C]575.917[/C][C]38.9097[/C][C]-2.82639[/C][/ROW]
[ROW][C]51[/C][C]599[/C][C]601.014[/C][C]568.417[/C][C]32.5972[/C][C]-2.01389[/C][/ROW]
[ROW][C]52[/C][C]587[/C][C]577.108[/C][C]560.042[/C][C]17.066[/C][C]9.89236[/C][/ROW]
[ROW][C]53[/C][C]557[/C][C]549.826[/C][C]551.583[/C][C]-1.75694[/C][C]7.17361[/C][/ROW]
[ROW][C]54[/C][C]528[/C][C]524.931[/C][C]543.125[/C][C]-18.1944[/C][C]3.06944[/C][/ROW]
[ROW][C]55[/C][C]517[/C][C]NA[/C][C]NA[/C][C]-26.5069[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]484[/C][C]NA[/C][C]NA[/C][C]-39.9861[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]514[/C][C]NA[/C][C]NA[/C][C]-5.40278[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]510[/C][C]NA[/C][C]NA[/C][C]-0.590278[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]495[/C][C]NA[/C][C]NA[/C][C]-4.99653[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]458[/C][C]NA[/C][C]NA[/C][C]-22.2569[/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
1511NANA31.1181NA
2514NANA38.9097NA
3513NANA32.5972NA
4511NANA17.066NA
5498NANA-1.75694NA
6490NANA-18.1944NA
7495493.66520.167-26.50691.34028
8486489.514529.5-39.9861-3.51389
9530534.597540-5.40278-4.59722
10539550.035550.625-0.590278-11.0347
11555556.253561.25-4.99653-1.25347
12548550.535572.792-22.2569-2.53472
13615616.076584.95831.1181-1.07639
14634636.285597.37538.9097-2.28472
15645642.306609.70832.59722.69444
16634638.649621.58317.066-4.64931
17630630.701632.458-1.75694-0.701389
18635623.972642.167-18.194411.0278
19642624.535651.042-26.506917.4653
20637619.264659.25-39.986117.7361
21675660.847666.25-5.4027814.1528
22679671.16671.75-0.5902787.84028
23676670.92675.917-4.996535.07986
24660655.576677.833-22.25694.42361
25716708.535677.41731.11817.46528
26730714.285675.37538.909715.7153
27717704.722672.12532.597212.2778
28694685.441668.37517.0668.55903
29670663.035664.792-1.756946.96528
30641643.181661.375-18.1944-2.18056
31626631.41657.917-26.5069-5.40972
32604613.431653.417-39.9861-9.43056
33630642.597648-5.40278-12.5972
34634642.285642.875-0.590278-8.28472
35635633.087638.083-4.996531.91319
36619611.576633.833-22.25697.42361
37674661.11863031.118112.8819
38664665.576626.66738.9097-1.57639
39653656.931624.33332.5972-3.93056
40635639.774622.70817.066-4.77431
41614618.41620.167-1.75694-4.40972
42595597.889616.083-18.1944-2.88889
43580584.368610.875-26.5069-4.36806
44570565.764605.75-39.98614.23611
45608595.931601.333-5.4027812.0694
46617596.493597.083-0.59027820.5069
47591587.712592.708-4.996533.28819
48565565.285587.542-22.2569-0.284722
49603613.243582.12531.1181-10.2431
50612614.826575.91738.9097-2.82639
51599601.014568.41732.5972-2.01389
52587577.108560.04217.0669.89236
53557549.826551.583-1.756947.17361
54528524.931543.125-18.19443.06944
55517NANA-26.5069NA
56484NANA-39.9861NA
57514NANA-5.40278NA
58510NANA-0.590278NA
59495NANA-4.99653NA
60458NANA-22.2569NA



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