Home » date » 2010 » Jan » 20 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 20 Jan 2010 09:02:54 -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/20/t1264004826bikixoxfea2ir0q.htm/, Retrieved Wed, 20 Jan 2010 17:27: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/Jan/20/t1264004826bikixoxfea2ir0q.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 «
4,26 4,26 4,07 4,26 4,4 4,46 4,34 4,18 4,11 3,98 3,85 3,66 3,59 3,57 3,76 3,6 3,43 3,26 3,3 3,31 3,14 3,3 3,49 3,39 3,37 3,54 3,7 3,96 4,03 4,02 4,04 3,92 3,79 3,83 3,76 3,82 4,06 4,11 4,01 4,22 4,34 4,64 4,62 4,44 4,39 4,42 4,28 4,41 4,25 4,23 4,23 4,37 4,51 4,84 4,85 4,58 4,56 4,46 4,26 3,87 4,13 4,24 4,03 3,93 4,03 4,12 3,92 3,77
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
14.26NANA-0.129644097222222NA
24.26NANA-0.094123263888889NA
34.07NANA-0.0404774305555556NA
44.26NANA0.0623350694444442NA
54.4NANA0.0930642361111113NA
64.46NANA0.199105902777778NA
74.344.328376736111114.124583333333330.2037934027777780.0116232638888887
84.184.119105902777784.067916666666670.05118923611111090.0608940972222216
94.113.975147569444444.02625-0.05110243055555590.134852430555557
103.983.960980902777783.98583333333333-0.02485243055555530.0190190972222224
113.853.828376736111113.91791666666667-0.08953993055555520.0216232638888894
123.663.647751736111113.8275-0.1797482638888890.012248263888889
133.593.604522569444443.73416666666667-0.129644097222222-0.0145225694444435
143.573.560460069444443.65458333333333-0.0941232638888890.00953993055555546
153.763.537439236111113.57791666666667-0.04047743055555560.222560763888889
163.63.571501736111113.509166666666670.06233506944444420.0284982638888889
173.433.558897569444443.465833333333330.0930642361111113-0.128897569444444
183.263.638689236111113.439583333333330.199105902777778-0.378689236111111
193.33.622960069444443.419166666666670.203793402777778-0.322960069444444
203.313.459939236111113.408750.0511892361111109-0.149939236111111
213.143.353897569444443.405-0.0511024305555559-0.213897569444443
223.33.392647569444443.4175-0.0248524305555553-0.092647569444444
233.493.367960069444443.4575-0.08953993055555520.122039930555556
243.393.334418402777783.51416666666667-0.1797482638888890.0555815972222229
253.373.447022569444443.57666666666667-0.129644097222222-0.0770225694444449
263.543.538793402777783.63291666666667-0.0941232638888890.00120659722222216
273.73.644939236111113.68541666666667-0.04047743055555560.0550607638888887
283.963.796918402777783.734583333333330.06233506944444420.163081597222222
294.033.860980902777783.767916666666670.09306423611111130.169019097222223
304.023.996189236111113.797083333333330.1991059027777780.0238107638888887
314.044.047543402777783.843750.203793402777778-0.00754340277777787
323.923.947439236111113.896250.0511892361111109-0.0274392361111113
333.793.881814236111113.93291666666667-0.0511024305555559-0.0918142361111105
343.833.931814236111113.95666666666667-0.0248524305555553-0.101814236111112
353.763.890876736111113.98041666666667-0.0895399305555552-0.130876736111112
363.823.839418402777784.01916666666667-0.179748263888889-0.0194184027777782
374.063.939522569444444.06916666666667-0.1296440972222220.120477430555555
384.114.020876736111114.115-0.0941232638888890.0891232638888892
394.014.121189236111114.16166666666667-0.0404774305555556-0.111189236111111
404.224.273585069444444.211250.0623350694444442-0.0535850694444431
414.344.350564236111114.25750.0930642361111113-0.0105642361111098
424.644.502855902777784.303750.1991059027777780.137144097222223
434.624.540043402777784.336250.2037934027777780.0799565972222229
444.444.400355902777784.349166666666670.05118923611111090.0396440972222223
454.394.312230902777784.36333333333333-0.05110243055555590.0777690972222214
464.424.353897569444444.37875-0.02485243055555530.0661024305555564
474.284.302543402777784.39208333333333-0.0895399305555552-0.0225434027777771
484.414.227751736111114.4075-0.1797482638888890.182248263888889
494.254.295772569444444.42541666666667-0.129644097222222-0.045772569444444
504.234.346710069444444.44083333333333-0.094123263888889-0.116710069444443
514.234.413272569444444.45375-0.0404774305555556-0.183272569444443
524.374.524835069444444.46250.0623350694444442-0.154835069444444
534.514.556397569444444.463333333333330.0930642361111113-0.0463975694444452
544.844.639105902777784.440.1991059027777780.200894097222222
554.854.616293402777784.41250.2037934027777780.233706597222223
564.584.459105902777784.407916666666670.05118923611111090.120894097222222
574.564.348897569444444.4-0.05110243055555590.211102430555555
584.464.348480902777784.37333333333333-0.02485243055555530.111519097222223
594.264.245460069444444.335-0.08953993055555520.0145399305555562
603.874.105251736111114.285-0.179748263888889-0.235251736111111
614.13NA4.21625NANA
624.24NA4.14375NANA
634.03NANANANA
643.93NANANANA
654.03NANANANA
664.12NANANANA
673.92NANANANA
683.77NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004826bikixoxfea2ir0q/1osgz1264003367.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004826bikixoxfea2ir0q/1osgz1264003367.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004826bikixoxfea2ir0q/2adda1264003367.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004826bikixoxfea2ir0q/2adda1264003367.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004826bikixoxfea2ir0q/37uwg1264003367.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004826bikixoxfea2ir0q/37uwg1264003367.ps (open in new window)


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