Home » date » 2010 » Dec » 20 »

Paper: classical decomposition (addictive)

*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: Mon, 20 Dec 2010 19:55:54 +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/20/t12928748811ir6t9h0bexh3b6.htm/, Retrieved Mon, 20 Dec 2010 20:54:46 +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/20/t12928748811ir6t9h0bexh3b6.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 «
608 651 691 627 634 731 475 337 803 722 590 724 627 696 825 677 656 785 412 352 839 729 696 641 695 638 762 635 721 854 418 367 824 687 601 676 740 691 683 594 729 731 386 331 706 715 657 653 642 643 718 654 632 731 392 344 792 852 649 629 685 617 715 715 629 916 531 357 917 828 708 858 775 785 1006 789 734 906 532 387 991 841 892 782
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1608NANA22.5121527777778NA
2651NANA6.10243055555559NA
3691NANA110.949652777778NA
4627NANA1.31770833333332NA
5634NANA4.56076388888888NA
6731NANA139.060763888889NA
7475411.581597222222633.541666666667-221.96006944444463.4184027777778
8337324.491319444444636.208333333333-311.71701388888912.5086805555557
9803794.331597222222643.666666666667150.6649305555568.66840277777783
10722740.685763888889651.33333333333389.3524305555556-18.6857638888888
11590636.532986111111654.333333333333-17.8003472222222-46.5329861111111
12724684.456597222222657.526.956597222222239.5434027777777
13627679.637152777778657.12522.5121527777778-52.6371527777777
14696661.227430555555655.1256.1024305555555934.7725694444446
15825768.199652777778657.25110.94965277777856.8003472222224
16677660.359375659.0416666666671.3177083333333216.640625
17656668.310763888889663.754.56076388888888-12.3107638888890
18785803.769097222222664.708333333333139.060763888889-18.7690972222222
19412442.123263888889664.083333333333-221.960069444444-30.1232638888888
20352352.782986111111664.5-311.717013888889-0.782986111110972
21839810.123263888889659.458333333333150.66493055555628.8767361111112
22729744.435763888889655.08333333333389.3524305555556-15.4357638888888
23696638.241319444444656.041666666667-17.800347222222257.7586805555555
24641688.581597222222661.62526.9565972222222-47.5815972222223
25695687.262152777778664.7522.51215277777787.73784722222229
26638671.727430555556665.6256.10243055555559-33.7274305555555
27762776.574652777778665.625110.949652777778-14.5746527777778
28635664.567708333333663.251.31770833333332-29.5677083333334
29721662.102430555555657.5416666666674.5607638888888858.8975694444446
30854794.102430555555655.041666666667139.06076388888959.8975694444445
31418436.414930555555658.375-221.960069444444-18.4149305555554
32367350.741319444444662.458333333333-311.71701388888916.2586805555557
33824812.039930555555661.375150.66493055555611.9600694444445
34687745.727430555556656.37589.3524305555556-58.7274305555555
35601637.199652777778655-17.8003472222222-36.1996527777777
36676677.164930555556650.20833333333326.9565972222222-1.16493055555554
37740666.262152777778643.7522.512152777777873.7378472222223
38691647.019097222222640.9166666666676.1024305555555943.9809027777779
39683745.449652777778634.5110.949652777778-62.4496527777777
40594632.067708333333630.751.31770833333332-38.0677083333334
41729638.810763888889634.254.5607638888888890.1892361111111
42731774.685763888889635.625139.060763888889-43.6857638888889
43386408.623263888889630.583333333333-221.960069444444-22.6232638888889
44331312.782986111111624.5-311.71701388888918.2170138888890
45706774.623263888889623.958333333333150.664930555556-68.623263888889
46715717.269097222222627.91666666666789.3524305555556-2.26909722222217
47657608.574652777778626.375-17.800347222222248.4253472222224
48653649.289930555556622.33333333333326.95659722222223.71006944444446
49642645.095486111111622.58333333333322.5121527777778-3.09548611111131
50643629.477430555556623.3756.1024305555555913.5225694444445
51718738.449652777778627.5110.949652777778-20.4496527777777
52654638.109375636.7916666666671.3177083333333215.8906250000001
53632646.727430555556642.1666666666674.56076388888888-14.7274305555555
54731779.894097222222640.833333333333139.060763888889-48.8940972222223
55392419.664930555556641.625-221.960069444444-27.6649305555557
56344330.616319444445642.333333333333-311.71701388888913.3836805555555
57792791.789930555556641.125150.6649305555560.210069444444343
58852732.894097222222643.54166666666789.3524305555556119.105902777778
59649628.157986111111645.958333333333-17.800347222222220.8420138888890
60629680.498263888889653.54166666666726.9565972222222-51.4982638888888
61685689.553819444444667.04166666666722.5121527777778-4.55381944444446
62617679.477430555556673.3756.10243055555559-62.4774305555555
63715790.074652777778679.125110.949652777778-75.0746527777777
64715684.651041666667683.3333333333331.3177083333333230.3489583333333
65629689.352430555556684.7916666666674.56076388888888-60.3524305555555
66916835.852430555555696.791666666667139.06076388888980.1475694444445
67531488.123263888889710.083333333333-221.96006944444442.8767361111112
68357409.116319444445720.833333333333-311.717013888889-52.1163194444445
69917890.623263888889739.958333333333150.66493055555626.3767361111111
70828844.519097222222755.16666666666789.3524305555556-16.5190972222222
71708744.824652777778762.625-17.8003472222222-36.8246527777777
72858793.539930555555766.58333333333326.956597222222264.4600694444446
73775788.720486111111766.20833333333322.5121527777778-13.7204861111110
74785773.602430555555767.56.1024305555555911.3975694444446
751006882.782986111111771.833333333333110.949652777778123.217013888889
76789776.776041666667775.4583333333331.3177083333333212.2239583333333
77734788.227430555556783.6666666666674.56076388888888-54.2274305555555
78906927.227430555555788.166666666667139.060763888889-21.2274305555555
79532NANA-221.960069444444NA
80387NANA-311.717013888889NA
81991NANA150.664930555556NA
82841NANA89.3524305555556NA
83892NANA-17.8003472222222NA
84782NANA26.9565972222222NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928748811ir6t9h0bexh3b6/196j51292874950.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928748811ir6t9h0bexh3b6/196j51292874950.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928748811ir6t9h0bexh3b6/296j51292874950.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928748811ir6t9h0bexh3b6/296j51292874950.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928748811ir6t9h0bexh3b6/32f081292874950.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928748811ir6t9h0bexh3b6/32f081292874950.ps (open in new window)


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