Home » date » 2010 » Jan » 12 »

opgave 9 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 12 Jan 2010 11:42:00 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/12/t1263321818emgb7mwn4juigwr.htm/, Retrieved Tue, 12 Jan 2010 19:43:43 +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/2010/Jan/12/t1263321818emgb7mwn4juigwr.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 «
100.09 100.09 100.06 100.11 100.08 100.08 100.08 100.08 99.94 99.79 99.98 99.98 99.98 99.98 99.93 99.93 99.93 99.93 99.93 99.93 99.76 99.48 99.55 99.56 99.57 99.56 99.65 99.5 99.5 99.49 99.49 99.46 99.52 99.49 99.55 99.57 99.57 99.57 99.57 99.57 99.57 99.57 99.57 99.53 100.38 100.32 100.46 100.47 100.47 100.47 100.51 100.5 100.51 100.51 100.51 100.51 101.65 102.13 102.2 102.13 102.13 102.12 102.13 102.05 102 102.01 102.01 102.02 102.78 103.39 103.41 103.5 103.5 103.49 103.38 103.24 103.25 103.25 103.25 103.25 103.83 104.33 104.36 104.48 104.5 104.48 104.35 104.48 104.48 104.47 104.47 104.86 105.22 105.96 106.03 106.03
 
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
1100.09NANA1.00153946186072NA
2100.09NANA1.00093832911167NA
3100.06NANA1.00015335259084NA
4100.11NANA0.99913055673448NA
5100.08NANA0.998379748611748NA
6100.08NANA0.997665615581926NA
7100.0899.803056260336100.0254166666670.9977769609591161.00277490239319
8100.0899.7342472034749100.016250.9971804302148391.00346674092621
999.94100.105940810497100.006251.000996845802100.99834234802497
1099.79100.18918708157399.99333333333331.001958668060270.996015667027542
1199.98100.20672202600099.97958333333331.002271850762860.997737456914907
1299.98100.16783520169599.96708333333331.002008179709430.998124795236751
1399.98100.10845960217999.95458333333331.001539461860720.998716795736452
1499.98100.03586189960699.94208333333331.000938329111670.99944158126351
1599.9399.943657602148799.92833333333331.000153352590840.999863346984928
1699.9399.821052401348799.90791666666670.999130556734481.00109142907263
1799.9399.71525735040899.87708333333330.9983797486117481.00215355859573
1899.9399.608597835725499.84166666666670.9976656155819261.00322665082390
1999.9399.585208290526699.80708333333330.9977769609591161.00346227833824
2099.9399.4911844736199.77250.9971804302148391.00441059706658
2199.7699.842762056454699.74333333333331.000996845802100.999171076052486
2299.4899.909056137294399.713751.001958668060270.99570553307295
2399.5599.904370017686399.67791666666671.002271850762860.996452907739436
2499.5699.841765039880799.64166666666671.002008179709430.997177884027108
2599.5799.758338098636699.6051.001539461860720.998112056573653
2699.5699.660510026188899.56708333333331.000938329111670.99899147589991
2799.6599.552764333511199.53751.000153352590841.00097672492713
2899.599.441382789789699.52791666666670.999130556734481.00058946495479
2999.599.367072413079699.52833333333330.9983797486117481.00133774281251
3099.4999.296411636849699.528750.9976656155819261.00194960079583
3199.4999.3079094434699.52916666666670.9977769609591161.00183359570814
3299.4699.24895272743799.52958333333340.9971804302148391.00212644332019
3399.5299.625879406530899.52666666666671.000996845802100.99893722989286
3499.4999.72118888703399.526251.001958668060270.997681647304718
3599.5599.758205372783499.53208333333331.002271850762860.99791289977596
3699.5799.73822419464499.53833333333331.002008179709430.998313342793072
3799.5799.69824573092599.5451.001539461860720.99871366110823
3899.5799.644661835977899.551251.000938329111670.99925071915944
3999.5799.605272384522299.591.000153352590840.99964587833879
4099.5799.57376758855799.66041666666670.999130556734480.999962162840192
4199.5799.57132426998399.73291666666670.9983797486117480.99998670028753
4299.5799.57534231520699.80833333333330.9976656155819260.999946349014909
4399.5799.661288783799799.88333333333330.9977769609591160.999084009599778
4499.5399.676493836891699.95833333333330.9971804302148390.998530307083922
45100.38100.134719469814100.0351.000996845802101.00244950534126
46100.32100.309004638962100.1129166666671.001958668060271.00010961489527
47100.46100.418451954473100.1908333333331.002271850762861.00041374911401
48100.47100.470525172648100.2691666666671.002008179709430.999994772868485
49100.47100.501981149068100.34751.001539461860720.999681785884193
50100.47100.521734046862100.42751.000938329111670.999485344663495
51100.51100.536665194122100.521251.000153352590840.999734771448099
52100.5100.562074230927100.6495833333330.999130556734480.999382727221952
53100.51100.634182710693100.79750.9983797486117480.998765998715867
54100.51100.703535848827100.9391666666670.9976656155819260.998078162328708
55100.51100.852800771345101.07750.9977769609591160.99660097916247
56100.51100.930032736041101.2154166666670.9971804302148390.99583837709496
57101.65101.452698650120101.3516666666671.000996845802101.00194476196795
58102.13101.682522979761101.483751.001958668060271.00440072696001
59102.2101.841260369286101.6104166666671.002271850762861.00352253722522
60102.13101.939302162739101.7351.002008179709431.00187069984996
61102.13102.016809585133101.861.001539461860721.00110952709978
62102.12102.081112552090101.9854166666671.000938329111671.00038094655257
63102.13102.111073263326102.0954166666671.000153352590841.00018535439957
64102.05102.106147245480102.1950.999130556734480.999450109058123
65102102.132168325172102.2979166666670.9983797486117480.998705908947792
66102.01102.166363057674102.4054166666670.9976656155819260.998469525066823
67102.01102.291678297128102.5195833333330.9977769609591160.997246322459292
68102.02102.344366979562102.633750.9971804302148390.996830631825326
69102.78102.845335511842102.7429166666671.000996845802100.999364720708853
70103.39103.046021733880102.8445833333331.001958668060271.00333810330891
71103.41103.180128516596102.946251.002271850762861.00222786583724
72103.5103.256942919057103.051.002008179709431.00235390545247
73103.5103.312133955806103.1533333333331.001539461860721.00181843155301
74103.49103.353138345337103.256251.000938329111671.00132421382509
75103.38103.367099181954103.351251.000153352590841.00012480584391
76103.24103.344236527034103.4341666666670.999130556734480.998991365841612
77103.25103.345199719735103.5129166666670.9983797486117480.99907881817449
78103.25103.351506670184103.5933333333330.9976656155819260.999017850117004
79103.25103.445357908237103.6758333333330.9977769609591160.9981114869513
80103.25103.466194963554103.758750.9971804302148390.997910477295216
81103.83103.943929550110103.8404166666671.000996845802100.998903932624033
82104.33104.136069268174103.93251.001958668060271.00186228204300
83104.36104.271769607385104.0354166666671.002271850762861.00084615800563
84104.48104.346626814491104.13751.002008179709431.00127817438455
85104.5104.399638888143104.2391666666671.001539461860721.00096131665709
86104.48104.455004622634104.3570833333331.000938329111671.00023929324839
87104.35104.498105931509104.4820833333331.000153352590840.998582692669986
88104.48104.516966018001104.6079166666670.999130556734480.999646315623107
89104.48104.575702759899104.7454166666670.9983797486117480.999084847078492
90104.47104.634754068226104.8795833333330.9976656155819260.998425436465226
91104.47NANA0.997776960959116NA
92104.86NANA0.997180430214839NA
93105.22NANA1.00099684580210NA
94105.96NANA1.00195866806027NA
95106.03NANA1.00227185076286NA
96106.03NANA1.00200817970943NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263321818emgb7mwn4juigwr/10w4o1263321717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263321818emgb7mwn4juigwr/10w4o1263321717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263321818emgb7mwn4juigwr/2i85m1263321717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263321818emgb7mwn4juigwr/2i85m1263321717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263321818emgb7mwn4juigwr/38c841263321717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263321818emgb7mwn4juigwr/38c841263321717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263321818emgb7mwn4juigwr/46eu01263321717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263321818emgb7mwn4juigwr/46eu01263321717.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