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 computationMon, 25 Nov 2013 12:27:43 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2013/Nov/25/t1385400747t3x9dxkjj00mah6.htm/, Retrieved Mon, 29 Apr 2024 19:42:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=228370, Retrieved Mon, 29 Apr 2024 19:42:19 +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] [Decompositie gebo...] [2013-11-25 17:27:43] [2e4b2f9d3944a9ae720fcdd8099335ae] [Current]
Feedback Forum

Post a new message
Dataseries X:
610
757
840
745
662
563
624
588
753
706
663
738
544
711
787
692
604
469
555
473
712
681
705
779
598
781
727
689
562
518
577
490
635
573
574
588
423
589
527
536
518
437
496
510
600
588
570
512
485
565
595
509
475
412
504
403
408
420
356
397
327




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

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







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1610NANA-81.5241NA
2757NANA70.653NA
3840NANA73.6738NA
4745NANA27.7467NA
5662NANA-32.8262NA
6563NANA-106.826NA
7624650.38684.667-34.2866-26.38
8588580.913680-99.08667.08663
9753741.09675.87565.215511.9095
10706703.684671.45832.22592.3158
11663694.465666.83327.6321-31.4655
12738717.903660.557.40320.097
13544572.184653.708-81.5241-28.1842
14711716.695646.04270.653-5.69462
15787713.215639.54273.673873.7845
16692664.538636.79227.746727.4616
17604604.674637.5-32.8262-0.673785
18469534.132640.958-106.826-65.1321
19555610.63644.917-34.2866-55.63
20473550.997650.083-99.0866-77.9967
21712715.715650.565.2155-3.71545
22681680.101647.87532.22590.899132
23705673.63264627.632131.3679
24779703.695646.29257.40375.3054
25598567.726649.25-81.524130.2741
26781721.528650.87570.65359.472
27727722.049648.37573.67384.95122
28689668.413640.66727.746720.5866
29562597.882630.708-32.8262-35.8821
30518510.465617.292-106.8267.53455
31577567.755602.042-34.28669.24497
32490487.663586.75-99.08662.33663
33635635.632570.41765.2155-0.632118
34573587.934555.70832.2259-14.9342
35574575.132547.527.6321-1.13212
36588599.695542.29257.403-11.6946
37423454.018535.542-81.5241-31.0175
38589603.65353370.653-14.653
39527606.049532.37573.6738-79.0488
40536559.288531.54227.7467-23.2884
41518499.174532-32.826218.8262
42437421.84528.667-106.82615.1595
43496493.797528.083-34.28662.2033
44510430.58529.667-99.086679.42
45600596.715531.565.21553.28455
46588565.434533.20832.225922.5658
47570557.924530.29227.632112.0762
48512584.861527.45857.403-72.8613
49485445.226526.75-81.524139.7741
50565593.278522.62570.653-28.278
51595583.84510.16773.673811.1595
52509522.913495.16727.7467-13.9134
53475446.424479.25-32.826228.5762
54412358.715465.542-106.82653.2845
55504419.88454.167-34.286684.12
56403NANA-99.0866NA
57408NANA65.2155NA
58420NANA32.2259NA
59356NANA27.6321NA
60397NANA57.403NA
61327NANA-81.5241NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 610 & NA & NA & -81.5241 & NA \tabularnewline
2 & 757 & NA & NA & 70.653 & NA \tabularnewline
3 & 840 & NA & NA & 73.6738 & NA \tabularnewline
4 & 745 & NA & NA & 27.7467 & NA \tabularnewline
5 & 662 & NA & NA & -32.8262 & NA \tabularnewline
6 & 563 & NA & NA & -106.826 & NA \tabularnewline
7 & 624 & 650.38 & 684.667 & -34.2866 & -26.38 \tabularnewline
8 & 588 & 580.913 & 680 & -99.0866 & 7.08663 \tabularnewline
9 & 753 & 741.09 & 675.875 & 65.2155 & 11.9095 \tabularnewline
10 & 706 & 703.684 & 671.458 & 32.2259 & 2.3158 \tabularnewline
11 & 663 & 694.465 & 666.833 & 27.6321 & -31.4655 \tabularnewline
12 & 738 & 717.903 & 660.5 & 57.403 & 20.097 \tabularnewline
13 & 544 & 572.184 & 653.708 & -81.5241 & -28.1842 \tabularnewline
14 & 711 & 716.695 & 646.042 & 70.653 & -5.69462 \tabularnewline
15 & 787 & 713.215 & 639.542 & 73.6738 & 73.7845 \tabularnewline
16 & 692 & 664.538 & 636.792 & 27.7467 & 27.4616 \tabularnewline
17 & 604 & 604.674 & 637.5 & -32.8262 & -0.673785 \tabularnewline
18 & 469 & 534.132 & 640.958 & -106.826 & -65.1321 \tabularnewline
19 & 555 & 610.63 & 644.917 & -34.2866 & -55.63 \tabularnewline
20 & 473 & 550.997 & 650.083 & -99.0866 & -77.9967 \tabularnewline
21 & 712 & 715.715 & 650.5 & 65.2155 & -3.71545 \tabularnewline
22 & 681 & 680.101 & 647.875 & 32.2259 & 0.899132 \tabularnewline
23 & 705 & 673.632 & 646 & 27.6321 & 31.3679 \tabularnewline
24 & 779 & 703.695 & 646.292 & 57.403 & 75.3054 \tabularnewline
25 & 598 & 567.726 & 649.25 & -81.5241 & 30.2741 \tabularnewline
26 & 781 & 721.528 & 650.875 & 70.653 & 59.472 \tabularnewline
27 & 727 & 722.049 & 648.375 & 73.6738 & 4.95122 \tabularnewline
28 & 689 & 668.413 & 640.667 & 27.7467 & 20.5866 \tabularnewline
29 & 562 & 597.882 & 630.708 & -32.8262 & -35.8821 \tabularnewline
30 & 518 & 510.465 & 617.292 & -106.826 & 7.53455 \tabularnewline
31 & 577 & 567.755 & 602.042 & -34.2866 & 9.24497 \tabularnewline
32 & 490 & 487.663 & 586.75 & -99.0866 & 2.33663 \tabularnewline
33 & 635 & 635.632 & 570.417 & 65.2155 & -0.632118 \tabularnewline
34 & 573 & 587.934 & 555.708 & 32.2259 & -14.9342 \tabularnewline
35 & 574 & 575.132 & 547.5 & 27.6321 & -1.13212 \tabularnewline
36 & 588 & 599.695 & 542.292 & 57.403 & -11.6946 \tabularnewline
37 & 423 & 454.018 & 535.542 & -81.5241 & -31.0175 \tabularnewline
38 & 589 & 603.653 & 533 & 70.653 & -14.653 \tabularnewline
39 & 527 & 606.049 & 532.375 & 73.6738 & -79.0488 \tabularnewline
40 & 536 & 559.288 & 531.542 & 27.7467 & -23.2884 \tabularnewline
41 & 518 & 499.174 & 532 & -32.8262 & 18.8262 \tabularnewline
42 & 437 & 421.84 & 528.667 & -106.826 & 15.1595 \tabularnewline
43 & 496 & 493.797 & 528.083 & -34.2866 & 2.2033 \tabularnewline
44 & 510 & 430.58 & 529.667 & -99.0866 & 79.42 \tabularnewline
45 & 600 & 596.715 & 531.5 & 65.2155 & 3.28455 \tabularnewline
46 & 588 & 565.434 & 533.208 & 32.2259 & 22.5658 \tabularnewline
47 & 570 & 557.924 & 530.292 & 27.6321 & 12.0762 \tabularnewline
48 & 512 & 584.861 & 527.458 & 57.403 & -72.8613 \tabularnewline
49 & 485 & 445.226 & 526.75 & -81.5241 & 39.7741 \tabularnewline
50 & 565 & 593.278 & 522.625 & 70.653 & -28.278 \tabularnewline
51 & 595 & 583.84 & 510.167 & 73.6738 & 11.1595 \tabularnewline
52 & 509 & 522.913 & 495.167 & 27.7467 & -13.9134 \tabularnewline
53 & 475 & 446.424 & 479.25 & -32.8262 & 28.5762 \tabularnewline
54 & 412 & 358.715 & 465.542 & -106.826 & 53.2845 \tabularnewline
55 & 504 & 419.88 & 454.167 & -34.2866 & 84.12 \tabularnewline
56 & 403 & NA & NA & -99.0866 & NA \tabularnewline
57 & 408 & NA & NA & 65.2155 & NA \tabularnewline
58 & 420 & NA & NA & 32.2259 & NA \tabularnewline
59 & 356 & NA & NA & 27.6321 & NA \tabularnewline
60 & 397 & NA & NA & 57.403 & NA \tabularnewline
61 & 327 & NA & NA & -81.5241 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=228370&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]610[/C][C]NA[/C][C]NA[/C][C]-81.5241[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]757[/C][C]NA[/C][C]NA[/C][C]70.653[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]840[/C][C]NA[/C][C]NA[/C][C]73.6738[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]745[/C][C]NA[/C][C]NA[/C][C]27.7467[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]662[/C][C]NA[/C][C]NA[/C][C]-32.8262[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]563[/C][C]NA[/C][C]NA[/C][C]-106.826[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]624[/C][C]650.38[/C][C]684.667[/C][C]-34.2866[/C][C]-26.38[/C][/ROW]
[ROW][C]8[/C][C]588[/C][C]580.913[/C][C]680[/C][C]-99.0866[/C][C]7.08663[/C][/ROW]
[ROW][C]9[/C][C]753[/C][C]741.09[/C][C]675.875[/C][C]65.2155[/C][C]11.9095[/C][/ROW]
[ROW][C]10[/C][C]706[/C][C]703.684[/C][C]671.458[/C][C]32.2259[/C][C]2.3158[/C][/ROW]
[ROW][C]11[/C][C]663[/C][C]694.465[/C][C]666.833[/C][C]27.6321[/C][C]-31.4655[/C][/ROW]
[ROW][C]12[/C][C]738[/C][C]717.903[/C][C]660.5[/C][C]57.403[/C][C]20.097[/C][/ROW]
[ROW][C]13[/C][C]544[/C][C]572.184[/C][C]653.708[/C][C]-81.5241[/C][C]-28.1842[/C][/ROW]
[ROW][C]14[/C][C]711[/C][C]716.695[/C][C]646.042[/C][C]70.653[/C][C]-5.69462[/C][/ROW]
[ROW][C]15[/C][C]787[/C][C]713.215[/C][C]639.542[/C][C]73.6738[/C][C]73.7845[/C][/ROW]
[ROW][C]16[/C][C]692[/C][C]664.538[/C][C]636.792[/C][C]27.7467[/C][C]27.4616[/C][/ROW]
[ROW][C]17[/C][C]604[/C][C]604.674[/C][C]637.5[/C][C]-32.8262[/C][C]-0.673785[/C][/ROW]
[ROW][C]18[/C][C]469[/C][C]534.132[/C][C]640.958[/C][C]-106.826[/C][C]-65.1321[/C][/ROW]
[ROW][C]19[/C][C]555[/C][C]610.63[/C][C]644.917[/C][C]-34.2866[/C][C]-55.63[/C][/ROW]
[ROW][C]20[/C][C]473[/C][C]550.997[/C][C]650.083[/C][C]-99.0866[/C][C]-77.9967[/C][/ROW]
[ROW][C]21[/C][C]712[/C][C]715.715[/C][C]650.5[/C][C]65.2155[/C][C]-3.71545[/C][/ROW]
[ROW][C]22[/C][C]681[/C][C]680.101[/C][C]647.875[/C][C]32.2259[/C][C]0.899132[/C][/ROW]
[ROW][C]23[/C][C]705[/C][C]673.632[/C][C]646[/C][C]27.6321[/C][C]31.3679[/C][/ROW]
[ROW][C]24[/C][C]779[/C][C]703.695[/C][C]646.292[/C][C]57.403[/C][C]75.3054[/C][/ROW]
[ROW][C]25[/C][C]598[/C][C]567.726[/C][C]649.25[/C][C]-81.5241[/C][C]30.2741[/C][/ROW]
[ROW][C]26[/C][C]781[/C][C]721.528[/C][C]650.875[/C][C]70.653[/C][C]59.472[/C][/ROW]
[ROW][C]27[/C][C]727[/C][C]722.049[/C][C]648.375[/C][C]73.6738[/C][C]4.95122[/C][/ROW]
[ROW][C]28[/C][C]689[/C][C]668.413[/C][C]640.667[/C][C]27.7467[/C][C]20.5866[/C][/ROW]
[ROW][C]29[/C][C]562[/C][C]597.882[/C][C]630.708[/C][C]-32.8262[/C][C]-35.8821[/C][/ROW]
[ROW][C]30[/C][C]518[/C][C]510.465[/C][C]617.292[/C][C]-106.826[/C][C]7.53455[/C][/ROW]
[ROW][C]31[/C][C]577[/C][C]567.755[/C][C]602.042[/C][C]-34.2866[/C][C]9.24497[/C][/ROW]
[ROW][C]32[/C][C]490[/C][C]487.663[/C][C]586.75[/C][C]-99.0866[/C][C]2.33663[/C][/ROW]
[ROW][C]33[/C][C]635[/C][C]635.632[/C][C]570.417[/C][C]65.2155[/C][C]-0.632118[/C][/ROW]
[ROW][C]34[/C][C]573[/C][C]587.934[/C][C]555.708[/C][C]32.2259[/C][C]-14.9342[/C][/ROW]
[ROW][C]35[/C][C]574[/C][C]575.132[/C][C]547.5[/C][C]27.6321[/C][C]-1.13212[/C][/ROW]
[ROW][C]36[/C][C]588[/C][C]599.695[/C][C]542.292[/C][C]57.403[/C][C]-11.6946[/C][/ROW]
[ROW][C]37[/C][C]423[/C][C]454.018[/C][C]535.542[/C][C]-81.5241[/C][C]-31.0175[/C][/ROW]
[ROW][C]38[/C][C]589[/C][C]603.653[/C][C]533[/C][C]70.653[/C][C]-14.653[/C][/ROW]
[ROW][C]39[/C][C]527[/C][C]606.049[/C][C]532.375[/C][C]73.6738[/C][C]-79.0488[/C][/ROW]
[ROW][C]40[/C][C]536[/C][C]559.288[/C][C]531.542[/C][C]27.7467[/C][C]-23.2884[/C][/ROW]
[ROW][C]41[/C][C]518[/C][C]499.174[/C][C]532[/C][C]-32.8262[/C][C]18.8262[/C][/ROW]
[ROW][C]42[/C][C]437[/C][C]421.84[/C][C]528.667[/C][C]-106.826[/C][C]15.1595[/C][/ROW]
[ROW][C]43[/C][C]496[/C][C]493.797[/C][C]528.083[/C][C]-34.2866[/C][C]2.2033[/C][/ROW]
[ROW][C]44[/C][C]510[/C][C]430.58[/C][C]529.667[/C][C]-99.0866[/C][C]79.42[/C][/ROW]
[ROW][C]45[/C][C]600[/C][C]596.715[/C][C]531.5[/C][C]65.2155[/C][C]3.28455[/C][/ROW]
[ROW][C]46[/C][C]588[/C][C]565.434[/C][C]533.208[/C][C]32.2259[/C][C]22.5658[/C][/ROW]
[ROW][C]47[/C][C]570[/C][C]557.924[/C][C]530.292[/C][C]27.6321[/C][C]12.0762[/C][/ROW]
[ROW][C]48[/C][C]512[/C][C]584.861[/C][C]527.458[/C][C]57.403[/C][C]-72.8613[/C][/ROW]
[ROW][C]49[/C][C]485[/C][C]445.226[/C][C]526.75[/C][C]-81.5241[/C][C]39.7741[/C][/ROW]
[ROW][C]50[/C][C]565[/C][C]593.278[/C][C]522.625[/C][C]70.653[/C][C]-28.278[/C][/ROW]
[ROW][C]51[/C][C]595[/C][C]583.84[/C][C]510.167[/C][C]73.6738[/C][C]11.1595[/C][/ROW]
[ROW][C]52[/C][C]509[/C][C]522.913[/C][C]495.167[/C][C]27.7467[/C][C]-13.9134[/C][/ROW]
[ROW][C]53[/C][C]475[/C][C]446.424[/C][C]479.25[/C][C]-32.8262[/C][C]28.5762[/C][/ROW]
[ROW][C]54[/C][C]412[/C][C]358.715[/C][C]465.542[/C][C]-106.826[/C][C]53.2845[/C][/ROW]
[ROW][C]55[/C][C]504[/C][C]419.88[/C][C]454.167[/C][C]-34.2866[/C][C]84.12[/C][/ROW]
[ROW][C]56[/C][C]403[/C][C]NA[/C][C]NA[/C][C]-99.0866[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]408[/C][C]NA[/C][C]NA[/C][C]65.2155[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]420[/C][C]NA[/C][C]NA[/C][C]32.2259[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]356[/C][C]NA[/C][C]NA[/C][C]27.6321[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]397[/C][C]NA[/C][C]NA[/C][C]57.403[/C][C]NA[/C][/ROW]
[ROW][C]61[/C][C]327[/C][C]NA[/C][C]NA[/C][C]-81.5241[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=228370&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=228370&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
1610NANA-81.5241NA
2757NANA70.653NA
3840NANA73.6738NA
4745NANA27.7467NA
5662NANA-32.8262NA
6563NANA-106.826NA
7624650.38684.667-34.2866-26.38
8588580.913680-99.08667.08663
9753741.09675.87565.215511.9095
10706703.684671.45832.22592.3158
11663694.465666.83327.6321-31.4655
12738717.903660.557.40320.097
13544572.184653.708-81.5241-28.1842
14711716.695646.04270.653-5.69462
15787713.215639.54273.673873.7845
16692664.538636.79227.746727.4616
17604604.674637.5-32.8262-0.673785
18469534.132640.958-106.826-65.1321
19555610.63644.917-34.2866-55.63
20473550.997650.083-99.0866-77.9967
21712715.715650.565.2155-3.71545
22681680.101647.87532.22590.899132
23705673.63264627.632131.3679
24779703.695646.29257.40375.3054
25598567.726649.25-81.524130.2741
26781721.528650.87570.65359.472
27727722.049648.37573.67384.95122
28689668.413640.66727.746720.5866
29562597.882630.708-32.8262-35.8821
30518510.465617.292-106.8267.53455
31577567.755602.042-34.28669.24497
32490487.663586.75-99.08662.33663
33635635.632570.41765.2155-0.632118
34573587.934555.70832.2259-14.9342
35574575.132547.527.6321-1.13212
36588599.695542.29257.403-11.6946
37423454.018535.542-81.5241-31.0175
38589603.65353370.653-14.653
39527606.049532.37573.6738-79.0488
40536559.288531.54227.7467-23.2884
41518499.174532-32.826218.8262
42437421.84528.667-106.82615.1595
43496493.797528.083-34.28662.2033
44510430.58529.667-99.086679.42
45600596.715531.565.21553.28455
46588565.434533.20832.225922.5658
47570557.924530.29227.632112.0762
48512584.861527.45857.403-72.8613
49485445.226526.75-81.524139.7741
50565593.278522.62570.653-28.278
51595583.84510.16773.673811.1595
52509522.913495.16727.7467-13.9134
53475446.424479.25-32.826228.5762
54412358.715465.542-106.82653.2845
55504419.88454.167-34.286684.12
56403NANA-99.0866NA
57408NANA65.2155NA
58420NANA32.2259NA
59356NANA27.6321NA
60397NANA57.403NA
61327NANA-81.5241NA



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