Home » date » 2010 » Dec » 15 »

*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: Wed, 15 Dec 2010 19:20:11 +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/15/t1292440691kmymzlh6kwz805o.htm/, Retrieved Wed, 15 Dec 2010 20:18:15 +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/15/t1292440691kmymzlh6kwz805o.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 «
130 127 122 117 112 113 149 157 157 147 137 132 125 123 117 114 111 112 144 150 149 134 123 116 117 111 105 102 95 93 124 130 124 115 106 105 105 101 95 93 84 87 116 120 117 109 105 107 109 109 108 107 99 103 131 137 135 124 118 121 121
 
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
1130NANA-2.95659722222222NA
2127NANA-5.56076388888889NA
3122NANA-9.87326388888889NA
4117NANA-11.6545138888889NA
5112NANA-17.9670138888889NA
6113NANA-16.1545138888889NA
7149147.126736111111133.12514.00173611111111.87326388888889
8157151.595486111111132.7518.84548611111115.40451388888889
9157151.053819444444132.37518.67881944444445.94618055555554
10147142.980902777778132.04166666666710.93923611111114.01909722222223
11137134.595486111111131.8752.720486111111122.40451388888889
12132130.772569444444131.791666666667-1.019097222222221.22743055555557
13125128.585069444444131.541666666667-2.95659722222222-3.58506944444444
14123125.480902777778131.041666666667-5.56076388888889-2.48090277777777
15117120.543402777778130.416666666667-9.87326388888889-3.54340277777777
16114117.887152777778129.541666666667-11.6545138888889-3.8871527777778
17111110.449652777778128.416666666667-17.96701388888890.550347222222229
18112111.012152777778127.166666666667-16.15451388888890.987847222222214
19144140.168402777778126.16666666666714.00173611111113.83159722222223
20150144.178819444444125.33333333333318.84548611111115.82118055555556
21149143.012152777778124.33333333333318.67881944444445.98784722222221
22134134.272569444444123.33333333333310.9392361111111-0.272569444444443
23123124.887152777778122.1666666666672.72048611111112-1.88715277777777
24116119.689236111111120.708333333333-1.01909722222222-3.68923611111113
25117116.126736111111119.083333333333-2.956597222222220.873263888888872
26111111.855902777778117.416666666667-5.56076388888889-0.855902777777786
27105105.668402777778115.541666666667-9.87326388888889-0.668402777777786
28102102.053819444444113.708333333333-11.6545138888889-0.0538194444444287
299594.2413194444444112.208333333333-17.96701388888890.758680555555557
309394.8871527777778111.041666666667-16.1545138888889-1.88715277777777
31124124.085069444444110.08333333333314.0017361111111-0.0850694444444429
32130128.012152777778109.16666666666718.84548611111111.98784722222223
33124127.012152777778108.33333333333318.6788194444444-3.01215277777776
34115118.480902777778107.54166666666710.9392361111111-3.48090277777776
35106109.428819444444106.7083333333332.72048611111112-3.42881944444441
36105104.980902777778106-1.019097222222220.0190972222222427
37105102.460069444444105.416666666667-2.956597222222222.53993055555556
3810199.1059027777778104.666666666667-5.560763888888891.89409722222223
399594.0850694444444103.958333333333-9.873263888888890.914930555555557
409391.7621527777778103.416666666667-11.65451388888891.23784722222223
418485.1579861111111103.125-17.9670138888889-1.15798611111113
428787.0121527777778103.166666666667-16.1545138888889-0.0121527777777857
43116117.418402777778103.41666666666714.0017361111111-1.41840277777779
44120122.762152777778103.91666666666718.8454861111111-2.76215277777779
45117123.470486111111104.79166666666718.6788194444444-6.4704861111111
46109116.855902777778105.91666666666710.9392361111111-7.85590277777779
47105109.845486111111107.1252.72048611111112-4.84548611111111
48107107.397569444444108.416666666667-1.01909722222222-0.397569444444443
49109106.751736111111109.708333333333-2.956597222222222.2482638888889
50109105.480902777778111.041666666667-5.560763888888893.51909722222223
51108102.626736111111112.5-9.873263888888895.3732638888889
52107102.220486111111113.875-11.65451388888894.77951388888889
539997.0746527777778115.041666666667-17.96701388888891.92534722222223
54103100.012152777778116.166666666667-16.15451388888892.98784722222224
55131131.251736111111117.2514.0017361111111-0.2517361111111
56137NANA18.8454861111111NA
57135NANA18.6788194444444NA
58124NANA10.9392361111111NA
59118NANA2.72048611111112NA
60121NANA-1.01909722222222NA
61121NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292440691kmymzlh6kwz805o/1sox21292440808.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292440691kmymzlh6kwz805o/1sox21292440808.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292440691kmymzlh6kwz805o/2sox21292440808.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292440691kmymzlh6kwz805o/2sox21292440808.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292440691kmymzlh6kwz805o/3lxwm1292440808.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292440691kmymzlh6kwz805o/3lxwm1292440808.ps (open in new window)


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