Home » date » 2010 » Jun » 06 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 06 Jun 2010 20:29:35 +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/06/t12758562120w16v86e5qekhvz.htm/, Retrieved Sun, 06 Jun 2010 22:30: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/06/t12758562120w16v86e5qekhvz.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 «
1 1 3 3 1 1 -2 1 1 -1 -4 -2 -1 -5 -4 -5 0 -2 -4 -6 -2 -2 -2 1 -2 0 -1 2 3 2 3 4 5 5 4 5 6 4 6 6 3 5 5 5 3 5 5 6 6 5 4 4 0 2 3 3 2 3 5 6 6 5 4 7 5 6 5 6 5 6 6 6 6
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11NANA0.90625NA
21NANA-0.39375NA
33NANA-0.46875NA
43NANA0.439583333333333NA
51NANA-0.302083333333333NA
61NANA-0.0520833333333332NA
7-2-0.2104166666666660.166666666666667-0.377083333333333-1.78958333333333
81-1.20208333333333-0.166666666666666-1.035416666666672.20208333333333
91-0.827083333333334-0.708333333333333-0.1187500000000001.82708333333333
10-1-0.910416666666667-1.333333333333330.422916666666667-0.0895833333333336
11-4-1.50208333333333-1.708333333333330.20625-2.49791666666667
12-2-1.10208333333333-1.8750.772916666666667-0.897916666666667
13-1-1.17708333333333-2.083333333333330.906250.177083333333334
14-5-2.85208333333333-2.45833333333333-0.39375-2.14791666666667
15-4-3.34375-2.875-0.46875-0.65625
16-5-2.60208333333333-3.041666666666670.439583333333333-2.39791666666667
170-3.30208333333333-3-0.3020833333333333.30208333333333
18-2-2.84375-2.79166666666667-0.05208333333333320.84375
19-4-3.08541666666667-2.70833333333333-0.377083333333333-0.914583333333334
20-6-3.57708333333333-2.54166666666667-1.03541666666667-2.42291666666667
21-2-2.32708333333333-2.20833333333333-0.1187500000000000.327083333333333
22-2-1.36875-1.791666666666670.422916666666667-0.63125
23-2-1.16875-1.3750.20625-0.83125
241-0.310416666666667-1.083333333333330.7729166666666671.31041666666667
25-20.28125-0.6250.90625-2.28125
260-0.3104166666666670.0833333333333334-0.393750.310416666666667
27-10.3229166666666670.791666666666667-0.46875-1.32291666666667
2821.814583333333331.3750.4395833333333330.185416666666667
2931.614583333333331.91666666666667-0.3020833333333331.38541666666667
3022.281252.33333333333333-0.0520833333333332-0.28125
3132.456252.83333333333333-0.3770833333333330.543750000000001
3242.297916666666673.33333333333333-1.035416666666671.70208333333333
3353.672916666666673.79166666666667-0.1187500000000001.32708333333333
3454.672916666666674.250.4229166666666670.327083333333334
3544.622916666666674.416666666666670.20625-0.622916666666667
3655.314583333333334.541666666666670.772916666666667-0.314583333333333
3765.656254.750.906250.34375
3844.481254.875-0.39375-0.48125
3964.364583333333334.83333333333333-0.468751.63541666666667
4065.189583333333334.750.4395833333333330.810416666666668
4134.489583333333334.79166666666667-0.302083333333333-1.48958333333333
4254.822916666666674.875-0.05208333333333320.177083333333334
4354.539583333333334.91666666666667-0.3770833333333330.460416666666668
4453.922916666666674.95833333333333-1.035416666666671.07708333333333
4534.797916666666674.91666666666667-0.118750000000000-1.79791666666667
4655.172916666666674.750.422916666666667-0.172916666666666
4754.747916666666674.541666666666670.206250.252083333333334
4865.064583333333334.291666666666670.7729166666666670.935416666666667
4964.989583333333334.083333333333330.906251.01041666666667
5053.522916666666673.91666666666667-0.393751.47708333333333
5143.322916666666673.79166666666667-0.468750.677083333333334
5244.106253.666666666666670.439583333333333-0.106250000000000
5303.281253.58333333333333-0.302083333333333-3.28125
5423.531253.58333333333333-0.0520833333333332-1.53125
5533.206253.58333333333333-0.377083333333333-0.20625
5632.547916666666673.58333333333333-1.035416666666670.452083333333333
5723.464583333333333.58333333333333-0.118750000000000-1.46458333333333
5834.131253.708333333333330.422916666666667-1.13125
5954.247916666666674.041666666666670.206250.752083333333334
6065.189583333333334.416666666666670.7729166666666670.810416666666667
6165.572916666666674.666666666666670.906250.427083333333333
6254.481254.875-0.393750.518750000000001
6344.656255.125-0.46875-0.65625
6475.814583333333335.3750.4395833333333331.18541666666667
6555.239583333333335.54166666666667-0.302083333333333-0.239583333333332
6665.531255.58333333333333-0.05208333333333320.46875
6755.206255.58333333333333-0.377083333333333-0.20625
686NANA-1.03541666666667NA
695NANA-0.118750000000000NA
706NANA0.422916666666667NA
716NANA0.20625NA
726NANA0.772916666666667NA
736NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758562120w16v86e5qekhvz/1hcip1275856171.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758562120w16v86e5qekhvz/1hcip1275856171.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t12758562120w16v86e5qekhvz/2hcip1275856171.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758562120w16v86e5qekhvz/2hcip1275856171.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t12758562120w16v86e5qekhvz/3amia1275856171.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758562120w16v86e5qekhvz/3amia1275856171.ps (open in new window)


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