Home » date » 2009 » May » 28 »

Maxime Jonckheere-Decompositie 2

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 27 May 2009 15:59:50 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/May/28/t1243461651slewxj5571i0mm2.htm/, Retrieved Thu, 28 May 2009 00:00:56 +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/2009/May/28/t1243461651slewxj5571i0mm2.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 «
66.2 66.2 66.2 66.08 66.31 66.39 66.37 66.23 66.27 66.27 66.27 66.28 66.28 66.28 66.26 66.13 65.86 65.9 65.94 65.94 65.91 65.95 65.91 66.08 66.47 66.47 66.56 66.78 67.08 67.28 67.27 67.27 67.26 67.37 67.5 67.63 67.64 67.64 67.71 67.87 67.93 68.33 68.39 68.39 68.58 68.44 68.49 68.52 68.54 68.54 68.54 68.62 68.75 68.71 68.72 68.72 68.72 68.92 68.9 69.12 69.09 69.09 69.1 69.16 68.83 68.52 68.53 68.53 68.51 68.38 68.44 68.41 68.42 68.42 68.45 68.63 68.84 68.72 68.37 68.37 68.47 68.69 68.46 68.17 68.17
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
166.2NANA0.030671296296297NA
266.2NANA0.00192129629629948NA
366.2NANA0.00178240740740835NA
466.08NANA0.0646990740740723NA
566.31NANA0.0493518518518569NA
666.39NANA0.0493518518518522NA
766.3766.242268518518566.2591666666667-0.01689814814814440.127731481481476
866.2366.257754629629666.2658333333333-0.00807870370370563-0.0277546296296265
966.2766.230740740740766.2716666666667-0.04092592592592640.0392592592592536
1066.2766.221782407407466.27625-0.0544675925925950.048217592592593
1166.2766.196296296296366.2595833333333-0.06328703703704090.0737037037036998
1266.2866.206296296296366.2204166666667-0.01412037037037390.073703703703714
1366.2866.212754629629666.18208333333330.0306712962962970.0672453703703724
1466.2866.154004629629666.15208333333330.001921296296299480.125995370370362
1566.2666.126782407407466.1250.001782407407408350.133217592592601
1666.1366.161365740740766.09666666666670.0646990740740723-0.0313657407407391
1765.8666.117685185185266.06833333333330.0493518518518569-0.257685185185181
1865.966.094351851851966.0450.0493518518518522-0.194351851851849
1965.9466.027685185185266.0445833333333-0.0168981481481444-0.0876851851851796
2065.9466.05233796296366.0604166666667-0.00807870370370563-0.112337962962968
2165.9166.039907407407466.0808333333333-0.0409259259259264-0.129907407407401
2265.9566.06594907407466.1204166666667-0.054467592592595-0.115949074074052
2365.9166.135046296296366.1983333333333-0.0632870370370409-0.225046296296298
2466.0866.292546296296366.3066666666667-0.0141203703703739-0.212546296296281
2566.4766.450254629629666.41958333333330.0306712962962970.0197453703703729
2666.4766.53233796296366.53041666666670.00192129629629948-0.062337962962971
2766.5666.643865740740766.64208333333330.00178240740740835-0.083865740740734
2866.7866.822199074074166.75750.0646990740740723-0.0421990740740625
2967.0866.932268518518566.88291666666670.04935185185185690.147731481481486
3067.2867.063101851851867.013750.04935185185185220.216898148148161
3167.2767.110185185185267.1270833333333-0.01689814814814440.159814814814823
3267.2767.216504629629667.2245833333333-0.008078703703705630.0534953703703707
3367.2667.28032407407467.32125-0.0409259259259264-0.020324074074054
3467.3767.360115740740767.4145833333333-0.0544675925925950.00988425925926606
3567.567.432129629629667.4954166666667-0.06328703703704090.0678703703703576
3667.6367.56046296296367.5745833333333-0.01412037037037390.069537037037037
3767.6467.695671296296367.6650.030671296296297-0.055671296296282
3867.6467.760254629629667.75833333333330.00192129629629948-0.120254629629628
3967.7167.861782407407467.860.00178240740740835-0.15178240740741
4067.8768.024282407407467.95958333333330.0646990740740723-0.154282407407408
4167.9368.094768518518568.04541666666670.0493518518518569-0.164768518518514
4268.3368.173101851851968.123750.04935185185185220.156898148148144
4368.3968.181435185185268.1983333333333-0.01689814814814440.208564814814807
4468.3968.265254629629668.2733333333333-0.008078703703705630.124745370370377
4568.5868.304490740740768.3454166666667-0.04092592592592640.275509259259252
4668.4468.356782407407468.41125-0.0544675925925950.0832175925925895
4768.4968.413379629629668.4766666666667-0.06328703703704090.076620370370378
4868.5268.512546296296368.5266666666667-0.01412037037037390.00745370370370324
4968.5468.586921296296368.556250.030671296296297-0.0469212962962899
5068.5468.585671296296368.583750.00192129629629948-0.0456712962962911
5168.5468.605115740740768.60333333333330.00178240740740835-0.0651157407407226
5268.6268.693865740740768.62916666666670.0646990740740723-0.0738657407407288
5368.7568.715601851851868.666250.04935185185185690.0343981481481563
5468.7168.757685185185268.70833333333330.0493518518518522-0.0476851851851876
5568.7268.739351851851968.75625-0.0168981481481444-0.0193518518518658
5668.7268.794004629629668.8020833333333-0.00807870370370563-0.0740046296296413
5768.7268.807407407407468.8483333333333-0.0409259259259264-0.0874074074074116
5868.9268.839699074074168.8941666666667-0.0544675925925950.0803009259259397
5968.968.85671296296368.92-0.06328703703704090.0432870370370608
6069.1268.901296296296368.9154166666667-0.01412037037037390.218703703703724
6169.0968.930254629629668.89958333333330.0306712962962970.159745370370388
6269.0968.885671296296368.883750.001921296296299480.204328703703709
6369.168.868865740740768.86708333333330.001782407407408350.231134259259264
6469.1668.900532407407468.83583333333330.06469907407407230.259467592592586
6568.8368.843518518518568.79416666666670.0493518518518569-0.0135185185185236
6668.5268.794768518518568.74541666666670.0493518518518522-0.274768518518528
6768.5368.671018518518568.6879166666667-0.0168981481481444-0.141018518518521
6868.5368.624004629629668.6320833333333-0.00807870370370563-0.094004629629623
6968.5168.536157407407468.5770833333333-0.0409259259259264-0.0261574074073820
7068.3868.47344907407468.5279166666667-0.054467592592595-0.0934490740740586
7168.4468.44296296296368.50625-0.0632870370370409-0.00296296296295395
7268.4168.500879629629668.515-0.0141203703703739-0.090879629629626
7368.4268.54733796296368.51666666666670.030671296296297-0.127337962962955
7468.4268.505254629629668.50333333333330.00192129629629948-0.085254629629631
7568.4568.496782407407468.4950.00178240740740835-0.0467824074074059
7668.6368.57094907407468.506250.06469907407407230.0590509259259306
7768.8468.569351851851868.520.04935185185185690.270648148148169
7868.7268.560185185185268.51083333333330.04935185185185220.159814814814823
7968.3768.473518518518568.4904166666666-0.0168981481481444-0.103518518518499
8068.37NANA-0.00807870370370563NA
8168.47NANA-0.0409259259259264NA
8268.69NANA-0.054467592592595NA
8368.46NANA-0.0632870370370409NA
8468.17NANA-0.0141203703703739NA
8568.17NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243461651slewxj5571i0mm2/12s6m1243461588.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243461651slewxj5571i0mm2/12s6m1243461588.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243461651slewxj5571i0mm2/2uso81243461588.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243461651slewxj5571i0mm2/2uso81243461588.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243461651slewxj5571i0mm2/3qm221243461588.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243461651slewxj5571i0mm2/3qm221243461588.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243461651slewxj5571i0mm2/4xfo01243461588.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243461651slewxj5571i0mm2/4xfo01243461588.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