Home » date » 2010 » Dec » 07 »

Classical decomposition

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 07 Dec 2010 18:02:19 +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/Dec/07/t1291744932xg6vgmpm3mqedzx.htm/, Retrieved Tue, 07 Dec 2010 19:02:13 +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/2010/Dec/07/t1291744932xg6vgmpm3mqedzx.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13328 12873 14000 13477 14237 13674 13529 14058 12975 14326 14008 16193 14483 14011 15057 14884 15414 14440 14900 15074 14442 15307 14938 17193 15528 14765 15838 15723 16150 15486 15986 15983 15692 16490 15686 18897 16316 15636 17163 16534 16518 16375 16290 16352 15943 16362 16393 19051 16747 16320 17910 16961 17480 17049 16879 17473 16998 17307 17418 20169 17871 17226 19062 17804 19100 18522 18060 18869 18127 18871 18890 21263 19547 18450 20254 19240 20216 19420 19415 20018 18652 19978 19509 21971
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
113328NANA-42.3935185185186NA
212873NANA-805.324074074073NA
314000NANA593.196759259259NA
413477NANA-175.143518518519NA
514237NANA369.405092592593NA
613674NANA-306.587962962964NA
71352913578.835648148113937.9583333333-359.122685185185-49.8356481481478
81405813953.293981481514033.5-80.2060185185183104.70601851852
91297513357.259259259314124.9583333333-767.699074074074-382.259259259257
101432614124.141203703714227.625-103.483796296296201.858796296299
111400813928.59953703714335.2916666667-406.6921296296379.4004629629653
121619316500.300925925914416.252084.05092592593-307.300925925927
131448314462.898148148114505.2916666667-42.393518518518620.1018518518504
141401113799.425925925914604.75-805.324074074073211.574074074073
151505715301.405092592614708.2083333333593.196759259259-244.405092592591
161488414635.064814814814810.2083333333-175.143518518519248.935185185186
171541415259.238425925914889.8333333333369.405092592593154.761574074077
181444014663.66203703714970.25-306.587962962964-223.662037037036
191490014696.335648148115055.4583333333-359.122685185185203.66435185185
201507415050.210648148115130.4166666667-80.206018518518323.7893518518522
211444214426.675925925915194.375-767.69907407407415.3240740740748
221530715158.391203703715261.875-103.483796296296148.608796296297
231493814920.807870370415327.5-406.6921296296317.1921296296296
241719317485.800925925915401.752084.05092592593-292.800925925925
251552815448.189814814815490.5833333333-42.393518518518679.8101851851843
261476514768.384259259315573.7083333333-805.324074074073-3.38425925926094
271583816256.863425925915663.6666666667593.196759259259-418.863425925925
281572315589.898148148115765.0416666667-175.143518518519133.101851851854
291615016214.905092592615845.5369.405092592593-64.9050925925912
301548615641.078703703715947.6666666667-306.587962962964-155.078703703703
311598615692.377314814816051.5-359.122685185185293.622685185186
321598316040.418981481516120.625-80.2060185185183-57.4189814814818
331569215444.425925925916212.125-767.699074074074247.574074074077
341649016197.641203703716301.125-103.483796296296292.358796296297
351568615943.557870370416350.25-406.69212962963-257.557870370367
361889718486.675925925916402.6252084.05092592593410.324074074077
371631616409.939814814816452.3333333333-42.3935185185186-93.9398148148102
381563615675.050925925916480.375-805.324074074073-39.0509259259234
391716317099.405092592616506.2083333333593.19675925925963.5949074074088
401653416336.189814814816511.3333333333-175.143518518519197.810185185186
411651816904.863425925916535.4583333333369.405092592593-386.863425925925
421637516264.745370370416571.3333333333-306.587962962964110.254629629628
431629016236.585648148116595.7083333333-359.12268518518553.414351851854
441635216561.960648148116642.1666666667-80.2060185185183-209.960648148146
451594315934.092592592616701.7916666667-767.6990740740748.90740740740875
461636216647.22453703716750.7083333333-103.483796296296-285.224537037036
471639316401.891203703716808.5833333333-406.69212962963-8.89120370370438
481905118960.800925925916876.752084.0509259259390.199074074073
491674716886.981481481516929.375-42.3935185185186-139.981481481482
501632016195.300925925917000.625-805.324074074073124.699074074073
511791017684.488425925917091.2916666667593.196759259259225.511574074073
521696116999.481481481517174.625-175.143518518519-38.4814814814818
531748017626.113425925917256.7083333333369.405092592593-146.113425925923
541704917039.41203703717346-306.5879629629649.5879629629635
551687917080.293981481517439.4166666667-359.122685185185-201.293981481482
561747317443.793981481517524-80.206018518518329.2060185185182
571699816842.050925925917609.75-767.699074074074155.949074074073
581730717589.391203703717692.875-103.483796296296-282.391203703704
591741817388.807870370417795.5-406.6921296296329.1921296296314
602016920008.425925925917924.3752084.05092592593160.574074074073
611787117992.564814814818034.9583333333-42.3935185185186-121.564814814814
621722617337.009259259318142.3333333333-805.324074074073-111.009259259259
631906218840.738425925918247.5416666667593.196759259259221.261574074077
641780418184.606481481518359.75-175.143518518519-380.606481481482
651910018855.655092592618486.25369.405092592593244.344907407409
661852218286.578703703718593.1666666667-306.587962962964235.421296296299
671806018349.460648148118708.5833333333-359.122685185185-289.460648148142
681886918749.210648148118829.4166666667-80.2060185185183119.789351851854
691812718162.384259259318930.0833333333-767.699074074074-35.3842592592628
701887118936.09953703719039.5833333333-103.483796296296-65.0995370370365
711889018739.22453703719145.9166666667-406.69212962963150.775462962967
722126321313.884259259319229.83333333332084.05092592593-50.8842592592591
731954719281.314814814819323.7083333333-42.3935185185186265.685185185186
741845018622.717592592619428.0416666667-805.324074074073-172.717592592588
752025420090.988425925919497.7916666667593.196759259259163.011574074073
761924019390.648148148119565.7916666667-175.143518518519-150.64814814815
772021620007.113425925919637.7083333333369.405092592593208.886574074077
781942019386.41203703719693-306.58796296296433.5879629629635
7919415NANA-359.122685185185NA
8020018NANA-80.2060185185183NA
8118652NANA-767.699074074074NA
8219978NANA-103.483796296296NA
8319509NANA-406.69212962963NA
8421971NANA2084.05092592593NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291744932xg6vgmpm3mqedzx/1f3mr1291744935.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291744932xg6vgmpm3mqedzx/1f3mr1291744935.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t1291744932xg6vgmpm3mqedzx/2f3mr1291744935.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291744932xg6vgmpm3mqedzx/2f3mr1291744935.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t1291744932xg6vgmpm3mqedzx/37c4u1291744935.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291744932xg6vgmpm3mqedzx/37c4u1291744935.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t1291744932xg6vgmpm3mqedzx/47c4u1291744935.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291744932xg6vgmpm3mqedzx/47c4u1291744935.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