Home » date » 2009 » Jan » 15 »

opdracht 9 oefening 2 stap 1 - Esther Blangenois 2MAR03(juiste)

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 15 Jan 2009 11:45:58 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jan/15/t1232045303fbb692r38aban1l.htm/, Retrieved Thu, 15 Jan 2009 19:48:23 +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/2009/Jan/15/t1232045303fbb692r38aban1l.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1,27 1,23 1,27 1,22 1,29 1,36 1,44 1,62 1,57 1,22 1,14 1,14 1,17 1,16 1,14 1,15 1,16 1,21 1,22 1,22 1,17 0,95 1 1,01 1,01 1 1 1 1,06 1,22 1,24 1,34 1,3 1,05 1 1 1,01 1,02 1,06 1,09 1,09 1,15 1,25 1,37 1,51 1,35 1,32 1,3 1,39 1,4 1,39 1,42 1,44 1,44 1,45 1,39 1,48 1,32 1,29 1,31 1,27 1,38 1,38 1,45 1,5 1,63 1,73 1,84 1,75 1,34 1,36 1,33 1,37 1,39 1,4 1,4 1,43 1,52 1,54 1,85 1,83 1,29 1,2 1,2 1,21 1,21 1,19 1,18 1,17 1,22 1,25 1,3 1,33 1,18 1,18 1,19
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11.27NANA-0.0903670634920634NA
21.23NANA-0.0687599206349207NA
31.27NANA-0.0654265873015874NA
41.22NANA-0.045188492063492NA
51.29NANA-0.0223313492063492NA
61.36NANA0.0542757936507935NA
71.441.419097222222221.310.1090972222222220.0209027777777775
81.621.521061507936511.302916666666670.2181448412698410.0989384920634921
91.571.510466269841271.294583333333330.2158829365079370.0595337301587304
101.221.204275793650791.28625-0.08197420634920620.0157242063492062
111.141.166894841269841.27791666666667-0.111021825396825-0.0268948412698413
121.141.153918650793651.26625-0.112331349206349-0.0139186507936508
131.171.160466269841271.25083333333333-0.09036706349206340.00953373015873016
141.161.156240079365081.225-0.06875992063492070.00375992063492059
151.141.126240079365081.19166666666667-0.06542658730158740.0137599206349206
161.151.118561507936511.16375-0.0451884920634920.031438492063492
171.161.124335317460321.14666666666667-0.02233134920634920.0356646825396825
181.211.189692460317461.135416666666670.05427579365079350.0203075396825396
191.221.232430555555561.123333333333330.109097222222222-0.0124305555555555
201.221.328144841269841.110.218144841269841-0.108144841269841
211.171.313382936507941.09750.215882936507937-0.143382936507937
220.951.003442460317461.08541666666667-0.0819742063492062-0.0534424603174604
2310.9639781746031751.075-0.1110218253968250.0360218253968254
241.010.958918650793651.07125-0.1123313492063490.0510813492063491
251.010.9821329365079371.0725-0.09036706349206340.0278670634920635
2611.009573412698411.07833333333333-0.0687599206349207-0.0095734126984126
2711.023323412698411.08875-0.0654265873015874-0.023323412698413
2811.053144841269841.09833333333333-0.045188492063492-0.0531448412698414
291.061.080168650793651.1025-0.0223313492063492-0.0201686507936509
301.221.156359126984131.102083333333330.05427579365079350.0636408730158728
311.241.210763888888891.101666666666670.1090972222222220.029236111111111
321.341.320644841269841.10250.2181448412698410.0193551587301588
331.31.321716269841271.105833333333330.215882936507937-0.0217162698412698
341.051.030109126984131.11208333333333-0.08197420634920620.0198908730158729
3511.006061507936511.11708333333333-0.111021825396825-0.00606150793650784
3611.003085317460321.11541666666667-0.112331349206349-0.00308531746031759
371.011.022549603174601.11291666666667-0.0903670634920634-0.0125496031746031
381.021.045823412698411.11458333333333-0.0687599206349207-0.0258234126984127
391.061.059156746031751.12458333333333-0.06542658730158740.000843253968254132
401.091.100644841269841.14583333333333-0.045188492063492-0.010644841269841
411.091.149335317460321.17166666666667-0.0223313492063492-0.0593353174603173
421.151.251775793650791.19750.0542757936507935-0.101775793650794
431.251.334930555555561.225833333333330.109097222222222-0.0849305555555553
441.371.475644841269841.25750.218144841269841-0.105644841269841
451.511.502966269841271.287083333333330.2158829365079370.00703373015873021
461.351.232609126984131.31458333333333-0.08197420634920620.117390873015873
471.321.231894841269841.34291666666667-0.1110218253968250.0881051587301585
481.31.257251984126981.36958333333333-0.1123313492063490.0427480158730156
491.391.299632936507941.39-0.09036706349206340.0903670634920635
501.41.330406746031751.39916666666667-0.06875992063492070.069593253968254
511.391.333323412698411.39875-0.06542658730158740.0566765873015871
521.421.351061507936511.39625-0.0451884920634920.0689384920634921
531.441.371418650793651.39375-0.02233134920634920.0685813492063494
541.441.447192460317461.392916666666670.0542757936507935-0.00719246031746024
551.451.497430555555561.388333333333330.109097222222222-0.0474305555555554
561.391.600644841269841.38250.218144841269841-0.210644841269841
571.481.597132936507941.381250.215882936507937-0.117132936507937
581.321.300109126984131.38208333333333-0.08197420634920620.0198908730158731
591.291.274811507936511.38583333333333-0.1110218253968250.0151884920634924
601.311.283918650793651.39625-0.1123313492063490.0260813492063492
611.271.325466269841271.41583333333333-0.0903670634920634-0.0554662698412696
621.381.377490079365081.44625-0.06875992063492070.00250992063492084
631.381.410823412698411.47625-0.0654265873015874-0.0308234126984128
641.451.443144841269841.48833333333333-0.0451884920634920.00685515873015863
651.51.469751984126981.49208333333333-0.02233134920634920.0302480158730161
661.631.550109126984131.495833333333330.05427579365079350.0798908730158727
671.731.609930555555561.500833333333330.1090972222222220.120069444444444
681.841.723561507936511.505416666666670.2181448412698410.116438492063492
691.751.722549603174601.506666666666670.2158829365079370.0274503968253972
701.341.423442460317461.50541666666667-0.0819742063492062-0.0834424603174602
711.361.389394841269841.50041666666667-0.111021825396825-0.0293948412698413
721.331.380585317460321.49291666666667-0.112331349206349-0.0505853174603172
731.371.390049603174601.48041666666667-0.0903670634920634-0.0200496031746027
741.391.404156746031751.47291666666667-0.0687599206349207-0.0141567460317458
751.41.411240079365081.47666666666667-0.0654265873015874-0.0112400793650795
761.41.432728174603171.47791666666667-0.045188492063492-0.0327281746031749
771.431.446835317460321.46916666666667-0.0223313492063492-0.0168353174603175
781.521.511359126984131.457083333333330.05427579365079350.00864087301587313
791.541.554097222222221.4450.109097222222222-0.0140972222222220
801.851.648978174603171.430833333333330.2181448412698410.201021825396825
811.831.630466269841271.414583333333330.2158829365079370.199533730158730
821.291.314692460317461.39666666666667-0.0819742063492062-0.0246924603174605
831.21.265644841269841.37666666666667-0.111021825396825-0.0656448412698414
841.21.241001984126981.35333333333333-0.112331349206349-0.0410019841269842
851.211.238382936507941.32875-0.0903670634920634-0.0283829365079367
861.211.224990079365081.29375-0.0687599206349207-0.0149900793650792
871.191.184573412698411.25-0.06542658730158740.00542658730158752
881.181.179394841269841.22458333333333-0.0451884920634920.000605158730158539
891.171.196835317460321.21916666666667-0.0223313492063492-0.0268353174603175
901.221.272192460317461.217916666666670.0542757936507935-0.0521924603174604
911.25NANA0.109097222222222NA
921.3NANA0.218144841269841NA
931.33NANA0.215882936507937NA
941.18NANA-0.0819742063492062NA
951.18NANA-0.111021825396825NA
961.19NANA-0.112331349206349NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/15/t1232045303fbb692r38aban1l/1o4bg1232045153.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/15/t1232045303fbb692r38aban1l/1o4bg1232045153.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/15/t1232045303fbb692r38aban1l/2k16o1232045153.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/15/t1232045303fbb692r38aban1l/2k16o1232045153.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/15/t1232045303fbb692r38aban1l/3fdx11232045153.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/15/t1232045303fbb692r38aban1l/3fdx11232045153.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/15/t1232045303fbb692r38aban1l/44vc61232045153.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/15/t1232045303fbb692r38aban1l/44vc61232045153.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