Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationTue, 13 May 2014 05:04:56 -0400
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2014/May/13/t1399971946o18nuqho8xbpval.htm/, Retrieved Tue, 14 May 2024 20:36:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=234860, Retrieved Tue, 14 May 2024 20:36:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact211
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [] [2014-05-13 09:04:56] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
3200944
3153170
3741498
3918719
4403449
4400407
4847473
4716136
4297440
4272253
3271834
3168388
2911748
2720999
3199918
3672623
3892013
3850845
4532467
4484739
4014972
3983758
3158459
3100569
2935404
2855719
3465611
3006985
4095110
4104793
4730788
4642726
4246919
4308032
3508154
3236641
3257275
3045631
3657692
4125747
4472507
4513455
5150896
5057815
4681742
4603682
3580181
3534002
3422762
3295209
3868093
4189245
4544332
4612845
5221595
5137505
4760439
4643697
3692267
3587603




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=234860&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'Gwilym Jenkins' @ jenkins.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
13200944NANA-757874NA
23153170NANA-918568NA
33741498NANA-359341NA
43918719NANA-167212NA
54403449NANA326880NA
64400407NANA337627NA
7484747348878003937260950536-40322.1
8471613647639003907200856693-47759.9
9429744043054403866630438809-7998.94
1042722534250150383381041633622107.6
11327183433020203802250-500224-30187.8
12316838831343803758040-62366134011.8
13291174829641403722010-757874-52391.7
14272099927806803699250-918568-59679.8
15319991833184903677840-359341-118577
16367262334868303654050-167212185789
17389201339641803637300326880-72168.1
18385084539673803629750337627-116534
19453246745784503627910950536-45980.1
20448473944912003634510856693-6464.96
21401497240900003651190438809-75031.8
22398375840508703634530416336-67107.8
23315845931150303615260-50022443425.5
24310056930106403634300-62366189929.4
25293540428952703653150-75787440132.6
26285571927494203667990-918568106296
27346561133249003684240-359341140713
28300698535402003707410-167212-533218
2940951104062380373550032688032733.4
3041047934093360375574033762711428.5
314730788472535037748209505365434.24
32464272646528403796140856693-10109.9
33424691942508703812060438809-3949.23
3443080324283010386668041633625019
35350815434287903929020-50022479360.8
36323664133381103961770-623661-101467
37325727532384303996300-75787418847.4
38304563131125304031100-918568-66902.3
39365769237071704066510-359341-49481.2
40412574739297404096950-167212196008
4144725074439150411227032688033356.4
4245134554465290412766033762748165.6
4351508965097480414695095053653413
4450578155020940416424085669336879.8
4546817424622220418341043880959525
46460368246111604194820416336-7473.76
47358018137002304200460-500224-120053
48353400235839304207590-623661-49929
49342276234568104214680-757874-34043.3
50329520933023804220950-918568-7168.38
51386809338682004227550-359341-110.671
52418924540652804232490-167212123966
53454433245657104238830326880-21376.7
5446128454583360424573033762729485
555221595NANA950536NA
565137505NANA856693NA
574760439NANA438809NA
584643697NANA416336NA
593692267NANA-500224NA
603587603NANA-623661NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 3200944 & NA & NA & -757874 & NA \tabularnewline
2 & 3153170 & NA & NA & -918568 & NA \tabularnewline
3 & 3741498 & NA & NA & -359341 & NA \tabularnewline
4 & 3918719 & NA & NA & -167212 & NA \tabularnewline
5 & 4403449 & NA & NA & 326880 & NA \tabularnewline
6 & 4400407 & NA & NA & 337627 & NA \tabularnewline
7 & 4847473 & 4887800 & 3937260 & 950536 & -40322.1 \tabularnewline
8 & 4716136 & 4763900 & 3907200 & 856693 & -47759.9 \tabularnewline
9 & 4297440 & 4305440 & 3866630 & 438809 & -7998.94 \tabularnewline
10 & 4272253 & 4250150 & 3833810 & 416336 & 22107.6 \tabularnewline
11 & 3271834 & 3302020 & 3802250 & -500224 & -30187.8 \tabularnewline
12 & 3168388 & 3134380 & 3758040 & -623661 & 34011.8 \tabularnewline
13 & 2911748 & 2964140 & 3722010 & -757874 & -52391.7 \tabularnewline
14 & 2720999 & 2780680 & 3699250 & -918568 & -59679.8 \tabularnewline
15 & 3199918 & 3318490 & 3677840 & -359341 & -118577 \tabularnewline
16 & 3672623 & 3486830 & 3654050 & -167212 & 185789 \tabularnewline
17 & 3892013 & 3964180 & 3637300 & 326880 & -72168.1 \tabularnewline
18 & 3850845 & 3967380 & 3629750 & 337627 & -116534 \tabularnewline
19 & 4532467 & 4578450 & 3627910 & 950536 & -45980.1 \tabularnewline
20 & 4484739 & 4491200 & 3634510 & 856693 & -6464.96 \tabularnewline
21 & 4014972 & 4090000 & 3651190 & 438809 & -75031.8 \tabularnewline
22 & 3983758 & 4050870 & 3634530 & 416336 & -67107.8 \tabularnewline
23 & 3158459 & 3115030 & 3615260 & -500224 & 43425.5 \tabularnewline
24 & 3100569 & 3010640 & 3634300 & -623661 & 89929.4 \tabularnewline
25 & 2935404 & 2895270 & 3653150 & -757874 & 40132.6 \tabularnewline
26 & 2855719 & 2749420 & 3667990 & -918568 & 106296 \tabularnewline
27 & 3465611 & 3324900 & 3684240 & -359341 & 140713 \tabularnewline
28 & 3006985 & 3540200 & 3707410 & -167212 & -533218 \tabularnewline
29 & 4095110 & 4062380 & 3735500 & 326880 & 32733.4 \tabularnewline
30 & 4104793 & 4093360 & 3755740 & 337627 & 11428.5 \tabularnewline
31 & 4730788 & 4725350 & 3774820 & 950536 & 5434.24 \tabularnewline
32 & 4642726 & 4652840 & 3796140 & 856693 & -10109.9 \tabularnewline
33 & 4246919 & 4250870 & 3812060 & 438809 & -3949.23 \tabularnewline
34 & 4308032 & 4283010 & 3866680 & 416336 & 25019 \tabularnewline
35 & 3508154 & 3428790 & 3929020 & -500224 & 79360.8 \tabularnewline
36 & 3236641 & 3338110 & 3961770 & -623661 & -101467 \tabularnewline
37 & 3257275 & 3238430 & 3996300 & -757874 & 18847.4 \tabularnewline
38 & 3045631 & 3112530 & 4031100 & -918568 & -66902.3 \tabularnewline
39 & 3657692 & 3707170 & 4066510 & -359341 & -49481.2 \tabularnewline
40 & 4125747 & 3929740 & 4096950 & -167212 & 196008 \tabularnewline
41 & 4472507 & 4439150 & 4112270 & 326880 & 33356.4 \tabularnewline
42 & 4513455 & 4465290 & 4127660 & 337627 & 48165.6 \tabularnewline
43 & 5150896 & 5097480 & 4146950 & 950536 & 53413 \tabularnewline
44 & 5057815 & 5020940 & 4164240 & 856693 & 36879.8 \tabularnewline
45 & 4681742 & 4622220 & 4183410 & 438809 & 59525 \tabularnewline
46 & 4603682 & 4611160 & 4194820 & 416336 & -7473.76 \tabularnewline
47 & 3580181 & 3700230 & 4200460 & -500224 & -120053 \tabularnewline
48 & 3534002 & 3583930 & 4207590 & -623661 & -49929 \tabularnewline
49 & 3422762 & 3456810 & 4214680 & -757874 & -34043.3 \tabularnewline
50 & 3295209 & 3302380 & 4220950 & -918568 & -7168.38 \tabularnewline
51 & 3868093 & 3868200 & 4227550 & -359341 & -110.671 \tabularnewline
52 & 4189245 & 4065280 & 4232490 & -167212 & 123966 \tabularnewline
53 & 4544332 & 4565710 & 4238830 & 326880 & -21376.7 \tabularnewline
54 & 4612845 & 4583360 & 4245730 & 337627 & 29485 \tabularnewline
55 & 5221595 & NA & NA & 950536 & NA \tabularnewline
56 & 5137505 & NA & NA & 856693 & NA \tabularnewline
57 & 4760439 & NA & NA & 438809 & NA \tabularnewline
58 & 4643697 & NA & NA & 416336 & NA \tabularnewline
59 & 3692267 & NA & NA & -500224 & NA \tabularnewline
60 & 3587603 & NA & NA & -623661 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=234860&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]3200944[/C][C]NA[/C][C]NA[/C][C]-757874[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]3153170[/C][C]NA[/C][C]NA[/C][C]-918568[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]3741498[/C][C]NA[/C][C]NA[/C][C]-359341[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]3918719[/C][C]NA[/C][C]NA[/C][C]-167212[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]4403449[/C][C]NA[/C][C]NA[/C][C]326880[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]4400407[/C][C]NA[/C][C]NA[/C][C]337627[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]4847473[/C][C]4887800[/C][C]3937260[/C][C]950536[/C][C]-40322.1[/C][/ROW]
[ROW][C]8[/C][C]4716136[/C][C]4763900[/C][C]3907200[/C][C]856693[/C][C]-47759.9[/C][/ROW]
[ROW][C]9[/C][C]4297440[/C][C]4305440[/C][C]3866630[/C][C]438809[/C][C]-7998.94[/C][/ROW]
[ROW][C]10[/C][C]4272253[/C][C]4250150[/C][C]3833810[/C][C]416336[/C][C]22107.6[/C][/ROW]
[ROW][C]11[/C][C]3271834[/C][C]3302020[/C][C]3802250[/C][C]-500224[/C][C]-30187.8[/C][/ROW]
[ROW][C]12[/C][C]3168388[/C][C]3134380[/C][C]3758040[/C][C]-623661[/C][C]34011.8[/C][/ROW]
[ROW][C]13[/C][C]2911748[/C][C]2964140[/C][C]3722010[/C][C]-757874[/C][C]-52391.7[/C][/ROW]
[ROW][C]14[/C][C]2720999[/C][C]2780680[/C][C]3699250[/C][C]-918568[/C][C]-59679.8[/C][/ROW]
[ROW][C]15[/C][C]3199918[/C][C]3318490[/C][C]3677840[/C][C]-359341[/C][C]-118577[/C][/ROW]
[ROW][C]16[/C][C]3672623[/C][C]3486830[/C][C]3654050[/C][C]-167212[/C][C]185789[/C][/ROW]
[ROW][C]17[/C][C]3892013[/C][C]3964180[/C][C]3637300[/C][C]326880[/C][C]-72168.1[/C][/ROW]
[ROW][C]18[/C][C]3850845[/C][C]3967380[/C][C]3629750[/C][C]337627[/C][C]-116534[/C][/ROW]
[ROW][C]19[/C][C]4532467[/C][C]4578450[/C][C]3627910[/C][C]950536[/C][C]-45980.1[/C][/ROW]
[ROW][C]20[/C][C]4484739[/C][C]4491200[/C][C]3634510[/C][C]856693[/C][C]-6464.96[/C][/ROW]
[ROW][C]21[/C][C]4014972[/C][C]4090000[/C][C]3651190[/C][C]438809[/C][C]-75031.8[/C][/ROW]
[ROW][C]22[/C][C]3983758[/C][C]4050870[/C][C]3634530[/C][C]416336[/C][C]-67107.8[/C][/ROW]
[ROW][C]23[/C][C]3158459[/C][C]3115030[/C][C]3615260[/C][C]-500224[/C][C]43425.5[/C][/ROW]
[ROW][C]24[/C][C]3100569[/C][C]3010640[/C][C]3634300[/C][C]-623661[/C][C]89929.4[/C][/ROW]
[ROW][C]25[/C][C]2935404[/C][C]2895270[/C][C]3653150[/C][C]-757874[/C][C]40132.6[/C][/ROW]
[ROW][C]26[/C][C]2855719[/C][C]2749420[/C][C]3667990[/C][C]-918568[/C][C]106296[/C][/ROW]
[ROW][C]27[/C][C]3465611[/C][C]3324900[/C][C]3684240[/C][C]-359341[/C][C]140713[/C][/ROW]
[ROW][C]28[/C][C]3006985[/C][C]3540200[/C][C]3707410[/C][C]-167212[/C][C]-533218[/C][/ROW]
[ROW][C]29[/C][C]4095110[/C][C]4062380[/C][C]3735500[/C][C]326880[/C][C]32733.4[/C][/ROW]
[ROW][C]30[/C][C]4104793[/C][C]4093360[/C][C]3755740[/C][C]337627[/C][C]11428.5[/C][/ROW]
[ROW][C]31[/C][C]4730788[/C][C]4725350[/C][C]3774820[/C][C]950536[/C][C]5434.24[/C][/ROW]
[ROW][C]32[/C][C]4642726[/C][C]4652840[/C][C]3796140[/C][C]856693[/C][C]-10109.9[/C][/ROW]
[ROW][C]33[/C][C]4246919[/C][C]4250870[/C][C]3812060[/C][C]438809[/C][C]-3949.23[/C][/ROW]
[ROW][C]34[/C][C]4308032[/C][C]4283010[/C][C]3866680[/C][C]416336[/C][C]25019[/C][/ROW]
[ROW][C]35[/C][C]3508154[/C][C]3428790[/C][C]3929020[/C][C]-500224[/C][C]79360.8[/C][/ROW]
[ROW][C]36[/C][C]3236641[/C][C]3338110[/C][C]3961770[/C][C]-623661[/C][C]-101467[/C][/ROW]
[ROW][C]37[/C][C]3257275[/C][C]3238430[/C][C]3996300[/C][C]-757874[/C][C]18847.4[/C][/ROW]
[ROW][C]38[/C][C]3045631[/C][C]3112530[/C][C]4031100[/C][C]-918568[/C][C]-66902.3[/C][/ROW]
[ROW][C]39[/C][C]3657692[/C][C]3707170[/C][C]4066510[/C][C]-359341[/C][C]-49481.2[/C][/ROW]
[ROW][C]40[/C][C]4125747[/C][C]3929740[/C][C]4096950[/C][C]-167212[/C][C]196008[/C][/ROW]
[ROW][C]41[/C][C]4472507[/C][C]4439150[/C][C]4112270[/C][C]326880[/C][C]33356.4[/C][/ROW]
[ROW][C]42[/C][C]4513455[/C][C]4465290[/C][C]4127660[/C][C]337627[/C][C]48165.6[/C][/ROW]
[ROW][C]43[/C][C]5150896[/C][C]5097480[/C][C]4146950[/C][C]950536[/C][C]53413[/C][/ROW]
[ROW][C]44[/C][C]5057815[/C][C]5020940[/C][C]4164240[/C][C]856693[/C][C]36879.8[/C][/ROW]
[ROW][C]45[/C][C]4681742[/C][C]4622220[/C][C]4183410[/C][C]438809[/C][C]59525[/C][/ROW]
[ROW][C]46[/C][C]4603682[/C][C]4611160[/C][C]4194820[/C][C]416336[/C][C]-7473.76[/C][/ROW]
[ROW][C]47[/C][C]3580181[/C][C]3700230[/C][C]4200460[/C][C]-500224[/C][C]-120053[/C][/ROW]
[ROW][C]48[/C][C]3534002[/C][C]3583930[/C][C]4207590[/C][C]-623661[/C][C]-49929[/C][/ROW]
[ROW][C]49[/C][C]3422762[/C][C]3456810[/C][C]4214680[/C][C]-757874[/C][C]-34043.3[/C][/ROW]
[ROW][C]50[/C][C]3295209[/C][C]3302380[/C][C]4220950[/C][C]-918568[/C][C]-7168.38[/C][/ROW]
[ROW][C]51[/C][C]3868093[/C][C]3868200[/C][C]4227550[/C][C]-359341[/C][C]-110.671[/C][/ROW]
[ROW][C]52[/C][C]4189245[/C][C]4065280[/C][C]4232490[/C][C]-167212[/C][C]123966[/C][/ROW]
[ROW][C]53[/C][C]4544332[/C][C]4565710[/C][C]4238830[/C][C]326880[/C][C]-21376.7[/C][/ROW]
[ROW][C]54[/C][C]4612845[/C][C]4583360[/C][C]4245730[/C][C]337627[/C][C]29485[/C][/ROW]
[ROW][C]55[/C][C]5221595[/C][C]NA[/C][C]NA[/C][C]950536[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]5137505[/C][C]NA[/C][C]NA[/C][C]856693[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]4760439[/C][C]NA[/C][C]NA[/C][C]438809[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]4643697[/C][C]NA[/C][C]NA[/C][C]416336[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]3692267[/C][C]NA[/C][C]NA[/C][C]-500224[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]3587603[/C][C]NA[/C][C]NA[/C][C]-623661[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=234860&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=234860&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
13200944NANA-757874NA
23153170NANA-918568NA
33741498NANA-359341NA
43918719NANA-167212NA
54403449NANA326880NA
64400407NANA337627NA
7484747348878003937260950536-40322.1
8471613647639003907200856693-47759.9
9429744043054403866630438809-7998.94
1042722534250150383381041633622107.6
11327183433020203802250-500224-30187.8
12316838831343803758040-62366134011.8
13291174829641403722010-757874-52391.7
14272099927806803699250-918568-59679.8
15319991833184903677840-359341-118577
16367262334868303654050-167212185789
17389201339641803637300326880-72168.1
18385084539673803629750337627-116534
19453246745784503627910950536-45980.1
20448473944912003634510856693-6464.96
21401497240900003651190438809-75031.8
22398375840508703634530416336-67107.8
23315845931150303615260-50022443425.5
24310056930106403634300-62366189929.4
25293540428952703653150-75787440132.6
26285571927494203667990-918568106296
27346561133249003684240-359341140713
28300698535402003707410-167212-533218
2940951104062380373550032688032733.4
3041047934093360375574033762711428.5
314730788472535037748209505365434.24
32464272646528403796140856693-10109.9
33424691942508703812060438809-3949.23
3443080324283010386668041633625019
35350815434287903929020-50022479360.8
36323664133381103961770-623661-101467
37325727532384303996300-75787418847.4
38304563131125304031100-918568-66902.3
39365769237071704066510-359341-49481.2
40412574739297404096950-167212196008
4144725074439150411227032688033356.4
4245134554465290412766033762748165.6
4351508965097480414695095053653413
4450578155020940416424085669336879.8
4546817424622220418341043880959525
46460368246111604194820416336-7473.76
47358018137002304200460-500224-120053
48353400235839304207590-623661-49929
49342276234568104214680-757874-34043.3
50329520933023804220950-918568-7168.38
51386809338682004227550-359341-110.671
52418924540652804232490-167212123966
53454433245657104238830326880-21376.7
5446128454583360424573033762729485
555221595NANA950536NA
565137505NANA856693NA
574760439NANA438809NA
584643697NANA416336NA
593692267NANA-500224NA
603587603NANA-623661NA



Parameters (Session):
par1 = additive ; par2 = 12 ;
Parameters (R input):
par1 = additive ; par2 = 12 ;
R code (references can be found in the software module):
par2 <- '12'
par1 <- 'multiplicative'
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')