Home » date » 2010 » Aug » 19 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 Aug 2010 01:56:37 +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/19/t12821832871yjbeeh8t8kpnj7.htm/, Retrieved Thu, 19 Aug 2010 04:01:28 +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/19/t12821832871yjbeeh8t8kpnj7.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
94 93 92 90 110 109 94 84 85 85 86 88 93 94 90 91 104 103 88 79 82 88 93 89 94 96 94 92 113 122 107 98 103 110 113 110 123 124 118 117 139 146 134 121 123 122 127 122 139 136 127 123 140 146 138 120 122 115 115 102 119 114 108 102 121 109 102 95 98 92 94 90 113 111 103 90 108 99 95 91 85 72 90 90 114 115 104 93 101 90 79 75 71 61 84 87 107 99 93 74 87 71 67 61 63 52 80 84 102 93 87 72 83 72 66 64 64 47 77 79
 
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.365777387991424
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
139394.5619658119659-1.56196581196586
149495.2432564147555-1.24325641475546
159090.916123708385-0.916123708385001
169191.375315415544-0.375315415543952
17104103.6156559007960.384344099204228
18103102.2171959924480.782804007551704
198891.9644837085955-3.96448370859548
207980.3086542572199-1.30865425721991
218280.66593383218591.33406616781413
228880.98986078141247.01013921858764
239384.5566335718668.44336642813403
248989.9393151340924-0.939315134092354
259493.89938990499920.100610095000818
269695.3909458867470.609054113253023
279491.94882144656822.05117855343181
289293.836378072517-1.83637807251708
29113106.024088117096.97591188290978
30122107.28938693928814.7106130607122
3110799.12031505605227.87968494394775
329893.48120176903464.51879823096544
3310397.64610474454665.35389525545341
34110103.0402881538356.9597118461652
35113107.4976008561615.50239914383927
36110105.853834278934.14616572107037
37123112.33360704880710.6663929511926
38124118.0123541790945.98764582090638
39118117.4522248941040.547775105895795
40117116.3242942162760.675705783724482
41139135.0198212855083.98017871449213
42146140.0948710383345.90512896166598
43134124.3726231086929.62737689130783
44121117.2412256674213.75877433257907
45123121.6577665027211.34223349727851
46122126.603019945167-4.60301994516733
47127125.9066861462321.09331385376818
48122121.7900219642850.209978035714713
49139130.9653018287478.03469817125278
50136132.7140672905393.28593270946135
51127127.71562342668-0.715623426679713
52123126.206706662262-3.20670666226191
53140145.577906501359-5.57790650135905
54146148.377671783481-2.37767178348088
55138131.9864964365076.01350356349326
56120119.8112254052180.188774594781549
57122121.3893162207080.61068377929233
58115122.296371150802-7.29637115080169
59115124.227614083759-9.22761408375929
60102115.77555628937-13.7755562893696
61119124.797858381335-5.79785838133486
62114118.475213003084-4.47521300308364
63108108.100040147907-0.100040147906824
64102105.236388510888-3.23638851088805
65121123.092862845377-2.09286284537745
66109129.197039514834-20.1970395148335
67102111.609815529806-9.60981552980647
689590.0257128280364.97428717196391
699893.6218202792384.37817972076198
709290.89210700301161.10789299698841
719494.6726017865744-0.672601786574361
729086.46536625957733.53463374042272
73113106.8789808513246.12101914867569
74111105.7548429703465.24515702965442
75103101.7099952322531.29000476774694
769097.3656475427341-7.36564754273411
77108114.436982128694-6.43698212869384
7899107.470099978008-8.47009997800812
7995100.886982155598-5.88698215559813
809189.91417543069111.08582456930888
818591.7099063630525-6.7099063630525
827282.8503321332957-10.8503321332957
839081.1275485113918.87245148860907
849079.080001544896810.9199984551032
85114103.83535966062710.1646403393732
86115103.63479541592311.3652045840769
8710499.3200756882324.67992431176805
889390.72607349803482.27392650196524
89101111.912326903989-10.9123269039892
9090102.019015518122-12.0190155181215
917995.7760563717014-16.7760563717014
927585.2425842164849-10.2425842164849
937177.9504105386412-6.95041053864122
946166.3769136729053-5.37691367290529
958479.16481810359064.83518189640944
968776.939129796344610.0608702036554
97107100.901173027156.09882697284978
989999.974851180339-0.974851180339058
999386.90646217115826.0935378288418
1007477.3035896254456-3.30358962544555
1018788.0866936731042-1.08669367310422
1027181.0854898022562-10.0854898022562
1036772.5327477662106-5.53274776621065
1046170.2554994408588-9.25549944085876
1056365.4123500431176-2.4123500431176
1065256.4967203841557-4.49672038415572
1078076.08332154297943.91667845702062
1088476.83591513457687.16408486542316
10910297.22556238405964.77443761594043
1109391.3285222227711.67147777722896
1118783.71103264755093.28896735244912
1127267.12244091910984.87755908089017
1138382.30402971278660.695970287213441
1147270.24764402304661.75235597695344
1156668.9123702414677-2.91237024146766
1166465.2325434717131-1.23254347171307
1176467.6640900377365-3.66409003773653
1184756.9686473910121-9.96864739101214
1197779.889709170909-2.88970917090892
1207980.2122586488956-1.21225864889561


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12196.022460526445983.4407450070382108.604176045854
12286.411071751005373.014096173995199.8080473280155
12379.208041863637465.042649394287793.3734343329872
12462.423941043255647.5297229365477.3181591499711
12573.16937084947957.580364395887588.7583773030705
12661.528398657397845.274275752429477.7825215623662
12756.593677837185839.700605274459973.4867503999117
12855.044514368854937.535793975598772.5532347621111
12956.384755652223638.281311808332274.488199496115
13043.031061456715524.351819817702761.7103030957283
13174.088051729305454.850238511365893.3258649472451
13276.531468531468556.750850578329796.3120864846073
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t12821832871yjbeeh8t8kpnj7/1c4yr1282182992.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12821832871yjbeeh8t8kpnj7/1c4yr1282182992.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t12821832871yjbeeh8t8kpnj7/2nvft1282182992.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12821832871yjbeeh8t8kpnj7/2nvft1282182992.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t12821832871yjbeeh8t8kpnj7/3nvft1282182992.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12821832871yjbeeh8t8kpnj7/3nvft1282182992.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=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