Home » date » 2010 » Jun » 07 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 07 Jun 2010 07:27:50 +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/Jun/07/t1275895696kq9li0l8otnn0yt.htm/, Retrieved Mon, 07 Jun 2010 09:28:17 +0200
 
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/Jun/07/t1275895696kq9li0l8otnn0yt.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.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 22.052 22.680 24.320 24.977 25.204 25.739 26.434 27.525 30.695
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
110.383NANA-0.299606944444445NA
210.431NANA-0.312715277777777NA
310.574NANA-0.769723611111112NA
410.653NANA-0.718340277777777NA
510.805NANA-0.429315277777778NA
610.872NANA-0.135381944444444NA
710.62510.471559722222210.6335-0.1619402777777780.153440277777777
810.40711.087284722222210.71204166666670.375243055555556-0.680284722222222
910.46311.926109722222210.78670833333331.13940138888889-1.46310972222222
1010.55611.617509722222210.8778750.739634722222221-1.06150972222222
1110.64611.312893055555611.00620833333330.306684722222222-0.666893055555555
1210.70211.435934722222211.1698750.266059722222223-0.733934722222223
1311.35311.093018055555611.392625-0.2996069444444450.259981944444442
1411.34611.385076388888911.6977916666667-0.312715277777777-0.0390763888888905
1511.45111.286609722222212.0563333333333-0.7697236111111120.164390277777777
1611.96411.704576388888912.4229166666667-0.7183402777777770.259423611111112
1712.57412.397309722222212.826625-0.4293152777777780.17669027777778
1813.03113.179618055555613.315-0.135381944444444-0.148618055555554
1913.81213.577101388888913.7390416666667-0.1619402777777780.234898611111111
2014.54414.469243055555614.0940.3752430555555560.0747569444444469
2114.93115.612234722222214.47283333333331.13940138888889-0.68123472222222
2214.88615.527509722222214.7878750.739634722222221-0.641509722222221
2316.00515.325934722222215.019250.3066847222222220.679065277777781
2417.06415.493518055555615.22745833333330.2660597222222231.57048194444445
2515.16815.099101388888915.3987083333333-0.2996069444444450.0688986111111127
2616.0515.191326388888915.5040416666667-0.3127152777777770.858673611111112
2715.83914.836484722222215.6062083333333-0.7697236111111121.00251527777778
2815.13714.990326388888915.7086666666667-0.7183402777777770.146673611111112
2914.95415.329684722222215.759-0.429315277777778-0.375684722222221
3015.64815.583576388888915.7189583333333-0.1353819444444440.0644236111111116
3115.30515.532768055555615.6947083333333-0.161940277777778-0.227768055555556
3215.57916.073659722222215.69841666666670.375243055555556-0.494659722222222
3316.34816.812318055555615.67291666666671.13940138888889-0.464318055555557
3415.92816.460259722222215.7206250.739634722222221-0.532259722222221
3516.17116.168101388888915.86141666666670.3066847222222220.00289861111111023
3615.93716.299393055555616.03333333333330.266059722222223-0.362393055555556
3715.71315.920726388888916.2203333333333-0.299606944444445-0.20772638888889
3815.59416.168243055555616.4809583333333-0.312715277777777-0.574243055555558
3915.68316.028526388888916.79825-0.769723611111112-0.345526388888889
4016.43816.412409722222217.13075-0.7183402777777770.025590277777777
4117.03216.976143055555517.4054583333333-0.4293152777777780.0558569444444501
4217.69617.474951388888917.6103333333333-0.1353819444444440.221048611111115
4317.74517.664309722222217.82625-0.1619402777777780.0806902777777836
4419.39418.462409722222218.08716666666670.3752430555555560.93159027777778
4520.14819.475734722222218.33633333333331.139401388888890.672265277777779
4620.10819.261009722222218.5213750.7396347222222210.846990277777781
4718.58419.022101388888918.71541666666670.306684722222222-0.438101388888889
4818.44119.152768055555618.88670833333330.266059722222223-0.71176805555556
4918.39118.728934722222219.0285416666667-0.299606944444445-0.337934722222222
5019.17818.855034722222219.16775-0.3127152777777770.322965277777779
5118.07918.601484722222219.3712083333333-0.769723611111112-0.52248472222222
5218.48318.914368055555619.6327083333333-0.718340277777777-0.431368055555552
5319.64419.455851388888919.8851666666667-0.4293152777777780.188148611111107
5419.19520.029659722222220.1650416666667-0.135381944444444-0.834659722222224
5519.6520.289476388888920.4514166666667-0.161940277777778-0.639476388888895
5620.8321.059618055555620.6843750.375243055555556-0.229618055555555
5723.59522.056818055555620.91741666666671.139401388888891.53818194444445
5822.93721.946926388888921.20729166666670.7396347222222210.99007361111111
5921.81421.789184722222221.48250.3066847222222220.0248152777777761
6021.92822.088601388888921.82254166666670.266059722222223-0.160601388888885
6121.77721.958434722222222.2580416666667-0.299606944444445-0.181434722222217
6221.38322.349534722222222.66225-0.312715277777777-0.966534722222221
6321.46722.164109722222222.9338333333333-0.769723611111112-0.697109722222226
6422.05222.450534722222223.168875-0.718340277777777-0.398534722222223
6522.6823.123226388888923.5525416666667-0.429315277777778-0.443226388888888
6624.3224.020409722222224.1557916666667-0.1353819444444440.299590277777774
6724.977NANA-0.161940277777778NA
6825.204NANA0.375243055555556NA
6925.739NANA1.13940138888889NA
7026.434NANA0.739634722222221NA
7127.525NANA0.306684722222222NA
7230.695NANA0.266059722222223NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895696kq9li0l8otnn0yt/185ev1275895667.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895696kq9li0l8otnn0yt/185ev1275895667.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895696kq9li0l8otnn0yt/285ev1275895667.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895696kq9li0l8otnn0yt/285ev1275895667.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895696kq9li0l8otnn0yt/3jewy1275895667.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895696kq9li0l8otnn0yt/3jewy1275895667.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895696kq9li0l8otnn0yt/4covj1275895667.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895696kq9li0l8otnn0yt/4covj1275895667.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