Home » date » 2008 » May » 08 » attachments

Classical Decomposition

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 08 May 2008 15:51:18 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/08/t1210283575ayjbj9xcvy3exzp.htm/, Retrieved Thu, 08 May 2008 23:53:01 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
56421 53152 53536 52408 41454 38271 35306 26414 31917 38030 27534 18387 50556 43901 48572 43899 37532 40357 35489 29027 34485 42598 30306 26451 47460 50104 61465 53726 39477 43895 31481 29896 33842 39120 33702 25094 51442 45594 52518 48564 41745 49585 32747 33379 35645 37034 35681 20972 58552 54955 65540 51570 51145 46641 35704 33253 35193 41668 34865 21210 56126 49231 59723 48103 47472 50497 40059 34149 36860 46356 36577
 
Text written by user:
zie word-file
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
156421NANA10725.9745370370NA
253152NANA7378.44675925926NA
353536NANA14881.9328703704NA
452408NANA9388.6550925926NA
541454NANA144.335648148148NA
638271NANA5022.94675925926NA
73530632660.780092592639158.125-6497.344907407412645.21990740741
82641429294.696759259338528.2916666667-9233.5949074074-2880.69675925926
93191732203.210648148137936-5732.78935185185-286.210648148146
103803036226.293981481537374.625-1148.331018518521803.70601851852
112753429058.391203703736856.6666666667-7798.27546296296-1524.39120370371
121838719648.210648148136780.1666666667-17131.9560185185-1261.21064814815
135055647600.682870370436874.708333333310725.97453703702955.31712962964
144390144369.655092592636991.20833333337378.44675925926-468.655092592591
154857252089.016203703737207.083333333314881.9328703704-3517.01620370371
164389946893.071759259337504.41666666679388.6550925926-2994.07175925926
173753237954.585648148137810.25144.335648148148-422.585648148146
184035743284.696759259338261.755022.94675925926-2927.69675925926
193548931971.405092592638468.75-6497.344907407413517.59490740741
202902729364.613425925938598.2083333333-9233.5949074074-337.613425925927
213448533661.085648148139393.875-5732.78935185185823.914351851854
224259839192.210648148140340.5416666667-1148.331018518523405.78935185185
233030633032.766203703740831.0416666667-7798.27546296296-2726.7662037037
242645123927.543981481541059.5-17131.95601851852523.45601851852
254746051765.891203703741039.916666666710725.9745370370-4305.8912037037
265010448287.571759259340909.1257378.446759259261816.42824074074
276146555800.47453703740918.541666666714881.93287037045664.52546296296
285372650135.488425925940746.83333333339388.65509259263590.51157407408
293947740887.752314814840743.4166666667144.335648148148-1410.75231481481
304389545851.321759259340828.3755022.94675925926-1956.32175925925
313148134440.405092592640937.75-6497.34490740741-2959.4050925926
322989631682.155092592640915.75-9233.5949074074-1786.15509259259
333384234622.252314814840355.0416666667-5732.78935185185-780.25231481481
343912038618.835648148239767.1666666667-1148.33101851852501.164351851847
353370231848.307870370439646.5833333333-7798.275462962961853.69212962964
362509422846.210648148139978.1666666667-17131.95601851852247.78935185185
375144250993.9745370374026810725.9745370370448.025462962964
384559447844.321759259340465.8757378.44675925926-2250.32175925925
395251855568.057870370440686.12514881.9328703704-3050.05787037037
404856450062.988425925940674.33333333339388.6550925926-1498.98842592592
414174540814.210648148140669.875144.335648148148930.789351851854
424958545603.530092592640580.58333333335022.946759259263981.46990740741
433274734207.738425925940705.0833333333-6497.34490740741-1460.73842592592
443337932157.780092592641391.375-9233.59490740741221.21990740741
453564536591.210648148142324-5732.78935185185-946.210648148146
463703441843.502314814842991.8333333333-1148.33101851852-4809.50231481482
473568135710.474537037043508.75-7798.27546296296-29.4745370370365
482097226645.793981481543777.75-17131.9560185185-5673.79398148148
495855254504.266203703743778.291666666710725.97453703704047.7337962963
505495551274.696759259243896.257378.446759259263680.30324074076
516554058754.09953703743872.166666666714881.93287037046785.90046296297
525157053435.071759259344046.41666666679388.6550925926-1865.07175925926
535114544349.835648148144205.5144.3356481481486795.16435185185
544664149204.363425925944181.41666666675022.94675925926-2563.36342592593
553570437592.905092592644090.25-6497.34490740741-1888.90509259258
563325334517.071759259243750.6666666667-9233.5949074074-1264.07175925925
573519337537.002314814843269.7916666667-5732.78935185185-2344.00231481481
584166841734.627314814842882.9583333333-1148.33101851852-66.6273148148102
593486534787.182870370442585.4583333333-7798.2754629629677.8171296296277
602121025461.127314814842593.0833333333-17131.9560185185-4251.12731481482
6156126NA42935.2083333333NANA
6249231NA43154NANA
6359723NA43260.7916666667NANA
6448103NA43525.5833333333NANA
6547472NA43792.25NANA
6650497NANANANA
6740059NANANANA
6834149NANANANA
6936860NANANANA
7046356NANANANA
7136577NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/08/t1210283575ayjbj9xcvy3exzp/1apz61210283470.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/08/t1210283575ayjbj9xcvy3exzp/1apz61210283470.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/08/t1210283575ayjbj9xcvy3exzp/2zkw41210283470.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/08/t1210283575ayjbj9xcvy3exzp/2zkw41210283470.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/08/t1210283575ayjbj9xcvy3exzp/3u70y1210283470.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/08/t1210283575ayjbj9xcvy3exzp/3u70y1210283470.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/08/t1210283575ayjbj9xcvy3exzp/4twhj1210283470.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/08/t1210283575ayjbj9xcvy3exzp/4twhj1210283470.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