Home » date » 2009 » Jun » 05 »

opgave9oef2stap2

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 05 Jun 2009 01:56:54 -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/Jun/05/t1244188854ni9a4ntv5lm8bce.htm/, Retrieved Fri, 05 Jun 2009 10:00:58 +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/Jun/05/t1244188854ni9a4ntv5lm8bce.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,8832 0,8707 0,8766 0,8860 0,9170 0,9561 0,9935 0,9781 0,9806 0,9812 1,0013 1,0194 1,0622 1,0785 1,0797 1,0862 1,1556 1,1674 1,1365 1,1155 1,1267 1,1714 1,1710 1,2298 1,2638 1,2640 1,2261 1,1989 1,2000 1,2146 1,2266 1,2191 1,2224 1,2507 1,2997 1,3406 1,3123 1,3013 1,3185 1,2943 1,2697 1,2155 1,2041 1,2295 1,2234 1,2022 1,0000 1,1861 1,2126 1,1940 1,2028 1,2273 1,2767 1,2661 1,2681 1,2810 1,2722 1,2617 1,2888 1,3205 1,2993 1,3080 1,3246 1,3513 1,3518 1,3421 1,3726 1,3626 1,3910 1,4233 1,4683 1,4559 1,4728 1,4759 1,5520 1,5754 1,5554 1,5562 1,5759 1,4955 1,4342 1,3266 1,2744 1,3511 1,3244 1,2797 1,3050 1,3203
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
10.8832NANA0.0120822916666667NA
20.8707NANA0.00422812499999998NA
30.8766NANA0.0111517361111112NA
40.886NANA0.0105531250000001NA
50.917NANA0.0188913194444444NA
60.9561NANA0.0068079861111111NA
70.99350.9591003472222220.9527666666666670.006333680555555710.0343996527777778
80.97810.9585656250.968883333333333-0.01031770833333330.0195343749999999
90.98060.9671746527777780.986004166666667-0.01882951388888900.0134253472222223
100.98120.9751218751.00280833333333-0.02768645833333340.00607812500000016
111.00130.9944239583333331.02109166666667-0.02666770833333330.00687604166666667
121.01941.0532906251.03983750.0134531249999999-0.0338906249999997
131.06221.066682291666671.05460.0120822916666667-0.00448229166666669
141.07851.070511458333331.066283333333330.004228124999999980.00798854166666652
151.07971.089247569444441.078095833333330.0111517361111112-0.00954756944444424
161.08621.102661458333331.092108333333330.0105531250000001-0.0164614583333336
171.15561.125995486111111.107104166666670.01889131944444440.0296045138888885
181.16741.129749652777781.122941666666670.00680798611111110.0376503472222220
191.13651.146442013888891.140108333333330.00633368055555571-0.00994201388888882
201.11551.145919791666671.1562375-0.0103177083333333-0.0304197916666669
211.12671.151237152777781.17006666666667-0.0188295138888890-0.0245371527777778
221.17141.153176041666671.1808625-0.02768645833333340.0182239583333332
231.1711.1607406251.18740833333333-0.02666770833333330.0102593750000000
241.22981.2046781251.1912250.01345312499999990.0251218750000000
251.26381.2090281251.196945833333330.01208229166666670.0547718750000001
261.2641.209244791666671.205016666666670.004228124999999980.0547552083333334
271.22611.224472569444441.213320833333330.01115173611111120.00162743055555570
281.19891.2311656251.22061250.0105531250000001-0.0322656250000000
291.21.248170486111111.229279166666670.0188913194444444-0.048170486111111
301.21461.246066319444441.239258333333330.0068079861111111-0.0314663194444444
311.22661.252229513888891.245895833333330.00633368055555571-0.0256295138888887
321.21911.2391531251.24947083333333-0.0103177083333333-0.0200531249999998
331.22241.236045486111111.254875-0.0188295138888890-0.0136454861111110
341.25071.235013541666671.2627-0.02768645833333340.0156864583333332
351.29971.242911458333331.26957916666667-0.02666770833333330.0567885416666667
361.34061.285973958333331.272520833333330.01345312499999990.0546260416666666
371.31231.2837031251.271620833333330.01208229166666670.0285968750000001
381.30131.275344791666671.271116666666670.004228124999999980.0259552083333334
391.31851.282743402777781.271591666666670.01115173611111120.0357565972222225
401.29431.2801656251.26961250.01055312500000010.0141343750000000
411.26971.273995486111111.255104166666670.0188913194444444-0.00429548611111108
421.21551.242987152777781.236179166666670.0068079861111111-0.0274871527777774
431.20411.231921180555561.22558750.00633368055555571-0.0278211805555555
441.22951.206644791666671.2169625-0.01031770833333330.0228552083333333
451.22341.188841319444441.20767083333333-0.01882951388888900.0345586805555556
461.20221.1723718751.20005833333333-0.02768645833333340.0298281250000001
4711.1708906251.19755833333333-0.0266677083333333-0.170890625000000
481.18611.213411458333331.199958333333330.0134531249999999-0.0273114583333334
491.21261.2168156251.204733333333330.0120822916666667-0.00421562500000006
501.1941.213773958333331.209545833333330.00422812499999998-0.0197739583333334
511.20281.224876736111111.2137250.0111517361111112-0.0220767361111109
521.22731.2287906251.21823750.0105531250000001-0.00149062499999997
531.27671.251641319444441.232750.01889131944444440.0250586805555555
541.26611.257191319444441.250383333333330.00680798611111110.00890868055555583
551.26811.265929513888891.259595833333330.006333680555555710.00217048611111115
561.2811.2576406251.26795833333333-0.01031770833333330.0233593749999998
571.27221.258953819444441.27778333333333-0.01882951388888900.0132461805555559
581.26171.260338541666671.288025-0.02768645833333340.00136145833333345
591.28881.2696531251.29632083333333-0.02666770833333330.0191468750000001
601.32051.316069791666671.302616666666670.01345312499999990.00443020833333363
611.29931.322219791666671.31013750.0120822916666667-0.0229197916666668
621.3081.322119791666671.317891666666670.00422812499999998-0.0141197916666667
631.32461.337393402777781.326241666666670.0111517361111112-0.0127934027777776
641.35131.3484781251.3379250.01055312500000010.00282187500000020
651.35181.371028819444441.35213750.0188913194444444-0.0192288194444443
661.34211.372066319444441.365258333333330.0068079861111111-0.0299663194444439
671.37261.384462847222221.378129166666670.00633368055555571-0.0118628472222220
681.36261.382036458333331.39235416666667-0.0103177083333333-0.0194364583333333
691.3911.389995486111111.408825-0.01882951388888900.00100451388888900
701.42331.399951041666671.4276375-0.02768645833333340.0233489583333337
711.46831.4187906251.44545833333333-0.02666770833333330.0495093750000002
721.45591.4763156251.46286250.0134531249999999-0.0204156249999998
731.47281.492336458333331.480254166666670.0120822916666667-0.0195364583333335
741.47591.4984906251.49426250.00422812499999998-0.0225906249999999
751.5521.512751736111111.50160.01115173611111120.0392482638888889
761.57541.509923958333331.499370833333330.01055312500000010.0654760416666664
771.55541.506153819444441.48726250.01889131944444440.0492461805555555
781.55621.481624652777781.474816666666670.00680798611111110.0745753472222221
791.57591.470600347222221.464266666666670.006333680555555710.105299652777778
801.49551.4395906251.44990833333333-0.01031770833333330.0559093750000001
811.43421.412612152777781.43144166666667-0.01882951388888900.0215878472222222
821.32661.3828343751.41052083333333-0.0276864583333334-0.0562343749999998
831.2744NANA-0.0266677083333333NA
841.3511NANA0.0134531249999999NA
851.3244NANANANA
861.2797NANANANA
871.305NANANANA
881.3203NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244188854ni9a4ntv5lm8bce/1u5ia1244188612.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244188854ni9a4ntv5lm8bce/1u5ia1244188612.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244188854ni9a4ntv5lm8bce/23p5r1244188612.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244188854ni9a4ntv5lm8bce/23p5r1244188612.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244188854ni9a4ntv5lm8bce/34att1244188612.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244188854ni9a4ntv5lm8bce/34att1244188612.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244188854ni9a4ntv5lm8bce/4iggv1244188612.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244188854ni9a4ntv5lm8bce/4iggv1244188612.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