Home » date » 2010 » Dec » 18 »

PAPER - Classical Decomposition

*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: Sat, 18 Dec 2010 16:15:43 +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/18/t1292688907dh4lpu4qs9ynxql.htm/, Retrieved Sat, 18 Dec 2010 17:15:11 +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/18/t1292688907dh4lpu4qs9ynxql.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 «
104,37 104,89 105,15 105,72 106,38 106,40 106,47 106,59 106,76 107,35 107,81 108,03 109,08 109,86 110,29 110,34 110,59 110,64 110,83 111,51 113,32 115,89 116,51 117,44 118,25 118,65 118,52 119,07 119,12 119,28 119,30 119,44 119,57 119,93 120,03 119,66 119,46 119,48 119,56 119,43 119,57 119,59 119,50 119,54 119,56 119,61 119,64 119,60 119,71 119,72 119,66 119,76 119,80 119,88 119,78 120,08 120,22
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1104.37NANA0.400081018518512NA
2104.89NANA0.4392476851852NA
3105.15NANA0.20827546296297NA
4105.72NANA0.0168865740740753NA
5106.38NANA-0.171030092592600NA
6106.4NANA-0.419363425925931NA
7106.47105.835219907407106.522916666667-0.6876967592592610.634780092592607
8106.59106.240636574074106.92625-0.685613425925920.349363425925915
9106.76107.048136574074107.3475-0.299363425925931-0.288136574074073
10107.35108.187164351852107.7541666666670.432997685185182-0.837164351851868
11107.81108.546331018519108.1220833333330.424247685185185-0.736331018518513
12108.03108.815497685185108.4741666666670.341331018518518-0.785497685185177
13109.08109.232581018519108.83250.400081018518512-0.152581018518518
14109.86109.658414351852109.2191666666670.43924768518520.201585648148153
15110.29109.905775462963109.69750.208275462962970.384224537037028
16110.34110.343553240741110.3266666666670.0168865740740753-0.00355324074074304
17110.59110.873969907407111.045-0.171030092592600-0.283969907407410
18110.64111.380219907407111.799583333333-0.419363425925931-0.740219907407408
19110.83111.886053240741112.57375-0.687696759259261-1.05605324074074
20111.51112.636469907407113.322083333333-0.68561342592592-1.12646990740741
21113.32113.731886574074114.03125-0.299363425925931-0.411886574074074
22115.89115.170914351852114.7379166666670.4329976851851820.719085648148152
23116.51115.881331018519115.4570833333330.4242476851851850.628668981481496
24117.44116.513831018519116.17250.3413310185185180.926168981481496
25118.25117.285497685185116.8854166666670.4000810185185120.964502314814837
26118.65118.007997685185117.568750.43924768518520.642002314814832
27118.52118.367858796296118.1595833333330.208275462962970.152141203703707
28119.07118.605219907407118.5883333333330.01688657407407530.464780092592591
29119.12118.732303240741118.903333333333-0.1710300925926000.387696759259271
30119.28118.723136574074119.1425-0.4193634259259310.55686342592594
31119.3118.597719907407119.285416666667-0.6876967592592610.702280092592616
32119.44118.684803240741119.370416666667-0.685613425925920.755196759259277
33119.57119.148969907407119.448333333333-0.2993634259259310.421030092592616
34119.93119.939664351852119.5066666666670.432997685185182-0.00966435185183911
35120.03119.964664351852119.5404166666670.4242476851851850.0653356481481495
36119.66119.913414351852119.5720833333330.341331018518518-0.253414351851845
37119.46119.993414351852119.5933333333330.400081018518512-0.533414351851846
38119.48120.045081018519119.6058333333330.4392476851852-0.565081018518512
39119.56119.817858796296119.6095833333330.20827546296297-0.25785879629629
40119.43119.612719907407119.5958333333330.0168865740740753-0.182719907407403
41119.57119.395219907407119.56625-0.1710300925926000.174780092592599
42119.59119.128136574074119.5475-0.4193634259259310.461863425925941
43119.5118.867719907407119.555416666667-0.6876967592592610.632280092592595
44119.54118.890219907407119.575833333333-0.685613425925920.649780092592593
45119.56119.290636574074119.59-0.2993634259259310.269363425925917
46119.61120.040914351852119.6079166666670.432997685185182-0.430914351851868
47119.64120.055497685185119.631250.424247685185185-0.415497685185173
48119.6119.994247685185119.6529166666670.341331018518518-0.394247685185192
49119.71NA119.676666666667NANA
50119.72NA119.710833333333NANA
51119.66NA119.760833333333NANA
52119.76NANANANA
53119.8NANANANA
54119.88NANANANA
55119.78NANANANA
56120.08NANANANA
57120.22NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292688907dh4lpu4qs9ynxql/1ougi1292688940.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292688907dh4lpu4qs9ynxql/1ougi1292688940.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292688907dh4lpu4qs9ynxql/2ougi1292688940.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292688907dh4lpu4qs9ynxql/2ougi1292688940.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292688907dh4lpu4qs9ynxql/3z4xl1292688940.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292688907dh4lpu4qs9ynxql/3z4xl1292688940.ps (open in new window)


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