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 computationSat, 23 Nov 2013 05:34:00 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2013/Nov/23/t1385202967tgvt8nrh0sm3llc.htm/, Retrieved Fri, 03 May 2024 00:25:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=227776, Retrieved Fri, 03 May 2024 00:25:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsexponential smoothing
Estimated Impact124
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Exponential Smoothing] [WS8 ] [2013-11-23 10:34:00] [cb12e74fc4061aee4f622ffda5eef43c] [Current]
Feedback Forum

Post a new message
Dataseries X:
1954
2302
3054
2414
2226
2725
2589
3470
2400
3180
4009
3924
2072
2434
2956
2828
2687
2629
3150
4119
3030
3055
3821
4001
2529
2472
3134
2789
2758
2993
3282
3437
2804
3076
3782
3889
2271
2452
3084
2522
2769
3438
2839
3746
2632
2851
3871
3618
2389
2344
2678
2492
2858
2246
2800
3869
3007
3023
3907
4209




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=227776&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=227776&T=0

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







Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.251396120075275
beta0.0225305113746615
gamma0.381434888768265

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=227776&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.251396120075275
beta0.0225305113746615
gamma0.381434888768265







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1320721985.8426816239386.1573183760681
1424342342.7247108163391.2752891836717
1529562858.5353688392497.4646311607557
1628282758.704051195469.2959488045954
1726872673.2670674484213.732932551578
1826292648.52287480085-19.5228748008526
1931502831.80772202885318.192277971149
2041193809.25344920555309.746550794449
2130302844.33038355574185.66961644426
2230553687.51650616411-632.516506164108
2338214347.13951930246-526.139519302463
2440014137.77519622104-136.775196221037
2525292278.95585460911250.044145390887
2624722678.61572871157-206.615728711572
2731343119.7337168255914.2662831744146
2827892988.90067588491-199.900675884907
2927582816.35569392072-58.3556939207233
3029932760.01705464532232.982945354684
3132823100.6678511092181.3321488908
3234374037.9752145646-600.975214564598
3328042800.191813034323.80818696568485
3430763354.52171946646-278.521719466456
3537824126.0088595316-344.008859531603
3638894067.13952528617-178.139525286168
3722712301.66840519502-30.6684051950169
3824522492.06518380062-40.0651838006233
3930843030.7714142117553.2285857882534
4025222841.44664648034-319.446646480339
4127692671.4557361266597.5442638733534
4234382730.57286228093707.427137719068
4328393171.50904900648-332.509049006476
4437463749.10591679088-3.10591679087975
4526322830.55304907271-198.553049072708
4628513248.48288610344-397.482886103436
4738713965.78067700107-94.7806770010693
4836184012.75738584256-394.757385842564
4923892229.53998648518159.460013514816
5023442460.72919503093-116.729195030935
5126783002.04567498196-324.045674981957
5224922604.56750978847-112.567509788468
5328582599.93302316387258.066976836132
5422462868.74103490666-622.741034906664
5528002665.98468317462134.015316825378
5638693445.21910876994423.780891230057
5730072570.88933923604436.110660763959
5830233087.87690524614-64.8769052461394
5939073973.41803117336-66.4180311733617
6042093940.22199886631268.778001133693

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
13 & 2072 & 1985.84268162393 & 86.1573183760681 \tabularnewline
14 & 2434 & 2342.72471081633 & 91.2752891836717 \tabularnewline
15 & 2956 & 2858.53536883924 & 97.4646311607557 \tabularnewline
16 & 2828 & 2758.7040511954 & 69.2959488045954 \tabularnewline
17 & 2687 & 2673.26706744842 & 13.732932551578 \tabularnewline
18 & 2629 & 2648.52287480085 & -19.5228748008526 \tabularnewline
19 & 3150 & 2831.80772202885 & 318.192277971149 \tabularnewline
20 & 4119 & 3809.25344920555 & 309.746550794449 \tabularnewline
21 & 3030 & 2844.33038355574 & 185.66961644426 \tabularnewline
22 & 3055 & 3687.51650616411 & -632.516506164108 \tabularnewline
23 & 3821 & 4347.13951930246 & -526.139519302463 \tabularnewline
24 & 4001 & 4137.77519622104 & -136.775196221037 \tabularnewline
25 & 2529 & 2278.95585460911 & 250.044145390887 \tabularnewline
26 & 2472 & 2678.61572871157 & -206.615728711572 \tabularnewline
27 & 3134 & 3119.73371682559 & 14.2662831744146 \tabularnewline
28 & 2789 & 2988.90067588491 & -199.900675884907 \tabularnewline
29 & 2758 & 2816.35569392072 & -58.3556939207233 \tabularnewline
30 & 2993 & 2760.01705464532 & 232.982945354684 \tabularnewline
31 & 3282 & 3100.6678511092 & 181.3321488908 \tabularnewline
32 & 3437 & 4037.9752145646 & -600.975214564598 \tabularnewline
33 & 2804 & 2800.19181303432 & 3.80818696568485 \tabularnewline
34 & 3076 & 3354.52171946646 & -278.521719466456 \tabularnewline
35 & 3782 & 4126.0088595316 & -344.008859531603 \tabularnewline
36 & 3889 & 4067.13952528617 & -178.139525286168 \tabularnewline
37 & 2271 & 2301.66840519502 & -30.6684051950169 \tabularnewline
38 & 2452 & 2492.06518380062 & -40.0651838006233 \tabularnewline
39 & 3084 & 3030.77141421175 & 53.2285857882534 \tabularnewline
40 & 2522 & 2841.44664648034 & -319.446646480339 \tabularnewline
41 & 2769 & 2671.45573612665 & 97.5442638733534 \tabularnewline
42 & 3438 & 2730.57286228093 & 707.427137719068 \tabularnewline
43 & 2839 & 3171.50904900648 & -332.509049006476 \tabularnewline
44 & 3746 & 3749.10591679088 & -3.10591679087975 \tabularnewline
45 & 2632 & 2830.55304907271 & -198.553049072708 \tabularnewline
46 & 2851 & 3248.48288610344 & -397.482886103436 \tabularnewline
47 & 3871 & 3965.78067700107 & -94.7806770010693 \tabularnewline
48 & 3618 & 4012.75738584256 & -394.757385842564 \tabularnewline
49 & 2389 & 2229.53998648518 & 159.460013514816 \tabularnewline
50 & 2344 & 2460.72919503093 & -116.729195030935 \tabularnewline
51 & 2678 & 3002.04567498196 & -324.045674981957 \tabularnewline
52 & 2492 & 2604.56750978847 & -112.567509788468 \tabularnewline
53 & 2858 & 2599.93302316387 & 258.066976836132 \tabularnewline
54 & 2246 & 2868.74103490666 & -622.741034906664 \tabularnewline
55 & 2800 & 2665.98468317462 & 134.015316825378 \tabularnewline
56 & 3869 & 3445.21910876994 & 423.780891230057 \tabularnewline
57 & 3007 & 2570.88933923604 & 436.110660763959 \tabularnewline
58 & 3023 & 3087.87690524614 & -64.8769052461394 \tabularnewline
59 & 3907 & 3973.41803117336 & -66.4180311733617 \tabularnewline
60 & 4209 & 3940.22199886631 & 268.778001133693 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=227776&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]2072[/C][C]1985.84268162393[/C][C]86.1573183760681[/C][/ROW]
[ROW][C]14[/C][C]2434[/C][C]2342.72471081633[/C][C]91.2752891836717[/C][/ROW]
[ROW][C]15[/C][C]2956[/C][C]2858.53536883924[/C][C]97.4646311607557[/C][/ROW]
[ROW][C]16[/C][C]2828[/C][C]2758.7040511954[/C][C]69.2959488045954[/C][/ROW]
[ROW][C]17[/C][C]2687[/C][C]2673.26706744842[/C][C]13.732932551578[/C][/ROW]
[ROW][C]18[/C][C]2629[/C][C]2648.52287480085[/C][C]-19.5228748008526[/C][/ROW]
[ROW][C]19[/C][C]3150[/C][C]2831.80772202885[/C][C]318.192277971149[/C][/ROW]
[ROW][C]20[/C][C]4119[/C][C]3809.25344920555[/C][C]309.746550794449[/C][/ROW]
[ROW][C]21[/C][C]3030[/C][C]2844.33038355574[/C][C]185.66961644426[/C][/ROW]
[ROW][C]22[/C][C]3055[/C][C]3687.51650616411[/C][C]-632.516506164108[/C][/ROW]
[ROW][C]23[/C][C]3821[/C][C]4347.13951930246[/C][C]-526.139519302463[/C][/ROW]
[ROW][C]24[/C][C]4001[/C][C]4137.77519622104[/C][C]-136.775196221037[/C][/ROW]
[ROW][C]25[/C][C]2529[/C][C]2278.95585460911[/C][C]250.044145390887[/C][/ROW]
[ROW][C]26[/C][C]2472[/C][C]2678.61572871157[/C][C]-206.615728711572[/C][/ROW]
[ROW][C]27[/C][C]3134[/C][C]3119.73371682559[/C][C]14.2662831744146[/C][/ROW]
[ROW][C]28[/C][C]2789[/C][C]2988.90067588491[/C][C]-199.900675884907[/C][/ROW]
[ROW][C]29[/C][C]2758[/C][C]2816.35569392072[/C][C]-58.3556939207233[/C][/ROW]
[ROW][C]30[/C][C]2993[/C][C]2760.01705464532[/C][C]232.982945354684[/C][/ROW]
[ROW][C]31[/C][C]3282[/C][C]3100.6678511092[/C][C]181.3321488908[/C][/ROW]
[ROW][C]32[/C][C]3437[/C][C]4037.9752145646[/C][C]-600.975214564598[/C][/ROW]
[ROW][C]33[/C][C]2804[/C][C]2800.19181303432[/C][C]3.80818696568485[/C][/ROW]
[ROW][C]34[/C][C]3076[/C][C]3354.52171946646[/C][C]-278.521719466456[/C][/ROW]
[ROW][C]35[/C][C]3782[/C][C]4126.0088595316[/C][C]-344.008859531603[/C][/ROW]
[ROW][C]36[/C][C]3889[/C][C]4067.13952528617[/C][C]-178.139525286168[/C][/ROW]
[ROW][C]37[/C][C]2271[/C][C]2301.66840519502[/C][C]-30.6684051950169[/C][/ROW]
[ROW][C]38[/C][C]2452[/C][C]2492.06518380062[/C][C]-40.0651838006233[/C][/ROW]
[ROW][C]39[/C][C]3084[/C][C]3030.77141421175[/C][C]53.2285857882534[/C][/ROW]
[ROW][C]40[/C][C]2522[/C][C]2841.44664648034[/C][C]-319.446646480339[/C][/ROW]
[ROW][C]41[/C][C]2769[/C][C]2671.45573612665[/C][C]97.5442638733534[/C][/ROW]
[ROW][C]42[/C][C]3438[/C][C]2730.57286228093[/C][C]707.427137719068[/C][/ROW]
[ROW][C]43[/C][C]2839[/C][C]3171.50904900648[/C][C]-332.509049006476[/C][/ROW]
[ROW][C]44[/C][C]3746[/C][C]3749.10591679088[/C][C]-3.10591679087975[/C][/ROW]
[ROW][C]45[/C][C]2632[/C][C]2830.55304907271[/C][C]-198.553049072708[/C][/ROW]
[ROW][C]46[/C][C]2851[/C][C]3248.48288610344[/C][C]-397.482886103436[/C][/ROW]
[ROW][C]47[/C][C]3871[/C][C]3965.78067700107[/C][C]-94.7806770010693[/C][/ROW]
[ROW][C]48[/C][C]3618[/C][C]4012.75738584256[/C][C]-394.757385842564[/C][/ROW]
[ROW][C]49[/C][C]2389[/C][C]2229.53998648518[/C][C]159.460013514816[/C][/ROW]
[ROW][C]50[/C][C]2344[/C][C]2460.72919503093[/C][C]-116.729195030935[/C][/ROW]
[ROW][C]51[/C][C]2678[/C][C]3002.04567498196[/C][C]-324.045674981957[/C][/ROW]
[ROW][C]52[/C][C]2492[/C][C]2604.56750978847[/C][C]-112.567509788468[/C][/ROW]
[ROW][C]53[/C][C]2858[/C][C]2599.93302316387[/C][C]258.066976836132[/C][/ROW]
[ROW][C]54[/C][C]2246[/C][C]2868.74103490666[/C][C]-622.741034906664[/C][/ROW]
[ROW][C]55[/C][C]2800[/C][C]2665.98468317462[/C][C]134.015316825378[/C][/ROW]
[ROW][C]56[/C][C]3869[/C][C]3445.21910876994[/C][C]423.780891230057[/C][/ROW]
[ROW][C]57[/C][C]3007[/C][C]2570.88933923604[/C][C]436.110660763959[/C][/ROW]
[ROW][C]58[/C][C]3023[/C][C]3087.87690524614[/C][C]-64.8769052461394[/C][/ROW]
[ROW][C]59[/C][C]3907[/C][C]3973.41803117336[/C][C]-66.4180311733617[/C][/ROW]
[ROW][C]60[/C][C]4209[/C][C]3940.22199886631[/C][C]268.778001133693[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=227776&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=227776&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
1320721985.8426816239386.1573183760681
1424342342.7247108163391.2752891836717
1529562858.5353688392497.4646311607557
1628282758.704051195469.2959488045954
1726872673.2670674484213.732932551578
1826292648.52287480085-19.5228748008526
1931502831.80772202885318.192277971149
2041193809.25344920555309.746550794449
2130302844.33038355574185.66961644426
2230553687.51650616411-632.516506164108
2338214347.13951930246-526.139519302463
2440014137.77519622104-136.775196221037
2525292278.95585460911250.044145390887
2624722678.61572871157-206.615728711572
2731343119.7337168255914.2662831744146
2827892988.90067588491-199.900675884907
2927582816.35569392072-58.3556939207233
3029932760.01705464532232.982945354684
3132823100.6678511092181.3321488908
3234374037.9752145646-600.975214564598
3328042800.191813034323.80818696568485
3430763354.52171946646-278.521719466456
3537824126.0088595316-344.008859531603
3638894067.13952528617-178.139525286168
3722712301.66840519502-30.6684051950169
3824522492.06518380062-40.0651838006233
3930843030.7714142117553.2285857882534
4025222841.44664648034-319.446646480339
4127692671.4557361266597.5442638733534
4234382730.57286228093707.427137719068
4328393171.50904900648-332.509049006476
4437463749.10591679088-3.10591679087975
4526322830.55304907271-198.553049072708
4628513248.48288610344-397.482886103436
4738713965.78067700107-94.7806770010693
4836184012.75738584256-394.757385842564
4923892229.53998648518159.460013514816
5023442460.72919503093-116.729195030935
5126783002.04567498196-324.045674981957
5224922604.56750978847-112.567509788468
5328582599.93302316387258.066976836132
5422462868.74103490666-622.741034906664
5528002665.98468317462134.015316825378
5638693445.21910876994423.780891230057
5730072570.88933923604436.110660763959
5830233087.87690524614-64.8769052461394
5939073973.41803117336-66.4180311733617
6042093940.22199886631268.778001133693







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
612484.179833594671921.275131424013047.08453576534
622597.625907362062016.420342474613178.8314722495
633110.959481294872511.233721516933710.68524107281
642859.036536827242240.574517304033477.49855635046
652992.876147432562355.464908417873630.28738644725
662948.179028369142291.608566010873604.7494907274
673124.472604778752448.535733568383800.40947598912
683958.406028634383262.898254346574653.91380292219
692984.308957078912269.028359164843699.58955499298
703249.384898532512514.132021050333984.6377760147
714151.941951712393396.519701982514907.36420144227
724232.678630088463456.892184352735008.46507582419

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
61 & 2484.17983359467 & 1921.27513142401 & 3047.08453576534 \tabularnewline
62 & 2597.62590736206 & 2016.42034247461 & 3178.8314722495 \tabularnewline
63 & 3110.95948129487 & 2511.23372151693 & 3710.68524107281 \tabularnewline
64 & 2859.03653682724 & 2240.57451730403 & 3477.49855635046 \tabularnewline
65 & 2992.87614743256 & 2355.46490841787 & 3630.28738644725 \tabularnewline
66 & 2948.17902836914 & 2291.60856601087 & 3604.7494907274 \tabularnewline
67 & 3124.47260477875 & 2448.53573356838 & 3800.40947598912 \tabularnewline
68 & 3958.40602863438 & 3262.89825434657 & 4653.91380292219 \tabularnewline
69 & 2984.30895707891 & 2269.02835916484 & 3699.58955499298 \tabularnewline
70 & 3249.38489853251 & 2514.13202105033 & 3984.6377760147 \tabularnewline
71 & 4151.94195171239 & 3396.51970198251 & 4907.36420144227 \tabularnewline
72 & 4232.67863008846 & 3456.89218435273 & 5008.46507582419 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=227776&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]2484.17983359467[/C][C]1921.27513142401[/C][C]3047.08453576534[/C][/ROW]
[ROW][C]62[/C][C]2597.62590736206[/C][C]2016.42034247461[/C][C]3178.8314722495[/C][/ROW]
[ROW][C]63[/C][C]3110.95948129487[/C][C]2511.23372151693[/C][C]3710.68524107281[/C][/ROW]
[ROW][C]64[/C][C]2859.03653682724[/C][C]2240.57451730403[/C][C]3477.49855635046[/C][/ROW]
[ROW][C]65[/C][C]2992.87614743256[/C][C]2355.46490841787[/C][C]3630.28738644725[/C][/ROW]
[ROW][C]66[/C][C]2948.17902836914[/C][C]2291.60856601087[/C][C]3604.7494907274[/C][/ROW]
[ROW][C]67[/C][C]3124.47260477875[/C][C]2448.53573356838[/C][C]3800.40947598912[/C][/ROW]
[ROW][C]68[/C][C]3958.40602863438[/C][C]3262.89825434657[/C][C]4653.91380292219[/C][/ROW]
[ROW][C]69[/C][C]2984.30895707891[/C][C]2269.02835916484[/C][C]3699.58955499298[/C][/ROW]
[ROW][C]70[/C][C]3249.38489853251[/C][C]2514.13202105033[/C][C]3984.6377760147[/C][/ROW]
[ROW][C]71[/C][C]4151.94195171239[/C][C]3396.51970198251[/C][C]4907.36420144227[/C][/ROW]
[ROW][C]72[/C][C]4232.67863008846[/C][C]3456.89218435273[/C][C]5008.46507582419[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=227776&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=227776&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
612484.179833594671921.275131424013047.08453576534
622597.625907362062016.420342474613178.8314722495
633110.959481294872511.233721516933710.68524107281
642859.036536827242240.574517304033477.49855635046
652992.876147432562355.464908417873630.28738644725
662948.179028369142291.608566010873604.7494907274
673124.472604778752448.535733568383800.40947598912
683958.406028634383262.898254346574653.91380292219
692984.308957078912269.028359164843699.58955499298
703249.384898532512514.132021050333984.6377760147
714151.941951712393396.519701982514907.36420144227
724232.678630088463456.892184352735008.46507582419



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')