Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_exponentialsmoothing.wasp
Title produced by softwareExponential Smoothing
Date of computationTue, 15 May 2012 04:50:38 -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/2012/May/15/t133707188607kvezvgvx4xh6r.htm/, Retrieved Wed, 08 May 2024 04:52:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=166461, Retrieved Wed, 08 May 2024 04:52:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact194
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Exponential Smoothing] [exonential smooth...] [2012-05-15 08:50:38] [2212baf038bb1c45b2178a66cd8e5b38] [Current]
Feedback Forum

Post a new message
Dataseries X:
69116
41519
51321
38529
41547
52073
38401
40898
40439
41888
37898
8771
68184
50530
47221
41756
45633
48138
39486
39341
41117
41629
29722
7054
56676
34870
35117
30169
30936
35699
33228
27733
33666
35429
27438
8170
63410
38040
45389
37353
37024
50957
37994
36454
46080
43373
37395
10963
76058
50179
57452
47568
50050
50856
41992
39284
44521
43832
41153
17100




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

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







Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.539862583200514
beta0
gamma0.745833250671537

\begin{tabular}{lllllllll}
\hline
Estimated Parameters of Exponential Smoothing \tabularnewline
Parameter & Value \tabularnewline
alpha & 0.539862583200514 \tabularnewline
beta & 0 \tabularnewline
gamma & 0.745833250671537 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=166461&T=1

[TABLE]
[ROW][C]Estimated Parameters of Exponential Smoothing[/C][/ROW]
[ROW][C]Parameter[/C][C]Value[/C][/ROW]
[ROW][C]alpha[/C][C]0.539862583200514[/C][/ROW]
[ROW][C]beta[/C][C]0[/C][/ROW]
[ROW][C]gamma[/C][C]0.745833250671537[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=166461&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=166461&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.539862583200514
beta0
gamma0.745833250671537







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
136818467583.3229318951600.677068104851
145053050346.619029349183.380970650964
154722147181.084452468239.9155475317966
164175641721.090351270434.9096487295683
174563345994.2662300528-361.266230052781
184813848788.9013856503-650.901385650279
193948638541.1617058299944.838294170098
203934141256.9861780551-1915.98617805513
214111739577.64529090471539.35470909526
224162941891.0376683898-262.03766838977
232972237501.4440341034-7779.4440341034
2470547705.77137930593-651.771379305931
255667657498.9656568246-822.965656824592
263487042224.5641755679-7354.56417556787
273511735743.9092878029-626.909287802933
283016931293.4229468596-1124.42294685958
293093633712.4340404568-2776.43404045683
303569934250.30690984941448.69309015063
313322828236.15957628374991.84042371632
322773331878.9293811419-4145.92938114189
333366630037.37003739393628.6299626061
343542932671.17239929122757.82760070878
352743828284.8943049087-846.894304908703
3681706787.407987312371382.59201268763
376341060452.97744220462957.02255779543
383804043104.6872484937-5064.6872484937
394538940140.83304551865248.1669544814
403735337735.0349811526-382.034981152581
413702440519.9872935448-3495.9872935448
425095742928.36388903248028.63611096761
433799439641.5763308002-1647.57633080017
443645436027.3356015519426.664398448105
454608040098.15961866985981.84038133018
464337343764.3151467551-391.315146755122
473739534724.02574546682670.97425453316
48109639475.824934040561487.17506595944
497605878861.3911665121-2803.39116651208
505017950591.9004056622-412.900405662222
515745254529.78738358362922.21261641638
524756847120.5805849614447.419415038632
535005049723.0977562049326.902243795077
545085660562.06101674-9706.06101673997
554199243205.7237386836-1213.72373868356
563928440306.6504542992-1022.65045429916
574452145863.4797320323-1342.4797320323
584383243396.9985652448435.001434755184
594115335778.85021410635374.14978589372
601710010374.84173621626725.15826378385

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
13 & 68184 & 67583.3229318951 & 600.677068104851 \tabularnewline
14 & 50530 & 50346.619029349 & 183.380970650964 \tabularnewline
15 & 47221 & 47181.0844524682 & 39.9155475317966 \tabularnewline
16 & 41756 & 41721.0903512704 & 34.9096487295683 \tabularnewline
17 & 45633 & 45994.2662300528 & -361.266230052781 \tabularnewline
18 & 48138 & 48788.9013856503 & -650.901385650279 \tabularnewline
19 & 39486 & 38541.1617058299 & 944.838294170098 \tabularnewline
20 & 39341 & 41256.9861780551 & -1915.98617805513 \tabularnewline
21 & 41117 & 39577.6452909047 & 1539.35470909526 \tabularnewline
22 & 41629 & 41891.0376683898 & -262.03766838977 \tabularnewline
23 & 29722 & 37501.4440341034 & -7779.4440341034 \tabularnewline
24 & 7054 & 7705.77137930593 & -651.771379305931 \tabularnewline
25 & 56676 & 57498.9656568246 & -822.965656824592 \tabularnewline
26 & 34870 & 42224.5641755679 & -7354.56417556787 \tabularnewline
27 & 35117 & 35743.9092878029 & -626.909287802933 \tabularnewline
28 & 30169 & 31293.4229468596 & -1124.42294685958 \tabularnewline
29 & 30936 & 33712.4340404568 & -2776.43404045683 \tabularnewline
30 & 35699 & 34250.3069098494 & 1448.69309015063 \tabularnewline
31 & 33228 & 28236.1595762837 & 4991.84042371632 \tabularnewline
32 & 27733 & 31878.9293811419 & -4145.92938114189 \tabularnewline
33 & 33666 & 30037.3700373939 & 3628.6299626061 \tabularnewline
34 & 35429 & 32671.1723992912 & 2757.82760070878 \tabularnewline
35 & 27438 & 28284.8943049087 & -846.894304908703 \tabularnewline
36 & 8170 & 6787.40798731237 & 1382.59201268763 \tabularnewline
37 & 63410 & 60452.9774422046 & 2957.02255779543 \tabularnewline
38 & 38040 & 43104.6872484937 & -5064.6872484937 \tabularnewline
39 & 45389 & 40140.8330455186 & 5248.1669544814 \tabularnewline
40 & 37353 & 37735.0349811526 & -382.034981152581 \tabularnewline
41 & 37024 & 40519.9872935448 & -3495.9872935448 \tabularnewline
42 & 50957 & 42928.3638890324 & 8028.63611096761 \tabularnewline
43 & 37994 & 39641.5763308002 & -1647.57633080017 \tabularnewline
44 & 36454 & 36027.3356015519 & 426.664398448105 \tabularnewline
45 & 46080 & 40098.1596186698 & 5981.84038133018 \tabularnewline
46 & 43373 & 43764.3151467551 & -391.315146755122 \tabularnewline
47 & 37395 & 34724.0257454668 & 2670.97425453316 \tabularnewline
48 & 10963 & 9475.82493404056 & 1487.17506595944 \tabularnewline
49 & 76058 & 78861.3911665121 & -2803.39116651208 \tabularnewline
50 & 50179 & 50591.9004056622 & -412.900405662222 \tabularnewline
51 & 57452 & 54529.7873835836 & 2922.21261641638 \tabularnewline
52 & 47568 & 47120.5805849614 & 447.419415038632 \tabularnewline
53 & 50050 & 49723.0977562049 & 326.902243795077 \tabularnewline
54 & 50856 & 60562.06101674 & -9706.06101673997 \tabularnewline
55 & 41992 & 43205.7237386836 & -1213.72373868356 \tabularnewline
56 & 39284 & 40306.6504542992 & -1022.65045429916 \tabularnewline
57 & 44521 & 45863.4797320323 & -1342.4797320323 \tabularnewline
58 & 43832 & 43396.9985652448 & 435.001434755184 \tabularnewline
59 & 41153 & 35778.8502141063 & 5374.14978589372 \tabularnewline
60 & 17100 & 10374.8417362162 & 6725.15826378385 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=166461&T=2

[TABLE]
[ROW][C]Interpolation Forecasts of Exponential Smoothing[/C][/ROW]
[ROW][C]t[/C][C]Observed[/C][C]Fitted[/C][C]Residuals[/C][/ROW]
[ROW][C]13[/C][C]68184[/C][C]67583.3229318951[/C][C]600.677068104851[/C][/ROW]
[ROW][C]14[/C][C]50530[/C][C]50346.619029349[/C][C]183.380970650964[/C][/ROW]
[ROW][C]15[/C][C]47221[/C][C]47181.0844524682[/C][C]39.9155475317966[/C][/ROW]
[ROW][C]16[/C][C]41756[/C][C]41721.0903512704[/C][C]34.9096487295683[/C][/ROW]
[ROW][C]17[/C][C]45633[/C][C]45994.2662300528[/C][C]-361.266230052781[/C][/ROW]
[ROW][C]18[/C][C]48138[/C][C]48788.9013856503[/C][C]-650.901385650279[/C][/ROW]
[ROW][C]19[/C][C]39486[/C][C]38541.1617058299[/C][C]944.838294170098[/C][/ROW]
[ROW][C]20[/C][C]39341[/C][C]41256.9861780551[/C][C]-1915.98617805513[/C][/ROW]
[ROW][C]21[/C][C]41117[/C][C]39577.6452909047[/C][C]1539.35470909526[/C][/ROW]
[ROW][C]22[/C][C]41629[/C][C]41891.0376683898[/C][C]-262.03766838977[/C][/ROW]
[ROW][C]23[/C][C]29722[/C][C]37501.4440341034[/C][C]-7779.4440341034[/C][/ROW]
[ROW][C]24[/C][C]7054[/C][C]7705.77137930593[/C][C]-651.771379305931[/C][/ROW]
[ROW][C]25[/C][C]56676[/C][C]57498.9656568246[/C][C]-822.965656824592[/C][/ROW]
[ROW][C]26[/C][C]34870[/C][C]42224.5641755679[/C][C]-7354.56417556787[/C][/ROW]
[ROW][C]27[/C][C]35117[/C][C]35743.9092878029[/C][C]-626.909287802933[/C][/ROW]
[ROW][C]28[/C][C]30169[/C][C]31293.4229468596[/C][C]-1124.42294685958[/C][/ROW]
[ROW][C]29[/C][C]30936[/C][C]33712.4340404568[/C][C]-2776.43404045683[/C][/ROW]
[ROW][C]30[/C][C]35699[/C][C]34250.3069098494[/C][C]1448.69309015063[/C][/ROW]
[ROW][C]31[/C][C]33228[/C][C]28236.1595762837[/C][C]4991.84042371632[/C][/ROW]
[ROW][C]32[/C][C]27733[/C][C]31878.9293811419[/C][C]-4145.92938114189[/C][/ROW]
[ROW][C]33[/C][C]33666[/C][C]30037.3700373939[/C][C]3628.6299626061[/C][/ROW]
[ROW][C]34[/C][C]35429[/C][C]32671.1723992912[/C][C]2757.82760070878[/C][/ROW]
[ROW][C]35[/C][C]27438[/C][C]28284.8943049087[/C][C]-846.894304908703[/C][/ROW]
[ROW][C]36[/C][C]8170[/C][C]6787.40798731237[/C][C]1382.59201268763[/C][/ROW]
[ROW][C]37[/C][C]63410[/C][C]60452.9774422046[/C][C]2957.02255779543[/C][/ROW]
[ROW][C]38[/C][C]38040[/C][C]43104.6872484937[/C][C]-5064.6872484937[/C][/ROW]
[ROW][C]39[/C][C]45389[/C][C]40140.8330455186[/C][C]5248.1669544814[/C][/ROW]
[ROW][C]40[/C][C]37353[/C][C]37735.0349811526[/C][C]-382.034981152581[/C][/ROW]
[ROW][C]41[/C][C]37024[/C][C]40519.9872935448[/C][C]-3495.9872935448[/C][/ROW]
[ROW][C]42[/C][C]50957[/C][C]42928.3638890324[/C][C]8028.63611096761[/C][/ROW]
[ROW][C]43[/C][C]37994[/C][C]39641.5763308002[/C][C]-1647.57633080017[/C][/ROW]
[ROW][C]44[/C][C]36454[/C][C]36027.3356015519[/C][C]426.664398448105[/C][/ROW]
[ROW][C]45[/C][C]46080[/C][C]40098.1596186698[/C][C]5981.84038133018[/C][/ROW]
[ROW][C]46[/C][C]43373[/C][C]43764.3151467551[/C][C]-391.315146755122[/C][/ROW]
[ROW][C]47[/C][C]37395[/C][C]34724.0257454668[/C][C]2670.97425453316[/C][/ROW]
[ROW][C]48[/C][C]10963[/C][C]9475.82493404056[/C][C]1487.17506595944[/C][/ROW]
[ROW][C]49[/C][C]76058[/C][C]78861.3911665121[/C][C]-2803.39116651208[/C][/ROW]
[ROW][C]50[/C][C]50179[/C][C]50591.9004056622[/C][C]-412.900405662222[/C][/ROW]
[ROW][C]51[/C][C]57452[/C][C]54529.7873835836[/C][C]2922.21261641638[/C][/ROW]
[ROW][C]52[/C][C]47568[/C][C]47120.5805849614[/C][C]447.419415038632[/C][/ROW]
[ROW][C]53[/C][C]50050[/C][C]49723.0977562049[/C][C]326.902243795077[/C][/ROW]
[ROW][C]54[/C][C]50856[/C][C]60562.06101674[/C][C]-9706.06101673997[/C][/ROW]
[ROW][C]55[/C][C]41992[/C][C]43205.7237386836[/C][C]-1213.72373868356[/C][/ROW]
[ROW][C]56[/C][C]39284[/C][C]40306.6504542992[/C][C]-1022.65045429916[/C][/ROW]
[ROW][C]57[/C][C]44521[/C][C]45863.4797320323[/C][C]-1342.4797320323[/C][/ROW]
[ROW][C]58[/C][C]43832[/C][C]43396.9985652448[/C][C]435.001434755184[/C][/ROW]
[ROW][C]59[/C][C]41153[/C][C]35778.8502141063[/C][C]5374.14978589372[/C][/ROW]
[ROW][C]60[/C][C]17100[/C][C]10374.8417362162[/C][C]6725.15826378385[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=166461&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=166461&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
136818467583.3229318951600.677068104851
145053050346.619029349183.380970650964
154722147181.084452468239.9155475317966
164175641721.090351270434.9096487295683
174563345994.2662300528-361.266230052781
184813848788.9013856503-650.901385650279
193948638541.1617058299944.838294170098
203934141256.9861780551-1915.98617805513
214111739577.64529090471539.35470909526
224162941891.0376683898-262.03766838977
232972237501.4440341034-7779.4440341034
2470547705.77137930593-651.771379305931
255667657498.9656568246-822.965656824592
263487042224.5641755679-7354.56417556787
273511735743.9092878029-626.909287802933
283016931293.4229468596-1124.42294685958
293093633712.4340404568-2776.43404045683
303569934250.30690984941448.69309015063
313322828236.15957628374991.84042371632
322773331878.9293811419-4145.92938114189
333366630037.37003739393628.6299626061
343542932671.17239929122757.82760070878
352743828284.8943049087-846.894304908703
3681706787.407987312371382.59201268763
376341060452.97744220462957.02255779543
383804043104.6872484937-5064.6872484937
394538940140.83304551865248.1669544814
403735337735.0349811526-382.034981152581
413702440519.9872935448-3495.9872935448
425095742928.36388903248028.63611096761
433799439641.5763308002-1647.57633080017
443645436027.3356015519426.664398448105
454608040098.15961866985981.84038133018
464337343764.3151467551-391.315146755122
473739534724.02574546682670.97425453316
48109639475.824934040561487.17506595944
497605878861.3911665121-2803.39116651208
505017950591.9004056622-412.900405662222
515745254529.78738358362922.21261641638
524756847120.5805849614447.419415038632
535005049723.0977562049326.902243795077
545085660562.06101674-9706.06101673997
554199243205.7237386836-1213.72373868356
563928440306.6504542992-1022.65045429916
574452145863.4797320323-1342.4797320323
584383243396.9985652448435.001434755184
594115335778.85021410635374.14978589372
601710010374.84173621626725.15826378385







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
61101098.89540492395034.7944603279107162.996349519
6266771.996373208660232.185556956873311.8071894605
6373788.034548920665985.393025290581590.6760725508
6461078.925273016853159.916703931468997.9338421022
6564060.60469780755092.537042323773028.6723532903
6672904.270901364262363.11635964283445.4254430865
6759992.48979667950172.87305327869812.10654008
6856884.628551566746747.31250841367021.9445947205
6965535.29080073753593.324154955877477.2574465182
7063874.795887332651611.938708918976137.6530657464
7154689.403715395843281.776690610766097.030740181
7216308.681220233213061.432468610919555.9299718555

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
61 & 101098.895404923 & 95034.7944603279 & 107162.996349519 \tabularnewline
62 & 66771.9963732086 & 60232.1855569568 & 73311.8071894605 \tabularnewline
63 & 73788.0345489206 & 65985.3930252905 & 81590.6760725508 \tabularnewline
64 & 61078.9252730168 & 53159.9167039314 & 68997.9338421022 \tabularnewline
65 & 64060.604697807 & 55092.5370423237 & 73028.6723532903 \tabularnewline
66 & 72904.2709013642 & 62363.116359642 & 83445.4254430865 \tabularnewline
67 & 59992.489796679 & 50172.873053278 & 69812.10654008 \tabularnewline
68 & 56884.6285515667 & 46747.312508413 & 67021.9445947205 \tabularnewline
69 & 65535.290800737 & 53593.3241549558 & 77477.2574465182 \tabularnewline
70 & 63874.7958873326 & 51611.9387089189 & 76137.6530657464 \tabularnewline
71 & 54689.4037153958 & 43281.7766906107 & 66097.030740181 \tabularnewline
72 & 16308.6812202332 & 13061.4324686109 & 19555.9299718555 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=166461&T=3

[TABLE]
[ROW][C]Extrapolation Forecasts of Exponential Smoothing[/C][/ROW]
[ROW][C]t[/C][C]Forecast[/C][C]95% Lower Bound[/C][C]95% Upper Bound[/C][/ROW]
[ROW][C]61[/C][C]101098.895404923[/C][C]95034.7944603279[/C][C]107162.996349519[/C][/ROW]
[ROW][C]62[/C][C]66771.9963732086[/C][C]60232.1855569568[/C][C]73311.8071894605[/C][/ROW]
[ROW][C]63[/C][C]73788.0345489206[/C][C]65985.3930252905[/C][C]81590.6760725508[/C][/ROW]
[ROW][C]64[/C][C]61078.9252730168[/C][C]53159.9167039314[/C][C]68997.9338421022[/C][/ROW]
[ROW][C]65[/C][C]64060.604697807[/C][C]55092.5370423237[/C][C]73028.6723532903[/C][/ROW]
[ROW][C]66[/C][C]72904.2709013642[/C][C]62363.116359642[/C][C]83445.4254430865[/C][/ROW]
[ROW][C]67[/C][C]59992.489796679[/C][C]50172.873053278[/C][C]69812.10654008[/C][/ROW]
[ROW][C]68[/C][C]56884.6285515667[/C][C]46747.312508413[/C][C]67021.9445947205[/C][/ROW]
[ROW][C]69[/C][C]65535.290800737[/C][C]53593.3241549558[/C][C]77477.2574465182[/C][/ROW]
[ROW][C]70[/C][C]63874.7958873326[/C][C]51611.9387089189[/C][C]76137.6530657464[/C][/ROW]
[ROW][C]71[/C][C]54689.4037153958[/C][C]43281.7766906107[/C][C]66097.030740181[/C][/ROW]
[ROW][C]72[/C][C]16308.6812202332[/C][C]13061.4324686109[/C][C]19555.9299718555[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=166461&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=166461&T=3

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
61101098.89540492395034.7944603279107162.996349519
6266771.996373208660232.185556956873311.8071894605
6373788.034548920665985.393025290581590.6760725508
6461078.925273016853159.916703931468997.9338421022
6564060.60469780755092.537042323773028.6723532903
6672904.270901364262363.11635964283445.4254430865
6759992.48979667950172.87305327869812.10654008
6856884.628551566746747.31250841367021.9445947205
6965535.29080073753593.324154955877477.2574465182
7063874.795887332651611.938708918976137.6530657464
7154689.403715395843281.776690610766097.030740181
7216308.681220233213061.432468610919555.9299718555



Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
R code (references can be found in the software module):
par1 <- as.numeric(par1)
if (par2 == 'Single') K <- 1
if (par2 == 'Double') K <- 2
if (par2 == 'Triple') K <- par1
nx <- length(x)
nxmK <- nx - K
x <- ts(x, frequency = par1)
if (par2 == 'Single') fit <- HoltWinters(x, gamma=F, beta=F)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=F)
if (par2 == 'Triple') fit <- HoltWinters(x, seasonal=par3)
fit
myresid <- x - fit$fitted[,'xhat']
bitmap(file='test1.png')
op <- par(mfrow=c(2,1))
plot(fit,ylab='Observed (black) / Fitted (red)',main='Interpolation Fit of Exponential Smoothing')
plot(myresid,ylab='Residuals',main='Interpolation Prediction Errors')
par(op)
dev.off()
bitmap(file='test2.png')
p <- predict(fit, par1, prediction.interval=TRUE)
np <- length(p[,1])
plot(fit,p,ylab='Observed (black) / Fitted (red)',main='Extrapolation Fit of Exponential Smoothing')
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(myresid),lag.max = nx/2,main='Residual ACF')
spectrum(myresid,main='Residals Periodogram')
cpgram(myresid,main='Residal Cumulative Periodogram')
qqnorm(myresid,main='Residual Normal QQ Plot')
qqline(myresid)
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Estimated Parameters of Exponential Smoothing',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'Value',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'alpha',header=TRUE)
a<-table.element(a,fit$alpha)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'beta',header=TRUE)
a<-table.element(a,fit$beta)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'gamma',header=TRUE)
a<-table.element(a,fit$gamma)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Interpolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observed',header=TRUE)
a<-table.element(a,'Fitted',header=TRUE)
a<-table.element(a,'Residuals',header=TRUE)
a<-table.row.end(a)
for (i in 1:nxmK) {
a<-table.row.start(a)
a<-table.element(a,i+K,header=TRUE)
a<-table.element(a,x[i+K])
a<-table.element(a,fit$fitted[i,'xhat'])
a<-table.element(a,myresid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Extrapolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Forecast',header=TRUE)
a<-table.element(a,'95% Lower Bound',header=TRUE)
a<-table.element(a,'95% Upper Bound',header=TRUE)
a<-table.row.end(a)
for (i in 1:np) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,p[i,'fit'])
a<-table.element(a,p[i,'lwr'])
a<-table.element(a,p[i,'upr'])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')