Home » date » 2010 » Dec » 29 »

Paper: 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: Wed, 29 Dec 2010 15:01:09 +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/29/t1293634787jy88dz1l9z8ldff.htm/, Retrieved Wed, 29 Dec 2010 15:59:52 +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/29/t1293634787jy88dz1l9z8ldff.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 «
31245 30951 30872 30752 30967 30781 30681 31356 31434 31594 31949 32396 32441 32447 32288 32418 32346 32091 31855 31683 31615 31840 31536 31383 31638 31626 31720 31472 31372 31419 31341 31171 31036 30532 30666 30571 30173 30032 29874 30018 29911 29963 30050 29901 29544 29451 29293 29334 29389 29563
 
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
131245NANA74.8148148148164NA
230951NANA54.7870370370366NA
330872NANA26.9120370370342NA
430752NANA91.592592592589NA
530967NANA65.2453703703675NA
630781NANA92.6620370370354NA
73068131399.912037037031298101.912037037038-718.912037037036
83135631430.856481481531410.166666666720.6898148148164-74.8564814814818
93143431282.412037037031531.5-249.087962962963151.587962962967
103159431572.300925925931659.9166666667-87.615740740738321.6990740740766
113194931695.217592592631786.7916666667-91.5740740740717253.782407407409
123239631798.495370370431898.8333333333-100.337962962960597.504629629628
133244132077.148148148132002.333333333374.8148148148164363.851851851850
143244732119.662037037032064.87554.7870370370366327.337962962964
153228832112.953703703732086.041666666726.9120370370342175.046296296296
163241832195.425925925932103.833333333391.592592592589222.574074074073
173234632162.120370370432096.87565.2453703703675183.879629629628
183209132130.120370370432037.458333333392.6620370370354-39.1203703703723
193185532063.703703703731961.7916666667101.912037037038-208.703703703701
203168331914.814814814831894.12520.6898148148164-231.814814814814
213161531587.162037037031836.25-249.08796296296327.8379629629671
223184031685.550925925931773.1666666667-87.6157407407383154.449074074073
233153631601.592592592631693.1666666667-91.5740740740717-65.5925925925876
243138331524.245370370431624.5833333333-100.337962962960-141.245370370369
253163831649.981481481531575.166666666774.8148148148164-11.9814814814818
263162631587.203703703731532.416666666754.787037037036638.7962962962993
273172031513.870370370431486.958333333326.9120370370342206.129629629635
283147231499.925925925931408.333333333391.592592592589-27.9259259259197
293137231382.828703703731317.583333333365.2453703703675-10.8287037037007
303141931340.162037037031247.592.662037037035478.8379629629671
313134131254.537037037031152.625101.91203703703886.4629629629671
323117131045.856481481531025.166666666720.6898148148164125.143518518522
333103630632.745370370430881.8333333333-249.087962962963403.254629629631
343053230656.717592592630744.3333333333-87.6157407407383-124.717592592588
353066630531.300925925930622.875-91.5740740740717134.699074074077
363057130400.995370370430501.3333333333-100.337962962960170.004629629631
373017330461.689814814830386.87574.8148148148164-288.68981481481
383003230334.953703703730280.166666666754.7870370370366-302.953703703701
392987430191.995370370430165.083333333326.9120370370342-317.995370370365
403001830149.467592592630057.87591.592592592589-131.467592592588
412991130020.870370370429955.62565.2453703703675-109.870370370369
422996329939.537037037029846.87592.662037037035423.4629629629635
433005029864.578703703729762.6666666667101.912037037038185.421296296299
442990129731.148148148129710.458333333320.6898148148164169.851851851850
4529544NANA-249.087962962963NA
4629451NANA-87.6157407407383NA
4729293NANA-91.5740740740717NA
4829334NANA-100.337962962960NA
4929389NANANANA
5029563NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293634787jy88dz1l9z8ldff/1x6871293634866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293634787jy88dz1l9z8ldff/1x6871293634866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293634787jy88dz1l9z8ldff/2x6871293634866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293634787jy88dz1l9z8ldff/2x6871293634866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293634787jy88dz1l9z8ldff/3qx7a1293634866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293634787jy88dz1l9z8ldff/3qx7a1293634866.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293634787jy88dz1l9z8ldff/4qx7a1293634866.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293634787jy88dz1l9z8ldff/4qx7a1293634866.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