Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_exponentialsmoothing.wasp
Title produced by softwareExponential Smoothing
Date of computationMon, 23 Jul 2012 13:06:59 -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/Jul/23/t1343064077wjb4lo3nvd9jw1j.htm/, Retrieved Sun, 28 Apr 2024 17:24:42 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=168831, Retrieved Sun, 28 Apr 2024 17:24:42 +0000
QR Codes:

Original text written by user:risk forecasting for health pilot
IsPrivate?No (this computation is public)
User-defined keywordscloud
Estimated Impact178
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Exponential Smoothing] [healtchare] [2012-07-23 17:06:59] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
4.2
2.6
2.0
2.8
4.8
4.9
5.6
2.7
1.9
6.8
4.6
4.0
2.8
9.0
3.8




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=168831&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
alpha6.61069613518961e-05
betaFALSE
gammaFALSE

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=168831&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
alpha6.61069613518961e-05
betaFALSE
gammaFALSE







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
22.64.2-1.6
324.19989422886184-2.19989422886184
42.84.19974880053907-1.39974880053907
54.84.199656267399210.600343732600788
64.94.199695954299140.700304045700859
75.64.199742249271631.40025775072837
82.74.19983481605664-1.49983481605664
91.94.19973566653442-2.29973566653442
106.84.199583637997592.60041636200241
114.64.199755543621530.400244456378468
1244.19978200256634-0.199782002566341
132.84.19976879558522-1.39976879558522
1494.199676261123554.80032373887645
153.84.19999359593943-0.399993595939431

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
2 & 2.6 & 4.2 & -1.6 \tabularnewline
3 & 2 & 4.19989422886184 & -2.19989422886184 \tabularnewline
4 & 2.8 & 4.19974880053907 & -1.39974880053907 \tabularnewline
5 & 4.8 & 4.19965626739921 & 0.600343732600788 \tabularnewline
6 & 4.9 & 4.19969595429914 & 0.700304045700859 \tabularnewline
7 & 5.6 & 4.19974224927163 & 1.40025775072837 \tabularnewline
8 & 2.7 & 4.19983481605664 & -1.49983481605664 \tabularnewline
9 & 1.9 & 4.19973566653442 & -2.29973566653442 \tabularnewline
10 & 6.8 & 4.19958363799759 & 2.60041636200241 \tabularnewline
11 & 4.6 & 4.19975554362153 & 0.400244456378468 \tabularnewline
12 & 4 & 4.19978200256634 & -0.199782002566341 \tabularnewline
13 & 2.8 & 4.19976879558522 & -1.39976879558522 \tabularnewline
14 & 9 & 4.19967626112355 & 4.80032373887645 \tabularnewline
15 & 3.8 & 4.19999359593943 & -0.399993595939431 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=168831&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]2[/C][C]2.6[/C][C]4.2[/C][C]-1.6[/C][/ROW]
[ROW][C]3[/C][C]2[/C][C]4.19989422886184[/C][C]-2.19989422886184[/C][/ROW]
[ROW][C]4[/C][C]2.8[/C][C]4.19974880053907[/C][C]-1.39974880053907[/C][/ROW]
[ROW][C]5[/C][C]4.8[/C][C]4.19965626739921[/C][C]0.600343732600788[/C][/ROW]
[ROW][C]6[/C][C]4.9[/C][C]4.19969595429914[/C][C]0.700304045700859[/C][/ROW]
[ROW][C]7[/C][C]5.6[/C][C]4.19974224927163[/C][C]1.40025775072837[/C][/ROW]
[ROW][C]8[/C][C]2.7[/C][C]4.19983481605664[/C][C]-1.49983481605664[/C][/ROW]
[ROW][C]9[/C][C]1.9[/C][C]4.19973566653442[/C][C]-2.29973566653442[/C][/ROW]
[ROW][C]10[/C][C]6.8[/C][C]4.19958363799759[/C][C]2.60041636200241[/C][/ROW]
[ROW][C]11[/C][C]4.6[/C][C]4.19975554362153[/C][C]0.400244456378468[/C][/ROW]
[ROW][C]12[/C][C]4[/C][C]4.19978200256634[/C][C]-0.199782002566341[/C][/ROW]
[ROW][C]13[/C][C]2.8[/C][C]4.19976879558522[/C][C]-1.39976879558522[/C][/ROW]
[ROW][C]14[/C][C]9[/C][C]4.19967626112355[/C][C]4.80032373887645[/C][/ROW]
[ROW][C]15[/C][C]3.8[/C][C]4.19999359593943[/C][C]-0.399993595939431[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=168831&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=168831&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
22.64.2-1.6
324.19989422886184-2.19989422886184
42.84.19974880053907-1.39974880053907
54.84.199656267399210.600343732600788
64.94.199695954299140.700304045700859
75.64.199742249271631.40025775072837
82.74.19983481605664-1.49983481605664
91.94.19973566653442-2.29973566653442
106.84.199583637997592.60041636200241
114.64.199755543621530.400244456378468
1244.19978200256634-0.199782002566341
132.84.19976879558522-1.39976879558522
1494.199676261123554.80032373887645
153.84.19999359593943-0.399993595939431







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
164.199967153578240.2869890747593888.1129452323971
174.199967153578240.2869890662092768.11294524094721
184.199967153578240.2869890576591648.11294524949732
194.199967153578240.2869890491090528.11294525804743
204.199967153578240.286989040558948.11294526659755
214.199967153578240.2869890320088288.11294527514766
224.199967153578240.2869890234587168.11294528369777
234.199967153578240.2869890149086038.11294529224788
244.199967153578240.2869890063584928.11294530079799
254.199967153578240.286988997808388.11294530934811
264.199967153578240.2869889892582688.11294531789822
274.199967153578240.2869889807081568.11294532644833

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
16 & 4.19996715357824 & 0.286989074759388 & 8.1129452323971 \tabularnewline
17 & 4.19996715357824 & 0.286989066209276 & 8.11294524094721 \tabularnewline
18 & 4.19996715357824 & 0.286989057659164 & 8.11294524949732 \tabularnewline
19 & 4.19996715357824 & 0.286989049109052 & 8.11294525804743 \tabularnewline
20 & 4.19996715357824 & 0.28698904055894 & 8.11294526659755 \tabularnewline
21 & 4.19996715357824 & 0.286989032008828 & 8.11294527514766 \tabularnewline
22 & 4.19996715357824 & 0.286989023458716 & 8.11294528369777 \tabularnewline
23 & 4.19996715357824 & 0.286989014908603 & 8.11294529224788 \tabularnewline
24 & 4.19996715357824 & 0.286989006358492 & 8.11294530079799 \tabularnewline
25 & 4.19996715357824 & 0.28698899780838 & 8.11294530934811 \tabularnewline
26 & 4.19996715357824 & 0.286988989258268 & 8.11294531789822 \tabularnewline
27 & 4.19996715357824 & 0.286988980708156 & 8.11294532644833 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=168831&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]16[/C][C]4.19996715357824[/C][C]0.286989074759388[/C][C]8.1129452323971[/C][/ROW]
[ROW][C]17[/C][C]4.19996715357824[/C][C]0.286989066209276[/C][C]8.11294524094721[/C][/ROW]
[ROW][C]18[/C][C]4.19996715357824[/C][C]0.286989057659164[/C][C]8.11294524949732[/C][/ROW]
[ROW][C]19[/C][C]4.19996715357824[/C][C]0.286989049109052[/C][C]8.11294525804743[/C][/ROW]
[ROW][C]20[/C][C]4.19996715357824[/C][C]0.28698904055894[/C][C]8.11294526659755[/C][/ROW]
[ROW][C]21[/C][C]4.19996715357824[/C][C]0.286989032008828[/C][C]8.11294527514766[/C][/ROW]
[ROW][C]22[/C][C]4.19996715357824[/C][C]0.286989023458716[/C][C]8.11294528369777[/C][/ROW]
[ROW][C]23[/C][C]4.19996715357824[/C][C]0.286989014908603[/C][C]8.11294529224788[/C][/ROW]
[ROW][C]24[/C][C]4.19996715357824[/C][C]0.286989006358492[/C][C]8.11294530079799[/C][/ROW]
[ROW][C]25[/C][C]4.19996715357824[/C][C]0.28698899780838[/C][C]8.11294530934811[/C][/ROW]
[ROW][C]26[/C][C]4.19996715357824[/C][C]0.286988989258268[/C][C]8.11294531789822[/C][/ROW]
[ROW][C]27[/C][C]4.19996715357824[/C][C]0.286988980708156[/C][C]8.11294532644833[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=168831&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=168831&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
164.199967153578240.2869890747593888.1129452323971
174.199967153578240.2869890662092768.11294524094721
184.199967153578240.2869890576591648.11294524949732
194.199967153578240.2869890491090528.11294525804743
204.199967153578240.286989040558948.11294526659755
214.199967153578240.2869890320088288.11294527514766
224.199967153578240.2869890234587168.11294528369777
234.199967153578240.2869890149086038.11294529224788
244.199967153578240.2869890063584928.11294530079799
254.199967153578240.286988997808388.11294530934811
264.199967153578240.2869889892582688.11294531789822
274.199967153578240.2869889807081568.11294532644833



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