Home » date » 2010 » May » 31 »

IKO - Opgave 9 - Oefening 2 - Melino Olivini

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 31 May 2010 14:58:04 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/May/31/t1275317956xuacyw0pgxbr92x.htm/, Retrieved Mon, 31 May 2010 16:59:22 +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/2010/May/31/t1275317956xuacyw0pgxbr92x.htm/},
    year = {2010},
}
@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 = {2010},
    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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
5221,3 5115,9 5107,4 5202,1 5307,5 5266,1 5329,8 5263,4 5177,1 5204,9 5185,2 5189,8 5253,8 5372,3 5478,4 5590,5 5699,8 5797,9 5854,3 5902,4 5956,9 6007,8 6101,7 6148,6 6207,4 6232 6291,7 6323,4 6365 6435 6493,4 6606,8 6639,1 6723,5 6759,4 6848,6 6918,1 6963,5 7013,1 7030,9 7112,1 7130,3 7130,8 7076,9 7040,8 7086,5 7120,7 7154,1 7228,2 7297,9 7369,5 7450,7 7459,7 7497,5 7536 7637,4 7715,1 7815,7 7859,5 7951,6 7973,7 7988 8053,1 8112 8169,2 8303,1 8372,7 8470,6 8536,1 8665,8 8773,7 8838,4 8936,2 8995,3 9098,9 9237,1 9315,5 9392,6 9502,2 9671,1 9695,6 9847,9 9836,6 9887,7 9875,6 9905,9 9871,1 9910 9977,3 10031,6 10090,7 10095,8 10126 10212,7 10398,7 10467 10543,6 10634,2 10728,7 10796,4 10875,8 10946,1 11050 11086,1 11217,3 11291,7 11314,1 11356,4 11357,8 11491,4 11625,7 11620,7
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
15221.3NANA0.999309258071646NA
25115.9NANA1.00029349348077NA
35107.45173.105490129995172.451.000126727204710.98729863710389
45202.15203.4072515054552021.000270521242880.999748770095773
55307.55244.949589183395248.5750.9993092580716461.01192583641711
65266.15285.588330558395284.03751.000293493480770.996312930682529
75329.85276.068536695725275.41.000126727204711.01018399646073
85263.45252.870628780915251.451.000270521242881.00200449848534
95177.15222.115372636455225.7250.9993092580716460.991379858654152
105204.95199.97571118515198.451.000293493480771.00094698304154
115185.25199.496334144115198.83751.000126727204710.997250438653024
125189.85230.764650261445229.351.000270521242880.99216851588622
135253.85283.273099230445286.9250.9993092580716460.994421431813788
145372.35375.23963491165373.66251.000293493480770.999453115561117
155478.45480.19440171825479.51.000126727204710.999672566046629
165590.55589.961794439765588.451.000270521242881.00009628072249
175699.85684.708119563545688.63750.9993092580716461.00265482063794
185797.95776.307311122715774.61251.000293493480771.00373814752475
195854.35846.478313972835845.73751.000126727204711.00133784572646
205902.45905.709687851595904.11251.000270521242880.999439578301928
215956.95957.157297411055961.2750.9993092580716460.99995680869277
226007.86024.742703897336022.9751.000293493480770.997187812869358
236101.76085.83364296116085.06251.000126727204711.00260709673805
246148.66146.062190724736144.41.000270521242881.00041291630259
256207.46191.895042132086196.1750.9993092580716461.00250407310887
2662326243.606920270926241.7751.000293493480770.998140991190006
276291.76284.121268213526283.3251.000126727204711.00120601297509
286323.46330.111966633426328.41.000270521242880.998939676475108
2963656374.58126587336378.98750.9993092580716460.998496957608087
3064356441.51498795616439.6251.000293493480770.998988593837277
316493.46510.13740697776509.31251.000126727204710.99742902400804
326606.86581.417431714186579.63751.000270521242881.00385670238200
336639.16644.357291455476648.950.9993092580716460.99920875846604
346723.56714.395052977656712.4251.000293493480771.00135603385718
356759.46778.383896798096777.5251.000126727204710.997199347648773
366848.66844.251014552266842.41.000270521242881.00063542167558
376918.16899.343540018186904.11250.9993092580716461.00271858617752
386963.56960.654807403946958.61251.000293493480771.00040875358350
397013.17006.537806441667005.651.000126727204711.00093658148141
407030.97052.657377653227050.751.000270521242880.996915009975934
417112.17081.417686838837086.31250.9993092580716461.00433279246022
427130.37108.860792131797106.7751.000293493480771.00301584297331
437130.87104.512720955457103.61251.000126727204711.00370008191653
447076.97091.142785958037089.2251.000270521242880.997991468175448
457040.87077.595328926717082.48750.9993092580716460.994801153892435
467086.57092.956125585457090.8751.000293493480770.99908978351605
477120.77124.852798269987123.951.000126727204710.99941713907816
487154.17175.740665292157173.81.000270521242880.996984190719597
497228.27226.330020624957231.3250.9993092580716461.00025877303828
507297.97301.642355662877299.51.000293493480770.999487463849833
517369.57366.445910810377365.51251.000126727204711.00041459466704
527450.77421.40710530947419.41.000270521242881.00394708096119
537459.77460.005999259287465.16250.9993092580716460.999958981365524
547497.57511.51643426387509.31251.000293493480770.998134007375679
5575367565.533637444557564.5751.000126727204710.996096291569126
567637.47638.340774603957636.2751.000270521242880.999876835214386
577715.17711.157398544137716.48750.9993092580716461.00051128530415
587815.77798.488133874777796.21.000293493480771.0022070772988
597859.57868.79706430127867.81.000126727204710.998818489760858
607951.67923.805477985157921.66251.000270521242881.00350772392029
617973.77961.896582760037967.40.9993092580716461.00148248813801
6279888014.00136704528011.651.000293493480770.996755507535584
638053.18057.158431786128056.13751.000126727204710.999496294900929
6481128122.159122347628119.96251.000270521242880.998749209145674
658169.28193.636399706858199.30.9993092580716460.997017636795828
668303.18286.50632200678284.0751.000293493480771.00200249385549
678372.78375.823810241728374.76251.000126727204710.999627044418258
688470.68468.252722697658465.96251.000270521242881.00027718555164
698536.18555.511264786048561.4250.9993092580716460.997731139123627
708665.88660.06592714718657.5251.000293493480771.00066212808322
718773.78754.62180817058753.51251.000126727204711.00217921370535
728838.48847.105182618398844.71251.000270521242880.999016041695142
738936.28920.384057639458926.550.9993092580716461.00177301137018
748995.39019.68394172219017.03751.000293493480770.997296585791737
759098.99115.442528177789114.28751.000126727204710.99818521940908
769237.19213.85436923219211.36251.000270521242881.00252289973733
779315.59305.00569970559311.43750.9993092580716461.00112781234458
789392.69418.863563964279416.11.000293493480770.997211599490118
799502.29519.068672109429517.86251.000126727204710.998227907299498
809671.19624.890533173829622.28751.000270521242881.00480103816941
819695.69714.2852977144797210.9993092580716460.998076513388086
829847.99792.748264490049789.8751.000293493480771.00563189556398
839836.69840.696925994379839.451.000126727204710.99958367521882
849887.79871.86982825029869.21.000270521242881.00160356366374
859875.69873.937443057149880.76250.9993092580716461.00016837831437
869905.99890.764523182489887.86251.000293493480771.00153026358903
879871.19904.617525446849903.36251.000126727204710.996615969737274
8899109934.474259498499931.78751.000270521242880.99753643133404
899977.39968.059883801779974.950.9993092580716461.00092697238038
9010031.610028.567455578110025.6251.000293493480771.00030239058921
9110090.710068.713318212910067.43751.000126727204711.00218366350220
9210095.810111.397107943310108.66251.000270521242880.998457472515734
931012610162.775292737010169.80.9993092580716460.996381373032688
9410212.710257.709687597210254.71.000293493480770.995612111380803
9510398.710354.612044768510353.31.000126727204711.00425780850513
961046710461.016661880710458.18751.000270521242881.00057196526042
9710543.610544.836204829310552.1250.9993092580716460.999882766805927
9810634.210637.671171095910634.551.000293493480770.99967369069413
9910728.710718.608167134710717.251.000126727204711.00094152456252
10010796.410800.683524131810797.76251.000270521242880.999603402495572
10110875.810869.399360485210876.91250.9993092580716461.00058886782080
10210946.110956.502218474210953.28751.000293493480770.999050589479488
1031105011033.585578283711032.18751.000126727204711.00148767792662
10411086.111121.082675467411118.0751.000270521242880.996854382213652
10511217.311186.555136265711194.28750.9993092580716461.00274837636429
10611291.711264.392555767611261.08751.000293493480771.00242422696982
10711314.111313.871093582811312.43751.000126727204711.00002023236921
10811356.411358.034258568311354.96251.000270521242880.999856114312467
10911357.811410.987504262911418.8750.9993092580716460.995338921873063
11011491.411494.234993232211490.86251.000293493480770.999753355205124
11111625.7NANA1.00012672720471NA
11211620.7NANA1.00027052124288NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t1275317956xuacyw0pgxbr92x/1zatl1275317882.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275317956xuacyw0pgxbr92x/1zatl1275317882.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275317956xuacyw0pgxbr92x/2ajso1275317882.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275317956xuacyw0pgxbr92x/2ajso1275317882.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275317956xuacyw0pgxbr92x/3ajso1275317882.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275317956xuacyw0pgxbr92x/3ajso1275317882.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275317956xuacyw0pgxbr92x/4vkrc1275317882.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275317956xuacyw0pgxbr92x/4vkrc1275317882.ps (open in new window)


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