Home » date » 2009 » Dec » 01 »

ws 9 classical decomposition

*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: Tue, 01 Dec 2009 07:47:36 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/01/t1259679081l5m9z3sr8z4eh3p.htm/, Retrieved Tue, 01 Dec 2009 15:51:26 +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/2009/Dec/01/t1259679081l5m9z3sr8z4eh3p.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
1901 1395 1639 1643 1751 1797 1373 1558 1555 2061 2010 2119 1985 1963 2017 1975 1589 1679 1392 1511 1449 1767 1899 2179 2217 2049 2343 2175 1607 1702 1764 1766 1615 1953 2091 2411 2550 2351 2786 2525 2474 2332 1978 1789 1904 1997 2207 2453 1948 1384 1989 2140 2100 2045 2083 2022 1950 1422 1859 2147
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11901NANA1.09947283558690NA
21395NANA0.975000431538964NA
31639NANA1.14004119014643NA
41643NANA1.10348928263025NA
51751NANA0.970269494375522NA
61797NANA0.973688591268436NA
713731448.8898331207317370.8341334675421590.94762208182711
815581507.798788925721764.166666666670.854680466089211.03329437020576
915551511.162560213661803.583333333330.8378667801397161.02900908276880
1020611830.390258795091833.166666666670.998485458020781.12598938401077
1120101927.378453827891840.251.047345987679881.04286731856321
1221192131.261445562061828.583333333331.165526014981760.994246859958173
1319852005.942377160141824.458333333331.099472835586900.98955983113045
1419631777.710161821401823.291666666670.9750004315389641.10422949823764
1520172071.359839063561816.916666666671.140041190146430.973756448281757
1619751986.55658105511800.251.103489282630250.994182606644427
1715891730.354359531951783.3750.9702694943755220.918309010664046
1816791734.382803196901781.250.9736885912684360.968067716599347
1913921495.948862914571793.416666666670.8341334675421590.930513090726883
2015111544.122708734511806.666666666670.854680466089210.978549173231411
2114491528.129362511491823.833333333330.8378667801397160.94821815190997
2217671842.954534141861845.750.998485458020780.95878653936668
2318991942.652249481561854.833333333331.047345987679880.97752956068529
2421792163.847610397601856.541666666671.165526014981761.00700252158682
2522172059.3126210542618731.099472835586901.07657282208323
2620491851.647694546431899.1250.9750004315389641.10658199507110
2723432185.078947780661916.666666666671.140041190146431.07227246977952
2821752131.205634519881931.333333333331.103489282630251.02054910364855
2916071889.195561340341947.083333333330.9702694943755220.850626601546677
3017021913.054659694661964.750.9736885912684360.889676618163986
3117641658.500622401841988.291666666670.8341334675421591.06361129816483
3217661721.967469053242014.750.854680466089211.02557105853514
3316151714.100876586662045.791666666670.8378667801397160.942184921587576
3419532075.68485298222078.833333333330.998485458020780.940894277468984
3520912230.366920180452129.541666666671.047345987679880.937513904586974
3624112554.735897672102191.916666666671.165526014981760.943737472901572
3725502448.617627588312227.083333333331.099472835586901.04140392165335
3823512181.035340334682236.958333333330.9750004315389641.07792842991679
3927862565.045176113222249.958333333331.140041190146431.08614071437977
4025252498.115820994442263.833333333331.103489282630251.01076178245205
4124742202.996886979622270.50.9702694943755221.12301565863397
4223322217.170063034172277.083333333330.9736885912684361.05179121749853
4319781879.928302473142253.750.8341334675421591.05216778607878
4417891870.361364977982188.3750.854680466089210.956499654825294
4519041771.983506647982114.8750.8378667801397161.07450210053126
4619972062.496524224182065.6250.998485458020780.968244055951167
4722072130.3017389408720341.047345987679881.03600347296213
4824532338.579385476952006.458333333331.165526014981761.04892740235103
4919482197.708764233761998.8751.099472835586900.886377681930564
5013841962.635243669952012.958333333330.9750004315389640.705174333572061
5119892308.108392883972024.583333333331.140041190146430.861744624356553
5221402209.783267187182002.541666666671.103489282630250.968420764052575
5321001905.690142744721964.083333333330.9702694943755221.10196298595291
5420451885.872519855081936.833333333330.9736885912684361.08437870453574
552083NANA0.834133467542159NA
562022NANA0.85468046608921NA
571950NANA0.837866780139716NA
581422NANA0.99848545802078NA
591859NANA1.04734598767988NA
602147NANA1.16552601498176NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259679081l5m9z3sr8z4eh3p/1f2n21259678854.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259679081l5m9z3sr8z4eh3p/1f2n21259678854.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259679081l5m9z3sr8z4eh3p/2q8l51259678854.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259679081l5m9z3sr8z4eh3p/2q8l51259678854.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259679081l5m9z3sr8z4eh3p/3pdts1259678854.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259679081l5m9z3sr8z4eh3p/3pdts1259678854.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259679081l5m9z3sr8z4eh3p/4mlwp1259678854.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259679081l5m9z3sr8z4eh3p/4mlwp1259678854.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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