Home » date » 2010 » Dec » 19 »

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: Sun, 19 Dec 2010 19:44:23 +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/19/t1292787740d201uv7u3g0vmr1.htm/, Retrieved Sun, 19 Dec 2010 20:42:24 +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/19/t1292787740d201uv7u3g0vmr1.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 «
1038.00 934.00 988.00 870.00 854.00 834.00 872.00 954.00 870.00 1238.00 1082.00 1053.00 934.00 787.00 1081.00 908.00 995.00 825.00 822.00 856.00 887.00 1094.00 990.00 936.00 1097.00 918.00 926.00 907.00 899.00 971.00 1087.00 1000.00 1071.00 1190.00 1116.00 1070.00 1314.00 1068.00 1185.00 1215.00 1145.00 1251.00 1363.00 1368.00 1535.00 1853.00 1866.00 2023.00 1373.00 1968.00 1424.00 1160.00 1243.00 1375.00 1539.00 1773.00 1906.00 2076.00 2004.00
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11038NANA83.3981481481482NA
2934NANA-119.837962962963NA
3988NANA4.84259259259255NA
4870NANA-66.9351851851852NA
5854NANA-83.3657407407408NA
6834NANA-105.060185185185NA
7872911.62037037037961.25-49.6296296296296-39.6203703703703
8954862.662037037037950.791666666667-88.129629629629691.337962962963
9870928.912037037037948.541666666667-19.6296296296296-58.9120370370370
1012381140.77314814815954186.77314814814897.226851851852
1110821086.28703703704961.458333333333124.828703703704-4.28703703703695
1210531099.70370370370966.958333333333132.745370370370-46.7037037037036
139341047.89814814815964.583.3981481481482-113.898148148148
14787838.49537037037958.333333333333-119.837962962963-51.4953703703703
151081959.800925925926954.9583333333334.84259259259255121.199074074074
16908882.731481481482949.666666666667-66.935185185185225.2685185185185
17995856.467592592593939.833333333333-83.3657407407408138.532407407408
18825826.064814814815931.125-105.060185185185-1.06481481481478
19822883.412037037037933.041666666667-49.6296296296296-61.4120370370370
20856857.162037037037945.291666666667-88.1296296296296-1.16203703703695
21887924.662037037037944.291666666667-19.6296296296296-37.6620370370370
2210941124.56481481481937.791666666667186.773148148148-30.5648148148148
239901058.57870370370933.75124.828703703704-68.5787037037037
249361068.57870370370935.833333333333132.745370370370-132.578703703704
2510971036.35648148148952.95833333333383.398148148148260.6435185185185
26918850.162037037037970-119.83796296296367.8379629629633
27926988.50925925926983.6666666666674.84259259259255-62.5092592592591
28907928.398148148148995.333333333333-66.9351851851852-21.3981481481480
29899921.2175925925921004.58333333333-83.3657407407408-22.2175925925925
30971910.3564814814811015.41666666667-105.06018518518560.6435185185187
311087980.4120370370371030.04166666667-49.6296296296296106.587962962963
321000957.2037037037041045.33333333333-88.129629629629642.7962962962963
3310711042.745370370371062.375-19.629629629629628.2546296296296
3411901272.773148148151086186.773148148148-82.7731481481482
3511161233.912037037041109.08333333333124.828703703704-117.912037037037
3610701263.745370370371131132.745370370370-193.74537037037
3713141237.564814814811154.1666666666783.398148148148276.4351851851852
3810681061.162037037041181-119.8379629629636.83796296296305
3911851220.509259259261215.666666666674.84259259259255-35.5092592592594
4012151195.689814814811262.625-66.935185185185219.3101851851852
4111451238.134259259261321.5-83.3657407407408-93.1342592592591
4212511287.398148148151392.45833333333-105.060185185185-36.3981481481480
4313631384.995370370371434.625-49.6296296296296-21.9953703703704
4413681386.453703703701474.58333333333-88.1296296296296-18.4537037037037
4515351502.412037037041522.04166666667-19.629629629629632.5879629629630
4618531716.481481481481529.70833333333186.773148148148136.518518518519
4718661656.328703703701531.5124.828703703704209.671296296296
4820231673.495370370371540.75132.745370370370349.504629629630
491373NA1553.25NANA
501968NA1577.45833333333NANA
511424NA1609.79166666667NANA
521160NA1634.54166666667NANA
531243NA1649.58333333333NANA
541375NANANANA
551539NANANANA
561773NANANANA
571906NANANANA
582076NANANANA
592004NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292787740d201uv7u3g0vmr1/1rpyf1292787860.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292787740d201uv7u3g0vmr1/1rpyf1292787860.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292787740d201uv7u3g0vmr1/2rpyf1292787860.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292787740d201uv7u3g0vmr1/2rpyf1292787860.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292787740d201uv7u3g0vmr1/32gxi1292787860.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292787740d201uv7u3g0vmr1/32gxi1292787860.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292787740d201uv7u3g0vmr1/42gxi1292787860.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292787740d201uv7u3g0vmr1/42gxi1292787860.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