Home » date » 2010 » Nov » 28 »

WS 8 Decomposition of Time Series

*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, 28 Nov 2010 20:55:17 +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/Nov/28/t1290977645cva0ay0jl1zeq0b.htm/, Retrieved Sun, 28 Nov 2010 21:54:09 +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/Nov/28/t1290977645cva0ay0jl1zeq0b.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 «
9911 8915 9452 9112 8472 8230 8384 8625 8221 8649 8625 10443 10357 8586 8892 8329 8101 7922 8120 7838 7735 8406 8209 9451 10041 9411 10405 8467 8464 8102 7627 7513 7510 8291 8064 9383 9706 8579 9474 8318 8213 8059 9111 7708 7680 8014 8007 8718 9486 9113 9025 8476 7952 7759 7835 7600 7651 8319 8812 8630
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
19911NANA1323.76302083333NA
28915NANA364.908854166666NA
39452NANA908.2734375NA
49112NANA-133.8515625NA
58472NANA-347.361979166667NA
68230NANA-552.424479166666NA
783848626.450520833338938.5-312.049479166666-242.450520833334
886258244.190104166678943.375-699.184895833334380.809895833334
982218075.033854166678906.33333333333-831.299479166667145.966145833334
1086498583.64843758850.375-266.726562565.3515625000018
1186258433.856770833338802.29166666667-368.434895833333191.143229166666
12104439688.388020833338774914.388020833333754.611979166668
131035710073.92968758750.166666666671323.76302083333283.0703125
1485869071.283854166678706.375364.908854166666-485.283854166666
1588929561.606770833338653.33333333333908.2734375-669.606770833332
1683298489.106770833338622.95833333333-133.8515625-160.106770833332
1781018248.138020833338595.5-347.361979166667-147.138020833334
1879227984.408854166678536.83333333333-552.424479166666-62.408854166666
1981208170.283854166678482.33333333333-312.049479166666-50.283854166666
2078387804.356770833338503.54166666667-699.18489583333433.6432291666661
2177357769.658854166678600.95833333333-831.299479166667-34.6588541666661
2284068403.02343758669.75-266.72656252.9765625
2382098322.190104166678690.625-368.434895833333-113.190104166666
2494519627.638020833338713.25914.388020833333-176.638020833334
251004110023.97135416678700.208333333331323.7630208333317.0286458333339
2694119031.033854166678666.125364.908854166666379.966145833334
27104059551.481770833338643.20833333333908.2734375853.51822916667
2884678495.190104166678629.04166666667-133.8515625-28.1901041666661
2984648270.846354166678618.20833333333-347.361979166667193.153645833334
3081028056.908854166668609.33333333333-552.42447916666645.0911458333358
3176278280.49218758592.54166666666-312.049479166666-653.492187499998
3275137844.731770833338543.91666666666-699.184895833334-331.73177083333
3375107639.158854166668470.45833333333-831.299479166667-129.158854166664
3482918158.731770833338425.45833333333-266.7265625132.268229166668
3580648040.356770833338408.79166666667-368.43489583333323.6432291666661
3693839310.92968758396.54166666667914.38802083333372.0703125
3797069780.346354166678456.583333333331323.76302083333-74.346354166666
3885798891.450520833338526.54166666667364.908854166666-312.450520833332
3994749450.02343758541.75908.273437523.9765625
4083188403.440104166678537.29166666667-133.8515625-85.440104166666
4182138176.013020833338523.375-347.36197916666736.9869791666661
4280597940.86718758493.29166666667-552.424479166666118.1328125
4391118144.36718758456.41666666667-312.049479166666966.6328125
4477087770.315104166678469.5-699.184895833334-62.315104166666
4576807641.74218758473.04166666667-831.29947916666738.2578125000018
4680148194.190104166678460.91666666667-266.7265625-180.190104166666
4780078088.190104166678456.625-368.434895833333-81.190104166666
4887189347.638020833338433.25914.388020833333-629.638020833332
4994869691.346354166678367.583333333331323.76302083333-205.346354166666
5091138674.825520833338309.91666666667364.908854166666438.174479166668
5190259212.481770833338304.20833333333908.2734375-187.481770833332
5284768181.856770833338315.70833333333-133.8515625294.143229166668
5379528014.596354166678361.95833333333-347.361979166667-62.596354166666
5477597839.408854166678391.83333333333-552.424479166666-80.408854166666
557835NANA-312.049479166666NA
567600NANA-699.184895833334NA
577651NANA-831.299479166667NA
588319NANA-266.7265625NA
598812NANA-368.434895833333NA
608630NANA914.388020833333NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290977645cva0ay0jl1zeq0b/1bzwj1290977713.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290977645cva0ay0jl1zeq0b/1bzwj1290977713.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290977645cva0ay0jl1zeq0b/2bzwj1290977713.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290977645cva0ay0jl1zeq0b/2bzwj1290977713.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290977645cva0ay0jl1zeq0b/3eiyz1290977714.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290977645cva0ay0jl1zeq0b/3eiyz1290977714.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290977645cva0ay0jl1zeq0b/4eiyz1290977714.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290977645cva0ay0jl1zeq0b/4eiyz1290977714.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])
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