Home » date » 2011 » Jan » 16 »

opgave 10 oef 2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 16 Jan 2011 19:33:18 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/Jan/16/t1295206744zkp056ewd34gpay.htm/, Retrieved Sun, 16 Jan 2011 20:39:07 +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/2011/Jan/16/t1295206744zkp056ewd34gpay.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
24.3 29.4 31.8 36.7 37.1 37.7 39.4 43.3 39.6 34.3 32 29.6 22.3 28.9 31.7 34.2 38.6 37.2 38.8 43.4 38.8 36.3 33 29.2 22.64 28.44 30.14 34.39 36.82 36.74 38.9 42.8 39.09 37.49 33.17 30.98 21.2 27.8 29 35.4 37.5 34.7 38.4 39.9 35.9 34.7 30.4 29 21.5 28 29.3 34.3 36.6 36.2 37.5 41.6 39.4 37.3 32.7 30.7 22.9 29.1 29.5 37.1 37.7 38.4 39.4 40.6 39.7 36.6 32.8 31.6 24.1 30.3 31.8 38.7 37.8 38.4 40.7 43.8 41.5 39.3 35.9 33.4
 
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' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.335559903587047
beta0
gamma0.746828588388269


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1322.322.4976495726496-0.197649572649578
1428.929.0394556717366-0.139455671736624
1531.731.8091226439367-0.109122643936725
1634.234.2098014973542-0.00980149735418223
1738.638.4688085451430.131191454856967
1837.237.07512717438230.124872825617686
1938.839.1709921916699-0.370992191669927
2043.443.03796479156430.362035208435678
2138.839.4717453284981-0.671745328498147
2236.334.04196390146162.25803609853838
233332.52863298094590.471367019054071
2429.230.2324342230432-1.0324342230432
2522.6422.5210418292540.118958170745962
2628.4429.1979659360931-0.757965936093058
2730.1431.7751376054034-1.63513760540337
2834.3933.71303244882210.676967551177874
2936.8238.2724555782065-1.45245557820648
3036.7436.34423031344730.395769686552718
3138.938.28493789858050.615062101419461
3242.842.8465357344012-0.0465357344012034
3339.0938.63023071125050.459769288749513
3437.4935.03396473685292.4560352631471
3533.1732.70048835772790.469511642272117
3630.9829.65744645763981.32255354236019
3721.223.3076407571489-2.10764075714892
3827.828.8022577547557-1.00225775475574
392930.8621822511304-1.86218225113037
4035.433.87120944685681.5287905531432
4137.537.6598017867894-0.159801786789444
4234.737.0824709291083-2.38247092910833
4338.438.19973027023070.200269729769268
4439.942.2938404480323-2.39384044803229
4535.937.5411142077381-1.64111420773806
4634.734.23046877949580.469531220504237
4730.430.2446428641830.155357135817006
482927.51948219893851.48051780106151
4921.519.52054214670451.97945785329555
502826.93514187402171.0648581259783
5129.329.26199338368910.0380066163109127
5234.334.5913259932237-0.29132599322373
5336.636.931242081273-0.331242081273025
5436.235.19344349788551.00655650211451
5537.538.7295395115909-1.22953951159086
5641.641.05660626851680.543393731483228
5739.437.66301801352171.73698198647829
5837.336.53327672783160.766723272168427
5932.732.49127618610920.208723813890799
6030.730.44159825251720.258401747482829
6122.922.28015051449730.61984948550268
6229.128.78467489722250.3153251027775
6329.530.3504659857137-0.850465985713733
6437.135.21824044541821.88175955458176
6537.738.2675496350328-0.567549635032755
6638.437.11430194986821.28569805013181
6739.439.6344647169843-0.23446471698432
6840.643.1752086792281-2.57520867922806
6939.739.32742827665630.372571723343725
7036.637.2583810611665-0.658381061166487
7132.832.46128056008970.338719439910342
7231.630.47987527248131.12012472751873
7324.122.78694584459881.31305415540115
7430.329.37296995960710.927030040392875
7531.830.56553251074261.2344674892574
7638.737.4887198160771.21128018392299
7737.839.0976398034029-1.29763980340287
7838.438.619026997003-0.219026997002956
7940.739.87992485751930.820075142480661
8043.842.61299945156411.18700054843593
8141.541.49042163457360.0095783654264352
8239.338.78798606439360.512013935606447
8335.934.87840725721911.02159274278085
8433.433.513898035352-0.113898035351966


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8525.502616040478123.341406642265227.6638254386909
8631.456477839597829.17683682085833.7361188583375
8732.490523769679830.098307164579434.8827403747802
8838.987967212385836.488239747817841.4876946769537
8938.945446688180436.34264540715441.5482479692068
9039.437502099940936.735556204866442.1394479950154
9141.287522873185538.489943789172444.0851019571985
9243.927489905568241.037440452236246.8175393589001
9341.822338496762738.842687014776644.8019899787488
9439.366008826438736.299372221703942.4326454311735
9535.537483325117832.38626178785738.6887048623786
9633.26671206037530.033117421541436.5003066992087
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295206744zkp056ewd34gpay/16jmq1295206396.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295206744zkp056ewd34gpay/16jmq1295206396.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295206744zkp056ewd34gpay/2uesw1295206396.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295206744zkp056ewd34gpay/2uesw1295206396.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295206744zkp056ewd34gpay/32e0z1295206396.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295206744zkp056ewd34gpay/32e0z1295206396.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