Home » date » 2009 » Dec » 02 »

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: Wed, 02 Dec 2009 14:14:08 -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/02/t1259788499auibuamhb4f9lre.htm/, Retrieved Wed, 02 Dec 2009 22:15:05 +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/02/t1259788499auibuamhb4f9lre.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 «
0.0314796223103059 -3.00870920563557 -2.07677512619799 -1.25010391965540 0.817975239137125 0.0252076485413113 0.554937772830776 0.230027371950115 2.35672227418686 1.41350455171120 2.73311719024401 1.31551925971717 -2.70076272244080 -0.721411049152714 -0.149388576811997 -0.118199629770334 -0.676562489695275 1.79699928690761 1.79845572032988 0.245100010770855 1.80710848932636 -1.75934771184948 -0.0186697168761931 0.189651523600062 -1.84149562719087 -1.07019530156943 -0.507291477584104 0.866365633831705 -1.76077926699189 -0.580719393339347 -0.435702079860853 -0.994868534845203 1.63136048315789 -1.1949403709466 -1.00525975426991 1.32302234837564 -0.628357549594746 0.632048410440518 -2.16903155809288 2.53779364144266 -0.632933703679292 -1.41749196342200 -0.455343045381255 0.812255211942954 0.627897309219833 0.650904313655623 -1.29800419154382 0.74391671726854 -1.50461634127457 -1.42734677658523 0.263353807408564 - etc...
 
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
10.0314796223103059NANA0.202293392203127NA
2-3.00870920563557NANA0.00723493478418439NA
3-2.07677512619799NANA0.268676718707118NA
4-1.2501039196554NANA-0.527992125675796NA
50.817975239137125NANA-0.659866406423514NA
60.0252076485413113NANA1.47635101637598NA
70.5549377728307760.3022550328442370.1480651255636972.041365457892441.83599183645936
80.2300273719501150.01288575484562430.1295257843858530.099484090420468217.8512919658896
92.356722274186862.958111373129470.3051376471303889.69435073301670.796698290535834
101.4135045517112-0.2758341067924820.432608098766682-0.637607357742155-5.12447343132451
112.733117190244010.07298222119096410.4174983721438770.1748083970152937.4490820592125
121.31551925971717-0.05968044785388480.429050618374456-0.139098850573846-22.0427176240022
13-2.70076272244080.1122098218789560.5546885177855140.202293392203127-24.0688620409199
14-0.7214110491527140.004392544452214620.6071297922155080.00723493478418439-164.235344001811
15-0.1493885768119970.1571375253546340.5848572444638510.268676718707118-0.950686836100102
16-0.118199629770334-0.2269069879854460.429754492446302-0.5279921256757960.520916657612658
17-0.676562489695275-0.1206859542868530.182894527001265-0.6598664064235145.60597539036882
181.796999286907610.03148404692382020.02132558353304391.4763510163759857.0765026254626
191.798455720329880.02085708712216220.01021722349691152.0413654578924486.2275594763607
200.2451000107708550.003132489573484430.03148734194829550.099484090420468278.2444777615709
211.807108489326360.01979628976680800.002042043898761209.694350733016791.2852110477945
22-1.75934771184948-0.01795054443803460.0281529756833417-0.63760735774215598.0108273552792
23-0.01866971687619310.004195546493369730.0240008292794010.17480839701529-4.44988916359217
240.1896515236000620.0167261473554643-0.120246481451581-0.13909885057384611.3386256601467
25-1.84149562719087-0.0631980743687292-0.3124080014698180.20229339220312729.1384768536880
26-1.07019530156943-0.00330754641435522-0.4571632658784350.00723493478418439323.561688182101
27-0.507291477584104-0.138677879429349-0.5161514555361230.2686767187071183.65805620674024
280.8663656338317050.263973526332917-0.499957316588856-0.5279921256757963.28201712447129
29-1.760779266991890.341512711978781-0.517548262275974-0.659866406423514-5.15582350299537
30-0.580719393339347-0.755053737841602-0.5114323961350631.476351016375980.769110017254391
31-0.435702079860853-0.84443366835317-0.4136611918695762.041365457892440.515969573679561
32-0.994868534845203-0.0290679530167517-0.2921869506359890.099484090420468234.2256138322457
331.63136048315789-2.81620209533704-0.2904992993234419.6943507330167-0.579276780547475
34-1.19494037094660.184967111767499-0.290095635694183-0.637607357742155-6.46028561255053
35-1.00525975426991-0.0303221311509812-0.1734592369057020.1748083970152933.1526748322695
361.323022348375640.0224409838586924-0.161331195521121-0.13909885057384658.9556303193532
37-0.628357549594746-0.0398548514453959-0.1970150928379150.20229339220312715.7661495854687
380.632048410440518-0.000886544625252148-0.1225366436184250.00723493478418439-712.934681952138
39-2.16903155809288-0.0239258730926300-0.08905078641633740.26867671870711890.6563179406406
402.537793641442660.0284859971611649-0.0539515568053305-0.52799212567579689.0891628993927
41-0.632933703679292-0.007100791715745980.0107609535000158-0.65986640642351489.1356526168432
42-1.417491963422-0.0377445859706507-0.02556613268252621.4763510163759837.5548420248724
43-0.455343045381255-0.175978597705121-0.08620631696531472.041365457892442.58749104333842
440.812255211942954-0.0207449431093243-0.2085252327447140.0994840904204682-39.1543716298681
450.627897309219833-1.87085434248978-0.1929839753082269.6943507330167-0.335620627944884
460.6509043136556230.137294253220976-0.215327272425387-0.6376073577421554.74094361843382
47-1.29800419154382-0.0518887351224115-0.2968320515968860.1748083970152925.0151442019482
480.743916717268540.0173344636633193-0.124619747696021-0.13909885057384642.9154735743403
49-1.50461634127457-0.0213932838401383-0.1057537451280510.20229339220312770.3312475316012
50-1.42734677658523-0.00221371176371059-0.3059753584164680.00723493478418439644.775349701686
510.263353807408564-0.119887448838984-0.4462145042409560.268676718707118-2.19667538144268
52-0.4308308548706310.249744747011059-0.473008469002074-0.527992125675796-1.72508475163865
530.3795760925180080.240054585102167-0.363792705258731-0.6598664064235141.58120742562139
541.70309353400146-0.402295162472445-0.2724928949891381.47635101637598-4.23344273775132
55-3.12314448117342NANA2.04136545789244NA
56-1.32526207118689NANA0.0994840904204682NA
57-0.60032490743804NANA9.6943507330167NA
581.23607137604666NANA-0.637607357742155NA
590.738007075905376NANA0.17480839701529NA
600.899100896289585NANA-0.139098850573846NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259788499auibuamhb4f9lre/1joix1259788447.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259788499auibuamhb4f9lre/1joix1259788447.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259788499auibuamhb4f9lre/23ycf1259788447.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259788499auibuamhb4f9lre/23ycf1259788447.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259788499auibuamhb4f9lre/36vqx1259788447.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259788499auibuamhb4f9lre/36vqx1259788447.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259788499auibuamhb4f9lre/4mqln1259788447.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259788499auibuamhb4f9lre/4mqln1259788447.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