Home » date » 2010 » Dec » 16 »

*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: Thu, 16 Dec 2010 19:30:36 +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/16/t1292527999srtf2jbrdl0euyd.htm/, Retrieved Thu, 16 Dec 2010 20:33: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/16/t1292527999srtf2jbrdl0euyd.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 «
-2.0 2.6 0.2 0.1 -0.1 0.1 -1.6 2.3 -0.3 0.0 0.1 0.4 -1.9 2.4 0.0 0.4 0.1 0.2 -1.3 2.1 -0.1 0.3 0.3 0.2 -1.9 2.7 0.0 -0.2 0.2 0.1 -1.5 2.1 -0.3 -0.2 0.2 0.3 -2.0 2.6 0.0 0.5 -0.1 0.2 -1.6 2.1 -0.2 0.0 0.2 0.2 -2.2 2.7 -0.3 0.4 -0.1 0.0 -1.6 2.2 -0.3 0.0 0.1 0.1 -1.9 2.5 0.1 -0.1 0.3 0.1 -1.9 2.5 -0.3 0.2 0.2 0.1 -2.4 3.1 -0.3 0.2 0.1 0.2 -1.8 2.4 -0.4 0.0 0.0 0.2 -2.4 3.2 0.0 0.1 0.1 0.1 -1.8 2.5 -0.6 0.0 0.0 0.4 -2.5 3.1 0.2 -0.3 0.3 0.4 -1.8 2.6 -0.3 0.3 0.0 0.4 -2.9 3.6 -0.1 0.3 0.0 0.3 -2.1 2.6 -0.2 0.0 -0.2 0.3 -3.1 3.4 -0.1 0.1 0.3 0.1 -2.5 3.1 -0.1 0.1 0.0
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1-2NANA-2.38310185185185NA
22.6NANA2.72893518518519NA
30.2NANA-0.195138888888889NA
40.1NANA-0.00671296296296297NA
5-0.1NANA-0.0497685185185185NA
60.1NANA0.0298611111111111NA
7-1.6-1.698842592592590.154166666666667-1.853009259259260.0988425925925925
82.32.353472222222220.152.20347222222222-0.0534722222222226
9-0.3-0.3118055555555560.133333333333333-0.4451388888888890.0118055555555556
1000.06087962962962960.1375-0.0766203703703704-0.0608796296296296
110.10.1043981481481480.158333333333333-0.0539351851851852-0.00439814814814807
120.40.2719907407407410.1708333333333330.1011574074074070.128009259259259
13-1.9-2.195601851851850.1875-2.383101851851850.295601851851852
142.42.920601851851850.1916666666666672.72893518518519-0.520601851851852
150-0.003472222222222270.191666666666667-0.1951388888888890.00347222222222227
160.40.2057870370370370.2125-0.006712962962962970.194212962962963
170.10.1835648148148150.233333333333333-0.0497685185185185-0.0835648148148148
180.20.2631944444444440.2333333333333330.0298611111111111-0.0631944444444444
19-1.3-1.628009259259260.225-1.853009259259260.328009259259259
202.12.440972222222220.23752.20347222222222-0.340972222222222
21-0.1-0.1951388888888890.25-0.4451388888888890.0951388888888889
220.30.1483796296296300.225-0.07662037037037040.151620370370370
230.30.1502314814814810.204166666666667-0.05393518518518520.149768518518519
240.20.3053240740740740.2041666666666670.101157407407407-0.105324074074074
25-1.9-2.191435185185190.191666666666667-2.383101851851850.291435185185186
262.72.912268518518520.1833333333333332.72893518518519-0.212268518518518
270-0.02013888888888890.175-0.1951388888888890.0201388888888889
28-0.20.1391203703703700.145833333333333-0.00671296296296297-0.33912037037037
290.20.07106481481481480.120833333333333-0.04976851851851850.128935185185185
300.10.1506944444444440.1208333333333330.0298611111111111-0.0506944444444444
31-1.5-1.732175925925930.120833333333333-1.853009259259260.232175925925926
322.12.315972222222220.11252.20347222222222-0.215972222222222
33-0.3-0.3368055555555560.108333333333333-0.4451388888888890.0368055555555556
34-0.20.06087962962962960.1375-0.0766203703703704-0.260879629629630
350.20.1002314814814810.154166666666667-0.05393518518518520.0997685185185186
360.30.2469907407407410.1458333333333330.1011574074074070.0530092592592592
37-2-2.237268518518520.145833333333333-2.383101851851850.237268518518519
382.62.870601851851850.1416666666666672.72893518518519-0.270601851851852
390-0.04930555555555560.145833333333333-0.1951388888888890.0493055555555556
400.50.1516203703703700.158333333333333-0.006712962962962970.348379629629630
41-0.10.1168981481481480.166666666666667-0.0497685185185185-0.216898148148148
420.20.1923611111111110.16250.02986111111111110.00763888888888889
43-1.6-1.703009259259260.15-1.853009259259260.103009259259259
442.12.349305555555560.1458333333333332.20347222222222-0.249305555555556
45-0.2-0.3076388888888890.1375-0.4451388888888890.107638888888889
4600.04421296296296290.120833333333333-0.0766203703703704-0.0442129629629629
470.20.06273148148148140.116666666666667-0.05393518518518520.137268518518519
480.20.2094907407407410.1083333333333330.101157407407407-0.00949074074074066
49-2.2-2.283101851851850.1-2.383101851851850.083101851851852
502.72.833101851851850.1041666666666672.72893518518519-0.133101851851852
51-0.3-0.09097222222222220.104166666666667-0.195138888888889-0.209027777777778
520.40.0932870370370370.1-0.006712962962962970.306712962962963
53-0.10.04606481481481480.0958333333333334-0.0497685185185185-0.146064814814815
5400.1173611111111110.08750.0298611111111111-0.117361111111111
55-1.6-1.757175925925930.0958333333333334-1.853009259259260.157175925925926
562.22.303472222222220.12.20347222222222-0.103472222222222
57-0.3-0.3368055555555560.108333333333333-0.4451388888888890.0368055555555556
5800.02754629629629630.104166666666667-0.0766203703703704-0.0275462962962963
590.10.04606481481481480.1-0.05393518518518520.0539351851851852
600.10.2219907407407410.1208333333333330.101157407407407-0.121990740740741
61-1.9-2.270601851851850.1125-2.383101851851850.370601851851852
622.52.841435185185190.11252.72893518518519-0.341435185185185
630.1-0.07013888888888890.125-0.1951388888888890.170138888888889
64-0.10.1266203703703700.133333333333333-0.00671296296296297-0.226620370370370
650.30.09606481481481480.145833333333333-0.04976851851851850.203935185185185
660.10.1798611111111110.150.0298611111111111-0.0798611111111111
67-1.9-1.723842592592590.129166666666667-1.85300925925926-0.176157407407407
682.52.336805555555560.1333333333333332.203472222222220.163194444444444
69-0.3-0.3034722222222220.141666666666667-0.4451388888888890.00347222222222232
700.20.06087962962962950.1375-0.07662037037037040.139120370370370
710.20.08773148148148150.141666666666667-0.05393518518518520.112268518518519
720.10.2386574074074070.13750.101157407407407-0.138657407407407
73-2.4-2.237268518518520.145833333333333-2.38310185185185-0.162731481481481
743.12.874768518518520.1458333333333332.728935185185190.225231481481481
75-0.3-0.0576388888888890.1375-0.195138888888889-0.242361111111111
760.20.1182870370370370.125-0.006712962962962970.081712962962963
770.10.05856481481481480.108333333333333-0.04976851851851850.0414351851851852
780.20.1340277777777780.1041666666666670.02986111111111110.0659722222222223
79-1.8-1.744675925925930.108333333333333-1.85300925925926-0.055324074074074
802.42.315972222222220.11252.203472222222220.0840277777777774
81-0.4-0.3159722222222220.129166666666667-0.445138888888889-0.0840277777777778
8200.06087962962962960.1375-0.0766203703703704-0.0608796296296296
8300.07939814814814810.133333333333333-0.0539351851851852-0.0793981481481481
840.20.2303240740740740.1291666666666670.101157407407407-0.030324074074074
85-2.4-2.258101851851850.125-2.38310185185185-0.141898148148148
863.22.858101851851850.1291666666666672.728935185185190.341898148148148
870-0.07013888888888890.125-0.1951388888888890.0701388888888889
880.10.1099537037037040.116666666666667-0.00671296296296297-0.00995370370370369
890.10.06689814814814810.116666666666667-0.04976851851851850.0331018518518519
900.10.1548611111111110.1250.0298611111111111-0.0548611111111111
91-1.8-1.723842592592590.129166666666667-1.85300925925926-0.0761574074074074
922.52.324305555555560.1208333333333332.203472222222220.175694444444444
93-0.6-0.3201388888888890.125-0.445138888888889-0.279861111111111
9400.04004629629629620.116666666666667-0.0766203703703704-0.0400462962962962
9500.05439814814814810.108333333333333-0.0539351851851852-0.0543981481481481
960.40.2303240740740740.1291666666666670.1011574074074070.169675925925926
97-2.5-2.241435185185190.141666666666667-2.38310185185185-0.258564814814815
983.12.874768518518520.1458333333333332.728935185185190.225231481481481
990.2-0.03263888888888890.1625-0.1951388888888890.232638888888889
100-0.30.1807870370370370.1875-0.00671296296296297-0.480787037037037
1010.30.1502314814814810.2-0.04976851851851850.149768518518519
1020.40.2298611111111110.20.02986111111111110.170138888888889
103-1.8-1.669675925925930.183333333333333-1.85300925925926-0.130324074074074
1042.62.390972222222220.18752.203472222222220.209027777777778
105-0.3-0.2493055555555560.195833333333333-0.445138888888889-0.0506944444444444
1060.30.1317129629629630.208333333333333-0.07662037037037040.168287037037037
10700.1668981481481480.220833333333333-0.0539351851851852-0.166898148148148
1080.40.3053240740740740.2041666666666670.1011574074074070.094675925925926
109-2.9-2.195601851851850.1875-2.38310185185185-0.704398148148148
1103.62.903935185185190.1752.728935185185190.696064814814815
111-0.1-0.01597222222222220.179166666666667-0.195138888888889-0.0840277777777778
1120.30.1641203703703700.170833333333333-0.006712962962962970.135879629629630
11300.1002314814814810.15-0.0497685185185185-0.100231481481481
1140.30.1673611111111110.13750.02986111111111110.132638888888889
115-2.1-1.728009259259260.125-1.85300925925926-0.371990740740741
1162.62.311805555555560.1083333333333332.203472222222220.288194444444444
117-0.2-0.3451388888888890.1-0.4451388888888890.145138888888889
11800.01504629629629630.0916666666666667-0.0766203703703704-0.0150462962962963
119-0.20.04189814814814820.0958333333333334-0.0539351851851852-0.241898148148148
1200.30.2011574074074070.10.1011574074074070.0988425925925926
121-3.1NA0.075NANA
1223.4NA0.0791666666666667NANA
123-0.1NA0.104166666666667NANA
1240.1NA0.1125NANA
1250.3NA0.125NANA
1260.1NANANANA
127-2.5NANANANA
1283.1NANANANA
129-0.1NANANANA
1300.1NANANANA
1310NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292527999srtf2jbrdl0euyd/1vda81292527832.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292527999srtf2jbrdl0euyd/1vda81292527832.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292527999srtf2jbrdl0euyd/26msb1292527832.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292527999srtf2jbrdl0euyd/26msb1292527832.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292527999srtf2jbrdl0euyd/36msb1292527832.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292527999srtf2jbrdl0euyd/36msb1292527832.ps (open in new window)


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