Home » date » 2010 » Dec » 21 »

Paper; Classical Decomposition Coffee

*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: Tue, 21 Dec 2010 12:03:05 +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/21/t129293297560wcfuq4vue7gs3.htm/, Retrieved Tue, 21 Dec 2010 13:03:13 +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/21/t129293297560wcfuq4vue7gs3.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 «
108,35 109,87 111,30 115,50 116,22 116,63 116,84 116,63 117,03 117,00 117,14 116,64 117,24 117,52 117,83 119,79 120,86 120,75 120,63 120,89 120,23 121,19 120,79 120,09 120,86 121,10 121,47 122,01 123,94 125,78 125,31 125,79 126,12 125,57 125,44 126,12 126,01 126,50 126,13 126,66 126,33 126,61 126,36 126,83 125,90 126,29 126,37 125,11
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1108.35NANA-0.71075231481482NA
2109.87NANA-0.647974537037033NA
3111.3NANA-0.809502314814815NA
4115.5NANA-0.0517245370370397NA
5116.22NANA0.581053240740726NA
6116.63NANA1.00521990740740NA
7116.84116.264942129630115.2995833333330.9653587962962970.575057870370372
8116.63116.654525462963115.988750.665775462962966-0.0245254629629699
9117.03116.831747685185116.5795833333330.2521643518518570.198252314814809
10117117.048275462963117.0304166666670.0178587962962966-0.0482754629629625
11117.14116.994942129630117.4025-0.4075578703703620.145057870370380
12116.64116.907581018519117.7675-0.859918981481479-0.267581018518513
13117.24117.386331018519118.097083333333-0.71075231481482-0.146331018518509
14117.52117.784525462963118.4325-0.647974537037033-0.264525462962965
15117.83117.933831018519118.743333333333-0.809502314814815-0.103831018518505
16119.79118.999525462963119.05125-0.05172453703703970.79047453703707
17120.86119.958969907407119.3779166666670.5810532407407260.90103009259262
18120.75120.678969907407119.673751.005219907407400.0710300925926077
19120.63120.933692129630119.9683333333330.965358796296297-0.303692129629624
20120.89120.934108796296120.2683333333330.665775462962966-0.0441087962962854
21120.23120.821331018519120.5691666666670.252164351851857-0.591331018518503
22121.19120.831192129630120.8133333333330.01785879629629660.358807870370384
23120.79120.626608796296121.034166666667-0.4075578703703620.163391203703725
24120.09120.512164351852121.372083333333-0.859918981481479-0.422164351851833
25120.86121.065914351852121.776666666667-0.71075231481482-0.205914351851845
26121.1121.527858796296122.175833333333-0.647974537037033-0.427858796296277
27121.47121.815914351852122.625416666667-0.809502314814815-0.345914351851832
28122.01123.001608796296123.053333333333-0.0517245370370397-0.991608796296276
29123.94124.010636574074123.4295833333330.581053240740726-0.0706365740740722
30125.78124.879803240741123.8745833333331.005219907407400.90019675925926
31125.31125.305775462963124.3404166666670.9653587962962970.00422453703703241
32125.79125.445775462963124.780.6657754629629660.344224537037036
33126.12125.451331018519125.1991666666670.2521643518518570.668668981481474
34125.57125.604942129630125.5870833333330.0178587962962966-0.0349421296296271
35125.44125.472858796296125.880416666667-0.407557870370362-0.0328587962962956
36126.12125.154664351852126.014583333333-0.8599189814814790.965335648148155
37126.01125.382164351852126.092916666667-0.710752314814820.627835648148164
38126.5125.532025462963126.18-0.6479745370370330.967974537037023
39126.13125.404664351852126.214166666667-0.8095023148148150.725335648148146
40126.66126.183275462963126.235-0.05172453703703970.476724537037015
41126.33126.884803240741126.303750.581053240740726-0.554803240740767
42126.61127.305636574074126.3004166666671.00521990740740-0.695636574074086
43126.36NANA0.965358796296297NA
44126.83NANA0.665775462962966NA
45125.9NANA0.252164351851857NA
46126.29NANA0.0178587962962966NA
47126.37NANA-0.407557870370362NA
48125.11NANA-0.859918981481479NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t129293297560wcfuq4vue7gs3/1wc8g1292932980.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t129293297560wcfuq4vue7gs3/1wc8g1292932980.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t129293297560wcfuq4vue7gs3/2wc8g1292932980.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t129293297560wcfuq4vue7gs3/2wc8g1292932980.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t129293297560wcfuq4vue7gs3/3plp11292932980.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t129293297560wcfuq4vue7gs3/3plp11292932980.ps (open in new window)


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