Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationSat, 26 Nov 2016 20:04:54 +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/2016/Nov/26/t1480190715776zsbzmlpcalk0.htm/, Retrieved Sun, 19 May 2024 05:22:57 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Sun, 19 May 2024 05:22:57 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
37729
48191
52498
57319
44377
48081
52597
53331
39587
46278
50365
57176
39251
47946
50427
54317
41210
50592
55728
59099
47519
53203
53882
55163
45255
50423
52161
54562
40971
48014
48440
44967
27218
30269
33234
36811
27745
31891
32398
34093
28358
29532
30769
32080
23951
34628
22978
35704
23090
22111
28925
35968
28963
34074
39160
51314
34527
40722
50609
52435




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=&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=&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 time2 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
137729NANA0.84817NA
248191NANA0.979035NA
35249851188.849765.21.028611.02558
4573195787650582.51.144190.990377
54437742901.450581.10.848171.0344
64808149044.8500950.9790350.980349
75259750399.448997.81.028611.0436
85333155119.848173.61.144190.967548
93958740431.647669.20.848170.97911
104627846867.347870.90.9790350.987427
115036549691.448309.51.028611.01356
125717655465.7484761.144191.03083
133925141299.348692.20.848170.950403
144794647329.148342.60.9790351.01303
155042749609.848230.11.028611.01647
16543175584348805.81.144190.972673
174121042238.149799.10.848170.975659
18505924998951059.50.9790351.01206
195572853946.152445.91.028611.03303
205909961283.853560.91.144190.96435
214751945509.853656.50.848171.04415
22532035182452933.80.9790351.02661
235388253650.852158.81.028611.00431
245516358958.151528.21.144190.935631
254525543227.550965.60.848171.0469
26504234961350675.40.9790351.01633
275216151496.950064.81.028611.0129
285456256326.349228.11.144190.968677
294097141103.948461.90.848170.996767
304801445816.346797.40.9790351.04797
314844045134.143878.91.028611.07325
324496745700.839941.61.144190.983944
332721830383.835822.80.848170.895807
343026932212.732902.50.9790350.939661
353323432862.831948.91.028611.0113
363681136862.932217.51.144190.998591
372774527409.232315.80.848171.01225
383189131203.331871.50.9790351.02204
393239832512.631608.41.028610.996477
403409335916.231390.11.144190.949236
412835826201.330891.60.848171.08231
422953229798.330436.40.9790350.991064
433076930481.629633.91.028611.00943
443208034005.3297201.144190.943382
452395124921.929383.10.848170.961043
463462828257.228862.20.9790351.22546
472297830043.129207.61.028610.764834
483570431505.727535.41.144191.13326
492309022658.126714.10.848171.01906
502211126914.227490.50.9790350.821538
51289252906628257.61.028610.995151
52359683488330487.11.144191.0311
532896328211.733261.90.848171.02663
543407435695.136459.50.9790350.954584
55391604019139073.21.028610.974348
565131446453.840599.81.144191.10462
573452736354.242861.90.848170.94974
584072243501.644433.10.9790350.936104
5950609NANA1.02861NA
6052435NANA1.14419NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 37729 & NA & NA & 0.84817 & NA \tabularnewline
2 & 48191 & NA & NA & 0.979035 & NA \tabularnewline
3 & 52498 & 51188.8 & 49765.2 & 1.02861 & 1.02558 \tabularnewline
4 & 57319 & 57876 & 50582.5 & 1.14419 & 0.990377 \tabularnewline
5 & 44377 & 42901.4 & 50581.1 & 0.84817 & 1.0344 \tabularnewline
6 & 48081 & 49044.8 & 50095 & 0.979035 & 0.980349 \tabularnewline
7 & 52597 & 50399.4 & 48997.8 & 1.02861 & 1.0436 \tabularnewline
8 & 53331 & 55119.8 & 48173.6 & 1.14419 & 0.967548 \tabularnewline
9 & 39587 & 40431.6 & 47669.2 & 0.84817 & 0.97911 \tabularnewline
10 & 46278 & 46867.3 & 47870.9 & 0.979035 & 0.987427 \tabularnewline
11 & 50365 & 49691.4 & 48309.5 & 1.02861 & 1.01356 \tabularnewline
12 & 57176 & 55465.7 & 48476 & 1.14419 & 1.03083 \tabularnewline
13 & 39251 & 41299.3 & 48692.2 & 0.84817 & 0.950403 \tabularnewline
14 & 47946 & 47329.1 & 48342.6 & 0.979035 & 1.01303 \tabularnewline
15 & 50427 & 49609.8 & 48230.1 & 1.02861 & 1.01647 \tabularnewline
16 & 54317 & 55843 & 48805.8 & 1.14419 & 0.972673 \tabularnewline
17 & 41210 & 42238.1 & 49799.1 & 0.84817 & 0.975659 \tabularnewline
18 & 50592 & 49989 & 51059.5 & 0.979035 & 1.01206 \tabularnewline
19 & 55728 & 53946.1 & 52445.9 & 1.02861 & 1.03303 \tabularnewline
20 & 59099 & 61283.8 & 53560.9 & 1.14419 & 0.96435 \tabularnewline
21 & 47519 & 45509.8 & 53656.5 & 0.84817 & 1.04415 \tabularnewline
22 & 53203 & 51824 & 52933.8 & 0.979035 & 1.02661 \tabularnewline
23 & 53882 & 53650.8 & 52158.8 & 1.02861 & 1.00431 \tabularnewline
24 & 55163 & 58958.1 & 51528.2 & 1.14419 & 0.935631 \tabularnewline
25 & 45255 & 43227.5 & 50965.6 & 0.84817 & 1.0469 \tabularnewline
26 & 50423 & 49613 & 50675.4 & 0.979035 & 1.01633 \tabularnewline
27 & 52161 & 51496.9 & 50064.8 & 1.02861 & 1.0129 \tabularnewline
28 & 54562 & 56326.3 & 49228.1 & 1.14419 & 0.968677 \tabularnewline
29 & 40971 & 41103.9 & 48461.9 & 0.84817 & 0.996767 \tabularnewline
30 & 48014 & 45816.3 & 46797.4 & 0.979035 & 1.04797 \tabularnewline
31 & 48440 & 45134.1 & 43878.9 & 1.02861 & 1.07325 \tabularnewline
32 & 44967 & 45700.8 & 39941.6 & 1.14419 & 0.983944 \tabularnewline
33 & 27218 & 30383.8 & 35822.8 & 0.84817 & 0.895807 \tabularnewline
34 & 30269 & 32212.7 & 32902.5 & 0.979035 & 0.939661 \tabularnewline
35 & 33234 & 32862.8 & 31948.9 & 1.02861 & 1.0113 \tabularnewline
36 & 36811 & 36862.9 & 32217.5 & 1.14419 & 0.998591 \tabularnewline
37 & 27745 & 27409.2 & 32315.8 & 0.84817 & 1.01225 \tabularnewline
38 & 31891 & 31203.3 & 31871.5 & 0.979035 & 1.02204 \tabularnewline
39 & 32398 & 32512.6 & 31608.4 & 1.02861 & 0.996477 \tabularnewline
40 & 34093 & 35916.2 & 31390.1 & 1.14419 & 0.949236 \tabularnewline
41 & 28358 & 26201.3 & 30891.6 & 0.84817 & 1.08231 \tabularnewline
42 & 29532 & 29798.3 & 30436.4 & 0.979035 & 0.991064 \tabularnewline
43 & 30769 & 30481.6 & 29633.9 & 1.02861 & 1.00943 \tabularnewline
44 & 32080 & 34005.3 & 29720 & 1.14419 & 0.943382 \tabularnewline
45 & 23951 & 24921.9 & 29383.1 & 0.84817 & 0.961043 \tabularnewline
46 & 34628 & 28257.2 & 28862.2 & 0.979035 & 1.22546 \tabularnewline
47 & 22978 & 30043.1 & 29207.6 & 1.02861 & 0.764834 \tabularnewline
48 & 35704 & 31505.7 & 27535.4 & 1.14419 & 1.13326 \tabularnewline
49 & 23090 & 22658.1 & 26714.1 & 0.84817 & 1.01906 \tabularnewline
50 & 22111 & 26914.2 & 27490.5 & 0.979035 & 0.821538 \tabularnewline
51 & 28925 & 29066 & 28257.6 & 1.02861 & 0.995151 \tabularnewline
52 & 35968 & 34883 & 30487.1 & 1.14419 & 1.0311 \tabularnewline
53 & 28963 & 28211.7 & 33261.9 & 0.84817 & 1.02663 \tabularnewline
54 & 34074 & 35695.1 & 36459.5 & 0.979035 & 0.954584 \tabularnewline
55 & 39160 & 40191 & 39073.2 & 1.02861 & 0.974348 \tabularnewline
56 & 51314 & 46453.8 & 40599.8 & 1.14419 & 1.10462 \tabularnewline
57 & 34527 & 36354.2 & 42861.9 & 0.84817 & 0.94974 \tabularnewline
58 & 40722 & 43501.6 & 44433.1 & 0.979035 & 0.936104 \tabularnewline
59 & 50609 & NA & NA & 1.02861 & NA \tabularnewline
60 & 52435 & NA & NA & 1.14419 & 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]37729[/C][C]NA[/C][C]NA[/C][C]0.84817[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]48191[/C][C]NA[/C][C]NA[/C][C]0.979035[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]52498[/C][C]51188.8[/C][C]49765.2[/C][C]1.02861[/C][C]1.02558[/C][/ROW]
[ROW][C]4[/C][C]57319[/C][C]57876[/C][C]50582.5[/C][C]1.14419[/C][C]0.990377[/C][/ROW]
[ROW][C]5[/C][C]44377[/C][C]42901.4[/C][C]50581.1[/C][C]0.84817[/C][C]1.0344[/C][/ROW]
[ROW][C]6[/C][C]48081[/C][C]49044.8[/C][C]50095[/C][C]0.979035[/C][C]0.980349[/C][/ROW]
[ROW][C]7[/C][C]52597[/C][C]50399.4[/C][C]48997.8[/C][C]1.02861[/C][C]1.0436[/C][/ROW]
[ROW][C]8[/C][C]53331[/C][C]55119.8[/C][C]48173.6[/C][C]1.14419[/C][C]0.967548[/C][/ROW]
[ROW][C]9[/C][C]39587[/C][C]40431.6[/C][C]47669.2[/C][C]0.84817[/C][C]0.97911[/C][/ROW]
[ROW][C]10[/C][C]46278[/C][C]46867.3[/C][C]47870.9[/C][C]0.979035[/C][C]0.987427[/C][/ROW]
[ROW][C]11[/C][C]50365[/C][C]49691.4[/C][C]48309.5[/C][C]1.02861[/C][C]1.01356[/C][/ROW]
[ROW][C]12[/C][C]57176[/C][C]55465.7[/C][C]48476[/C][C]1.14419[/C][C]1.03083[/C][/ROW]
[ROW][C]13[/C][C]39251[/C][C]41299.3[/C][C]48692.2[/C][C]0.84817[/C][C]0.950403[/C][/ROW]
[ROW][C]14[/C][C]47946[/C][C]47329.1[/C][C]48342.6[/C][C]0.979035[/C][C]1.01303[/C][/ROW]
[ROW][C]15[/C][C]50427[/C][C]49609.8[/C][C]48230.1[/C][C]1.02861[/C][C]1.01647[/C][/ROW]
[ROW][C]16[/C][C]54317[/C][C]55843[/C][C]48805.8[/C][C]1.14419[/C][C]0.972673[/C][/ROW]
[ROW][C]17[/C][C]41210[/C][C]42238.1[/C][C]49799.1[/C][C]0.84817[/C][C]0.975659[/C][/ROW]
[ROW][C]18[/C][C]50592[/C][C]49989[/C][C]51059.5[/C][C]0.979035[/C][C]1.01206[/C][/ROW]
[ROW][C]19[/C][C]55728[/C][C]53946.1[/C][C]52445.9[/C][C]1.02861[/C][C]1.03303[/C][/ROW]
[ROW][C]20[/C][C]59099[/C][C]61283.8[/C][C]53560.9[/C][C]1.14419[/C][C]0.96435[/C][/ROW]
[ROW][C]21[/C][C]47519[/C][C]45509.8[/C][C]53656.5[/C][C]0.84817[/C][C]1.04415[/C][/ROW]
[ROW][C]22[/C][C]53203[/C][C]51824[/C][C]52933.8[/C][C]0.979035[/C][C]1.02661[/C][/ROW]
[ROW][C]23[/C][C]53882[/C][C]53650.8[/C][C]52158.8[/C][C]1.02861[/C][C]1.00431[/C][/ROW]
[ROW][C]24[/C][C]55163[/C][C]58958.1[/C][C]51528.2[/C][C]1.14419[/C][C]0.935631[/C][/ROW]
[ROW][C]25[/C][C]45255[/C][C]43227.5[/C][C]50965.6[/C][C]0.84817[/C][C]1.0469[/C][/ROW]
[ROW][C]26[/C][C]50423[/C][C]49613[/C][C]50675.4[/C][C]0.979035[/C][C]1.01633[/C][/ROW]
[ROW][C]27[/C][C]52161[/C][C]51496.9[/C][C]50064.8[/C][C]1.02861[/C][C]1.0129[/C][/ROW]
[ROW][C]28[/C][C]54562[/C][C]56326.3[/C][C]49228.1[/C][C]1.14419[/C][C]0.968677[/C][/ROW]
[ROW][C]29[/C][C]40971[/C][C]41103.9[/C][C]48461.9[/C][C]0.84817[/C][C]0.996767[/C][/ROW]
[ROW][C]30[/C][C]48014[/C][C]45816.3[/C][C]46797.4[/C][C]0.979035[/C][C]1.04797[/C][/ROW]
[ROW][C]31[/C][C]48440[/C][C]45134.1[/C][C]43878.9[/C][C]1.02861[/C][C]1.07325[/C][/ROW]
[ROW][C]32[/C][C]44967[/C][C]45700.8[/C][C]39941.6[/C][C]1.14419[/C][C]0.983944[/C][/ROW]
[ROW][C]33[/C][C]27218[/C][C]30383.8[/C][C]35822.8[/C][C]0.84817[/C][C]0.895807[/C][/ROW]
[ROW][C]34[/C][C]30269[/C][C]32212.7[/C][C]32902.5[/C][C]0.979035[/C][C]0.939661[/C][/ROW]
[ROW][C]35[/C][C]33234[/C][C]32862.8[/C][C]31948.9[/C][C]1.02861[/C][C]1.0113[/C][/ROW]
[ROW][C]36[/C][C]36811[/C][C]36862.9[/C][C]32217.5[/C][C]1.14419[/C][C]0.998591[/C][/ROW]
[ROW][C]37[/C][C]27745[/C][C]27409.2[/C][C]32315.8[/C][C]0.84817[/C][C]1.01225[/C][/ROW]
[ROW][C]38[/C][C]31891[/C][C]31203.3[/C][C]31871.5[/C][C]0.979035[/C][C]1.02204[/C][/ROW]
[ROW][C]39[/C][C]32398[/C][C]32512.6[/C][C]31608.4[/C][C]1.02861[/C][C]0.996477[/C][/ROW]
[ROW][C]40[/C][C]34093[/C][C]35916.2[/C][C]31390.1[/C][C]1.14419[/C][C]0.949236[/C][/ROW]
[ROW][C]41[/C][C]28358[/C][C]26201.3[/C][C]30891.6[/C][C]0.84817[/C][C]1.08231[/C][/ROW]
[ROW][C]42[/C][C]29532[/C][C]29798.3[/C][C]30436.4[/C][C]0.979035[/C][C]0.991064[/C][/ROW]
[ROW][C]43[/C][C]30769[/C][C]30481.6[/C][C]29633.9[/C][C]1.02861[/C][C]1.00943[/C][/ROW]
[ROW][C]44[/C][C]32080[/C][C]34005.3[/C][C]29720[/C][C]1.14419[/C][C]0.943382[/C][/ROW]
[ROW][C]45[/C][C]23951[/C][C]24921.9[/C][C]29383.1[/C][C]0.84817[/C][C]0.961043[/C][/ROW]
[ROW][C]46[/C][C]34628[/C][C]28257.2[/C][C]28862.2[/C][C]0.979035[/C][C]1.22546[/C][/ROW]
[ROW][C]47[/C][C]22978[/C][C]30043.1[/C][C]29207.6[/C][C]1.02861[/C][C]0.764834[/C][/ROW]
[ROW][C]48[/C][C]35704[/C][C]31505.7[/C][C]27535.4[/C][C]1.14419[/C][C]1.13326[/C][/ROW]
[ROW][C]49[/C][C]23090[/C][C]22658.1[/C][C]26714.1[/C][C]0.84817[/C][C]1.01906[/C][/ROW]
[ROW][C]50[/C][C]22111[/C][C]26914.2[/C][C]27490.5[/C][C]0.979035[/C][C]0.821538[/C][/ROW]
[ROW][C]51[/C][C]28925[/C][C]29066[/C][C]28257.6[/C][C]1.02861[/C][C]0.995151[/C][/ROW]
[ROW][C]52[/C][C]35968[/C][C]34883[/C][C]30487.1[/C][C]1.14419[/C][C]1.0311[/C][/ROW]
[ROW][C]53[/C][C]28963[/C][C]28211.7[/C][C]33261.9[/C][C]0.84817[/C][C]1.02663[/C][/ROW]
[ROW][C]54[/C][C]34074[/C][C]35695.1[/C][C]36459.5[/C][C]0.979035[/C][C]0.954584[/C][/ROW]
[ROW][C]55[/C][C]39160[/C][C]40191[/C][C]39073.2[/C][C]1.02861[/C][C]0.974348[/C][/ROW]
[ROW][C]56[/C][C]51314[/C][C]46453.8[/C][C]40599.8[/C][C]1.14419[/C][C]1.10462[/C][/ROW]
[ROW][C]57[/C][C]34527[/C][C]36354.2[/C][C]42861.9[/C][C]0.84817[/C][C]0.94974[/C][/ROW]
[ROW][C]58[/C][C]40722[/C][C]43501.6[/C][C]44433.1[/C][C]0.979035[/C][C]0.936104[/C][/ROW]
[ROW][C]59[/C][C]50609[/C][C]NA[/C][C]NA[/C][C]1.02861[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]52435[/C][C]NA[/C][C]NA[/C][C]1.14419[/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
137729NANA0.84817NA
248191NANA0.979035NA
35249851188.849765.21.028611.02558
4573195787650582.51.144190.990377
54437742901.450581.10.848171.0344
64808149044.8500950.9790350.980349
75259750399.448997.81.028611.0436
85333155119.848173.61.144190.967548
93958740431.647669.20.848170.97911
104627846867.347870.90.9790350.987427
115036549691.448309.51.028611.01356
125717655465.7484761.144191.03083
133925141299.348692.20.848170.950403
144794647329.148342.60.9790351.01303
155042749609.848230.11.028611.01647
16543175584348805.81.144190.972673
174121042238.149799.10.848170.975659
18505924998951059.50.9790351.01206
195572853946.152445.91.028611.03303
205909961283.853560.91.144190.96435
214751945509.853656.50.848171.04415
22532035182452933.80.9790351.02661
235388253650.852158.81.028611.00431
245516358958.151528.21.144190.935631
254525543227.550965.60.848171.0469
26504234961350675.40.9790351.01633
275216151496.950064.81.028611.0129
285456256326.349228.11.144190.968677
294097141103.948461.90.848170.996767
304801445816.346797.40.9790351.04797
314844045134.143878.91.028611.07325
324496745700.839941.61.144190.983944
332721830383.835822.80.848170.895807
343026932212.732902.50.9790350.939661
353323432862.831948.91.028611.0113
363681136862.932217.51.144190.998591
372774527409.232315.80.848171.01225
383189131203.331871.50.9790351.02204
393239832512.631608.41.028610.996477
403409335916.231390.11.144190.949236
412835826201.330891.60.848171.08231
422953229798.330436.40.9790350.991064
433076930481.629633.91.028611.00943
443208034005.3297201.144190.943382
452395124921.929383.10.848170.961043
463462828257.228862.20.9790351.22546
472297830043.129207.61.028610.764834
483570431505.727535.41.144191.13326
492309022658.126714.10.848171.01906
502211126914.227490.50.9790350.821538
51289252906628257.61.028610.995151
52359683488330487.11.144191.0311
532896328211.733261.90.848171.02663
543407435695.136459.50.9790350.954584
55391604019139073.21.028610.974348
565131446453.840599.81.144191.10462
573452736354.242861.90.848170.94974
584072243501.644433.10.9790350.936104
5950609NANA1.02861NA
6052435NANA1.14419NA



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