Home » date » 2008 » May » 07 » attachments

exponential smoothing 3 multiplicatief

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 07 May 2008 11:10:33 -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/May/07/t1210180293v984s2s4imr4aue.htm/, Retrieved Wed, 07 May 2008 19:11:37 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
56421 53152 53536 52408 41454 38271 35306 26414 31917 38030 27534 18387 50556 43901 48572 43899 37532 40357 35489 29027 34485 42598 30306 26451 47460 50104 61465 53726 39477 43895 31481 29896 33842 39120 33702 25094 51442 45594 52518 48564 41745 49585 32747 33379 35645 37034 35681 20972 58552 54955 65540 51570 51145 46641 35704 33253 35193 41668 34865 21210 56126 49231 59723 48103 47472 50497 40059 34149 36860 46356 36577
 
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 time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0
beta0.00350348394533219
gamma0.323270481307047


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
135055650171.6294214468384.3705785532
144390143650.1812576848250.818742315227
154857248256.4676951532315.532304846805
164389943485.1985085089413.801491491133
173753237061.6413558757470.358644124302
184035739576.6526546217780.347345378323
193548934786.650148218702.34985178199
202902728496.6182790210530.38172097904
213448533333.49352091551151.50647908451
224259840405.21918331292192.78081668707
233030628538.33375047591767.66624952406
242645124889.10343694381561.89656305622
254746053355.5401722728-5895.5401722728
265010446378.15408605733725.84591394269
276146551270.739014916110194.2609850839
285372646232.69550715967493.3044928404
293947739432.526356469444.4736435305895
304389542191.93692479861703.06307520135
313148137080.816722788-5599.81672278798
322989630352.2776035735-456.277603573522
333384235676.2518023742-1834.25180237415
343912043506.0448835144-4386.04488351444
353370230795.16579367262906.83420632741
362509426857.2219833691-1763.22198336914
375144254400.0506041289-2958.05060412890
384559450298.2412433926-4704.24124339261
395251857665.7021707106-5147.70217071064
404856451405.7332016236-2841.73320162356
414174541666.544289395378.4557106047141
424958545136.34231048534448.65768951467
433274737236.7638680837-4489.76386808373
443337931880.79447864311498.2055213569
453564537021.0515737432-1376.05157374321
463703444402.1753879587-7368.17538795872
473568133471.68598421052209.31401578949
482097227719.3739188528-6747.37391885277
495855256342.30285006042209.69714993962
505495551411.02430932013543.97569067989
516554059011.61820692356528.38179307654
525157053188.602251375-1618.602251375
535114543912.89871638377232.10128361627
544664149044.5896431648-2403.58964316481
553570437674.9200302113-1970.92003021127
563325334066.5997294566-813.599729456648
573519338490.6902626285-3297.6902626285
584166844210.1382392391-2542.1382392391
593486535959.7782250809-1094.77822508091


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
6026857.601364613024478.276212589229236.9265166367
6159991.883756080757612.558604056962371.2089081044
6255248.898910310552869.573758286857628.2240623343
6364239.714766807961860.389614784166619.0399188316
6455340.297078171152960.971926147457719.6222301948
6548590.061313550746210.736161526950969.3864655744
6650698.573644738348319.248492714653077.8987967620
6738895.388642709536516.063490685841274.7137947333
6835491.930231102233112.605079078537871.2553831259
6939286.096186992536906.771034968841665.4213390163
7045537.510018140343158.184866116547916.835170164
7137362.296716848837352.300148186737372.2932855109
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210180293v984s2s4imr4aue/1gec31210180229.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210180293v984s2s4imr4aue/1gec31210180229.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210180293v984s2s4imr4aue/28yux1210180229.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210180293v984s2s4imr4aue/28yux1210180229.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210180293v984s2s4imr4aue/335cy1210180229.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210180293v984s2s4imr4aue/335cy1210180229.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