Home » date » 2010 » Jan » 08 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 08 Jan 2010 03:37:59 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947275helrrv5tswfnxtg.htm/, Retrieved Fri, 08 Jan 2010 11:41:21 +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/Jan/08/t1262947275helrrv5tswfnxtg.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
10.846 10.413 10.709 10.662 10.570 10.297 10.635 10.872 10.296 10.383 10.431 10.574 10.653 10.805 10.872 10.625 10.407 10.463 10.556 10.646 10.702 11.353 11.346 11.451 11.964 12.574 13.031 13.812 14.544 14.931 14.886 16.005 17.064 15.168 16.050 15.839 15.137 14.954 15.648 15.305 15.579 16.348 15.928 16.171 15.937 15.713 15.594 15.683 16.438 17.032 17.696 17.745 19.394 20.148 20.108 18.584 18.441 18.391 19.178 18.079 18.483 19.644 19.195 19.650 20.830 23.595 22.937 21.814 21.928 21.777 21.383 21.467
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
110.846NANA-0.534832638888888NA
210.413NANA-0.261732638888889NA
310.709NANA-0.163249305555555NA
410.662NANA-0.216132638888889NA
510.57NANA0.321050694444445NA
610.297NANA1.08520902777778NA
710.63510.905934027777810.54929166666670.356642361111111-0.270934027777779
810.87210.806659027777810.55758333333330.2490756944444440.0653409722222218
910.29610.714542361111110.58070833333330.133834027777778-0.418542361111111
1010.38310.287775694444410.5859583333333-0.298182638888890.095224305555556
1110.43110.437242361111110.577625-0.140382638888889-0.00624236111111287
1210.57410.046450694444410.57775-0.5312993055555550.527549305555555
1310.65310.046542361111110.581375-0.5348326388888880.606457638888887
1410.80510.306934027777810.5686666666667-0.2617326388888890.498065972222223
1510.87210.412917361111110.5761666666667-0.1632493055555550.459082638888889
1610.62510.417367361111110.6335-0.2161326388888890.207632638888889
1710.40711.033092361111110.71204166666670.321050694444445-0.62609236111111
1810.46311.871917361111110.78670833333331.08520902777778-1.40891736111111
1910.55611.234517361111110.8778750.356642361111111-0.678517361111114
2010.64611.255284027777811.00620833333330.249075694444444-0.609284027777777
2110.70211.303709027777811.1698750.133834027777778-0.601709027777778
2211.35311.094442361111111.392625-0.298182638888890.258557638888886
2311.34611.557409027777811.6977916666667-0.140382638888889-0.211409027777778
2411.45111.525034027777812.0563333333333-0.531299305555555-0.0740340277777793
2511.96411.888084027777812.4229166666667-0.5348326388888880.0759159722222229
2612.57412.564892361111112.826625-0.2617326388888890.00910763888889043
2713.03113.151750694444413.315-0.163249305555555-0.120750694444444
2813.81213.522909027777813.7390416666667-0.2161326388888890.289090972222223
2914.54414.415050694444414.0940.3210506944444450.128949305555558
3014.93115.558042361111114.47283333333331.08520902777778-0.627042361111108
3114.88615.144517361111114.7878750.356642361111111-0.25851736111111
3216.00515.268325694444415.019250.2490756944444440.736674305555558
3317.06415.361292361111115.22745833333330.1338340277777781.70270763888889
3415.16815.100525694444415.3987083333333-0.298182638888890.0674743055555567
3516.0515.363659027777815.5040416666667-0.1403826388888890.686340972222226
3615.83915.074909027777815.6062083333333-0.5312993055555550.764090972222224
3715.13715.173834027777815.7086666666667-0.534832638888888-0.0368340277777772
3814.95415.497267361111115.759-0.261732638888889-0.543267361111111
3915.64815.555709027777815.7189583333333-0.1632493055555550.0922909722222212
4015.30515.478575694444415.6947083333333-0.216132638888889-0.173575694444445
4115.57916.019467361111115.69841666666670.321050694444445-0.440467361111111
4216.34816.758125694444415.67291666666671.08520902777778-0.410125694444446
4315.92816.077267361111115.7206250.356642361111111-0.149267361111111
4416.17116.110492361111115.86141666666670.2490756944444440.0605076388888879
4515.93716.167167361111116.03333333333330.133834027777778-0.230167361111111
4615.71315.922150694444416.2203333333333-0.29818263888889-0.209150694444443
4715.59416.340575694444416.4809583333333-0.140382638888889-0.746575694444445
4815.68316.266950694444416.79825-0.531299305555555-0.583950694444443
4916.43816.595917361111117.13075-0.534832638888888-0.157917361111110
5017.03217.143725694444417.4054583333333-0.261732638888889-0.111725694444438
5117.69617.447084027777817.6103333333333-0.1632493055555550.248915972222228
5217.74517.610117361111117.82625-0.2161326388888890.134882638888897
5319.39418.408217361111118.08716666666670.3210506944444450.985782638888889
5420.14819.421542361111118.33633333333331.085209027777780.726457638888888
5520.10818.878017361111118.5213750.3566423611111111.22998263888889
5618.58418.964492361111118.71541666666670.249075694444444-0.380492361111109
5718.44119.020542361111118.88670833333330.133834027777778-0.579542361111113
5818.39118.730359027777819.0285416666667-0.29818263888889-0.339359027777778
5919.17819.027367361111119.16775-0.1403826388888890.150632638888894
6018.07918.839909027777819.3712083333333-0.531299305555555-0.760909027777775
6118.48319.097875694444419.6327083333333-0.534832638888888-0.61487569444444
6219.64419.623434027777819.8851666666667-0.2617326388888890.0205659722222187
6319.19520.001792361111120.1650416666667-0.163249305555555-0.80679236111111
6419.6520.235284027777820.4514166666667-0.216132638888889-0.585284027777782
6520.8321.005425694444420.6843750.321050694444445-0.175425694444446
6623.59522.002625694444420.91741666666671.085209027777781.59237430555556
6722.937NANA0.356642361111111NA
6821.814NANA0.249075694444444NA
6921.928NANA0.133834027777778NA
7021.777NANA-0.29818263888889NA
7121.383NANA-0.140382638888889NA
7221.467NANA-0.531299305555555NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947275helrrv5tswfnxtg/1fw981262947074.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947275helrrv5tswfnxtg/1fw981262947074.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947275helrrv5tswfnxtg/2k1wy1262947074.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947275helrrv5tswfnxtg/2k1wy1262947074.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947275helrrv5tswfnxtg/3bs6d1262947074.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947275helrrv5tswfnxtg/3bs6d1262947074.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947275helrrv5tswfnxtg/4mxql1262947074.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947275helrrv5tswfnxtg/4mxql1262947074.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