Home » date » 2008 » Aug » 11 »

Michaël Mertens opdracht 10

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 11 Aug 2008 13:26:29 -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/Aug/11/t1218482821vrhl6orspatfn34.htm/, Retrieved Mon, 11 Aug 2008 19:27:05 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
15.14 15.09 15.17 15.18 15.21 15.27 15.28 15.3 15.34 15.33 15.27 15.35 15.38 15.38 15.39 15.4 15.39 15.43 15.43 15.47 15.48 15.47 15.58 15.56 15.61 15.56 15.62 15.63 15.58 15.65 15.79 15.76 15.77 15.79 15.87 15.79 15.9 15.96 16.05 16.18 16.29 16.43 16.38 16.39 16.35 16.48 16.52 16.44 16.46 16.52 16.47 16.59 16.59 16.59 16.54 16.48 16.47 16.56 16.61 16.57 16.72 16.69 16.72 16.81 16.75 16.85 16.84 16.92 17.02 17.11 17.2 17.3 17.37 17.42 17.51 17.56 17.62 17.59 17.78 17.73 17.79 17.85 17.86 17.79 17.97 17.96 18.03 18.02 18.03 18.14 18.16 18.24 18.28 18.18 18.19 18.32
 
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.862499742878666
beta0.0338568524640709
gamma0.871697167846424


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1315.3815.26961250.110387499999995
1415.3815.37292035503790.00707964496207936
1515.3915.3977486147752-0.00774861477524169
1615.415.4108112329217-0.0108112329217409
1715.3915.3938333058659-0.00383330586586617
1815.4315.42984523405190.00015476594814956
1915.4315.4326347258873-0.00263472588727609
2015.4715.4741913437140-0.00419134371395025
2115.4815.4842829854306-0.00428298543063832
2215.4715.4720871831442-0.00208718314416600
2315.5815.5833909774979-0.00339097749786887
2415.5615.5638878945040-0.00388789450397908
2515.6115.59874024445200.0112597555480356
2615.5615.6034563512448-0.0434563512447621
2715.6215.58073254393820.039267456061788
2815.6315.6331648819733-0.00316488197333697
2915.5815.6230270321828-0.0430270321828186
3015.6515.62397660657920.0260233934208483
3115.7915.64776306226460.142236937735401
3215.7615.8173349762871-0.0573349762871356
3315.7715.7832774869106-0.0132774869106083
3415.7915.76502268437420.0249773156257653
3515.8715.9017392249009-0.0317392249009423
3615.7915.8591243078315-0.0691243078315171
3715.915.83901892288940.0609810771106343
3815.9615.88100647905010.0789935209498509
3916.0515.97833155411170.0716684458883297
4016.1816.05909075654190.120909243458112
4116.2916.16027903997710.129720960022883
4216.4316.33263455745110.0973654425489379
4316.3816.4481005577839-0.0681005577839251
4416.3916.4224117075540-0.0324117075539618
4516.3516.425934675581-0.0759346755809993
4616.4816.36719702106610.112802978933946
4716.5216.5844036434241-0.06440364342415
4816.4416.5197193338504-0.0797193338503988
4916.4616.5163451812626-0.056345181262639
5016.5216.46614690219000.0538530978099523
5116.4716.5470253433148-0.0770253433148369
5216.5916.5072109851510.0827890148490056
5316.5916.57723643427570.0127635657243275
5416.5916.6420825014401-0.0520825014400614
5516.5416.6016974185202-0.061697418520243
5616.4816.5788761214078-0.098876121407752
5716.4716.5109833179501-0.0409833179501504
5816.5616.49716003127950.0628399687205139
5916.6116.6407218417714-0.0307218417714203
6016.5716.5949239270631-0.0249239270631172
6116.7216.63488406769280.0851159323072146
6216.6916.7173067290362-0.0273067290361944
6316.7216.70753050138120.0124694986188345
6416.8116.76170649589190.0482935041081305
6516.7516.7902250548055-0.0402250548054681
6616.8516.79668737410330.0533126258967407
6716.8416.8442221112176-0.00422211121762572
6816.9216.86636441203680.0536355879632175
6917.0216.94125278978540.0787472102146474
7017.1117.05093840086870.0590615991312760
7117.217.18771408400980.0122859159901552
7217.317.18864807298080.111351927019246
7317.3717.3722575813102-0.00225758131021436
7417.4217.37621660535620.0437833946438069
7517.5117.44496987039200.065030129607976
7617.5617.5627548178179-0.00275481781785203
7717.6217.54912542168090.070874578319092
7817.5917.6783576375715-0.088357637571498
7917.7817.60840398631230.171596013687729
8017.7317.8058564838392-0.0758564838392033
8117.7917.78501882752920.00498117247082774
8217.8517.83951868070540.0104813192946338
8317.8617.9381657196307-0.0781657196306895
8417.7917.8796960840044-0.0896960840044052
8517.9717.87715072680480.092849273195231
8617.9617.9723011271238-0.0123011271238163
8718.0317.99723368898660.0327663110134502
8818.0218.0801299194004-0.0601299194004454
8918.0318.02522761365640.0047723863436353
9018.1418.07581905855510.0641809414448531
9118.1618.1704996291990-0.0104996291989750
9218.2418.17782996466260.0621700353373811
9318.2818.2863544070357-0.0063544070356798
9418.1818.3320307236965-0.152030723696477
9518.1918.2754346170459-0.0854346170459372
9618.3218.20464984155520.115350158444805


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
9718.402160402639818.274879315820818.5294414894587
9818.403237768755618.232703380753318.5737721567579
9918.443153598859818.236221281134818.6500859165849
10018.484669487354718.244992362497618.7243466122119
10118.489179209188918.219027350212818.759331068165
10218.542406625506118.243309113749218.8415041372630
10318.570537389766618.243574643712318.8975001358208
10418.593697687671518.239655877361718.9477394979812
10518.636635739747218.256096846604619.0171746328898
10618.666766223964218.260164448534719.0733679993937
10718.750152271978218.317811322672119.1824932212842
10818.780489011458118.322647820189619.2383302027265
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218482821vrhl6orspatfn34/1cff01218482787.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218482821vrhl6orspatfn34/1cff01218482787.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218482821vrhl6orspatfn34/2rkop1218482787.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218482821vrhl6orspatfn34/2rkop1218482787.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218482821vrhl6orspatfn34/357gg1218482787.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218482821vrhl6orspatfn34/357gg1218482787.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=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