Home » date » 2009 » Dec » 04 »

review workshop 9

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 04 Dec 2009 03:37:14 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t1259923076fp0cna71ygw5du1.htm/, Retrieved Fri, 04 Dec 2009 11:38:01 +0100
 
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/Dec/04/t1259923076fp0cna71ygw5du1.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.610 10.862 52.929 56.902 81.776 87.876 82.103 72.846 60.632 33.521 15.342 7.758 8.668 13.082 38.157 58.263 81.153 88.476 72.329 75.845 61.108 37.665 12.755 2.793 12.935 19.533 33.404 52.074 70.735 69.702 61.656 82.993 53.990 32.283 15.686 2.713 12.842 19.244 48.488 54.464 84.192 84.458 85.793 75.163 68.212 49.233 24.302 5.402 15.058 33.559 70.358 85.934 94.452 129.305 113.882 107.256 94.274 57.842 26.611 14.521
 
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.0856933077970092
beta0.133966475305803
gamma0.210070820415668


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
138.6688.90730328460187-0.239303284601871
1413.08213.4491526080878-0.367152608087789
1538.15738.8689753281552-0.711975328155155
1658.26358.7788482637078-0.515848263707817
1781.15381.3648054271869-0.211805427186917
1888.47688.927276416743-0.451276416742985
1972.32979.2169136883903-6.88791368839036
2075.84569.50139269706776.34360730293231
2161.10858.70101054810812.40698945189192
2237.66532.83570178598564.82929821401444
2312.75515.1771948283939-2.42219482839394
242.7937.54035851209682-4.74735851209682
2512.9357.900451592575585.03454840742442
2619.53312.59567824931816.9373217506819
2733.40438.4897169640234-5.08571696402337
2852.07457.9903263769801-5.91632637698005
2970.73579.9827780515775-9.24777805157747
3069.70286.694324305443-16.9923243054429
3161.65674.7322227784386-13.0762227784386
3282.99367.236855635970415.7561443640296
3353.9956.9540077741217-2.96400777412166
3432.28332.20650788191770.076492118082264
3515.68613.82510626006361.86089373993636
362.7136.34659467776843-3.63359467776843
3712.8428.567829006388494.27417099361151
3819.24413.32541240009355.91858759990655
3948.48835.681922463767912.8060775362321
4054.46456.6368096885508-2.17280968855079
4184.19278.73664570308565.45535429691436
4284.45885.9225951108235-1.46459511082354
4385.79376.25933569664189.53366430335817
4475.16377.0882215200617-1.92522152006171
4568.21261.15890327142387.05309672857624
4649.23335.869733532178813.3632664678212
4724.30216.53852749538427.7634725046158
485.4026.85831393575046-1.45631393575046
4915.05812.07949107129332.97850892870668
5033.55918.596043912744914.9629560872551
5170.35851.670217885329918.6877821146701
5285.93477.9185619173658.01543808263507
5394.452114.34047554971-19.8884755497099
54129.305122.437032486426.86796751358001
55113.882114.427829459730-0.545829459730129
56107.256113.081087749935-5.82508774993509
5794.27493.40007808416750.873921915832483
5857.84257.63102823219550.210971767804516
5926.61126.44328449916220.167715500837801
6014.5219.351595898711445.16940410128856


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
6119.418445646790615.206593500623823.6302977929575
6232.321965269489327.477870791493837.1660597474849
6378.460375948431570.086117951440786.8346339454222
64109.41272297222797.5294342771035121.296011667351
65150.387317610432133.341551005239167.433084215626
66170.851430593446150.344425896385191.358435290508
67156.846912860106136.833576216481176.860249503732
68153.451626386386132.794137037388174.109115735384
69128.706729261245110.376448001314147.037010521176
7079.195354419452966.939799757236791.450909081669
7136.312660114152229.354629568333943.2706906599705
7214.105845889762111.782879833976116.4288119455482
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259923076fp0cna71ygw5du1/1hjes1259923032.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259923076fp0cna71ygw5du1/1hjes1259923032.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259923076fp0cna71ygw5du1/2frhr1259923032.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259923076fp0cna71ygw5du1/2frhr1259923032.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259923076fp0cna71ygw5du1/3yl1c1259923032.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259923076fp0cna71ygw5du1/3yl1c1259923032.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