Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_exponentialsmoothing.wasp
Title produced by softwareExponential Smoothing
Date of computationWed, 08 Dec 2010 20:25:33 +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/2010/Dec/08/t12918398350nbw28lh46a8ryc.htm/, Retrieved Fri, 03 May 2024 11:29:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=107123, Retrieved Fri, 03 May 2024 11:29:12 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact177
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Exponential Smoothing] [exponential smoot...] [2010-12-08 09:17:39] [d6e648f00513dd750579ba7880c5fbf5]
- R       [Exponential Smoothing] [] [2010-12-08 14:59:13] [dcd1a35a8985187cb1e9de87792355b2]
-    D        [Exponential Smoothing] [workshop 8: minit...] [2010-12-08 20:25:33] [95216a33d813bfae7986b08ea3322626] [Current]
Feedback Forum

Post a new message
Dataseries X:
33
24
24
31
25
28
24
25
16
17
11
12
39
19
14
15
7
12
12
14
9
8
4
7
3
5
0
-2
6
11
9
17
21
21
41
57
65
68
73
71
71
70
69
65
57
57
57
55
65
65
64
60
43
47
40
31
27
24
23
17




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107123&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' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107123&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107123&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' @ 72.249.127.135







Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.623322017241314
beta0.395355498337461
gamma1

\begin{tabular}{lllllllll}
\hline
Estimated Parameters of Exponential Smoothing \tabularnewline
Parameter & Value \tabularnewline
alpha & 0.623322017241314 \tabularnewline
beta & 0.395355498337461 \tabularnewline
gamma & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107123&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.623322017241314[/C][/ROW]
[ROW][C]beta[/C][C]0.395355498337461[/C][/ROW]
[ROW][C]gamma[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107123&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107123&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.623322017241314
beta0.395355498337461
gamma1







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133945.8392094017094-6.83920940170941
141919.8960120850976-0.89601208509757
151412.22819952430071.77180047569934
161512.57659143778212.42340856221786
1774.928354767035612.07164523296439
181210.4047129812051.59528701879499
191213.2689459200521-1.26894592005214
201412.20179492401381.79820507598615
2194.156271826906934.84372817309307
2289.6610819392656-1.6610819392656
2344.03528731155333-0.0352873115533328
2476.414190284996410.585809715003589
25332.4984204152193-29.4984204152193
265-9.8324020684551814.8324020684552
270-7.317740503206347.31774050320634
28-2-2.526587608560320.52658760856032
296-11.216688778016217.2166887780162
30117.52569257573853.4743074242615
31914.9505386295644-5.95053862956441
321715.43514526346471.56485473653527
332111.64841504245009.35158495754996
342121.8808047890448-0.880804789044824
354121.914013783471419.0859862165286
365745.717947616861511.2820523831385
376579.0455962674453-14.0455962674453
386878.761684143413-10.7616841434130
397371.90151317108621.09848682891376
407178.13448878202-7.1344887820201
417176.9444138328207-5.94441383282071
427076.3543894470259-6.35438944702591
436971.961409300004-2.96140930000405
446575.7354606891368-10.7354606891368
455762.778920986599-5.77892098659897
465751.56130755275305.43869244724695
475756.44747673999830.552523260001699
485554.58508141432480.414918585675196
496557.74616618148927.25383381851085
506563.37206186945551.6279381305445
516463.15172874649960.848271253500378
526060.515545486921-0.515545486920971
534359.9185965680545-16.9185965680545
544745.64840217930691.35159782069307
554042.5505186056832-2.55051860568317
563138.9673546934143-7.9673546934143
572725.60039210060721.39960789939278
582420.84891014903193.15108985096805
592319.67107972466763.32892027533239
601717.3740649723405-0.374064972340499

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
13 & 39 & 45.8392094017094 & -6.83920940170941 \tabularnewline
14 & 19 & 19.8960120850976 & -0.89601208509757 \tabularnewline
15 & 14 & 12.2281995243007 & 1.77180047569934 \tabularnewline
16 & 15 & 12.5765914377821 & 2.42340856221786 \tabularnewline
17 & 7 & 4.92835476703561 & 2.07164523296439 \tabularnewline
18 & 12 & 10.404712981205 & 1.59528701879499 \tabularnewline
19 & 12 & 13.2689459200521 & -1.26894592005214 \tabularnewline
20 & 14 & 12.2017949240138 & 1.79820507598615 \tabularnewline
21 & 9 & 4.15627182690693 & 4.84372817309307 \tabularnewline
22 & 8 & 9.6610819392656 & -1.6610819392656 \tabularnewline
23 & 4 & 4.03528731155333 & -0.0352873115533328 \tabularnewline
24 & 7 & 6.41419028499641 & 0.585809715003589 \tabularnewline
25 & 3 & 32.4984204152193 & -29.4984204152193 \tabularnewline
26 & 5 & -9.83240206845518 & 14.8324020684552 \tabularnewline
27 & 0 & -7.31774050320634 & 7.31774050320634 \tabularnewline
28 & -2 & -2.52658760856032 & 0.52658760856032 \tabularnewline
29 & 6 & -11.2166887780162 & 17.2166887780162 \tabularnewline
30 & 11 & 7.5256925757385 & 3.4743074242615 \tabularnewline
31 & 9 & 14.9505386295644 & -5.95053862956441 \tabularnewline
32 & 17 & 15.4351452634647 & 1.56485473653527 \tabularnewline
33 & 21 & 11.6484150424500 & 9.35158495754996 \tabularnewline
34 & 21 & 21.8808047890448 & -0.880804789044824 \tabularnewline
35 & 41 & 21.9140137834714 & 19.0859862165286 \tabularnewline
36 & 57 & 45.7179476168615 & 11.2820523831385 \tabularnewline
37 & 65 & 79.0455962674453 & -14.0455962674453 \tabularnewline
38 & 68 & 78.761684143413 & -10.7616841434130 \tabularnewline
39 & 73 & 71.9015131710862 & 1.09848682891376 \tabularnewline
40 & 71 & 78.13448878202 & -7.1344887820201 \tabularnewline
41 & 71 & 76.9444138328207 & -5.94441383282071 \tabularnewline
42 & 70 & 76.3543894470259 & -6.35438944702591 \tabularnewline
43 & 69 & 71.961409300004 & -2.96140930000405 \tabularnewline
44 & 65 & 75.7354606891368 & -10.7354606891368 \tabularnewline
45 & 57 & 62.778920986599 & -5.77892098659897 \tabularnewline
46 & 57 & 51.5613075527530 & 5.43869244724695 \tabularnewline
47 & 57 & 56.4474767399983 & 0.552523260001699 \tabularnewline
48 & 55 & 54.5850814143248 & 0.414918585675196 \tabularnewline
49 & 65 & 57.7461661814892 & 7.25383381851085 \tabularnewline
50 & 65 & 63.3720618694555 & 1.6279381305445 \tabularnewline
51 & 64 & 63.1517287464996 & 0.848271253500378 \tabularnewline
52 & 60 & 60.515545486921 & -0.515545486920971 \tabularnewline
53 & 43 & 59.9185965680545 & -16.9185965680545 \tabularnewline
54 & 47 & 45.6484021793069 & 1.35159782069307 \tabularnewline
55 & 40 & 42.5505186056832 & -2.55051860568317 \tabularnewline
56 & 31 & 38.9673546934143 & -7.9673546934143 \tabularnewline
57 & 27 & 25.6003921006072 & 1.39960789939278 \tabularnewline
58 & 24 & 20.8489101490319 & 3.15108985096805 \tabularnewline
59 & 23 & 19.6710797246676 & 3.32892027533239 \tabularnewline
60 & 17 & 17.3740649723405 & -0.374064972340499 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107123&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]39[/C][C]45.8392094017094[/C][C]-6.83920940170941[/C][/ROW]
[ROW][C]14[/C][C]19[/C][C]19.8960120850976[/C][C]-0.89601208509757[/C][/ROW]
[ROW][C]15[/C][C]14[/C][C]12.2281995243007[/C][C]1.77180047569934[/C][/ROW]
[ROW][C]16[/C][C]15[/C][C]12.5765914377821[/C][C]2.42340856221786[/C][/ROW]
[ROW][C]17[/C][C]7[/C][C]4.92835476703561[/C][C]2.07164523296439[/C][/ROW]
[ROW][C]18[/C][C]12[/C][C]10.404712981205[/C][C]1.59528701879499[/C][/ROW]
[ROW][C]19[/C][C]12[/C][C]13.2689459200521[/C][C]-1.26894592005214[/C][/ROW]
[ROW][C]20[/C][C]14[/C][C]12.2017949240138[/C][C]1.79820507598615[/C][/ROW]
[ROW][C]21[/C][C]9[/C][C]4.15627182690693[/C][C]4.84372817309307[/C][/ROW]
[ROW][C]22[/C][C]8[/C][C]9.6610819392656[/C][C]-1.6610819392656[/C][/ROW]
[ROW][C]23[/C][C]4[/C][C]4.03528731155333[/C][C]-0.0352873115533328[/C][/ROW]
[ROW][C]24[/C][C]7[/C][C]6.41419028499641[/C][C]0.585809715003589[/C][/ROW]
[ROW][C]25[/C][C]3[/C][C]32.4984204152193[/C][C]-29.4984204152193[/C][/ROW]
[ROW][C]26[/C][C]5[/C][C]-9.83240206845518[/C][C]14.8324020684552[/C][/ROW]
[ROW][C]27[/C][C]0[/C][C]-7.31774050320634[/C][C]7.31774050320634[/C][/ROW]
[ROW][C]28[/C][C]-2[/C][C]-2.52658760856032[/C][C]0.52658760856032[/C][/ROW]
[ROW][C]29[/C][C]6[/C][C]-11.2166887780162[/C][C]17.2166887780162[/C][/ROW]
[ROW][C]30[/C][C]11[/C][C]7.5256925757385[/C][C]3.4743074242615[/C][/ROW]
[ROW][C]31[/C][C]9[/C][C]14.9505386295644[/C][C]-5.95053862956441[/C][/ROW]
[ROW][C]32[/C][C]17[/C][C]15.4351452634647[/C][C]1.56485473653527[/C][/ROW]
[ROW][C]33[/C][C]21[/C][C]11.6484150424500[/C][C]9.35158495754996[/C][/ROW]
[ROW][C]34[/C][C]21[/C][C]21.8808047890448[/C][C]-0.880804789044824[/C][/ROW]
[ROW][C]35[/C][C]41[/C][C]21.9140137834714[/C][C]19.0859862165286[/C][/ROW]
[ROW][C]36[/C][C]57[/C][C]45.7179476168615[/C][C]11.2820523831385[/C][/ROW]
[ROW][C]37[/C][C]65[/C][C]79.0455962674453[/C][C]-14.0455962674453[/C][/ROW]
[ROW][C]38[/C][C]68[/C][C]78.761684143413[/C][C]-10.7616841434130[/C][/ROW]
[ROW][C]39[/C][C]73[/C][C]71.9015131710862[/C][C]1.09848682891376[/C][/ROW]
[ROW][C]40[/C][C]71[/C][C]78.13448878202[/C][C]-7.1344887820201[/C][/ROW]
[ROW][C]41[/C][C]71[/C][C]76.9444138328207[/C][C]-5.94441383282071[/C][/ROW]
[ROW][C]42[/C][C]70[/C][C]76.3543894470259[/C][C]-6.35438944702591[/C][/ROW]
[ROW][C]43[/C][C]69[/C][C]71.961409300004[/C][C]-2.96140930000405[/C][/ROW]
[ROW][C]44[/C][C]65[/C][C]75.7354606891368[/C][C]-10.7354606891368[/C][/ROW]
[ROW][C]45[/C][C]57[/C][C]62.778920986599[/C][C]-5.77892098659897[/C][/ROW]
[ROW][C]46[/C][C]57[/C][C]51.5613075527530[/C][C]5.43869244724695[/C][/ROW]
[ROW][C]47[/C][C]57[/C][C]56.4474767399983[/C][C]0.552523260001699[/C][/ROW]
[ROW][C]48[/C][C]55[/C][C]54.5850814143248[/C][C]0.414918585675196[/C][/ROW]
[ROW][C]49[/C][C]65[/C][C]57.7461661814892[/C][C]7.25383381851085[/C][/ROW]
[ROW][C]50[/C][C]65[/C][C]63.3720618694555[/C][C]1.6279381305445[/C][/ROW]
[ROW][C]51[/C][C]64[/C][C]63.1517287464996[/C][C]0.848271253500378[/C][/ROW]
[ROW][C]52[/C][C]60[/C][C]60.515545486921[/C][C]-0.515545486920971[/C][/ROW]
[ROW][C]53[/C][C]43[/C][C]59.9185965680545[/C][C]-16.9185965680545[/C][/ROW]
[ROW][C]54[/C][C]47[/C][C]45.6484021793069[/C][C]1.35159782069307[/C][/ROW]
[ROW][C]55[/C][C]40[/C][C]42.5505186056832[/C][C]-2.55051860568317[/C][/ROW]
[ROW][C]56[/C][C]31[/C][C]38.9673546934143[/C][C]-7.9673546934143[/C][/ROW]
[ROW][C]57[/C][C]27[/C][C]25.6003921006072[/C][C]1.39960789939278[/C][/ROW]
[ROW][C]58[/C][C]24[/C][C]20.8489101490319[/C][C]3.15108985096805[/C][/ROW]
[ROW][C]59[/C][C]23[/C][C]19.6710797246676[/C][C]3.32892027533239[/C][/ROW]
[ROW][C]60[/C][C]17[/C][C]17.3740649723405[/C][C]-0.374064972340499[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107123&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107123&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
133945.8392094017094-6.83920940170941
141919.8960120850976-0.89601208509757
151412.22819952430071.77180047569934
161512.57659143778212.42340856221786
1774.928354767035612.07164523296439
181210.4047129812051.59528701879499
191213.2689459200521-1.26894592005214
201412.20179492401381.79820507598615
2194.156271826906934.84372817309307
2289.6610819392656-1.6610819392656
2344.03528731155333-0.0352873115533328
2476.414190284996410.585809715003589
25332.4984204152193-29.4984204152193
265-9.8324020684551814.8324020684552
270-7.317740503206347.31774050320634
28-2-2.526587608560320.52658760856032
296-11.216688778016217.2166887780162
30117.52569257573853.4743074242615
31914.9505386295644-5.95053862956441
321715.43514526346471.56485473653527
332111.64841504245009.35158495754996
342121.8808047890448-0.880804789044824
354121.914013783471419.0859862165286
365745.717947616861511.2820523831385
376579.0455962674453-14.0455962674453
386878.761684143413-10.7616841434130
397371.90151317108621.09848682891376
407178.13448878202-7.1344887820201
417176.9444138328207-5.94441383282071
427076.3543894470259-6.35438944702591
436971.961409300004-2.96140930000405
446575.7354606891368-10.7354606891368
455762.778920986599-5.77892098659897
465751.56130755275305.43869244724695
475756.44747673999830.552523260001699
485554.58508141432480.414918585675196
496557.74616618148927.25383381851085
506563.37206186945551.6279381305445
516463.15172874649960.848271253500378
526060.515545486921-0.515545486920971
534359.9185965680545-16.9185965680545
544745.64840217930691.35159782069307
554042.5505186056832-2.55051860568317
563138.9673546934143-7.9673546934143
572725.60039210060721.39960789939278
582420.84891014903193.15108985096805
592319.67107972466763.32892027533239
601717.3740649723405-0.374064972340499







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
6120.31161934105944.0703873660572536.5528513160616
6215.2014915555701-6.323350604332336.7263337154726
639.17616834254956-18.965506731014437.3178434161135
640.79189943412365-35.009231526216536.5930303944638
65-10.2409387589134-54.565405596659234.0835280788325
66-7.4926775549548-61.091224618663946.1058695087543
67-13.6452206377149-77.192029077412749.9015878019829
68-17.7927965650271-91.906725291043556.3211321609893
69-20.8155811236241-106.07327975842464.4421175111759
70-24.2750136200530-121.21952002926372.6694927891567
71-26.6218267396906-135.76851287644682.5248593970644
72-32.4808460541769-154.32172062340489.36002851505

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
61 & 20.3116193410594 & 4.07038736605725 & 36.5528513160616 \tabularnewline
62 & 15.2014915555701 & -6.3233506043323 & 36.7263337154726 \tabularnewline
63 & 9.17616834254956 & -18.9655067310144 & 37.3178434161135 \tabularnewline
64 & 0.79189943412365 & -35.0092315262165 & 36.5930303944638 \tabularnewline
65 & -10.2409387589134 & -54.5654055966592 & 34.0835280788325 \tabularnewline
66 & -7.4926775549548 & -61.0912246186639 & 46.1058695087543 \tabularnewline
67 & -13.6452206377149 & -77.1920290774127 & 49.9015878019829 \tabularnewline
68 & -17.7927965650271 & -91.9067252910435 & 56.3211321609893 \tabularnewline
69 & -20.8155811236241 & -106.073279758424 & 64.4421175111759 \tabularnewline
70 & -24.2750136200530 & -121.219520029263 & 72.6694927891567 \tabularnewline
71 & -26.6218267396906 & -135.768512876446 & 82.5248593970644 \tabularnewline
72 & -32.4808460541769 & -154.321720623404 & 89.36002851505 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107123&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]20.3116193410594[/C][C]4.07038736605725[/C][C]36.5528513160616[/C][/ROW]
[ROW][C]62[/C][C]15.2014915555701[/C][C]-6.3233506043323[/C][C]36.7263337154726[/C][/ROW]
[ROW][C]63[/C][C]9.17616834254956[/C][C]-18.9655067310144[/C][C]37.3178434161135[/C][/ROW]
[ROW][C]64[/C][C]0.79189943412365[/C][C]-35.0092315262165[/C][C]36.5930303944638[/C][/ROW]
[ROW][C]65[/C][C]-10.2409387589134[/C][C]-54.5654055966592[/C][C]34.0835280788325[/C][/ROW]
[ROW][C]66[/C][C]-7.4926775549548[/C][C]-61.0912246186639[/C][C]46.1058695087543[/C][/ROW]
[ROW][C]67[/C][C]-13.6452206377149[/C][C]-77.1920290774127[/C][C]49.9015878019829[/C][/ROW]
[ROW][C]68[/C][C]-17.7927965650271[/C][C]-91.9067252910435[/C][C]56.3211321609893[/C][/ROW]
[ROW][C]69[/C][C]-20.8155811236241[/C][C]-106.073279758424[/C][C]64.4421175111759[/C][/ROW]
[ROW][C]70[/C][C]-24.2750136200530[/C][C]-121.219520029263[/C][C]72.6694927891567[/C][/ROW]
[ROW][C]71[/C][C]-26.6218267396906[/C][C]-135.768512876446[/C][C]82.5248593970644[/C][/ROW]
[ROW][C]72[/C][C]-32.4808460541769[/C][C]-154.321720623404[/C][C]89.36002851505[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107123&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107123&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
6120.31161934105944.0703873660572536.5528513160616
6215.2014915555701-6.323350604332336.7263337154726
639.17616834254956-18.965506731014437.3178434161135
640.79189943412365-35.009231526216536.5930303944638
65-10.2409387589134-54.565405596659234.0835280788325
66-7.4926775549548-61.091224618663946.1058695087543
67-13.6452206377149-77.192029077412749.9015878019829
68-17.7927965650271-91.906725291043556.3211321609893
69-20.8155811236241-106.07327975842464.4421175111759
70-24.2750136200530-121.21952002926372.6694927891567
71-26.6218267396906-135.76851287644682.5248593970644
72-32.4808460541769-154.32172062340489.36002851505



Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = additive ;
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = additive ;
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')