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:18:16 +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/t129278617922iqp3bgzap4vj3.htm/, Retrieved Sun, 19 Dec 2010 20:16: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/t129278617922iqp3bgzap4vj3.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
11038NANA1.08544698912203NA
2934NANA0.890185350023919NA
3988NANA1.01552386048150NA
4870NANA0.942735333563146NA
5854NANA0.939529631512505NA
6834NANA0.913095660751156NA
7872924.363389136453961.250.96162641262570.943351943887164
8954883.748477254904950.7916666666670.9294869825197291.07949266624290
9870934.137602241508948.5416666666670.9848145158706880.931340305659886
1012381104.062199171469541.157297902695461.12131363697539
1110821052.22146490644961.4583333333331.094401523629671.02830063450207
1210531049.97735058353966.9583333333331.08585583720451.00287877582767
139341046.91362100819964.51.085446989122030.892146191679638
14787853.094293772922958.3333333333330.8901853500239190.922524046573315
151081969.78297326565954.9583333333331.015523860481501.11468238750350
16908895.284321773801949.6666666666670.9427353335631461.01420294974116
17995883.001265349836939.8333333333330.9395296315125051.12683870232710
18825850.20619711692931.1250.9130956607511560.970352842401767
19822897.23751074697933.0416666666670.96162641262570.916145379739715
20856878.636298851045945.2916666666670.9294869825197290.974237009237331
21887929.952140549058944.2916666666670.9848145158706880.953812525746004
2210941085.30432899861937.7916666666671.157297902695461.00801219599798
239901021.89742268921933.751.094401523629670.968786081674161
249361016.18008765054935.8333333333331.08585583720450.921096576655104
2510971034.38575367541952.9583333333331.085446989122031.06053278102691
26918863.47978952329700.8901853500239191.06314011183389
27926998.936970760307983.6666666666671.015523860481500.926985412598361
28907938.335902006518995.3333333333330.9427353335631460.966604813969592
29899943.835808990271004.583333333330.9395296315125050.95249617723422
30971927.1725521877361015.416666666670.9130956607511561.04727000137013
311087990.5152727716631030.041666666670.96162641262571.09740862143231
321000971.623725727291045.333333333330.9294869825197291.02920500346106
3310711046.242321298121062.3750.9848145158706881.02366342691162
3411901256.8255223272610861.157297902695460.94682991303079
3511161213.782489832281109.083333333331.094401523629670.91943985792233
3610701228.1029518782911311.08585583720450.871262460825061
3713141252.786733278341154.166666666671.085446989122031.04886168179757
3810681051.3088983782511810.8901853500239191.01587649609691
3911851234.538506392021215.666666666671.015523860481500.959872854402255
4012151190.321200540171262.6250.9427353335631461.02073289079337
4111451241.588408043781321.50.9395296315125050.922205774942794
4212511271.447661943451392.458333333330.9130956607511560.983917810732218
4313631379.573292213141434.6250.96162641262570.987986653332092
4413681370.606012973881474.583333333330.9294869825197290.99809864180573
4515351498.928727093351522.041666666670.9848145158706881.02406470184650
4618531770.328245902431529.708333333331.157297902695461.04669854547535
4718661676.075933438841531.51.094401523629671.11331471490763
4820231673.032381172831540.751.08585583720451.20918161702395
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/t129278617922iqp3bgzap4vj3/15wbw1292786292.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t129278617922iqp3bgzap4vj3/15wbw1292786292.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t129278617922iqp3bgzap4vj3/25wbw1292786292.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t129278617922iqp3bgzap4vj3/25wbw1292786292.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t129278617922iqp3bgzap4vj3/3t23t1292786292.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t129278617922iqp3bgzap4vj3/3t23t1292786292.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t129278617922iqp3bgzap4vj3/4t23t1292786292.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t129278617922iqp3bgzap4vj3/4t23t1292786292.ps (open in new window)


 
Parameters (Session):
par1 = additive ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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