Home » date » 2010 » Dec » 26 »

*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, 26 Dec 2010 21:11:42 +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/26/t1293397826wde0up8wp5x3nti.htm/, Retrieved Sun, 26 Dec 2010 22:10:31 +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/26/t1293397826wde0up8wp5x3nti.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 «
24 29 29 25 16 18 13 22 15 20 19 18 13 17 17 13 14 13 17 17 15 9 10 9 14 18 18 12 16 12 19 13 12 13 11 10 16 12 6 8 6 8 8 9 13 8 11 8 10 15 12 13 12 15 13 13 16 14 12 15 14 19 16 16 11 13 12 11 6 9 6 15 17 13 12 13 10 14 13 10 11 12 7 11 9 13 12 5 13 11 8 8 8 8 0 3 0 -1 -1 -4 1 -1 0 -1 6 0 -3 -3 4 1 0 -4 -2 3 2 5 6 6 3 4 7 5 6 1 3 6 0 3 4 7 6
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
124NANA0.739197530864198NA
229NANA1.97993827160494NA
329NANA0.433641975308642NA
425NANA-1.6820987654321NA
516NANA-0.54320987654321NA
618NANA0.373456790123457NA
71321.118827160493820.20833333333330.910493827160494-8.11882716049383
82219.466049382716119.250.2160493827160492.53395061728395
91519.461419753086418.251.21141975308642-4.46141975308642
102017.012345679012317.25-0.2376543209876542.98765432098766
111914.091049382716116.6666666666667-2.575617283950624.90895061728395
121815.549382716049416.375-0.8256172839506182.45061728395062
131317.072530864197516.33333333333330.739197530864198-4.07253086419753
141718.271604938271616.29166666666671.97993827160494-1.27160493827161
151716.516975308642016.08333333333330.4336419753086420.483024691358025
161313.942901234567915.625-1.6820987654321-0.942901234567902
171414.248456790123514.7916666666667-0.54320987654321-0.248456790123456
181314.415123456790114.04166666666670.373456790123457-1.41512345679012
191714.618827160493813.70833333333330.9104938271604942.38117283950618
201714.007716049382713.79166666666670.2160493827160492.99228395061728
211515.086419753086413.8751.21141975308642-0.0864197530864192
22913.637345679012313.875-0.237654320987654-4.63734567901234
231011.341049382716013.9166666666667-2.57561728395062-1.34104938271605
24913.132716049382713.9583333333333-0.825617283950618-4.13271604938272
251414.7391975308642140.739197530864198-0.739197530864198
261815.896604938271613.91666666666671.979938271604942.10339506172839
271814.058641975308613.6250.4336419753086423.94135802469136
281211.984567901234613.6666666666667-1.68209876543210.0154320987654319
291613.331790123456813.875-0.543209876543212.66820987654321
301214.331790123456813.95833333333330.373456790123457-2.33179012345679
311914.993827160493814.08333333333330.9104938271604944.00617283950617
321314.132716049382713.91666666666670.216049382716049-1.13271604938272
331214.378086419753113.16666666666671.21141975308642-2.37808641975309
341312.262345679012312.5-0.2376543209876540.737654320987653
35119.3410493827160511.9166666666667-2.575617283950621.65895061728395
361010.507716049382711.3333333333333-0.825617283950618-0.507716049382717
371611.447530864197510.70833333333330.7391975308641984.55246913580247
381212.063271604938310.08333333333331.97993827160494-0.0632716049382704
39610.39197530864209.958333333333330.433641975308642-4.39197530864197
4088.109567901234579.79166666666666-1.6820987654321-0.109567901234566
4169.040123456790129.58333333333333-0.54320987654321-3.04012345679012
4289.873456790123469.50.373456790123457-1.87345679012346
43810.07716049382729.166666666666670.910493827160494-2.07716049382716
4499.257716049382729.041666666666670.216049382716049-0.257716049382715
451310.62808641975319.416666666666671.211419753086422.37191358024691
4689.637345679012349.875-0.237654320987654-1.63734567901234
47117.7577160493827210.3333333333333-2.575617283950623.24228395061728
48810.049382716049410.875-0.825617283950618-2.04938271604938
491012.114197530864211.3750.739197530864198-2.11419753086420
501513.729938271604911.751.979938271604941.27006172839506
511212.475308641975312.04166666666670.433641975308642-0.475308641975307
521310.734567901234612.4166666666667-1.68209876543212.26543209876543
531212.165123456790112.7083333333333-0.54320987654321-0.165123456790123
541513.415123456790113.04166666666670.3734567901234571.58487654320987
551314.410493827160513.50.910493827160494-1.41049382716049
561314.049382716049413.83333333333330.216049382716049-1.04938271604938
571615.378086419753114.16666666666671.211419753086420.621913580246913
581414.220679012345714.4583333333333-0.237654320987654-0.220679012345679
591211.966049382716114.5416666666667-2.575617283950620.0339506172839492
601513.591049382716114.4166666666667-0.8256172839506181.40895061728395
611415.030864197530914.29166666666670.739197530864198-1.03086419753086
621916.146604938271614.16666666666671.979938271604942.85339506172840
631614.100308641975313.66666666666670.4336419753086421.89969135802469
641611.359567901234613.0416666666667-1.68209876543214.64043209876543
651112.040123456790112.5833333333333-0.54320987654321-1.04012345679012
661312.706790123456812.33333333333330.3734567901234570.293209876543211
671213.368827160493812.45833333333330.910493827160494-1.36882716049383
681112.549382716049412.33333333333330.216049382716049-1.54938271604938
69613.128086419753111.91666666666671.21141975308642-7.12808641975309
70911.387345679012311.625-0.237654320987654-2.38734567901234
7168.8827160493827211.4583333333333-2.57561728395062-2.88271604938272
721510.632716049382711.4583333333333-0.8256172839506184.36728395061728
731712.280864197530911.54166666666670.7391975308641984.71913580246914
741313.521604938271611.54166666666671.97993827160494-0.521604938271604
751212.141975308642011.70833333333330.433641975308642-0.141975308641975
761310.359567901234612.0416666666667-1.68209876543212.64043209876543
771011.665123456790112.2083333333333-0.54320987654321-1.66512345679012
781412.456790123456812.08333333333330.3734567901234571.54320987654321
791312.493827160493811.58333333333330.9104938271604940.506172839506172
801011.466049382716011.250.216049382716049-1.46604938271605
811112.461419753086411.251.21141975308642-1.46141975308642
821210.679012345679010.9166666666667-0.2376543209876541.32098765432099
8378.1327160493827210.7083333333333-2.57561728395062-1.13271604938272
84119.8827160493827210.7083333333333-0.8256172839506181.11728395061728
85911.114197530864210.3750.739197530864198-2.11419753086420
861312.063271604938310.08333333333331.979938271604940.93672839506173
871210.30864197530869.8750.4336419753086421.69135802469136
8857.901234567901249.58333333333333-1.6820987654321-2.90123456790124
89138.581790123456799.125-0.543209876543214.41820987654321
90118.873456790123468.50.3734567901234572.12654320987654
9188.702160493827167.791666666666670.910493827160494-0.70216049382716
9287.049382716049386.833333333333330.2160493827160490.950617283950618
9386.919753086419755.708333333333331.211419753086421.08024691358025
9484.554012345679014.79166666666667-0.2376543209876543.44598765432099
9501.341049382716053.91666666666667-2.57561728395062-1.34104938271605
9632.091049382716052.91666666666667-0.8256172839506180.90895061728395
9702.822530864197532.083333333333330.739197530864198-2.82253086419753
98-13.354938271604941.3751.97993827160494-4.35493827160494
99-11.350308641975310.9166666666666670.433641975308642-2.35030864197531
100-4-1.182098765432100.5-1.6820987654321-2.8179012345679
1011-0.5015432098765430.0416666666666667-0.543209876543211.50154320987654
102-10.0401234567901234-0.3333333333333330.373456790123457-1.04012345679012
10300.493827160493827-0.4166666666666670.910493827160494-0.493827160493827
104-10.0493827160493825-0.1666666666666670.216049382716049-1.04938271604938
10561.16975308641975-0.04166666666666671.211419753086424.83024691358025
1060-0.2376543209876542.77555756156289e-17-0.2376543209876540.237654320987654
107-3-2.70061728395062-0.125-2.57561728395062-0.299382716049383
108-3-0.90895061728395-0.0833333333333334-0.825617283950618-2.09104938271605
10940.9058641975308650.1666666666666670.7391975308641983.09413580246914
11012.479938271604940.51.97993827160494-1.47993827160494
11101.183641975308640.750.433641975308642-1.18364197530864
112-4-0.6820987654320991-1.6820987654321-3.3179012345679
113-20.956790123456791.5-0.54320987654321-2.95679012345679
11432.415123456790122.041666666666670.3734567901234570.584876543209877
11523.368827160493832.458333333333330.910493827160494-1.36882716049383
11652.966049382716052.750.2160493827160492.03395061728395
11764.378086419753093.166666666666671.211419753086421.62191358024691
11863.387345679012353.625-0.2376543209876542.61265432098765
11931.466049382716054.04166666666667-2.575617283950621.53395061728395
12043.549382716049384.375-0.8256172839506180.450617283950618
1217NA4.41666666666667NANA
1225NA4.25NANA
1236NA4.08333333333333NANA
1241NA4.04166666666667NANA
1253NA4.20833333333333NANA
1266NANANANA
1270NANANANA
1283NANANANA
1294NANANANA
1307NANANANA
1316NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293397826wde0up8wp5x3nti/1un8b1293397898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293397826wde0up8wp5x3nti/1un8b1293397898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293397826wde0up8wp5x3nti/2un8b1293397898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293397826wde0up8wp5x3nti/2un8b1293397898.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293397826wde0up8wp5x3nti/3me8e1293397898.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293397826wde0up8wp5x3nti/3me8e1293397898.ps (open in new window)


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