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 computationWed, 21 Dec 2016 16:29:02 +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/2016/Dec/21/t1482334460ym8j238a1okiv43.htm/, Retrieved Tue, 07 May 2024 03:16:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=302387, Retrieved Tue, 07 May 2024 03:16:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact43
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [] [2016-12-21 15:29:02] [361c8dad91b3f1ef2e651cd04783c23b] [Current]
Feedback Forum

Post a new message
Dataseries X:
5300
3800
3900
5400
6100
4200
4000
4600
7300
4400
4000
5300
9300
4300
3400
6000
6500
3400
2900
5000
5800
3000
2300
4000
5800
2900
2200
3900
5300
3000
2000
3700
6000
2800
1800
3900
5400
2400
1700
3500
5400
3900
2900
4600
5400
2900
2700
4500
6300
2800
1900
5100
6200
3500
3500
6000
6000
3400
2800
4900




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time2 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=302387&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]2 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=302387&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=302387&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
15300NANA1945.31NA
23800NANA-890.402NA
339003234.64700-1465.4665.402
454005260.494850410.491139.509
561006857.814912.51945.31-757.812
642003934.64825-890.402265.402
740003409.64875-1465.4590.402
846005460.495050410.491-860.491
973007020.3150751945.31279.688
1044004272.15162.5-890.402127.902
1140004034.65500-1465.4-34.5982
1253006147.995737.5410.491-847.991
1393007595.3156501945.311704.69
1443004772.15662.5-890.402-472.098
1534003934.65400-1465.4-534.598
1660005347.994937.5410.491652.009
1765006707.814762.51945.31-207.812
1834003684.64575-890.402-284.598
1929002897.14362.5-1465.42.90179
2050004635.494225410.491364.509
2158006045.3141001945.31-245.312
2230003009.63900-890.402-9.59821
2323002309.63775-1465.4-9.59821
2440004172.993762.5410.491-172.991
2558005682.813737.51945.31117.188
2629002822.13712.5-890.40277.9018
2722002172.13637.5-1465.427.9018
2839003997.993587.5410.491-97.9911
2953005520.3135751945.31-220.312
3030002634.63525-890.402365.402
3120002122.13587.5-1465.4-122.098
3237004060.493650410.491-360.491
3360005545.3136001945.31454.688
3428002709.63600-890.40290.4018
3518002084.63550-1465.4-284.598
3639003835.493425410.49164.5089
3754005307.813362.51945.3192.1875
3824002409.63300-890.402-9.59821
3917001784.63250-1465.4-84.5982
4035003847.993437.5410.491-347.991
4154005720.3137751945.31-320.312
4239003172.14062.5-890.402727.902
4329002734.64200-1465.4165.402
4446004485.494075410.491114.509
4554005870.3139251945.31-470.312
4629002997.13887.5-890.402-97.0982
4727002522.13987.5-1465.4177.902
4845004497.994087.5410.4912.00893
4963005920.3139751945.31379.688
5028003059.63950-890.402-259.598
5119002547.14012.5-1465.4-647.098
5251004497.994087.5410.491602.009
5362006320.3143751945.31-120.312
5435003797.14687.5-890.402-297.098
5535003309.64775-1465.4190.402
5660005147.994737.5410.491852.009
5760006582.814637.51945.31-582.812
5834003522.14412.5-890.402-122.098
592800NANA-1465.4NA
604900NANA410.491NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 5300 & NA & NA & 1945.31 & NA \tabularnewline
2 & 3800 & NA & NA & -890.402 & NA \tabularnewline
3 & 3900 & 3234.6 & 4700 & -1465.4 & 665.402 \tabularnewline
4 & 5400 & 5260.49 & 4850 & 410.491 & 139.509 \tabularnewline
5 & 6100 & 6857.81 & 4912.5 & 1945.31 & -757.812 \tabularnewline
6 & 4200 & 3934.6 & 4825 & -890.402 & 265.402 \tabularnewline
7 & 4000 & 3409.6 & 4875 & -1465.4 & 590.402 \tabularnewline
8 & 4600 & 5460.49 & 5050 & 410.491 & -860.491 \tabularnewline
9 & 7300 & 7020.31 & 5075 & 1945.31 & 279.688 \tabularnewline
10 & 4400 & 4272.1 & 5162.5 & -890.402 & 127.902 \tabularnewline
11 & 4000 & 4034.6 & 5500 & -1465.4 & -34.5982 \tabularnewline
12 & 5300 & 6147.99 & 5737.5 & 410.491 & -847.991 \tabularnewline
13 & 9300 & 7595.31 & 5650 & 1945.31 & 1704.69 \tabularnewline
14 & 4300 & 4772.1 & 5662.5 & -890.402 & -472.098 \tabularnewline
15 & 3400 & 3934.6 & 5400 & -1465.4 & -534.598 \tabularnewline
16 & 6000 & 5347.99 & 4937.5 & 410.491 & 652.009 \tabularnewline
17 & 6500 & 6707.81 & 4762.5 & 1945.31 & -207.812 \tabularnewline
18 & 3400 & 3684.6 & 4575 & -890.402 & -284.598 \tabularnewline
19 & 2900 & 2897.1 & 4362.5 & -1465.4 & 2.90179 \tabularnewline
20 & 5000 & 4635.49 & 4225 & 410.491 & 364.509 \tabularnewline
21 & 5800 & 6045.31 & 4100 & 1945.31 & -245.312 \tabularnewline
22 & 3000 & 3009.6 & 3900 & -890.402 & -9.59821 \tabularnewline
23 & 2300 & 2309.6 & 3775 & -1465.4 & -9.59821 \tabularnewline
24 & 4000 & 4172.99 & 3762.5 & 410.491 & -172.991 \tabularnewline
25 & 5800 & 5682.81 & 3737.5 & 1945.31 & 117.188 \tabularnewline
26 & 2900 & 2822.1 & 3712.5 & -890.402 & 77.9018 \tabularnewline
27 & 2200 & 2172.1 & 3637.5 & -1465.4 & 27.9018 \tabularnewline
28 & 3900 & 3997.99 & 3587.5 & 410.491 & -97.9911 \tabularnewline
29 & 5300 & 5520.31 & 3575 & 1945.31 & -220.312 \tabularnewline
30 & 3000 & 2634.6 & 3525 & -890.402 & 365.402 \tabularnewline
31 & 2000 & 2122.1 & 3587.5 & -1465.4 & -122.098 \tabularnewline
32 & 3700 & 4060.49 & 3650 & 410.491 & -360.491 \tabularnewline
33 & 6000 & 5545.31 & 3600 & 1945.31 & 454.688 \tabularnewline
34 & 2800 & 2709.6 & 3600 & -890.402 & 90.4018 \tabularnewline
35 & 1800 & 2084.6 & 3550 & -1465.4 & -284.598 \tabularnewline
36 & 3900 & 3835.49 & 3425 & 410.491 & 64.5089 \tabularnewline
37 & 5400 & 5307.81 & 3362.5 & 1945.31 & 92.1875 \tabularnewline
38 & 2400 & 2409.6 & 3300 & -890.402 & -9.59821 \tabularnewline
39 & 1700 & 1784.6 & 3250 & -1465.4 & -84.5982 \tabularnewline
40 & 3500 & 3847.99 & 3437.5 & 410.491 & -347.991 \tabularnewline
41 & 5400 & 5720.31 & 3775 & 1945.31 & -320.312 \tabularnewline
42 & 3900 & 3172.1 & 4062.5 & -890.402 & 727.902 \tabularnewline
43 & 2900 & 2734.6 & 4200 & -1465.4 & 165.402 \tabularnewline
44 & 4600 & 4485.49 & 4075 & 410.491 & 114.509 \tabularnewline
45 & 5400 & 5870.31 & 3925 & 1945.31 & -470.312 \tabularnewline
46 & 2900 & 2997.1 & 3887.5 & -890.402 & -97.0982 \tabularnewline
47 & 2700 & 2522.1 & 3987.5 & -1465.4 & 177.902 \tabularnewline
48 & 4500 & 4497.99 & 4087.5 & 410.491 & 2.00893 \tabularnewline
49 & 6300 & 5920.31 & 3975 & 1945.31 & 379.688 \tabularnewline
50 & 2800 & 3059.6 & 3950 & -890.402 & -259.598 \tabularnewline
51 & 1900 & 2547.1 & 4012.5 & -1465.4 & -647.098 \tabularnewline
52 & 5100 & 4497.99 & 4087.5 & 410.491 & 602.009 \tabularnewline
53 & 6200 & 6320.31 & 4375 & 1945.31 & -120.312 \tabularnewline
54 & 3500 & 3797.1 & 4687.5 & -890.402 & -297.098 \tabularnewline
55 & 3500 & 3309.6 & 4775 & -1465.4 & 190.402 \tabularnewline
56 & 6000 & 5147.99 & 4737.5 & 410.491 & 852.009 \tabularnewline
57 & 6000 & 6582.81 & 4637.5 & 1945.31 & -582.812 \tabularnewline
58 & 3400 & 3522.1 & 4412.5 & -890.402 & -122.098 \tabularnewline
59 & 2800 & NA & NA & -1465.4 & NA \tabularnewline
60 & 4900 & NA & NA & 410.491 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=302387&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]5300[/C][C]NA[/C][C]NA[/C][C]1945.31[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]3800[/C][C]NA[/C][C]NA[/C][C]-890.402[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]3900[/C][C]3234.6[/C][C]4700[/C][C]-1465.4[/C][C]665.402[/C][/ROW]
[ROW][C]4[/C][C]5400[/C][C]5260.49[/C][C]4850[/C][C]410.491[/C][C]139.509[/C][/ROW]
[ROW][C]5[/C][C]6100[/C][C]6857.81[/C][C]4912.5[/C][C]1945.31[/C][C]-757.812[/C][/ROW]
[ROW][C]6[/C][C]4200[/C][C]3934.6[/C][C]4825[/C][C]-890.402[/C][C]265.402[/C][/ROW]
[ROW][C]7[/C][C]4000[/C][C]3409.6[/C][C]4875[/C][C]-1465.4[/C][C]590.402[/C][/ROW]
[ROW][C]8[/C][C]4600[/C][C]5460.49[/C][C]5050[/C][C]410.491[/C][C]-860.491[/C][/ROW]
[ROW][C]9[/C][C]7300[/C][C]7020.31[/C][C]5075[/C][C]1945.31[/C][C]279.688[/C][/ROW]
[ROW][C]10[/C][C]4400[/C][C]4272.1[/C][C]5162.5[/C][C]-890.402[/C][C]127.902[/C][/ROW]
[ROW][C]11[/C][C]4000[/C][C]4034.6[/C][C]5500[/C][C]-1465.4[/C][C]-34.5982[/C][/ROW]
[ROW][C]12[/C][C]5300[/C][C]6147.99[/C][C]5737.5[/C][C]410.491[/C][C]-847.991[/C][/ROW]
[ROW][C]13[/C][C]9300[/C][C]7595.31[/C][C]5650[/C][C]1945.31[/C][C]1704.69[/C][/ROW]
[ROW][C]14[/C][C]4300[/C][C]4772.1[/C][C]5662.5[/C][C]-890.402[/C][C]-472.098[/C][/ROW]
[ROW][C]15[/C][C]3400[/C][C]3934.6[/C][C]5400[/C][C]-1465.4[/C][C]-534.598[/C][/ROW]
[ROW][C]16[/C][C]6000[/C][C]5347.99[/C][C]4937.5[/C][C]410.491[/C][C]652.009[/C][/ROW]
[ROW][C]17[/C][C]6500[/C][C]6707.81[/C][C]4762.5[/C][C]1945.31[/C][C]-207.812[/C][/ROW]
[ROW][C]18[/C][C]3400[/C][C]3684.6[/C][C]4575[/C][C]-890.402[/C][C]-284.598[/C][/ROW]
[ROW][C]19[/C][C]2900[/C][C]2897.1[/C][C]4362.5[/C][C]-1465.4[/C][C]2.90179[/C][/ROW]
[ROW][C]20[/C][C]5000[/C][C]4635.49[/C][C]4225[/C][C]410.491[/C][C]364.509[/C][/ROW]
[ROW][C]21[/C][C]5800[/C][C]6045.31[/C][C]4100[/C][C]1945.31[/C][C]-245.312[/C][/ROW]
[ROW][C]22[/C][C]3000[/C][C]3009.6[/C][C]3900[/C][C]-890.402[/C][C]-9.59821[/C][/ROW]
[ROW][C]23[/C][C]2300[/C][C]2309.6[/C][C]3775[/C][C]-1465.4[/C][C]-9.59821[/C][/ROW]
[ROW][C]24[/C][C]4000[/C][C]4172.99[/C][C]3762.5[/C][C]410.491[/C][C]-172.991[/C][/ROW]
[ROW][C]25[/C][C]5800[/C][C]5682.81[/C][C]3737.5[/C][C]1945.31[/C][C]117.188[/C][/ROW]
[ROW][C]26[/C][C]2900[/C][C]2822.1[/C][C]3712.5[/C][C]-890.402[/C][C]77.9018[/C][/ROW]
[ROW][C]27[/C][C]2200[/C][C]2172.1[/C][C]3637.5[/C][C]-1465.4[/C][C]27.9018[/C][/ROW]
[ROW][C]28[/C][C]3900[/C][C]3997.99[/C][C]3587.5[/C][C]410.491[/C][C]-97.9911[/C][/ROW]
[ROW][C]29[/C][C]5300[/C][C]5520.31[/C][C]3575[/C][C]1945.31[/C][C]-220.312[/C][/ROW]
[ROW][C]30[/C][C]3000[/C][C]2634.6[/C][C]3525[/C][C]-890.402[/C][C]365.402[/C][/ROW]
[ROW][C]31[/C][C]2000[/C][C]2122.1[/C][C]3587.5[/C][C]-1465.4[/C][C]-122.098[/C][/ROW]
[ROW][C]32[/C][C]3700[/C][C]4060.49[/C][C]3650[/C][C]410.491[/C][C]-360.491[/C][/ROW]
[ROW][C]33[/C][C]6000[/C][C]5545.31[/C][C]3600[/C][C]1945.31[/C][C]454.688[/C][/ROW]
[ROW][C]34[/C][C]2800[/C][C]2709.6[/C][C]3600[/C][C]-890.402[/C][C]90.4018[/C][/ROW]
[ROW][C]35[/C][C]1800[/C][C]2084.6[/C][C]3550[/C][C]-1465.4[/C][C]-284.598[/C][/ROW]
[ROW][C]36[/C][C]3900[/C][C]3835.49[/C][C]3425[/C][C]410.491[/C][C]64.5089[/C][/ROW]
[ROW][C]37[/C][C]5400[/C][C]5307.81[/C][C]3362.5[/C][C]1945.31[/C][C]92.1875[/C][/ROW]
[ROW][C]38[/C][C]2400[/C][C]2409.6[/C][C]3300[/C][C]-890.402[/C][C]-9.59821[/C][/ROW]
[ROW][C]39[/C][C]1700[/C][C]1784.6[/C][C]3250[/C][C]-1465.4[/C][C]-84.5982[/C][/ROW]
[ROW][C]40[/C][C]3500[/C][C]3847.99[/C][C]3437.5[/C][C]410.491[/C][C]-347.991[/C][/ROW]
[ROW][C]41[/C][C]5400[/C][C]5720.31[/C][C]3775[/C][C]1945.31[/C][C]-320.312[/C][/ROW]
[ROW][C]42[/C][C]3900[/C][C]3172.1[/C][C]4062.5[/C][C]-890.402[/C][C]727.902[/C][/ROW]
[ROW][C]43[/C][C]2900[/C][C]2734.6[/C][C]4200[/C][C]-1465.4[/C][C]165.402[/C][/ROW]
[ROW][C]44[/C][C]4600[/C][C]4485.49[/C][C]4075[/C][C]410.491[/C][C]114.509[/C][/ROW]
[ROW][C]45[/C][C]5400[/C][C]5870.31[/C][C]3925[/C][C]1945.31[/C][C]-470.312[/C][/ROW]
[ROW][C]46[/C][C]2900[/C][C]2997.1[/C][C]3887.5[/C][C]-890.402[/C][C]-97.0982[/C][/ROW]
[ROW][C]47[/C][C]2700[/C][C]2522.1[/C][C]3987.5[/C][C]-1465.4[/C][C]177.902[/C][/ROW]
[ROW][C]48[/C][C]4500[/C][C]4497.99[/C][C]4087.5[/C][C]410.491[/C][C]2.00893[/C][/ROW]
[ROW][C]49[/C][C]6300[/C][C]5920.31[/C][C]3975[/C][C]1945.31[/C][C]379.688[/C][/ROW]
[ROW][C]50[/C][C]2800[/C][C]3059.6[/C][C]3950[/C][C]-890.402[/C][C]-259.598[/C][/ROW]
[ROW][C]51[/C][C]1900[/C][C]2547.1[/C][C]4012.5[/C][C]-1465.4[/C][C]-647.098[/C][/ROW]
[ROW][C]52[/C][C]5100[/C][C]4497.99[/C][C]4087.5[/C][C]410.491[/C][C]602.009[/C][/ROW]
[ROW][C]53[/C][C]6200[/C][C]6320.31[/C][C]4375[/C][C]1945.31[/C][C]-120.312[/C][/ROW]
[ROW][C]54[/C][C]3500[/C][C]3797.1[/C][C]4687.5[/C][C]-890.402[/C][C]-297.098[/C][/ROW]
[ROW][C]55[/C][C]3500[/C][C]3309.6[/C][C]4775[/C][C]-1465.4[/C][C]190.402[/C][/ROW]
[ROW][C]56[/C][C]6000[/C][C]5147.99[/C][C]4737.5[/C][C]410.491[/C][C]852.009[/C][/ROW]
[ROW][C]57[/C][C]6000[/C][C]6582.81[/C][C]4637.5[/C][C]1945.31[/C][C]-582.812[/C][/ROW]
[ROW][C]58[/C][C]3400[/C][C]3522.1[/C][C]4412.5[/C][C]-890.402[/C][C]-122.098[/C][/ROW]
[ROW][C]59[/C][C]2800[/C][C]NA[/C][C]NA[/C][C]-1465.4[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]4900[/C][C]NA[/C][C]NA[/C][C]410.491[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=302387&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=302387&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
15300NANA1945.31NA
23800NANA-890.402NA
339003234.64700-1465.4665.402
454005260.494850410.491139.509
561006857.814912.51945.31-757.812
642003934.64825-890.402265.402
740003409.64875-1465.4590.402
846005460.495050410.491-860.491
973007020.3150751945.31279.688
1044004272.15162.5-890.402127.902
1140004034.65500-1465.4-34.5982
1253006147.995737.5410.491-847.991
1393007595.3156501945.311704.69
1443004772.15662.5-890.402-472.098
1534003934.65400-1465.4-534.598
1660005347.994937.5410.491652.009
1765006707.814762.51945.31-207.812
1834003684.64575-890.402-284.598
1929002897.14362.5-1465.42.90179
2050004635.494225410.491364.509
2158006045.3141001945.31-245.312
2230003009.63900-890.402-9.59821
2323002309.63775-1465.4-9.59821
2440004172.993762.5410.491-172.991
2558005682.813737.51945.31117.188
2629002822.13712.5-890.40277.9018
2722002172.13637.5-1465.427.9018
2839003997.993587.5410.491-97.9911
2953005520.3135751945.31-220.312
3030002634.63525-890.402365.402
3120002122.13587.5-1465.4-122.098
3237004060.493650410.491-360.491
3360005545.3136001945.31454.688
3428002709.63600-890.40290.4018
3518002084.63550-1465.4-284.598
3639003835.493425410.49164.5089
3754005307.813362.51945.3192.1875
3824002409.63300-890.402-9.59821
3917001784.63250-1465.4-84.5982
4035003847.993437.5410.491-347.991
4154005720.3137751945.31-320.312
4239003172.14062.5-890.402727.902
4329002734.64200-1465.4165.402
4446004485.494075410.491114.509
4554005870.3139251945.31-470.312
4629002997.13887.5-890.402-97.0982
4727002522.13987.5-1465.4177.902
4845004497.994087.5410.4912.00893
4963005920.3139751945.31379.688
5028003059.63950-890.402-259.598
5119002547.14012.5-1465.4-647.098
5251004497.994087.5410.491602.009
5362006320.3143751945.31-120.312
5435003797.14687.5-890.402-297.098
5535003309.64775-1465.4190.402
5660005147.994737.5410.491852.009
5760006582.814637.51945.31-582.812
5834003522.14412.5-890.402-122.098
592800NANA-1465.4NA
604900NANA410.491NA



Parameters (Session):
par1 = Default ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
Parameters (R input):
par1 = additive ; par2 = 4 ;
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')