Home » date » 2008 » Jun » 01 »

exponential smoothing eigen reeks - opgave 10 - Vanovermeire Bart

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 01 Jun 2008 08:43:51 -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/Jun/01/t1212331487ymq737xbl7v7w1h.htm/, Retrieved Sun, 01 Jun 2008 14:44:51 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
42.3 50.8 54.1 38.2 48.4 61.1 54.1 61.4 64.3 57.4 71.7 55.3 55.1 66.8 59.4 64.9 59.2 77.4 75.8 38.3 54 61.8 61.3 104.3 39.7 62.6 50.2 90.9 56.2 50.2 52.8 45.6 69 81.9 73.9 54.9 55.4 64.6 49.6 55.8 44.6 61.5 40.5 48.3 50.9 65.3 56.5 53.2 56.9 79.5 94 68.4 65.9 85.5 77.5 114.8 87.4 107.5 151.7 94.4 67.5 95.2 96.2 70.6 80.1 83.4 115.4 61.5 80.6 94.3 82.6 107.7 79.1 102.8 125.2 106.4 62.3 107.4 67.9 88 76.5 130.5 100.9 85.6
 
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 time7 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.176253502446095
beta0
gamma0.418332059342259


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1355.149.82911686001515.27088313998491
1466.861.5930616681875.20693833181301
1559.456.83963076297432.56036923702569
1664.962.84600068962192.05399931037810
1759.257.89212042075931.30787957924071
1877.474.045768361153.35423163885002
1975.871.50054225099394.29945774900614
2038.336.98077681934091.31922318065913
215452.93399465506971.06600534493033
2261.860.1253004316471.67469956835297
2361.359.04117624082232.25882375917774
24104.3103.1463683007881.15363169921187
2539.756.6300743549653-16.9300743549653
2662.664.652505069366-2.05250506936604
2750.257.7020879009876-7.50208790098762
2890.961.5906152084529.3093847915500
2956.260.9339263879327-4.73392638793268
3050.277.1517397456751-26.9517397456751
3152.869.7016294630241-16.9016294630241
3245.633.870369008396611.7296309916035
336950.851892903771618.1481070962284
3481.961.336583240439520.5634167595605
3573.963.700855823024310.1991441769757
3654.9112.623356679300-57.7233566792996
3755.449.8400912768515.55990872314898
3864.667.9640419486506-3.36404194865058
3949.658.3359411989728-8.73594119897277
4055.874.8655780331879-19.0655780331879
4144.655.1524772585909-10.5524772585909
4261.561.30133679022960.19866320977043
4340.561.8256271891787-21.3256271891787
4448.335.927954033349512.3720459666505
4550.954.0801733459901-3.18017334599011
4665.360.37373823659414.92626176340593
4756.557.0530012679981-0.553001267998113
4853.274.9000841626525-21.7000841626525
4956.944.52572317312212.3742768268779
5079.559.158031499902320.3419685000977
519452.349985709792241.6500142902078
5268.475.4511122681335-7.0511122681335
5365.958.72785537938767.17214462061242
5485.574.143684738461711.3563152615383
5577.566.964313413683110.5356865863169
56114.854.206093242943260.5939067570568
5787.481.11948944240566.2805105575944
58107.597.320849295372310.1791507046277
59151.789.544359569126462.1556404308736
6094.4118.655250946366-24.2552509463664
6167.587.3905255427864-19.8905255427864
6295.2108.235746459935-13.0357464599350
6396.298.6241737833614-2.42417378336138
6470.696.7872624601969-26.1872624601969
6580.178.5199823759641.58001762403606
6683.498.340186507812-14.9401865078121
67115.484.276282125162431.1237178748376
6861.588.7683680484569-27.2683680484569
6980.681.5030701162586-0.903070116258633
7094.397.1270994408894-2.82709944088941
7182.6102.283715607434-19.6837156074336
72107.789.142073826712418.5579261732876
7379.169.9490164178059.15098358219494
74102.896.28812086778236.51187913221773
75125.293.919708829915731.2802911700843
76106.489.168857979649917.2311420203501
7762.387.6758576226446-25.3758576226446
78107.497.57739547188489.8226045281152
7967.9103.462129093953-35.5621290939532
808876.250416540069911.7495834599301
8176.585.2807586458286-8.78075864582861
82130.599.351987096466231.1480129035338
83100.9104.412252298965-3.51225229896471
8485.6107.491704678564-21.8917046785639


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8576.597779945331156.245142973455596.9504169172067
86100.98751966604779.4013045443748122.573734787718
87105.46687951898783.3812703818284127.552488656145
8890.824654953911368.6537323092663112.995577598556
8972.610016442212447.245998980374697.9740339040501
9098.397909757325673.3259679701948123.469851544456
9186.635038196564861.1872628011026112.082813592027
9281.793050002628855.4518909698628108.134209035395
9381.623012990580349.7398467184914113.506179262669
94110.76622580059180.233922491469141.298529109713
9598.900600783925268.1115197089342129.689681858916
9696.089343064161NANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212331487ymq737xbl7v7w1h/1nxgf1212331422.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212331487ymq737xbl7v7w1h/1nxgf1212331422.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212331487ymq737xbl7v7w1h/2je8b1212331422.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212331487ymq737xbl7v7w1h/2je8b1212331422.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212331487ymq737xbl7v7w1h/3hg321212331422.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212331487ymq737xbl7v7w1h/3hg321212331422.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; 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