Home » date » 2010 » May » 31 »

Opgave 10 eigen oefening Laura Quaglia

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 31 May 2010 19:53:46 +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/May/31/t1275335947vulr2enohhu0b95.htm/, Retrieved Mon, 31 May 2010 21:59:12 +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/May/31/t1275335947vulr2enohhu0b95.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
464 675 703 887 1139 1077 1318 1260 1120 963 996 960 530 883 894 1045 1199 1287 1565 1577 1076 918 1008 1063 544 635 804 980 1018 1064 1404 1286 1104 999 996 1015 615 722 832 977 1270 1437 1520 1708 1151 934 1159 1209 699 830 996 1124 1458 1270 1753 2258 1208 1241 1265 1828 809 997 1164 1205 1538 1513 1378 2083 1357 1536 1526 1376 779 1005 1193 1522 1539 1546 2116 2326 1596 1356 1553 1613 814 1150 1225 1691 1759 1754 2100 2062 2012 1897 1964 2186 966 1549 1538 1612 2078 2137 2907 2249 1883 1739 1828 1868 1138 1430 1809 1763 2200 2067 2503 2141 2103 1972 2181 2344 970 1199 1718 1683 2025 2051 2439 2353 2230 1852 2147 2286 1007 1665 1642 1518 1831 2207 2822 2393 2306 1785 2047 2171 1212 1335 2011 1860 1954 2152 2835 2224 2182 1992 2389 2724 891 1247 2017 2257 2255 2255 3057 3330 1896 2096 2374 2535 1041 1728 2201 2455 2204 2660 3670 2665 etc...
 
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.608148513917232
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
2675464211
3703592.319336436536110.680663563464
4887659.62961750203227.370382497970
51139797.904577726963341.095422273037
610771005.3412518862871.6587481137188
713181048.92041306081269.079586939191
812601212.5607639833447.4392360166596
911201241.41086486824-121.410864868241
109631167.57502782521-204.575027825214
119961043.16302866873-47.1630286687339
129601014.48090287201-54.4809028720076
13530981.348422753527-451.348422753527
14883706.861550197083176.138449802917
15894813.97988668841280.020113311588
161045862.643999682343182.356000317657
171199973.543530279416225.456469720584
1812871110.65454729301176.345452706985
1915651217.89877229283347.101227707171
2015771428.98786810179148.012131898208
2110761519.00122615741-443.001226157408
229181249.59068880627-331.590688806269
2310081047.93430417995-39.9343041799452
2410631023.6483164385939.3516835614071
255441047.57998431660-503.579984316604
26635741.328565215998-106.328565215998
27804676.665006292938127.334993707062
28980754.103593485548225.896406514452
291018891.482157406555126.517842593445
301064968.42379536377395.5762046362272
3114041026.54832217914377.451677820856
3212861256.0949991214629.9050008785368
3311041274.28168096444-170.281680964439
349991170.72512973859-171.725129738587
359961066.29074728582-70.2907472858215
3610151023.54353378182-8.54353378181736
376151018.34779640880-403.347796408803
38722773.052433431-51.0524334309995
39832742.00497190807989.9950280919213
40977796.73531450212180.264685497880
411270906.363015099413363.636984900587
4214371127.50830707205309.491692927952
4315201315.72522019591204.27477980409
4417081439.95462396454268.045376035463
4511511602.96602106289-451.966021062889
469341328.10355701241-394.103557012409
4711591088.4300644858270.5699355141824
4812091131.3470658960077.6529341039975
496991178.57158237266-479.571582372661
50830886.920837235792-56.9208372357921
51996852.30451465992143.695485340080
521124939.692710526105184.307289473895
5314581051.77891472377406.221085276233
5412701298.82166405635-28.8216640563533
5517531281.29381189186471.70618810814
5622581568.16122919539689.838770804612
5712081987.68565250270-779.685652502702
5812411513.52098161060-272.520981610597
5912651347.78775163285-82.787751632847
6018281297.44050350678530.559496493218
618091620.09947284381-811.099472843807
629971126.83053379480-129.830533794796
6311641047.87428760641116.125712393590
6412051118.4959670261586.5040329738486
6515381171.10326612704366.896733872955
6615131394.23096959297118.769030407032
6713781466.46017893440-88.4601789343951
6820831412.66325257459670.33674742541
6913571820.32754934546-463.327549345464
7015361538.55558875411-2.55558875410725
7115261537.00141125111-11.0014112511135
7213761530.31091934776-154.310919347757
737791436.46696306522-657.466963065217
7410051036.62940652743-31.6294065274296
7511931017.39402995169175.605970048311
7615221124.18853967156397.811460328437
7715391366.11698808955172.883011910454
7815461471.2555348644274.7444651355763
7921161516.71127026016599.288729739837
8023261881.16782065879444.83217934121
8115962151.69184946771-555.69184946771
8213561813.74867701800-457.748677018004
8315531535.3694993419317.6305006580740
8416131546.0914621167566.9085378832497
858141586.78178999882-772.781789998824
8611501116.8156928287433.1843071712592
8712251136.9966799203288.003320079685
8816911190.51576824656500.484231753442
8917591494.88451002642264.115489973579
9017541655.5059527563798.4940472436256
9121001715.40496121728384.595038782721
9220621949.29586251293112.704137487069
9320122017.83671623802-5.83671623801547
9418972014.28712593171-117.287125931710
9519641942.9591345947221.0408654052826
9621861955.75510562247230.244894377528
979662095.77819597520-1129.77819597520
9815491408.70526503679140.294734963211
9915381494.0252996150843.9747003849222
10016121520.7684483041291.2315516958763
10120781576.25078089033501.749219109666
10221371881.38882285101255.611177148991
10329072036.83838037480870.161619625198
10422492566.02587621768-317.025876217678
10518832373.22706072259-490.227060722589
10617392075.09620226213-336.096202262134
10718281870.69979632319-42.6997963231918
10818681844.7319786446723.2680213553258
10911381858.88239125371-720.88239125371
11014301420.478836303679.52116369633404
11118091426.26911785635382.730882143646
11217631659.02633506224103.973664937756
11322001722.25776488067477.742235119332
11420672012.7959952039954.2040047960136
11525032045.76008016904457.239919830955
11621412323.82985791787-182.829857917875
11721032212.64215152542-109.642151525421
11819722145.96344001255-173.963440012548
11921812040.16783249299140.832167507013
12023442125.81470587412218.185294125880
1219702258.50376825537-1288.50376825537
12211991474.90211641411-275.902116414113
12317181307.11265433025410.887345669749
12416831556.99318298670126.006817013295
12520251633.62404149678391.375958503219
12620511871.63874904345179.361250956554
12724391980.71702726701458.28297273299
12823532259.4211360881593.578863911851
12922302316.33098311020-86.3309831102042
13018522263.82892402672-411.82892402672
13121472013.37577589174133.624224108262
13222862094.63914920652191.360850793480
13310072211.01496623851-1204.01496623851
13416651478.79505378645186.204946213545
13516421592.0353151102649.9646848897396
13615181622.42126397430-104.421263974298
13718311558.91762746697272.08237253303
13822071724.38411798601482.615882013993
13928222017.88624942567804.11375057433
14023932506.90683185786-113.906831857861
14123062437.63456133848-131.634561338483
14217852357.58119848034-572.581198480338
14320472009.3667935275737.6332064724272
14421712032.25337211772138.746627882280
14512122116.63192767536-904.631927675356
14613351566.48136521751-231.481365217507
14720111425.70631696095585.293683039052
14818601781.6518005062978.3481994937092
14919541829.29914159648124.700858403519
15021521905.13578331878246.864216681216
15128352055.26588983281779.734110167193
15222242529.46003018156-305.460030181560
15321822343.69496676553-161.694966765532
15419922245.36041301918-253.360413019177
15523892091.27965435611297.720345643892
15627242272.33784012237451.662159877635
1578912547.01551144460-1656.01551144460
15812471539.91213913568-292.912139135680
15920171361.778057012655.221942988001
16022571760.25030792611496.749692073887
16122552062.34789494969192.652105050310
16222552179.5089863390675.4910136609378
16330572225.41873411107831.581265888933
16433302731.14364516283598.856354837168
16518963095.33724740695-1199.33724740695
16620962365.96208271083-269.962082710828
16723742201.78504329624172.214956703763
16825352306.51731328995228.482686710049
16910412445.46871966848-1404.46871966848
17017281591.34315495886136.656845041142
17122011674.45081218725526.549187812754
17224551994.67091825990460.329081740102
17322042274.61936523302-70.6193652330248
17426602231.67230321278428.327696787218
17536702492.159155483521177.84084451648
17626653208.46131470723-543.461314707234
17726392877.95612379652-238.956123796524
17822262732.63531221825-506.635312218246
17925862424.52579999473161.474200005273
18026842522.72609476391161.273905236092
18111852620.80458056687-1435.80458056687
18217491747.622158619571.37784138042798
18324591748.46009080749710.539909192507
18426182180.5738806618437.426119338199
18525852446.59392508591138.406074914092
18633102530.76537386203779.23462613797
18739233004.65575374069918.344246259314


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1883563.145442367732697.561232636484428.72965209897
1893563.145442367732550.062556809194576.22832792627
1903563.145442367732421.463419260084704.82746547538
1913563.145442367732305.950648088534820.34023664693
1923563.145442367732200.192890134794926.09799460067
1933563.145442367732102.070301071495024.22058366397
1943563.145442367732010.134986063785116.15589867167
1953563.145442367731923.345946616825202.94493811864
1963563.145442367731840.924987507065285.36589722840
1973563.145442367731762.272264152225364.01862058324
1983563.145442367731686.91381677045439.37706796506
1993563.145442367731614.467423359165511.8234613763
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t1275335947vulr2enohhu0b95/1ya171275335623.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275335947vulr2enohhu0b95/1ya171275335623.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275335947vulr2enohhu0b95/2ya171275335623.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275335947vulr2enohhu0b95/2ya171275335623.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275335947vulr2enohhu0b95/3rjis1275335623.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275335947vulr2enohhu0b95/3rjis1275335623.ps (open in new window)


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