Home » date » 2010 » Dec » 11 »

opgave 8 oef 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 11 Dec 2010 20:42:46 +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/Dec/11/t1292100246mk5ogm4lgdzl1gg.htm/, Retrieved Sat, 11 Dec 2010 21:44:07 +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/Dec/11/t1292100246mk5ogm4lgdzl1gg.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
24,3 29,4 31,8 36,7 37,1 37,7 39,4 43,3 39,6 34,3 32 29,6 22,3 28,9 31,7 34,2 38,6 37,2 38,8 43,4 38,8 36,3 33 29,2 22,64 28,44 30,14 34,39 36,82 36,74 38,9 42,8 39,09 37,49 33,17 30,98 21,2 27,8 29 35,4 37,5 34,7 38,4 39,9 35,9 34,7 30,4 29 21,5 28 29,3 34,3 36,6 36,2 37,5 41,6 39,4 37,3 32,7 30,7 22,9 29,1 29,5 37,1 37,7 38,4 39,4 40,6 39,7 36,6 32,8 31,6 24,1 30,3 31,8 38,7 37,8 38,4 40,7 43,8 41,5 39,3 35,9 33,4
 
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
124.3NANA0.657507503836322NA
229.4NANA0.842468589465635NA
331.8NANA0.885496296850527NA
436.7NANA1.04309665520377NA
537.1NANA1.09530841428656NA
637.7NANA1.07656062680808NA
739.439.267703797792634.51666666666671.137644726155271.00336908424513
843.342.371716681143734.41251.231288534141481.02190808849785
939.639.108156571627334.38751.137278271803051.01257649225864
1034.336.33327770801334.27916666666671.059923015670730.944038142543783
113232.477419379934334.23750.948592022780120.985299959508811
1229.630.331418195201334.27916666666670.8848353429984580.97588578976116
1322.322.508673547996834.23333333333330.6575075038363220.99072919390155
1428.928.82295661709334.21250.8424685894656351.00267298681154
1531.730.269215080673834.18333333333330.8854962968505271.04726864953428
1634.235.708675496475734.23333333333331.043096655203770.957750449281587
1738.637.632971600862534.35833333333331.095308414286561.02569630720087
1837.237.015742885084634.38333333333331.076560626808081.00497780405184
1938.839.113173722489934.38083333333331.137644726155270.991993139582284
2043.442.326569434891834.37583333333331.231288534141481.0253606795788
2138.838.999167403912834.29166666666671.137278271803050.99489303446276
2236.336.286022806897634.23458333333331.059923015670731.00038519495996
233332.411808431692134.16833333333330.948592022780121.01814744677229
2429.230.150764312672434.0750.8848353429984580.96846632799047
2522.6422.394705580665134.060.6575075038363221.01095323260452
2628.4428.676928728252334.03916666666670.8424685894656350.991738001984191
2730.1430.130118370710234.026250.8854962968505271.00032796516655
2834.3935.556991857864834.08791666666671.043096655203770.967179679807286
2936.8237.398849427308734.14458333333331.095308414286560.984522266428709
3036.7436.846184586362434.22583333333331.076560626808080.99711816603118
3138.938.952955423556334.241.137644726155270.99864052873574
3242.842.052607736045334.15333333333331.231288534141481.01777279232351
3339.0938.757495771154734.07916666666671.137278271803051.00857909475908
3437.4936.115551855210634.073751.059923015670731.03805696089872
3533.1732.388884124474934.14416666666670.948592022780121.02411678872675
3630.9830.161824754459934.08750.8848353429984581.02712618524246
3721.222.34320082619833.98166666666670.6575075038363220.94883450965282
3827.828.509137067517133.840.8424685894656350.975125972215937
392929.74050000009633.586250.8854962968505270.97510129284667
4035.434.773800119249333.33708333333331.043096655203771.01800780698696
4137.536.260641433462633.10541666666671.095308414286561.03417916830875
4234.735.426918826687132.90751.076560626808080.979481172770254
4338.437.357408695123632.83751.137644726155271.02790855525835
4439.940.458089084332132.85833333333331.231288534141480.986205747800673
4535.937.39276184499132.87916666666671.137278271803050.960078855603683
4634.734.814054718884932.84583333333331.059923015670730.996723888676402
4730.431.078246146333732.76250.948592022780120.978176176894278
482929.011538808561932.78750.8848353429984580.999602268303034
4921.521.574464969629332.81250.6575075038363220.99654846737872
502827.671582878156732.84583333333330.8424685894656351.01186838943364
5129.329.276721314620533.06250.8854962968505271.00079512610477
5234.334.752503562538933.31666666666671.043096655203770.986979252826357
5336.636.715650803897533.52083333333331.095308414286560.996850095221921
5436.236.266636115597433.68751.076560626808080.998162605558868
5537.538.471352489483933.81666666666671.137644726155270.9747512778567
5641.641.766333151857433.92083333333331.231288534141480.996017530405347
5739.438.639029284508533.9751.137278271803051.01969435385885
5837.336.143374834371934.11.059923015670731.03200102842992
5932.732.501134180503834.26250.948592022780121.00611873476143
6030.730.438335799146934.40.8848353429984581.00859653440253
6122.922.730582330541534.57083333333330.6575075038363221.00745329208882
6229.129.156433767089834.60833333333330.8424685894656350.998064448912351
6329.530.619724031510534.57916666666670.8854962968505270.963431282713123
6437.136.052028145480334.56251.043096655203771.02906831899417
6537.737.829214358422134.53751.095308414286560.996584270632801
6638.437.226569341167934.57916666666671.076560626808081.03152132145399
6739.439.438350506715934.66666666666671.137644726155270.999027583399834
6840.642.807798036985434.76666666666671.231288534141480.948425330471847
6939.739.705227664323934.91251.137278271803050.999868338135017
7036.637.176799774650935.0751.059923015670730.984484953569236
7132.833.339057133959635.14583333333330.948592022780120.983831062414463
7231.631.101962306395835.150.8848353429984581.01601306337838
7324.123.147003749637935.20416666666670.6575075038363221.04117147345159
7430.329.816367495504635.39166666666670.8424685894656351.01622036972037
7531.831.523668167878735.60.8854962968505271.00876585271262
7638.737.329821548104935.78751.043096655203771.03670466118166
7737.839.463049409732936.02916666666671.095308414286560.957858061284976
7838.439.007380044679636.23333333333331.076560626808080.984429099211895
7940.7NANA1.13764472615527NA
8043.8NANA1.23128853414148NA
8141.5NANA1.13727827180305NA
8239.3NANA1.05992301567073NA
8335.9NANA0.94859202278012NA
8433.4NANA0.884835342998458NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100246mk5ogm4lgdzl1gg/1pii71292100162.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100246mk5ogm4lgdzl1gg/1pii71292100162.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100246mk5ogm4lgdzl1gg/2pii71292100162.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100246mk5ogm4lgdzl1gg/2pii71292100162.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100246mk5ogm4lgdzl1gg/30rha1292100162.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100246mk5ogm4lgdzl1gg/30rha1292100162.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100246mk5ogm4lgdzl1gg/40rha1292100162.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100246mk5ogm4lgdzl1gg/40rha1292100162.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