Home » date » 2009 » Dec » 04 »

klassieke decompositie van de tijdreeks met moving averages

*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: Fri, 04 Dec 2009 11:39:30 -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/04/t1259952035ec17wq4mgvvgp4y.htm/, Retrieved Fri, 04 Dec 2009 19:40:40 +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/04/t1259952035ec17wq4mgvvgp4y.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 «
107.11 107.57 107.81 108.75 109.43 109.62 109.54 109.53 109.84 109.67 109.79 109.56 110.22 110.40 110.69 110.72 110.89 110.58 110.94 110.91 111.22 111.09 111.00 111.06 111.55 112.32 112.64 112.36 112.04 112.37 112.59 112.89 113.22 112.85 113.06 112.99 113.32 113.74 113.91 114.52 114.96 114.91 115.30 115.44 115.52 116.08 115.94 115.56 115.88 116.66 117.41 117.68 117.85 118.21 118.92 119.03 119.17 118.95 118.92 118.90
 
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
1107.11NANA0.997537193196223NA
2107.57NANA1.00053837314138NA
3107.81NANA1.00216513945625NA
4108.75NANA1.00181946953812NA
5109.43NANA1.00113455682792NA
6109.62NANA1.00014340559154NA
7109.54109.328699611791109.1479166666671.001656311459221.00193270741314
8109.53109.490673734648109.3954166666671.000870759222681.00035917456721
9109.84109.79176865484109.6333333333331.001445138232051.00043929837137
10109.67109.774294813808109.8354166666670.9994435141713520.999049915884361
11109.79109.767261159592109.9783333333330.9980807840295061.00020715503118
12109.56109.546972988661110.0791666666670.9951653551337561.00011891712736
13110.22109.906154103377110.17750.9975371931962231.00285558073780
14110.4110.352712301674110.2933333333331.000538373141381.00042851414650
15110.69110.647382772132110.4083333333331.002165139456251.00038516254791
16110.72110.726096870701110.5251.001819469538120.9999449373646
17110.89110.760104555259110.6345833333331.001134556827921.00117276383282
18110.58110.763381810749110.74751.000143405591540.99834438234233
19110.94111.049044326723110.8654166666671.001656311459220.999018052542607
20110.91111.097488332683111.0008333333331.000870759222680.99831239809741
21111.22111.322727909912111.1620833333331.001445138232050.999077206318592
22111.09111.249723301604111.3116666666670.9994435141713520.99856428135852
23111111.214062429441111.4279166666670.9980807840295060.99807522156133
24111.06111.011110017402111.5504166666670.9951653551337561.00044040621331
25111.55111.418669872561111.693750.9975371931962231.00117870844796
26112.32111.905214343998111.8451.000538373141381.00370658023787
27112.64112.253352408111112.0108333333331.002165139456251.00344441910727
28112.36112.371585349418112.16751.001819469538120.999896901433031
29112.04112.454107653291112.3266666666671.001134556827920.996317540889054
30112.37112.509048779925112.4929166666671.000143405591540.998764110252169
31112.59112.833661988306112.6470833333331.001656311459220.997840520426157
32112.89112.878204225134112.781.000870759222681.00010450002237
33113.22113.055227999054112.8920833333331.001445138232051.00145744698288
34112.85112.972097624359113.0350.9994435141713520.998919223180534
35113.06113.029321855395113.2466666666670.9980807840295061.00027141757644
36112.99112.925559369340113.4741666666670.9951653551337561.00057064699099
37113.32113.412912977959113.6929166666670.9975371931962230.99918075485834
38113.74113.973410539479113.9120833333331.000538373141380.997952061464386
39113.91114.361239751434114.1141666666671.002165139456250.996054259708846
40114.52114.552629819558114.3445833333331.001819469538120.999715154339021
41114.96114.729185933683114.5991666666671.001134556827921.00201181647406
42114.91114.842716726306114.826251.000143405591541.00058587323265
43115.3115.230542070268115.041.001656311459221.00060277360918
44115.44115.368704297666115.2683333333331.000870759222681.00061798130410
45115.52115.702798583255115.5358333333331.001445138232050.99842010231824
46116.08115.748884854565115.8133333333330.9994435141713521.00286063356767
47115.94115.842662065378116.0654166666670.9980807840295061.00084025982213
48115.56115.760951327009116.3233333333330.9951653551337560.998264083659426
49115.88116.324474660600116.6116666666670.9975371931962230.996179009946986
50116.66116.975025658903116.9120833333331.000538373141380.997306898142328
51117.41117.467534114940117.213751.002165139456250.99951021262706
52117.68117.699177803465117.4854166666671.001819469538120.99983706085443
53117.85117.862737096554117.7291666666671.001134556827920.99989193279515
54118.21118.009420784260117.99251.000143405591541.00169968816394
55118.92NANA1.00165631145922NA
56119.03NANA1.00087075922268NA
57119.17NANA1.00144513823205NA
58118.95NANA0.999443514171352NA
59118.92NANA0.998080784029506NA
60118.9NANA0.995165355133756NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259952035ec17wq4mgvvgp4y/1p34h1259951968.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259952035ec17wq4mgvvgp4y/1p34h1259951968.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259952035ec17wq4mgvvgp4y/2vaby1259951968.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259952035ec17wq4mgvvgp4y/2vaby1259951968.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259952035ec17wq4mgvvgp4y/3uslk1259951969.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259952035ec17wq4mgvvgp4y/3uslk1259951969.ps (open in new window)


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