Home » date » 2010 » Aug » 19 »

tijdreeks 1 - stap 29

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 19 Aug 2010 20:31:32 +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/Aug/19/t1282251454xt7eqq9xb0veza7.htm/, Retrieved Thu, 19 Aug 2010 22:57:39 +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/Aug/19/t1282251454xt7eqq9xb0veza7.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:
Aerts Ellen
 
Dataseries X:
» Textbox « » Textfile « » CSV «
25 24 23 21 41 40 25 15 16 16 17 19 18 19 20 21 46 47 30 16 15 18 30 31 32 36 30 31 61 57 45 33 31 36 46 49 34 40 41 48 75 77 71 54 50 56 66 66 48 63 71 70 88 92 91 80 81 81 98 106 85 93 96 92 115 109 119 107 107 106 132 143 120 123 132 136 158 151 155 138 143 139 168 182 154 158 167 170 197 190 196 174 180 171 200 215 184 186 197 186 211 205 218 199 213 207 236 248 211 220 235 223 245 236 253 246 255 248 274 288
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
125NANA-9.86265432098766NA
224NANA-6.20987654320987NA
323NANA-2.71913580246914NA
421NANA-6.23302469135802NA
541NANA15.8364197530864NA
640NANA9.84567901234568NA
72531.725308641975323.20833333333338.51697530864198-6.72530864197531
81514.567901234567922.7083333333333-8.140432098765430.432098765432098
91614.567901234567922.375-7.807098765432111.43209876543211
101611.859567901234622.25-10.39043209876544.14043209876543
111728.299382716049422.45833333333335.84104938271605-11.2993827160494
121934.280864197530922.958333333333311.3225308641975-15.2808641975309
131813.595679012345723.4583333333333-9.862654320987664.40432098765433
141917.498456790123523.7083333333333-6.209876543209871.50154320987654
152020.989197530864223.7083333333333-2.71913580246914-0.989197530864192
162117.516975308642023.75-6.233024691358023.48302469135802
174640.211419753086424.37515.83641975308645.78858024691358
184735.262345679012325.41666666666679.8456790123456811.7376543209877
193035.01697530864226.58.51697530864198-5.01697530864198
201619.651234567901227.7916666666667-8.14043209876543-3.65123456790124
211521.109567901234628.9166666666667-7.80709876543211-6.10956790123456
221819.359567901234629.75-10.3904320987654-1.35956790123457
233036.632716049382730.79166666666675.84104938271605-6.63271604938272
243143.155864197530931.833333333333311.3225308641975-12.1558641975309
253223.012345679012332.875-9.862654320987668.98765432098766
263627.998456790123534.2083333333333-6.209876543209878.00154320987654
273032.864197530864235.5833333333333-2.71913580246914-2.86419753086419
283130.76697530864237-6.233024691358020.233024691358018
296154.253086419753138.416666666666715.83641975308646.74691358024692
305749.67901234567939.83333333333339.845679012345687.320987654321
314549.183641975308640.66666666666678.51697530864198-4.18364197530864
323332.776234567901240.9166666666667-8.140432098765430.223765432098766
333133.734567901234641.5416666666667-7.80709876543211-2.73456790123456
343632.317901234567942.7083333333333-10.39043209876543.6820987654321
354649.841049382716445.84104938271605-3.84104938271604
364956.739197530864245.416666666666711.3225308641975-7.7391975308642
373437.470679012345747.3333333333333-9.86265432098766-3.47067901234568
384043.081790123456849.2916666666667-6.20987654320987-3.0817901234568
394148.239197530864250.9583333333333-2.71913580246914-7.2391975308642
404846.350308641975352.5833333333333-6.233024691358021.64969135802468
417570.086419753086454.2515.83641975308644.91358024691358
427765.637345679012355.79166666666679.8456790123456811.3626543209877
437165.600308641975357.08333333333338.516975308641985.3996913580247
445450.484567901234658.625-8.140432098765433.51543209876544
455053.026234567901260.8333333333333-7.80709876543211-3.02623456790122
465652.609567901234663-10.39043209876543.39043209876544
476670.299382716049464.45833333333335.84104938271605-4.29938271604937
486676.947530864197565.62511.3225308641975-10.9475308641975
494857.220679012345767.0833333333333-9.86265432098766-9.22067901234567
506362.790123456790169-6.209876543209870.209876543209873
517168.655864197530971.375-2.719135802469142.34413580246914
527067.475308641975373.7083333333333-6.233024691358022.52469135802470
538891.919753086419876.083333333333315.8364197530864-3.91975308641976
549288.92901234567979.08333333333339.845679012345683.07098765432099
559190.808641975308682.29166666666678.516975308641980.191358024691354
568076.942901234567985.0833333333333-8.140432098765433.0570987654321
578179.567901234567987.375-7.807098765432111.43209876543212
588178.942901234567989.3333333333333-10.39043209876542.0570987654321
599897.21604938271691.3755.841049382716050.78395061728395
60106104.53086419753193.208333333333311.32253086419751.46913580246913
618585.220679012345795.0833333333333-9.86265432098766-0.220679012345684
629391.165123456790197.375-6.209876543209871.83487654320987
639696.864197530864299.5833333333333-2.71913580246914-0.864197530864189
649295.4753086419753101.708333333333-6.23302469135802-3.4753086419753
65115120.003086419753104.16666666666715.8364197530864-5.00308641975306
66109116.970679012346107.1259.84567901234568-7.97067901234566
67119118.641975308642110.1258.516975308641980.358024691358025
68107104.692901234568112.833333333333-8.140432098765432.3070987654321
69107107.776234567901115.583333333333-7.80709876543211-0.776234567901241
70106108.526234567901118.916666666667-10.3904320987654-2.52623456790123
71132128.382716049383122.5416666666675.841049382716053.61728395061728
72143137.405864197531126.08333333333311.32253086419755.59413580246911
73120119.470679012346129.333333333333-9.862654320987660.529320987654302
74123125.915123456790132.125-6.20987654320987-2.91512345679013
75132132.197530864198134.916666666667-2.71913580246914-0.197530864197546
76136131.558641975309137.791666666667-6.233024691358024.44135802469137
77158156.503086419753140.66666666666715.83641975308641.49691358024691
78151153.637345679012143.7916666666679.84567901234568-2.63734567901233
79155155.350308641975146.8333333333338.51697530864198-0.350308641975289
80138141.567901234568149.708333333333-8.14043209876543-3.56790123456793
81143144.817901234568152.625-7.80709876543211-1.8179012345679
82139145.109567901235155.5-10.3904320987654-6.10956790123456
83168164.382716049383158.5416666666675.841049382716053.61728395061726
84182173.114197530864161.79166666666711.32253086419758.88580246913583
85154155.262345679012165.125-9.86265432098766-1.26234567901236
86158162.123456790123168.333333333333-6.20987654320987-4.12345679012347
87167168.655864197531171.375-2.71913580246914-1.65586419753086
88170168.016975308642174.25-6.233024691358021.98302469135805
89197192.753086419753176.91666666666715.83641975308644.24691358024691
90190189.470679012346179.6259.845679012345680.529320987654359
91196190.766975308642182.258.516975308641985.23302469135808
92174176.526234567901184.666666666667-8.14043209876543-2.52623456790121
93180179.276234567901187.083333333333-7.807098765432110.723765432098759
94171178.609567901235189-10.3904320987654-7.60956790123458
95200196.091049382716190.255.841049382716053.90895061728395
96215202.780864197531191.45833333333311.322530864197512.2191358024691
97184183.137345679012193-9.862654320987660.862654320987673
98186188.748456790123194.958333333333-6.20987654320987-2.74845679012344
99197194.655864197531197.375-2.719135802469142.34413580246917
100186194.016975308642200.25-6.23302469135802-8.01697530864195
101211219.086419753086203.2515.8364197530864-8.0864197530864
102205215.970679012346206.1259.84567901234568-10.9706790123457
103218217.141975308642208.6258.516975308641980.858024691358025
104199203.026234567901211.166666666667-8.14043209876543-4.02623456790124
105213206.359567901235214.166666666667-7.807098765432116.64043209876542
106207206.901234567901217.291666666667-10.39043209876540.0987654320987588
107236226.091049382716220.255.841049382716059.90895061728398
108248234.280864197531222.95833333333311.322530864197513.7191358024692
109211215.845679012346225.708333333333-9.86265432098766-4.84567901234567
110220222.91512345679229.125-6.20987654320987-2.91512345679007
111235230.114197530864232.833333333333-2.719135802469144.88580246913583
112223230.058641975309236.291666666667-6.23302469135802-7.05864197530863
113245255.419753086420239.58333333333315.8364197530864-10.4197530864198
114236252.679012345679242.8333333333339.84567901234568-16.6790123456790
115253NANA8.51697530864198NA
116246NANA-8.14043209876543NA
117255NANA-7.80709876543211NA
118248NANA-10.3904320987654NA
119274NANA5.84104938271605NA
120288NANA11.3225308641975NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251454xt7eqq9xb0veza7/19mml1282249886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251454xt7eqq9xb0veza7/19mml1282249886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251454xt7eqq9xb0veza7/2kel61282249886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251454xt7eqq9xb0veza7/2kel61282249886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251454xt7eqq9xb0veza7/3kel61282249886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251454xt7eqq9xb0veza7/3kel61282249886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251454xt7eqq9xb0veza7/4dnkr1282249886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251454xt7eqq9xb0veza7/4dnkr1282249886.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