Home » date » 2010 » Jun » 06 »

Opgave 9 Oefening 2 decompositie

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 06 Jun 2010 19:58:04 +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/Jun/06/t1275854417ft0y8xl7ff6dq9h.htm/, Retrieved Sun, 06 Jun 2010 22:00:23 +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/Jun/06/t1275854417ft0y8xl7ff6dq9h.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
0,9383 0,9217 0,9095 0,8920 0,8742 0,8607 0,8607 0,9005 0,9111 0,9059 0,8883 0,8924 0,8833 0,8700 0,8758 0,8858 0,9170 0,9554 0,9922 0,9778 0,9808 0,9811 1,0014 1,0183 1,0622 1,0773 1,0807 1,0848 1,1582 1,1663 1,1372 1,1139 1,1222 1,1692 1,1702 1,2286 1,2613 1,2646 1,2262 1,1985 1,2007 1,2138 1,2266 1,2176 1,2218 1,2490 1,2991 1,3408 1,3119 1,3014 1,3201 1,2938 1,2694 1,2165 1,2037 1,2292 1,2256 1,2015 1,1786 1,1856 1,2103 1,1938 1,2020 1,2271 1,2770 1,2650 1,2684 1,2811 1,2727 1,2611 1,2881 1,3213 1,2999 1,3074 1,3242 1,3516 1,3511 1,3419 1,3716 1,3622 1,3896 1,4227 1,4684 1,4570 1,4718 1,4748 1,5527 1,5751 1,5557 1,5553 1,5770 1,4975 1,4370 1,3322 1,2732 1,3449 1,3239 1,2785 1,3050 1,3190 1,3650 1,4016 1,4088 1,4268 1,4562 1,4816 1,4914 1,4614
 
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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
10.9383NANA0.00486019965277778NA
20.9217NANA-0.00783563368055566NA
30.9095NANA0.00144665798611115NA
40.892NANA0.00173415798611112NA
50.8742NANA0.0153945746527778NA
60.8607NANA0.0120023871527777NA
70.86070.9033378038194450.8939833333333330.00935447048611112-0.0426378038194445
80.90050.8878253038194450.8895375-0.001712196180555510.0126746961805554
90.91110.8779737413194450.885979166666667-0.008005425347222250.0331262586805555
100.90590.8672648871527780.884316666666667-0.01705177951388880.0386351128472221
110.88830.8695846788194440.885841666666667-0.01625698784722230.0187153211805555
120.89240.8976404079861110.8915708333333330.00606957465277776-0.00524040798611125
130.88330.9058560329861110.9009958333333330.00486019965277778-0.0225560329861111
140.870.9018601996527780.909695833333333-0.00783563368055566-0.0318601996527778
150.87580.9172674913194440.9158208333333330.00144665798611115-0.0414674913194444
160.88580.9235924913194440.9218583333333330.00173415798611112-0.0377924913194443
170.9170.9450987413194440.9297041666666670.0153945746527778-0.0280987413194445
180.95540.9516648871527780.93966250.01200238715277770.00373511284722239
190.99220.9617169704861110.95236250.009354470486111120.0304830295138889
200.97780.9667419704861110.968454166666667-0.001712196180555510.0110580295138890
210.98080.9776237413194440.985629166666667-0.008005425347222250.0031762586805556
220.98110.9854065538194451.00245833333333-0.0170517795138888-0.00430655381944467
231.00141.004543012152781.0208-0.0162569878472223-0.00314301215277757
241.01831.045707074652781.03963750.00606957465277776-0.0274070746527777
251.06221.059326866319441.054466666666670.004860199652777780.00287313368055564
261.07731.058343532986111.06617916666667-0.007835633680555660.0189564670138886
271.08071.079188324652781.077741666666670.001446657986111150.00151167534722219
281.08481.093204991319441.091470833333330.00173415798611112-0.00840499131944461
291.15821.121736241319441.106341666666670.01539457465277780.0364637586805552
301.16631.134139887152781.12213750.01200238715277770.0321601128472222
311.13721.148550303819441.139195833333330.00935447048611112-0.0113503038194442
321.11391.153583637152781.15529583333333-0.00171219618055551-0.039683637152778
331.12221.161157074652781.1691625-0.00800542534722225-0.0389570746527779
341.16921.162910720486111.1799625-0.01705177951388880.00628927951388913
351.17021.170213845486111.18647083333333-0.0162569878472223-1.38454861111637e-05
361.22861.196290407986111.190220833333330.006069574652777760.0323095920138887
371.26131.200785199652781.1959250.004860199652777780.0605148003472225
381.26461.196135199652781.20397083333333-0.007835633680555660.0684648003472224
391.22621.213888324652781.212441666666670.001446657986111150.0123116753472223
401.19851.221650824652781.219916666666670.00173415798611112-0.0231508246527781
411.20071.244007074652781.22861250.0153945746527778-0.0433070746527777
421.21381.250660720486111.238658333333330.0120023871527777-0.0368607204861111
431.22661.254796137152781.245441666666670.00935447048611112-0.0281961371527777
441.21761.247371137152781.24908333333333-0.00171219618055551-0.0297711371527776
451.22181.246523741319441.25452916666667-0.00800542534722225-0.0247237413194445
461.2491.245360720486111.2624125-0.01705177951388880.00363927951388887
471.29911.252988845486111.26924583333333-0.01625698784722230.0461111545138890
481.34081.278290407986111.272220833333330.006069574652777760.0625095920138892
491.31191.276239366319441.271379166666670.004860199652777780.0356606336805558
501.30141.263072699652781.27090833333333-0.007835633680555660.0383273003472222
511.32011.272996657986111.271550.001446657986111150.0471033420138889
521.29381.271463324652781.269729166666670.001734157986111120.0223366753472221
531.26941.278123741319441.262729166666670.0153945746527778-0.00872374131944431
541.21651.263244053819441.251241666666670.0120023871527777-0.0467440538194444
551.20371.249896137152781.240541666666670.00935447048611112-0.0461961371527777
561.22921.230112803819441.231825-0.00171219618055551-0.000912803819444363
571.22561.214415407986111.22242083333333-0.008005425347222250.0111845920138887
581.20151.197669053819441.21472083333333-0.01705177951388880.00383094618055568
591.17861.196001345486111.21225833333333-0.0162569878472223-0.0174013454861108
601.18561.220665407986111.214595833333330.00606957465277776-0.0350654079861108
611.21031.224172699652781.21931250.00486019965277778-0.0138726996527780
621.19381.216335199652781.22417083333333-0.00783563368055566-0.0225351996527778
631.2021.229742491319441.228295833333330.00144665798611115-0.0277424913194444
641.22711.234475824652781.232741666666670.00173415798611112-0.00737582465277753
651.2771.255182074652781.23978750.01539457465277780.0218179253472219
661.2651.262006553819441.250004166666670.01200238715277770.00299344618055541
671.26841.268746137152781.259391666666670.00935447048611112-0.000346137152777759
681.28111.266146137152781.26785833333333-0.001712196180555510.0149538628472221
691.27271.269677907986111.27768333333333-0.008005425347222250.00302209201388903
701.26111.270910720486111.2879625-0.0170517795138888-0.00981072048611087
711.28811.279980512152781.2962375-0.01625698784722230.00811948784722238
721.32131.308598741319441.302529166666670.006069574652777760.0127012586805557
731.29991.314893532986111.310033333333330.00486019965277778-0.0149935329861111
741.30741.309876866319441.3177125-0.00783563368055566-0.00247686631944455
751.32421.327409157986111.32596250.00144665798611115-0.0032091579861111
761.35161.339300824652781.337566666666670.001734157986111120.0122991753472221
771.35111.367207074652781.35181250.0153945746527778-0.0161070746527776
781.34191.376981553819441.364979166666670.0120023871527777-0.0350815538194442
791.37161.387150303819441.377795833333330.00935447048611112-0.0155503038194444
801.36221.390221137152781.39193333333333-0.00171219618055551-0.0280211371527777
811.38961.400423741319441.40842916666667-0.00800542534722225-0.0108237413194447
821.42271.410210720486111.4272625-0.01705177951388880.0124892795138891
831.46841.428843012152781.4451-0.01625698784722230.0395569878472219
841.4571.468586241319441.462516666666670.00606957465277776-0.0115862413194443
851.47181.484826866319441.479966666666670.00486019965277778-0.0130268663194444
861.47481.486326866319441.4941625-0.00783563368055566-0.0115268663194441
871.55271.503221657986111.5017750.001446657986111150.0494783420138887
881.57511.501713324652781.499979166666670.001734157986111120.0733866753472221
891.55571.503469574652781.4880750.01539457465277780.0522304253472223
901.55531.487273220486111.475270833333330.01200238715277770.0680267795138891
911.5771.473791970486111.46443750.009354470486111120.103208029513889
921.49751.448383637152781.45009583333333-0.001712196180555510.0491163628472224
931.4371.423590407986111.43159583333333-0.008005425347222250.0134095920138890
941.33221.393552387152781.41060416666667-0.0170517795138888-0.0613523871527777
951.27321.375730512152781.3919875-0.0162569878472223-0.102530512152778
961.34491.383707074652781.37763750.00606957465277776-0.0388070746527778
971.32391.369085199652781.3642250.00486019965277778-0.0451851996527777
981.27851.346435199652781.35427083333333-0.00783563368055566-0.067935199652778
991.3051.353571657986111.3521250.00144665798611115-0.0485716579861113
1001.3191.360884157986111.359150.00173415798611112-0.0418841579861111
1011.3651.389861241319441.374466666666670.0153945746527778-0.0248612413194447
1021.40161.400414887152781.38841250.01200238715277770.00118511284722222
1031.4088NANA0.00935447048611112NA
1041.4268NANA-0.00171219618055551NA
1051.4562NANA-0.00800542534722225NA
1061.4816NANA-0.0170517795138888NA
1071.4914NANA-0.0162569878472223NA
1081.4614NANA0.00606957465277776NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854417ft0y8xl7ff6dq9h/1j9hv1275854281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854417ft0y8xl7ff6dq9h/1j9hv1275854281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854417ft0y8xl7ff6dq9h/2j9hv1275854281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854417ft0y8xl7ff6dq9h/2j9hv1275854281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854417ft0y8xl7ff6dq9h/3ciyy1275854281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854417ft0y8xl7ff6dq9h/3ciyy1275854281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854417ft0y8xl7ff6dq9h/4ciyy1275854281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854417ft0y8xl7ff6dq9h/4ciyy1275854281.ps (open in new window)


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