Home » date » 2010 » Jun » 03 »

IKO - opgave 10 - oefening 2 - Melino Olivini

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 03 Jun 2010 18:00:21 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jun/03/t1275588133opfz08o5tm19zth.htm/, Retrieved Thu, 03 Jun 2010 20:02:17 +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/2010/Jun/03/t1275588133opfz08o5tm19zth.htm/},
    year = {2010},
}
@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 = {2010},
    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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
5221,3 5115,9 5107,4 5202,1 5307,5 5266,1 5329,8 5263,4 5177,1 5204,9 5185,2 5189,8 5253,8 5372,3 5478,4 5590,5 5699,8 5797,9 5854,3 5902,4 5956,9 6007,8 6101,7 6148,6 6207,4 6232 6291,7 6323,4 6365 6435 6493,4 6606,8 6639,1 6723,5 6759,4 6848,6 6918,1 6963,5 7013,1 7030,9 7112,1 7130,3 7130,8 7076,9 7040,8 7086,5 7120,7 7154,1 7228,2 7297,9 7369,5 7450,7 7459,7 7497,5 7536 7637,4 7715,1 7815,7 7859,5 7951,6 7973,7 7988 8053,1 8112 8169,2 8303,1 8372,7 8470,6 8536,1 8665,8 8773,7 8838,4 8936,2 8995,3 9098,9 9237,1 9315,5 9392,6 9502,2 9671,1 9695,6 9847,9 9836,6 9887,7 9875,6 9905,9 9871,1 9910 9977,3 10031,6 10090,7 10095,8 10126 10212,7 10398,7 10467 10543,6 10634,2 10728,7 10796,4 10875,8 10946,1 11050 11086,1 11217,3 11291,7 11314,1 11356,4 11357,8 11491,4 11625,7 11620,7
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.384583602218265
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
35107.45010.596.9000000000005
45202.15039.26615105495162.833848945051
55307.55196.5893792453110.910620754697
65266.15344.64378529941-78.5437852994073
75329.85273.0371334171056.7628665828961
85263.45358.56720111979-95.1672011197888
95177.15255.56745610011-78.4674561001093
105204.95139.0901591762365.8098408237729
115185.25192.19954482164-6.99954482164321
125189.85169.8076346602519.9923653397527
135253.85182.0963705394771.7036294605268
145372.35273.6724106495398.6275893504735
155478.45430.1029642400448.2970357599643
165590.55554.7772122290735.7227877709338
175699.85680.6156106312919.1843893687092
185797.95797.293612201070.606387798932701
195854.35895.62681900512-41.3268190051213
205902.45936.13320208391-33.7332020839103
215956.95971.25996571212-14.3599657121231
226007.86020.23735837082-12.4373583708229
236101.76066.3541542864935.3458457135066
246148.66173.84758695444-25.2475869544442
256207.46211.03777901619-3.63777901618596
2662326268.43874885807-36.438748858066
276291.76279.025003561912.6749964380951
286323.46343.59959935017-20.1995993501714
2963656367.53116466872-2.53116466871597
3064356408.1577202426126.8422797573858
316493.46488.480820883464.91917911653945
326606.86548.7726565080658.0273434919445
336639.16684.48902129535-45.3890212953447
346723.56699.3331479844224.1668520155799
356759.46793.02732298685-33.6273229868475
366848.66815.9948059796132.6051940203924
376918.16917.7342289470.365771053004210
386963.56987.37489849615-23.8748984961476
397013.17023.5930040299-10.4930040299032
407030.97069.15756674199-38.2575667419933
417112.17072.2443339122539.8556660877493
427130.37168.77216954509-38.4721695450862
437130.87172.17640399629-41.3764039962853
447076.97156.76371750056-79.863717500556
457040.87072.14944133765-31.3494413376493
467086.57023.9929602604962.5070397395139
477120.77093.732142767526.9678572324910
487154.17138.3035384460915.7964615539122
497228.27177.778598532850.4214014672052
507297.97271.2698427379526.6301572620541
517369.57351.2113645454218.2886354545753
527450.77429.844873848220.8551261517978
537459.77519.06541338838-59.3654133883765
547497.57505.2344488603-7.73444886029847
5575367540.05990665643-4.05990665643185
567637.47576.9985331298360.4014668701684
577715.17701.6279468380313.4720531619723
587815.77784.5090775723431.1909224276642
597859.57897.10459487608-37.6045948760766
607951.67926.4424843186825.1575156813233
617973.78028.21765232226-54.5176523222635
6279888029.35105720768-41.3510572076839
638053.18027.7481186712225.351881328781
6481128102.598036515659.40196348434802
658169.28165.113877500394.08612249961334
668303.18223.8853332103979.2146667896068
678372.78388.24999511286-15.5499951128604
688470.68451.8697219778818.7302780221198
698536.18556.97307977018-20.8730797701755
708665.88614.4456355627751.3543644372257
718773.78763.895682027679.80431797232995
728838.48875.56626195076-37.1662619507642
738936.28925.9727270487510.2272729512515
748995.39027.70596852121-32.4059685212142
759098.99074.3431644139524.5568355860487
769237.19187.3873207027249.7126792972849
779315.59344.70600198279-29.2060019827877
789392.69411.87385253385-19.2738525338518
799502.29481.5614448977620.6385551022395
809671.19599.0986947635672.0013052364393
819695.69795.6892160958-100.089216095806
829847.99781.6965448264866.2034551735196
839836.69959.4573080964-122.857308096407
849887.79900.90840198985-13.2084019898521
859875.69946.92866717305-71.3286671730475
869905.99907.3968314102-1.49683141020978
879871.19937.12117459456-66.0211745945562
8899109876.930513446333.0694865536989
899977.39928.5484957086348.7515042913674
9010031.610014.597524842617.0024751574365
9110090.710075.436397985215.263602014762
9210095.810140.4065290309-44.6065290309034
931012610128.3515894137-2.35158941374175
9410212.710157.647206686155.0527933139329
9510398.710265.5196082509133.180391749082
961046710502.7386030546-35.7386030546204
9710543.610557.2941223536-13.6941223536251
9810634.210628.62758744975.57241255034933
9910728.710721.37064594137.3293540586892
10010796.410818.6893953271-22.2893953271359
10110875.810877.8172593810-2.01725938095842
10210946.110956.4414545016-10.3414545016185
1031105011022.764300677227.2356993227877
10411086.111137.1387040317-51.0387040317019
10511217.311153.610055382663.6899446173593
10611291.711309.3041637087-17.6041637086637
10711314.111376.9338910155-62.8338910155471
10811356.411375.1690068674-18.7690068673983
10911357.811410.2507545963-52.4507545962751
11011491.411391.479054454699.9209455454275
11111625.711563.507011629562.1929883705125
11211620.711721.7254151297-101.025415129739


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
11311677.872697063511578.681123678411777.0642704487
11411735.045394127111565.631769262511904.4590189917
11511792.218091190611548.299087303112036.1370950782
11611849.390788254211525.14406581312173.6375106954
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275588133opfz08o5tm19zth/1tscp1275588019.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275588133opfz08o5tm19zth/1tscp1275588019.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t1275588133opfz08o5tm19zth/241ta1275588019.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275588133opfz08o5tm19zth/241ta1275588019.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t1275588133opfz08o5tm19zth/341ta1275588019.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275588133opfz08o5tm19zth/341ta1275588019.ps (open in new window)


 
Parameters (Session):
par1 = 4 ; par2 = Double ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 4 ; par2 = Double ; 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=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')
 





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