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 20:32:51 +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/t1293395444b0lhu1sjqn5y75a.htm/, Retrieved Sun, 26 Dec 2010 21:30:49 +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/t1293395444b0lhu1sjqn5y75a.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 «
6 6 8 4 8 10 9 12 9 11 11 11 11 11 9 8 6 7 8 6 5 2 3 3 7 8 7 7 6 6 7 5 5 5 4 4 4 1 -1 3 4 3 2 1 4 3 5 6 6 6 6 6 5 6 5 6 5 7 4 5 6 6 5 3 2 3 3 2 0 4 4 5 6 6 5 5 3 5 5 5 3 6 6 4 6 5 4 5 5 4 3 2 3 2 -1 0 -2 1 -2 -2 -2 -6 -4 -2 0 -5 -4 -5 -1 -2 -4 -1 1 1 -2 1 1 3 3 1 1 0 2 2 -1 1 0 1 1 3 2
 
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
16NANA0.979552469135803NA
26NANA0.970293209876543NA
38NANA-0.386188271604938NA
44NANA0.243441358024691NA
58NANA-0.126929012345679NA
610NANA-0.154706790123457NA
798.673996913580258.95833333333333-0.2843364197530860.326003086419755
8129.076774691358039.375-0.2982253086419752.92322530864197
999.410108024691369.625-0.214891975308642-0.410108024691358
10119.789737654320999.83333333333333-0.04359567901234561.21026234567901
11119.599922839506179.91666666666667-0.3167438271604941.40007716049383
12119.340663580246919.70833333333333-0.367669753086421.65933641975309
131110.52121913580259.541666666666670.9795524691358030.47878086419753
141110.22029320987659.250.9702932098765430.779706790123457
1598.44714506172848.83333333333333-0.3861882716049380.552854938271604
1688.535108024691368.291666666666670.243441358024691-0.535108024691359
1767.456404320987667.58333333333333-0.126929012345679-1.45640432098766
1876.761959876543216.91666666666667-0.1547067901234570.238040123456789
1986.132330246913586.41666666666667-0.2843364197530861.86766975308642
2065.826774691358026.125-0.2982253086419750.173225308641975
2155.701774691358025.91666666666667-0.214891975308642-0.701774691358025
2225.748070987654325.79166666666667-0.0435956790123456-3.74807098765432
2335.433256172839515.75-0.316743827160494-2.43325617283951
2435.340663580246915.70833333333333-0.36766975308642-2.34066358024691
2576.60455246913585.6250.9795524691358030.395447530864198
2686.511959876543215.541666666666670.9702932098765431.48804012345679
2775.113811728395065.5-0.3861882716049381.88618827160494
2875.868441358024695.6250.2434413580246911.13155864197531
2965.664737654320995.79166666666667-0.1269290123456790.335262345679013
3065.720293209876545.875-0.1547067901234570.279706790123457
3175.507330246913585.79166666666667-0.2843364197530861.49266975308642
3255.076774691358025.375-0.298225308641975-0.0767746913580227
3354.535108024691364.75-0.2148919753086420.464891975308642
3454.206404320987654.25-0.04359567901234560.793595679012346
3543.683256172839514-0.3167438271604940.316743827160495
3643.423996913580253.79166666666667-0.367669753086420.576003086419754
3744.437885802469143.458333333333330.979552469135803-0.437885802469135
3814.053626543209883.083333333333330.970293209876543-3.05362654320988
39-12.488811728395062.875-0.386188271604938-3.48881172839506
4032.993441358024692.750.2434413580246910.00655864197530853
4142.581404320987652.70833333333333-0.1269290123456791.41859567901235
4232.678626543209882.83333333333333-0.1547067901234570.321373456790123
4322.715663580246913-0.284336419753086-0.715663580246913
4412.993441358024693.29166666666667-0.298225308641975-1.99344135802469
4543.576774691358023.79166666666667-0.2148919753086420.423225308641975
4634.164737654320994.20833333333333-0.0435956790123456-1.16473765432099
4754.058256172839514.375-0.3167438271604940.941743827160494
4864.173996913580254.54166666666667-0.367669753086421.82600308641975
4965.771219135802474.791666666666670.9795524691358030.228780864197532
5066.095293209876545.1250.970293209876543-0.0952932098765427
5164.988811728395065.375-0.3861882716049381.01118827160494
5265.826774691358025.583333333333330.2434413580246910.173225308641975
5355.581404320987655.70833333333333-0.126929012345679-0.581404320987654
5465.470293209876545.625-0.1547067901234570.529706790123456
5555.298996913580255.58333333333333-0.284336419753086-0.298996913580247
5665.285108024691365.58333333333333-0.2982253086419750.714891975308642
5755.326774691358035.54166666666667-0.214891975308642-0.326774691358025
5875.331404320987655.375-0.04359567901234561.66859567901235
5944.808256172839515.125-0.316743827160494-0.808256172839505
6054.507330246913584.875-0.367669753086420.492669753086419
6165.646219135802474.666666666666670.9795524691358030.353780864197533
6265.386959876543214.416666666666670.9702932098765430.61304012345679
6353.655478395061734.04166666666667-0.3861882716049381.34452160493827
6433.951774691358023.708333333333330.243441358024691-0.951774691358025
6523.456404320987653.58333333333333-0.126929012345679-1.45640432098765
6633.428626543209883.58333333333333-0.154706790123457-0.428626543209877
6733.298996913580253.58333333333333-0.284336419753086-0.298996913580246
6823.285108024691363.58333333333333-0.298225308641975-1.28510802469136
6903.368441358024693.58333333333333-0.214891975308642-3.36844135802469
7043.623070987654323.66666666666667-0.04359567901234560.376929012345679
7143.474922839506173.79166666666667-0.3167438271604940.525077160493827
7253.548996913580253.91666666666667-0.367669753086421.45100308641975
7365.062885802469144.083333333333330.9795524691358030.937114197530865
7465.261959876543214.291666666666670.9702932098765430.738040123456791
7554.155478395061734.54166666666667-0.3861882716049380.844521604938272
7654.993441358024694.750.2434413580246910.00655864197530853
7734.789737654320994.91666666666667-0.126929012345679-1.78973765432099
7854.803626543209884.95833333333333-0.1547067901234570.196373456790124
7954.632330246913584.91666666666667-0.2843364197530860.36766975308642
8054.576774691358024.875-0.2982253086419750.423225308641975
8134.576774691358024.79166666666667-0.214891975308642-1.57677469135802
8264.706404320987654.75-0.04359567901234561.29359567901235
8364.516589506172844.83333333333333-0.3167438271604941.48341049382716
8444.507330246913584.875-0.36766975308642-0.50733024691358
8565.72955246913584.750.9795524691358030.270447530864198
8655.511959876543214.541666666666670.970293209876543-0.51195987654321
8744.030478395061734.41666666666667-0.386188271604938-0.0304783950617278
8854.493441358024694.250.2434413580246910.506558641975309
8953.664737654320993.79166666666667-0.1269290123456791.33526234567901
9043.178626543209883.33333333333333-0.1547067901234570.821373456790123
9132.548996913580252.83333333333333-0.2843364197530860.451003086419754
9222.035108024691362.33333333333333-0.298225308641975-0.035108024691358
9331.701774691358021.91666666666667-0.2148919753086421.29822530864198
9421.331404320987651.375-0.04359567901234560.668595679012346
95-10.4749228395061730.791666666666667-0.316743827160494-1.47492283950617
960-0.2843364197530860.0833333333333334-0.367669753086420.284336419753086
97-20.354552469135803-0.6250.979552469135803-2.35455246913580
981-0.113040123456790-1.083333333333330.9702932098765431.11304012345679
99-2-1.76118827160494-1.375-0.386188271604938-0.238811728395061
100-2-1.54822530864198-1.791666666666670.243441358024691-0.451774691358025
101-2-2.33526234567901-2.20833333333333-0.1269290123456790.335262345679012
102-6-2.69637345679012-2.54166666666667-0.154706790123457-3.30362654320988
103-4-2.99266975308642-2.70833333333333-0.284336419753086-1.00733024691358
104-2-3.08989197530864-2.79166666666667-0.2982253086419751.08989197530864
1050-3.21489197530864-3-0.2148919753086423.21489197530864
106-5-3.08526234567901-3.04166666666667-0.0435956790123456-1.91473765432099
107-4-3.19174382716049-2.875-0.316743827160494-0.808256172839506
108-5-2.82600308641975-2.45833333333333-0.36766975308642-2.17399691358025
109-1-1.10378086419753-2.083333333333330.9795524691358030.103780864197531
110-2-0.904706790123457-1.8750.970293209876543-1.09529320987654
111-4-2.09452160493827-1.70833333333333-0.386188271604938-1.90547839506173
112-1-1.08989197530864-1.333333333333330.2434413580246910.0898919753086418
1131-0.835262345679012-0.708333333333333-0.1269290123456791.83526234567901
1141-0.321373456790123-0.166666666666666-0.1547067901234571.32137345679012
115-2-0.1176697530864200.166666666666667-0.284336419753086-1.88233024691358
11610.03510802469135820.333333333333333-0.2982253086419750.964891975308642
11710.4517746913580250.666666666666667-0.2148919753086420.548225308641975
11830.9980709876543211.04166666666667-0.04359567901234562.00192901234568
11930.766589506172841.08333333333333-0.3167438271604942.23341049382716
12010.632330246913581-0.367669753086420.36766975308642
1211NA1.08333333333333NANA
1220NA1.16666666666667NANA
1232NA1.16666666666667NANA
1242NA1.16666666666667NANA
125-1NA1.125NANA
1261NANANANA
1270NANANANA
1281NANANANA
1291NANANANA
1303NANANANA
1312NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293395444b0lhu1sjqn5y75a/17a1t1293395567.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293395444b0lhu1sjqn5y75a/17a1t1293395567.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293395444b0lhu1sjqn5y75a/27a1t1293395567.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293395444b0lhu1sjqn5y75a/27a1t1293395567.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293395444b0lhu1sjqn5y75a/30jiw1293395567.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293395444b0lhu1sjqn5y75a/30jiw1293395567.ps (open in new window)


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