Home » date » 2010 » Aug » 19 »

tijdreeks 1 - stap 29

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 19 Aug 2010 20:59:38 +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/Aug/19/t1282251625tdva5mm39nmp8ju.htm/, Retrieved Thu, 19 Aug 2010 23:00:26 +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/Aug/19/t1282251625tdva5mm39nmp8ju.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:
Aerts Ellen
 
Dataseries X:
» Textbox « » Textfile « » CSV «
25 24 23 21 41 40 25 15 16 16 17 19 18 19 20 21 46 47 30 16 15 18 30 31 32 36 30 31 61 57 45 33 31 36 46 49 34 40 41 48 75 77 71 54 50 56 66 66 48 63 71 70 88 92 91 80 81 81 98 106 85 93 96 92 115 109 119 107 107 106 132 143 120 123 132 136 158 151 155 138 143 139 168 182 154 158 167 170 197 190 196 174 180 171 200 215 184 186 197 186 211 205 218 199 213 207 236 248 211 220 235 223 245 236 253 246 255 248 274 288
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
125NANA0.88010480829017NA
224NANA0.936399030973389NA
323NANA0.946881990031835NA
421NANA0.937204017852464NA
541NANA1.28524329475686NA
640NANA1.22892471969396NA
72525.925705836018123.20833333333331.11708606833830.964293900352289
81519.581000956119722.70833333333330.8622826109116930.766048683293283
91619.015257755029222.3750.8498439220124790.841429561782736
101619.051733445754422.250.8562576829552540.839818594226948
111723.092097155711222.45833333333331.028219539400870.73618259464994
121924.601055226886822.95833333333331.071552314782730.77232459440336
131820.645791961140223.45833333333330.880104808290170.871848366673453
141922.200460359327423.70833333333330.9363990309733890.855838108420902
152022.448993847004823.70833333333330.9468819900318350.89090852517956
162122.25859542399623.750.9372040178524640.94345575720204
174631.327805309698524.3751.285243294756861.46834416089018
184731.235169958888125.41666666666671.228924719693961.50471407909295
193029.60278081096526.51.11708606833831.01341830659665
201623.964270894920827.79166666666670.8622826109116930.667660621520982
211524.574653411527528.91666666666670.8498439220124790.610385007219015
221825.473666067918829.750.8562576829552540.706612073503976
233031.660593317385130.79166666666671.028219539400870.947550151674723
243134.111082020583531.83333333333331.071552314782730.908795563309713
253228.933445572539332.8750.880104808290171.10598649302837
263632.03265018454834.20833333333330.9363990309733891.12385331193626
273033.693217478632835.58333333333330.9468819900318350.89038691597278
283134.6765486605412370.9372040178524640.893975934671816
296149.374763240242738.41666666666671.285243294756861.23544896211841
305748.952168001142639.83333333333331.228924719693961.16440195250739
314545.42816677909140.66666666666671.11708606833830.99057486116107
323335.281730163136840.91666666666670.8622826109116930.935328280314304
333135.303932926935141.54166666666670.8498439220124790.878089137098621
343636.569338542880742.70833333333330.8562576829552540.98443125947676
354645.2416597336383441.028219539400871.016761990405
364948.666334296382245.41666666666671.071552314782731.00685619141943
373441.65829425906847.33333333333330.880104808290170.816163998183843
384046.1566689017349.29166666666670.9363990309733890.86661366497574
394148.251528075372350.95833333333330.9468819900318350.849714022236874
404849.281311272075452.58333333333330.9372040178524640.974000057242766
417569.724448740559754.251.285243294756861.07566286080038
427768.56375831959255.79166666666671.228924719693961.1230422877504
437163.766996400978157.08333333333331.11708606833831.1134286387513
445450.55131806469858.6250.8622826109116931.0682214048482
455051.698838589092460.83333333333330.8498439220124790.967139714634695
465653.944234026181630.8562576829552541.03810909564164
476666.277317810547864.45833333333331.028219539400870.995815796116848
486670.320620657616565.6251.071552314782730.938558269008274
494859.040364222798967.08333333333330.880104808290170.8130031145957
506364.6115331371638690.9363990309733890.97505811951958
517167.583702038522271.3750.9468819900318351.05054913919232
527069.079746149208773.70833333333330.9372040178524641.01332161598862
538897.785594009417876.08333333333331.285243294756860.899928060891307
549297.187463249130479.08333333333331.228924719693960.946624152172458
559191.926874373672882.29166666666671.11708606833830.989917264347473
568073.365878811736585.08333333333330.8622826109116931.09042515806683
578174.255112685840387.3750.8498439220124791.09083397856651
588176.492353010669489.33333333333330.8562576829552541.0589293806755
599893.953560412754691.3751.028219539400871.04306850713766
6010699.877605340373493.20833333333331.071552314782731.06129897326595
618583.683298854923695.08333333333330.880104808290171.01573433603949
629391.181855641033797.3750.9363990309733891.01993976045107
639694.293664840670299.58333333333330.9468819900318351.01809596818846
649295.3214586490777101.7083333333330.9372040178524640.965155184402859
65115133.879509870506104.1666666666671.285243294756860.858981334120753
66109131.648560597215107.1251.228924719693960.827961958000366
67119123.019103275756110.1251.11708606833830.967329437715486
6810797.294221264536112.8333333333330.8622826109116931.09975699079881
6910798.2277933192757115.5833333333330.8498439220124791.08930473122013
70106101.823309464762118.9166666666670.8562576829552541.04101900200644
71132125.999736057415122.5416666666671.028219539400871.04762124215761
72143135.104887688856126.0833333333331.071552314782731.05843691110071
73120113.826888538862129.3333333333330.880104808290171.05423245368804
74123123.721721967359132.1250.9363990309733890.994166570300813
75132127.750161821795134.9166666666670.9468819900318351.03326679291517
76136129.138903626587137.7916666666670.9372040178524641.05312958512682
77158180.790890129132140.6666666666671.285243294756860.873937839938433
78151176.70913365266143.7916666666671.228924719693960.854511574352494
79155164.025471034341146.8333333333331.11708606833830.944975186003574
80138129.090892541905149.7083333333330.8622826109116931.06901422155094
81143129.707428597155152.6250.8498439220124791.1024811882142
82139133.148069699542155.50.8562576829552541.04395054553673
83168163.015639475846158.5416666666671.028219539400871.03057596522751
84182173.368234929222161.7916666666671.071552314782731.04978861943367
85154145.327306468914165.1250.880104808290171.05967697153281
86158157.627170213854168.3333333333330.9363990309733891.00236526346086
87167162.271901041706171.3750.9468819900318351.02913689263478
88170163.307800110792174.250.9372040178524641.04097905846915
89197227.380959564068176.9166666666671.285243294756860.86638740718522
90190220.745602775027179.6251.228924719693960.860719296835275
91196203.588935954656182.251.11708606833830.962724222124006
92174159.234855481693184.6666666666670.8622826109116931.09272558117783
93180158.991633743168187.0833333333330.8498439220124791.13213504234297
94171161.8327020785431890.8562576829552541.05664675806382
95200195.618767371016190.251.028219539400871.02239679090031
96215205.157620267776191.4583333333331.071552314782731.04797472167681
97184169.8602280000031930.880104808290171.08324357129673
98186182.55879441352194.9583333333330.9363990309733891.01884984833261
99197186.890832782533197.3750.9468819900318351.05409129526021
100186187.675104574956200.250.9372040178524640.991074444430179
101211261.225699659332203.251.285243294756860.8077306339888
102205253.312107846917206.1251.228924719693960.809278331550922
103218233.052081007078208.6251.11708606833830.935413230630533
104199182.085344670852211.1666666666670.8622826109116931.09289410611119
105213182.008239964339214.1666666666670.8498439220124791.17027668660349
106207186.057659025485217.2916666666670.8562576829552541.11255833855056
107236226.465353553042220.251.028219539400871.04210200941278
108248238.911518183432222.9583333333331.071552314782731.03804120406447
109211198.646989437827225.7083333333330.880104808290171.06218574264393
110220214.552427971778229.1250.9363990309733891.02539040028454
111235220.465690012412232.8333333333330.9468819900318351.06592549610223
112223221.453499385055236.2916666666670.9372040178524641.00698341014813
113245307.922872702165239.5833333333331.285243294756860.795653787748901
114236298.423886099016242.8333333333331.228924719693960.790821415420132
115253NANA1.1170860683383NA
116246NANA0.862282610911693NA
117255NANA0.849843922012479NA
118248NANA0.856257682955254NA
119274NANA1.02821953940087NA
120288NANA1.07155231478273NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251625tdva5mm39nmp8ju/1qoxv1282251574.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251625tdva5mm39nmp8ju/1qoxv1282251574.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251625tdva5mm39nmp8ju/2qoxv1282251574.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251625tdva5mm39nmp8ju/2qoxv1282251574.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251625tdva5mm39nmp8ju/3jfxy1282251574.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251625tdva5mm39nmp8ju/3jfxy1282251574.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251625tdva5mm39nmp8ju/4jfxy1282251574.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282251625tdva5mm39nmp8ju/4jfxy1282251574.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