Home » date » 2008 » Aug » 18 »

Toon Raeman - Opg.10 - Exponential Smoothing

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 18 Aug 2008 05:00:08 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Aug/18/t1219057293rgd83u2b6esmq6o.htm/, Retrieved Mon, 18 Aug 2008 11:01:33 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
12.11 11.42 11.71 12.04 12.21 12 12.36 12.32 12.96 12.79 13.19 12.34 13.25 12.54 12.77 12.96 13 13.61 13.8 14.16 14.27 14.69 15.01 15.09 15.14 14.2 13.83 14.31 14.04 14.9 14.92 15.36 15.5 15.65 16.18 15.44 15.58 15.24 15.33 16.07 15.82 15.87 15.72 17.07 16.83 17.52 17.76 17.36 17.95 16.71 17.14 16.72 17.26 17.24 17.69 18.13 18.08 18.18 18.18 17.64 17.89 16.82 16.61 16.66 17.02 16.91 17.18 18.06 17.58 17.48 17.54 17.44 17.79 16.79 16.19 16.62 16.39 16.54 17.26 18 17.29 18.16 17.82 17.48 18.31 17.04 17.03 16.97 17.11 17.12 17.69 18.5 18.27 18.45 18.35 18.03
 
Text written by user:
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.553590492930469
beta0.0620502955838186
gamma0.64547702995407


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1313.2512.54172222222220.708277777777772
1412.5412.2342147583650.305785241635011
1512.7712.65981178148100.110188218519037
1612.9612.93841316745500.0215868325449780
171312.99745718598560.00254281401435286
1813.6113.58062929705900.0293707029410264
1913.813.75674530269290.0432546973071055
2014.1614.15744984075640.00255015924358837
2114.2714.3202916659892-0.0502916659892492
2214.6914.7750698842658-0.0850698842657582
2315.0115.1085063557543-0.0985063557543349
2415.0915.1936207863540-0.103620786353964
2515.1415.1522660045593-0.0122660045592724
2614.214.3355811263814-0.135581126381437
2713.8314.4510059011042-0.621005901104201
2814.3114.26470278175380.0452972182462172
2914.0414.2976074671984-0.257607467198365
3014.914.70177925478520.198220745214778
3114.9214.9384557675841-0.0184557675841415
3215.3615.25423539916060.105764600839418
3315.515.42350131719360.0764986828063652
3415.6515.9073153080154-0.257315308015365
3516.1816.10447704494330.0755229550566767
3615.4416.2533870995686-0.813387099568642
3715.5815.7899836138805-0.20998361388048
3815.2414.76606713012860.47393286987136
3915.3315.03773228391050.292267716089532
4016.0715.53906637784610.530933622153883
4115.8215.76027981014870.0597201898513191
4215.8716.4891132425697-0.619113242569734
4315.7216.2004574328931-0.480457432893106
4417.0716.26997181257370.800028187426346
4516.8316.81269157297870.0173084270212485
4617.5217.16306667129530.356933328704734
4717.7617.8127925057252-0.0527925057251615
4817.3617.6467393251675-0.286739325167499
4917.9517.67905040772760.270949592272448
5016.7117.1652612012099-0.455261201209886
5117.1416.88508751604110.254912483958851
5216.7217.4481302730138-0.728130273013786
5317.2616.80692699083870.453073009161255
5417.2417.5417926427331-0.301792642733119
5517.6917.46353558555510.226464414444894
5618.1318.3124262795372-0.182426279537186
5718.0818.07104531936240.0089546806375509
5818.1818.4996859804297-0.319685980429693
5918.1818.6185665064751-0.438566506475077
6017.6418.1200759135896-0.480075913589573
6117.8918.1479474344342-0.257947434434232
6216.8217.0558357886584-0.235835788658363
6316.6117.0330312119843-0.423031211984252
6416.6616.8454850184927-0.185485018492692
6517.0216.77166051787690.248339482123114
6616.9117.0952578583092-0.185257858309193
6717.1817.15731466074400.0226853392560216
6818.0617.69216021259430.367839787405742
6917.5817.7460347472905-0.16603474729051
7017.4817.9125826769409-0.432582676940886
7117.5417.8603081356006-0.320308135600616
7217.4417.34498421393280.0950157860672505
7317.7917.70464214231120.0853578576887912
7416.7916.77016057797390.0198394220261022
7516.1916.8049462408868-0.614946240886802
7616.6216.54300427511560.0769957248843589
7716.3916.7119065360177-0.32190653601765
7816.5416.5477077371023-0.00770773710234351
7917.2616.72689819530420.533101804695839
801817.62021910525740.379780894742595
8117.2917.5037383242314-0.213738324231358
8218.1617.54230294986740.617697050132616
8317.8218.1151123980704-0.295112398070394
8417.4817.7455839947709-0.265583994770950
8518.3117.90262066393170.407379336068335
8617.0417.1383760214255-0.0983760214254765
8717.0316.93159418664100.0984058133590189
8816.9717.2952292466832-0.325229246683243
8917.1117.1439955058378-0.0339955058378081
9017.1217.2570812991928-0.137081299192847
9117.6917.54340475046600.146595249533977
9218.518.18822393284090.311776067159077
9318.2717.87038309734020.399616902659787
9418.4518.5164476564008-0.0664476564008467
9518.3518.4523736719747-0.102373671974746
9618.0318.2095487333393-0.179548733339342


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
9718.6225780911517.986183133966819.2589730483332
9817.487538490569616.749299888995518.2257770921436
9917.395756358829016.558003092175018.233509625483
10017.583302966316316.647110032479618.5194959001530
10117.707660246350016.673333406026118.7419870866739
10217.822658568023916.690002086752218.9553150492955
10318.284115108191817.052592049433219.5156381669505
10418.907846926447317.576680974843820.2390128780507
10518.444481256979417.012724398095919.876238115863
10618.723059885157217.189639023149220.2564807471652
10718.675734552473017.039484552936520.3119845520096
10818.461177356119916.720865020699220.2014896915405
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219057293rgd83u2b6esmq6o/1weou1219057201.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219057293rgd83u2b6esmq6o/1weou1219057201.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219057293rgd83u2b6esmq6o/2ta0t1219057201.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219057293rgd83u2b6esmq6o/2ta0t1219057201.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219057293rgd83u2b6esmq6o/3xhmp1219057201.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219057293rgd83u2b6esmq6o/3xhmp1219057201.ps (open in new window)


 
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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by