Home » date » 2010 » Aug » 07 »

Tijdsreeks B - stap 27

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 07 Aug 2010 13:19:56 +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/Aug/07/t12811871752a05h9uov3wav2u.htm/, Retrieved Sat, 07 Aug 2010 15:19:36 +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/Aug/07/t12811871752a05h9uov3wav2u.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:
Gosselin Claudia
 
Dataseries X:
» Textbox « » Textfile « » CSV «
166 165 164 162 160 159 160 162 163 163 164 166 163 166 170 171 176 172 169 180 172 170 161 167 158 163 165 169 168 165 156 157 146 150 146 159 146 151 156 152 152 143 127 126 122 122 114 127 125 123 124 123 127 117 104 110 106 107 100 115 117 123 130 129 125 112 90 96 99 108 101 113 113 120 131 135 137 120 102 114 121 134 122 131
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.629181587767191
beta0.0412105272936492
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13163158.0734508547014.92654914529911
14166163.9668231213352.03317687866519
15170169.0924568813720.907543118627871
16171170.991727537660.00827246233981782
17176176.825408150483-0.825408150482559
18172173.363150342122-1.36315034212242
19169168.4438767187680.556123281231663
20180171.8299277221748.17007227782608
21172178.843376272332-6.84337627233197
22170174.899864839295-4.89986483929459
23161172.635460218965-11.6354602189646
24167166.6647815938350.335218406164785
25158165.353047197435-7.35304719743505
26163161.9052370040861.09476299591421
27165165.456529433316-0.456529433316348
28169165.5622128605823.43778713941796
29168172.731588624257-4.73158862425717
30165165.997998077423-0.99799807742258
31156161.415410331597-5.4154103315966
32157163.108076283288-6.10807628328797
33146154.440898210801-8.44089821080087
34150149.041707930130.958292069869628
35146146.946123303462-0.946123303461746
36159151.3977478057687.60225219423216
37146151.253594164881-5.2535941648807
38151151.760008587292-0.760008587291765
39156153.0216567557242.97834324427649
40152156.274237268001-4.27423726800109
41152154.903684124029-2.9036841240287
42143150.093746917097-7.09374691709718
43127139.268797712543-12.2687977125427
44126135.445913664715-9.4459136647145
45122122.780358420159-0.780358420159331
46122124.851842927184-2.85184292718409
47114118.719417983047-4.71941798304671
48127122.9356313322524.06436866774831
49125114.67536989148710.3246301085129
50123125.930594672566-2.93059467256623
51124126.437493018267-2.43749301826719
52123122.6774052639530.32259473604698
53127123.9107779223443.08922207765633
54117120.676561420825-3.67656142082477
55104109.530089069581-5.53008906958102
56110110.616031918222-0.616031918221893
57106106.570550405005-0.570550405004965
58107107.862465025745-0.862465025745081
59100102.197338571444-2.19733857144375
60115111.231132186093.76886781390998
61117105.07224976051711.9277502394833
62123112.42829645741410.5717035425861
63130121.9709928663288.02900713367222
64129126.4486600039082.55133999609151
65125130.796957775159-5.7969577751586
66112119.919157790429-7.91915779042853
6790105.762308221345-15.7623082213452
6896102.313548291892-6.31354829189227
699994.63342764582144.3665723541786
7010898.98472375693359.0152762430665
7110199.35689563379431.6431043662057
72113113.436383977466-0.436383977465894
73113107.9650403702155.03495962978531
74120110.6106425219629.38935747803775
75131118.56511245063412.4348875493656
76135123.9964607867811.0035392132201
77137130.9989826215136.00101737848746
78120127.495167577491-7.49516757749142
79102111.445560897239-9.44556089723908
80114116.3876032177-2.38760321769955
81121116.1524427485724.84755725142803
82134123.55710454899510.4428954510045
83122123.157701531511-1.15770153151095
84131135.695170433302-4.69517043330245


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85130.454034707349118.314640487486142.593428927211
86132.296755827628117.784366395379146.809145259877
87135.979829744022119.277750696334152.681908791709
88133.241058661304114.463065326114152.019051996494
89131.364472486531110.585435843744152.143509129317
90118.82383758167896.0944824641646141.553192699191
91106.70469573055682.0596791209231131.349712340188
92120.38972991135993.8524675823117146.926992240407
93124.58444227744596.170183920447152.998700634443
94131.132979019595100.850866294637161.415091744552
95119.70962494622687.5641235428816151.85512634957
96131.54199910618797.5339271914234165.55007102095
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/07/t12811871752a05h9uov3wav2u/1n1d61281187191.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/07/t12811871752a05h9uov3wav2u/1n1d61281187191.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/07/t12811871752a05h9uov3wav2u/2n1d61281187191.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/07/t12811871752a05h9uov3wav2u/2n1d61281187191.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/07/t12811871752a05h9uov3wav2u/3n1d61281187191.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/07/t12811871752a05h9uov3wav2u/3n1d61281187191.ps (open in new window)


 
Parameters (Session):
 
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')
 





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