Home » date » 2009 » Aug » 18 »

Opgave 10 - Robbert Van Hees

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 18 Aug 2009 06:28:25 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Aug/18/t1250598570gtugqkd9gsy8r0f.htm/, Retrieved Tue, 18 Aug 2009 14:29:34 +0200
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Aug/18/t1250598570gtugqkd9gsy8r0f.htm/},
    year = {2009},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
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 18.49 18.07 17.8 17.88 18.12 18.68 18.8 19.64 19.56 19.3 20.07 19.82 20.29 19.36 18.74 18.87 18.87 18.91 19.31 20.06 20.72 20.42 20.58 20.58 21.18 19.87 19.83 19.48 19.49 19.4 19.89 20.44 20.07 19.75 19.54 19.07
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.459863297921987
beta0.146965751748968
gamma0.668062732641707


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1313.2512.6539197346210.596080265378989
1412.5412.25699664949640.283003350503645
1512.7712.65908970316780.110910296832230
1612.9612.94831276976280.0116872302372268
171313.0220852317476-0.0220852317476012
1813.6113.6147159025095-0.00471590250949383
1913.813.8609842107814-0.0609842107813989
2014.1613.86050758014460.299492419855431
2114.2714.8243506935806-0.554350693580581
2214.6914.44919880861560.240801191384367
2315.0115.1167772122287-0.106777212228696
2415.0914.15217787676870.937822123231348
2515.1416.0103777873678-0.87037778736779
2614.214.6735890306251-0.473589030625059
2713.8314.6445012348439-0.814501234843888
2814.3114.3853483127609-0.0753483127608661
2914.0414.2990182191282-0.259018219128231
3014.914.71310553521710.186894464782881
3114.9214.9292764810236-0.00927648102361367
3215.3614.98165411407530.3783458859247
3315.515.5982526686552-0.0982526686552312
3415.6515.6543455758710-0.00434557587102091
3516.1816.01772185987780.162278140122247
3615.4415.43142414655850.00857585344152056
3715.5816.0895502007709-0.509550200770947
3815.2414.92361342164390.316386578356092
3915.3315.07555703007890.254442969921053
4016.0715.62480071498000.445199285020028
4115.8215.7486027256720.0713972743280014
4215.8716.6352319471215-0.765231947121494
4315.7216.3611111036762-0.641111103676197
4417.0716.24749826171570.822501738284338
4516.8316.917836124607-0.0878361246069908
4617.5217.02364900213580.496350997864212
4717.7617.75286736687860.00713263312136547
4817.3616.98840553609090.371594463909055
4917.9517.71955935824150.230440641758491
5016.7117.1946888973513-0.48468889735134
5117.1416.98866133003070.151338669969302
5216.7217.6423396096089-0.922339609608947
5317.2616.92378215746910.336217842530939
5417.2417.6221348011800-0.382134801180047
5517.6917.55740530867130.132594691328741
5618.1318.4378311485022-0.307831148502228
5718.0818.2148297569720-0.134829756972028
5818.1818.4900082689929-0.31000826899286
5918.1818.5890863468764-0.409086346876393
6017.6417.62023641797530.0197635820246767
6117.8918.0030216263282-0.113021626328223
6216.8216.9021048390842-0.0821048390841916
6316.6116.9817522037394-0.37175220373943
6416.6616.8337121745102-0.173712174510214
6517.0216.79597650213310.224023497866892
6616.9117.0542823246001-0.144282324600134
6717.1817.17035200476320.00964799523681137
6818.0617.69655305423730.363446945762703
6917.5817.7695492764780-0.189549276478036
7017.4817.8694792625431-0.389479262543137
7117.5417.8026563417840-0.262656341783977
7217.4417.00114311274190.438856887258133
7317.7917.47367884193570.316321158064323
7416.7916.58095483509850.209045164901493
7516.1916.6907879978106-0.500787997810566
7616.6216.54639497056150.073605029438454
7716.3916.7740268297144-0.384026829714369
7816.5416.5876713347055-0.0476713347055444
7917.2616.772986592960.487013407040003
801817.64554213454480.354457865455206
8117.2917.5241602188327-0.234160218832717
8218.1617.53215057114830.627849428851711
8317.8218.0540695375838-0.234069537583849
8417.4817.5823081803749-0.102308180374898
8518.3117.80002541580020.509974584199846
8617.0416.98556317129160.0544368287083898
8717.0316.79722320282390.232776797176061
8816.9717.2957964015063-0.325796401506281
8917.1117.2340747384349-0.124074738434860
9017.1217.3728886947149-0.252888694714855
9117.6917.7388732154873-0.0488732154873048
9218.518.36530246555930.134697534440697
9318.2717.93050648144850.339493518551457
9418.4518.5827839427230-0.132783942722952
9518.3518.4428550695268-0.0928550695268093
9618.0318.0850429512244-0.0550429512244115
9718.4918.5733969603524-0.083396960352406
9818.0717.27639884550620.793601154493786
9917.817.51090478254530.289095217454715
10017.8817.86773907009580.0122609299041692
10118.1218.0931451563350.0268548436649958
10218.6818.32450290632180.355497093678242
10318.819.1932883024889-0.393288302488916
10419.6419.8673950560483-0.227395056048291
10519.5619.36975873986740.190241260132566
10619.319.8544358722569-0.554435872256892
10720.0719.55258132395020.517418676049843
10819.8219.52712986483970.292870135160292
10920.2920.2975602736362-0.00756027363622636
11019.3619.34201230350720.0179876964928205
11118.7419.0419942751055-0.301994275105546
11218.8719.0247659626135-0.154765962613478
11318.8719.1707321350768-0.300732135076778
11418.9119.3426550929002-0.43265509290018
11519.3119.4930379739120-0.183037973912040
11620.0620.2638669442370-0.203866944236960
11720.7219.83962607451320.880373925486779
11820.4220.33821991752240.081780082477632
11920.5820.7368883577538-0.15688835775385
12020.5820.26895377639390.311046223606109
12121.1820.91763030020090.262369699799141
12219.8720.0406803843038-0.170680384303758
12319.8319.49305077275020.336949227249828
12419.4819.8416369217171-0.361636921717107
12519.4919.8436897697541-0.353689769754098
12619.419.9475753366679-0.547575336667904
12719.8920.1393742194867-0.249374219486661
12820.4420.8851028594458-0.445102859445761
12920.0720.7039113347433-0.633911334743274
13019.7520.0860800097087-0.336080009708688
13119.5420.0380452364186-0.498045236418633
13219.0719.4085519085413-0.338551908541341


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
13319.483036428147518.89183730364520.0742355526500
13418.191195843142617.50034387155118.8820478147342
13517.716408542156116.913220504040318.5195965802719
13617.433475408386616.50809832631918.3588524904541
13717.376870364192416.314334228459118.4394064999258
13817.361017791009716.151084649941518.5709509320780
13917.691364340549416.303476888511119.0792517925878
14018.240141685552916.643873130195619.8364102409103
14118.073522492466416.31289014675819.8341548381748
14217.791416994417115.872704069933919.7101299189004
14317.767435595527515.659902156364819.8749690346902
14417.422073943508212.642198577901922.2019493091146
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250598570gtugqkd9gsy8r0f/1erki1250598500.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250598570gtugqkd9gsy8r0f/1erki1250598500.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250598570gtugqkd9gsy8r0f/2o1h71250598500.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250598570gtugqkd9gsy8r0f/2o1h71250598500.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250598570gtugqkd9gsy8r0f/3m0ty1250598500.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250598570gtugqkd9gsy8r0f/3m0ty1250598500.ps (open in new window)


 
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=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