Home » date » 2009 » Jun » 07 »

Opdracht 9 oefening 2

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 07 Jun 2009 09:23:52 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/07/t1244388385xb16lqv90ipnaq3.htm/, Retrieved Sun, 07 Jun 2009 17:26:30 +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/2009/Jun/07/t1244388385xb16lqv90ipnaq3.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:
thomas cammaert
 
Dataseries X:
» Textbox « » Textfile « » CSV «
8,9722 8,8284 8,7446 8,7519 8,6337 8,7272 8,6330 8,5865 8,5968 8,5114 8,3884 8,2671 8,2410 8,3177 8,4070 8,3917 8,4145 8,5245 8,6289 8,6622 8,9055 8,9770 9,1264 9,1120 9,0576 9,2106 9,2637 9,3107 9,6744 9,5780 9,4166 9,4359 9,2275 9,1828 9,0594 9,1358 9,2208 9,1137 9,2689 9,2489 9,1679 9,1051 9,0818 9,0961 9,1733 9,1455 9,2265 9,1541 9,1559 9,1182 9,1856 9,2378 9,0682 9,0105 8,9939 9,0228 9,1368 9,1763 9,2346 9,1653 9,1277 9,1430 9,1962 9,1861 9,0920 9,0620 8,9981 8,9819 9,0476 9,0852 9,0884 9,1670 9,1931 9,2628 9,4276 9,3398 9,3342 9,4223 9,5614 9,4316 9,3111 9,3414 9,4017 9,3346 9,3310 9,2349 9,2170 9,2098 9,2665 9,2533 9,1008 9,0377 9,0795 9,1896 9,2992 9,2372 9,2061 9,3290 9,1842 9,3231 9,2835 9,1735 9,2889 9,4319 9,4314 9,3642 9,4020 9,3699 9,3106 9,3739 9,4566 9,3984 9,5637 9,8506
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
18.9722NANA0.996413972028731NA
28.8284NANA0.998332675899909NA
38.7446NANA1.00320216960678NA
48.7519NANA1.00352650149531NA
58.6337NANA1.00309617782405NA
68.7272NANA0.999620611253606NA
78.6338.58556569161678.60630.9975907987888761.00552489027364
88.58658.526972320118768.554554166666670.9967757704246721.00698110391901
98.59688.507860430511068.519208333333330.998667962752141.01045381153292
108.51148.48622638592748.490133333333330.999539824964751.00296640849864
118.38848.495101458368038.465991666666671.003438438501660.98743964873275
128.26718.446681390367328.44841250.999795096459520.978739414680407
138.2418.40953048940328.439795833333330.9964139720287310.979959583996328
148.31778.428702317490348.442779166666670.9983326758999090.986830438030775
158.4078.485882332260788.458795833333331.003202169606780.99070428634617
168.39178.521002063242568.491058333333331.003526501495310.984825486218301
178.41458.567653433165628.541208333333331.003096177824050.982124226387034
188.52458.603897039409118.60716250.9996206112536060.99077196774375
198.62898.655488493355158.676391666666670.9975907987888760.996928134861994
208.66228.719416495528758.747620833333330.9967757704246720.993438036185324
218.90558.808771571037828.820520833333330.998667962752141.01098092148061
228.9778.890415302647528.894508333333330.999539824964751.00973910603779
239.12649.016191220475438.985295833333331.003438438501661.01222342969771
249.1129.079826630077729.08168750.999795096459521.00354339033476
259.05769.125561873152829.158404166666670.9964139720287310.992552582065905
269.21069.208083998687469.22346250.9983326758999091.00027323831026
279.26379.298797950338369.269116666666671.003202169606780.996225538986243
289.31079.323873440763889.291108333333331.003526501495310.998587127887613
299.67449.325676496477639.296891666666671.003096177824051.03739390956292
309.5789.291565213491639.295091666666670.9996206112536061.03082739882108
319.41669.280470815539729.302883333333330.9975907987888761.01466834896268
329.43599.275642294819989.305645833333330.9967757704246721.01727726232711
339.22759.289434622626939.3018250.998667962752140.99333278879254
349.18289.295187284265549.299466666666670.999539824964750.98790908877589
359.05949.307681724873189.27578751.003438438501660.973325073609932
369.13589.233086886739169.234979166666670.999795096459520.989463232835067
379.22089.168328791177269.2013250.9964139720287311.00572309414484
389.11379.157921941442989.173216666666670.9983326758999090.99517118165827
399.26899.186121626655359.15681.003202169606781.00901124290630
409.24899.185265524105279.15298751.003526501495311.00692788637713
419.16799.18675185541649.158395833333331.003096177824050.997947930268163
429.10519.162643310241089.166120833333330.9996206112536060.993719791517284
439.08189.142100815119389.164179166666670.9975907987888760.993404052707486
449.09619.132123196808339.16166250.9967757704246720.996055331708521
459.17339.146179864486659.158379166666670.998667962752141.00296518720550
469.14559.15023318589939.154445833333330.999539824964750.99948272510622
479.22659.18129029155699.149829166666671.003438438501661.00492411273442
489.15419.139860159807229.141733333333330.999795096459521.00155799322351
499.15599.101373923981829.134129166666670.9964139720287311.00599097196463
509.11829.112194145167289.12741250.9983326758999091.00065910084191
519.18569.152050372970089.12283751.003202169606781.00366580445503
529.23789.154770862541089.12261.003526501495311.00906949378697
539.06829.152471043539269.124220833333331.003096177824050.99079253644853
549.01059.121563068204439.1250250.9996206112536060.98782411880793
558.99399.102334351902669.124316666666670.9975907987888760.988087193052847
569.02289.094756565114549.1241750.9967757704246720.99208812631769
579.13689.113494294289089.125650.998667962752141.00255727440632
589.17639.119738891739339.12393750.999539824964751.00620205347238
599.23469.154143100801949.1227751.003438438501661.00878912404057
609.16539.124042568218659.12591250.999795096459521.00452183683634
619.12779.095499233271739.128233333333330.9964139720287311.00354029678882
629.1439.111486992855189.126704166666660.9983326758999091.00345860200092
639.19629.150491229598159.121283333333331.003202169606781.00499522585782
649.18619.145910559804969.113770833333331.003526501495311.00439425248391
659.0929.132070575022779.103883333333331.003096177824050.995612104101302
669.0629.094410873351269.09786250.9996206112536060.996436176702085
678.99819.078733016254649.100658333333330.9975907987888760.991118472576484
688.98199.079007507941829.1083750.9967757704246720.989304171424368
699.04769.11085614642089.123008333333330.998667962752140.993057057931306
709.08529.134848602093389.139054166666670.999539824964750.994564923376836
719.08849.187030795623839.155551.003438438501660.989264127026676
729.1679.1787730181249.180654166666670.999795096459520.998717364717402
739.19319.186077415054029.21913750.9964139720287311.00076448135898
749.26289.245904168226149.261345833333330.9983326758999091.00182738556083
759.42769.320814057952189.29106251.003202169606781.01145671841364
769.33989.345557975917029.312716666666671.003526501495310.999383880991177
779.33429.365353129877979.336445833333331.003096177824050.996673576591726
789.42239.352933588850849.356483333333330.9996206112536061.00741654054209
799.56149.346640181897739.36921250.9975907987888761.02297722111077
809.43169.343572563574429.373795833333330.9967757704246721.00942117544725
819.31119.351385325249669.363858333333330.998667962752140.99569204734395
829.34149.345364183478769.349666666666670.999539824964750.999575812841433
839.40179.373549096373829.341429166666671.003438438501661.00300322784217
849.33469.329654595618459.331566666666670.999795096459521.00053007368396
859.3319.271964147718029.305333333333340.9964139720287311.00636713552182
869.23499.254273523825779.269729166666670.9983326758999090.997906532179334
879.2179.273266455121869.243666666666671.003202169606780.993932401770815
889.20989.260233135127389.227691666666661.003526501495310.994553794230507
899.26659.245633601054679.217095833333331.003096177824051.00225689226349
909.25339.205272964225169.208766666666660.9996206112536061.00521733966624
919.10089.17734071008669.199504166666670.9975907987888760.991659816007215
929.03779.16856365768219.198220833333330.9967757704246720.985726918351878
939.07959.188519224990839.2007750.998667962752140.988135278131179
949.18969.199893656202969.204129166666660.999539824964750.99888111139241
959.29929.24122483328999.209558333333331.003438438501661.00627353708583
969.23729.205055131722189.206941666666670.999795096459521.00349208862064
979.20619.178421634368949.211454166666670.9964139720287311.00301559099523
989.3299.220317733686729.235716666666670.9983326758999091.01178725825426
999.18429.296478045321149.266804166666671.003202169606780.987922518100535
1009.32319.321498428043679.288741666666661.003526501495311.00017181486096
1019.28359.329095382617049.30031.003096177824050.995112561213384
1029.17359.306580348089839.31011250.9996206112536060.9857004030361
1039.28899.2975420880849.319995833333330.9975907987888760.999070497557083
1049.43199.296150956296469.326220833333330.9967757704246721.01460271507441
1059.43149.327001182492469.339441666666670.998667962752141.01119318154516
1069.36429.349624721982689.353929166666670.999539824964751.0015589158336
1079.4029.40095550872549.368741666666671.003438438501661.00011110479926
1089.36999.406701305239369.408629166666670.999795096459520.996087756584886
1099.3106NANANANA
1109.3739NANANANA
1119.4566NANANANA
1129.3984NANANANA
1139.5637NANANANA
1149.8506NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244388385xb16lqv90ipnaq3/12dtd1244388229.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244388385xb16lqv90ipnaq3/12dtd1244388229.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244388385xb16lqv90ipnaq3/2aq291244388229.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244388385xb16lqv90ipnaq3/2aq291244388229.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244388385xb16lqv90ipnaq3/39bhi1244388229.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244388385xb16lqv90ipnaq3/39bhi1244388229.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244388385xb16lqv90ipnaq3/4s58o1244388229.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244388385xb16lqv90ipnaq3/4s58o1244388229.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; par2 = 12 ;
 
R code (references can be found in the software module):
par2 <- as.numeric(par2)
x <- ts(x,freq=par2)
m <- decompose(x,type=par1)
m$figure
bitmap(file='test1.png')
plot(m)
dev.off()
mylagmax <- length(x)/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$trend),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$seasonal),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$random),na.action=na.pass,lag.max = mylagmax,main='Random')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
spectrum(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
spectrum(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
cpgram(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
cpgram(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Classical Decomposition by Moving Averages',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observations',header=TRUE)
a<-table.element(a,'Fit',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Random',header=TRUE)
a<-table.row.end(a)
for (i in 1:length(m$trend)) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
if (par1 == 'additive') a<-table.element(a,m$trend[i]+m$seasonal[i]) else a<-table.element(a,m$trend[i]*m$seasonal[i])
a<-table.element(a,m$trend[i])
a<-table.element(a,m$seasonal[i])
a<-table.element(a,m$random[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.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