Home » date » 2011 » Jan » 16 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 16 Jan 2011 14:23:38 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/Jan/16/t1295187867cahppxxpic41lwg.htm/, Retrieved Sun, 16 Jan 2011 15:24:27 +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/2011/Jan/16/t1295187867cahppxxpic41lwg.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
10574 10653 10805 10872 10625 10407 10463 10556 10646 10702 11353 11346 11451 11964 12574 13031 13812 14544 14931 14886 16005 17064 15168 16050 15839 15137 14954 15648 15305 15579 16348 15928 16171 15937 15713 15594 15683 16438 17032 17696 17745 19394 20148 20108 18584 18441 18391 19178 18073 18483 19644 19195 19650 20830 23595 22937 21814 21928 21777 21383 21467 22052 22680 24320 24977 25204 27390 26434 27525 30695 32436 30160 30236
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
110574NANA-786.176388888889NA
210653NANA-747.351388888889NA
310805NANA-458.326388888889NA
410872NANA-164.393055555557NA
510625NANA-186.893055555555NA
610407NANA293.031944444444NA
71046312138.615277777810786.70833333331351.90694444445-1675.61527777778
81055611615.648611111110877.875737.773611111111-1059.64861111111
91064611319.065277777811006.2083333333312.856944444445-673.06527777778
101070211455.973611111111169.875286.098611111111-753.973611111109
111135311005.873611111111392.625-386.751388888889347.126388888892
121134611446.015277777811697.7916666667-251.776388888889-100.015277777775
131145111270.156944444412056.3333333333-786.176388888889180.843055555555
141196411675.565277777812422.9166666667-747.351388888889288.434722222220
151257412368.298611111112826.625-458.326388888889205.701388888887
161303113150.606944444413315-164.393055555557-119.606944444444
171381213552.148611111113739.0416666667-186.893055555555259.851388888888
181454414387.031944444414094293.031944444444156.968055555555
191493115824.740277777814472.83333333331351.90694444445-893.740277777777
201488615525.648611111114787.875737.773611111111-639.648611111112
211600515332.106944444415019.25312.856944444445672.893055555556
221706415513.556944444415227.4583333333286.0986111111111550.44305555555
231516815011.956944444415398.7083333333-386.751388888889156.043055555558
241605015252.265277777815504.0416666667-251.776388888889797.734722222223
251583914820.031944444415606.2083333333-786.1763888888891018.96805555556
261513714961.315277777815708.6666666667-747.351388888889175.684722222224
271495415300.673611111115759-458.326388888889-346.673611111109
281564815554.565277777815718.9583333333-164.39305555555793.4347222222259
291530515507.815277777815694.7083333333-186.893055555555-202.815277777776
301557915991.448611111115698.4166666667293.031944444444-412.448611111109
311634817024.823611111115672.91666666671351.90694444445-676.823611111109
321592816458.398611111115720.625737.773611111111-530.398611111112
331617116174.273611111115861.4166666667312.856944444445-3.27361111111168
341593716319.431944444416033.3333333333286.098611111111-382.431944444445
351571315833.581944444416220.3333333333-386.751388888889-120.581944444446
361559416229.181944444416480.9583333333-251.776388888889-635.181944444446
371568316012.073611111116798.25-786.176388888889-329.073611111111
381643816383.398611111117130.75-747.35138888888954.6013888888883
391703216947.131944444417405.4583333333-458.32638888888984.8680555555584
401769617445.940277777817610.3333333333-164.393055555557250.059722222220
411774517639.356944444417826.25-186.893055555555105.643055555560
421939418380.198611111118087.1666666667293.0319444444441013.80138888889
432014819687.990277777818336.08333333331351.90694444445460.009722222225
442010819258.648611111118520.875737.773611111111849.351388888888
451858419027.773611111118714.9166666667312.856944444445-443.773611111108
461844119172.306944444418886.2083333333286.098611111111-731.306944444445
471839118641.290277777819028.0416666667-386.751388888889-250.290277777778
481917818915.473611111119167.25-251.776388888889262.526388888888
491807318584.531944444419370.7083333333-786.176388888889-511.531944444447
501848318884.856944444419632.2083333333-747.351388888889-401.856944444447
511964419426.340277777819884.6666666667-458.326388888889217.659722222226
521919520000.148611111120164.5416666667-164.393055555557-805.148611111112
531965020264.023611111120450.9166666667-186.893055555555-614.023611111112
542083020976.906944444420683.875293.031944444444-146.906944444443
552359522269.073611111120917.16666666671351.906944444451325.92638888889
562293721945.065277777821207.2916666667737.773611111111991.934722222224
572181421795.356944444421482.5312.85694444444518.6430555555562
582192822108.640277777821822.5416666667286.098611111111-180.640277777777
592177721871.290277777822258.0416666667-386.751388888889-94.2902777777745
602138322410.473611111122662.25-251.776388888889-1027.47361111111
612146722216.448611111123002.625-786.176388888889-749.448611111107
622205222559.106944444423306.4583333333-747.351388888889-507.10694444444
632268023231.798611111123690.125-458.326388888889-551.79861111111
642432024128.981944444424293.375-164.393055555557191.018055555553
652497724915.898611111125102.7916666667-186.89305555555561.1013888888883
662520426205.656944444425912.625293.031944444444-1001.65694444444
672739027995.615277777826643.70833333331351.90694444445-605.615277777779
6826434NANA737.773611111111NA
6927525NANA312.856944444445NA
7030695NANA286.098611111111NA
7132436NANA-386.751388888889NA
7230160NANA-251.776388888889NA
7330236NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295187867cahppxxpic41lwg/1ubeh1295187815.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295187867cahppxxpic41lwg/1ubeh1295187815.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295187867cahppxxpic41lwg/208vt1295187815.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295187867cahppxxpic41lwg/208vt1295187815.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295187867cahppxxpic41lwg/3wfbh1295187815.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295187867cahppxxpic41lwg/3wfbh1295187815.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295187867cahppxxpic41lwg/4gxww1295187815.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295187867cahppxxpic41lwg/4gxww1295187815.ps (open in new window)


 
Parameters (Session):
par1 = 200 ; 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