Home » date » 2010 » Aug » 14 »

Tijdreeks 2 - stap 24

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 14 Aug 2010 11:18:56 +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/14/t1281784806nskcetud9rswcba.htm/, Retrieved Sat, 14 Aug 2010 13:20:11 +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/14/t1281784806nskcetud9rswcba.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:
Reuben Vermoet
 
Dataseries X:
» Textbox « » Textfile « » CSV «
172 171 170 168 166 165 166 168 169 169 170 172 173 172 165 152 148 145 141 149 146 144 149 150 149 156 150 137 130 126 125 123 117 111 114 121 122 131 125 116 106 98 99 96 95 83 85 98 102 110 101 90 88 83 88 85 86 80 79 97 105 116 99 87 82 81 85 84 78 77 79 85 96 108 98 86 80 74 75 82 71 66 71 75
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1172NANA8.93055555555556NA
2171NANA17.8263888888889NA
3170NANA9.9375NA
4168NANA-0.333333333333324NA
5166NANA-4.59722222222223NA
6165NANA-7.73611111111111NA
7166164.006944444444168.875-4.868055555555551.9930555555556
8168165.222222222222168.958333333333-3.736111111111112.7777777777778
9169163.659722222222168.791666666667-5.131944444444455.34027777777777
10169159.354166666667167.916666666667-8.56259.64583333333334
11170161.104166666667166.5-5.395833333333348.89583333333334
12172168.583333333333164.9166666666673.666666666666673.41666666666666
13173171.972222222222163.0416666666678.930555555555561.0277777777778
14172179.034722222222161.20833333333317.8263888888889-7.03472222222223
15165169.395833333333159.4583333333339.9375-4.39583333333331
16152157.125157.458333333333-0.333333333333324-5.125
17148150.944444444444155.541666666667-4.59722222222223-2.94444444444446
18145146.013888888889153.75-7.73611111111111-1.01388888888886
19141146.965277777778151.833333333333-4.86805555555555-5.9652777777778
20149146.430555555556150.166666666667-3.736111111111112.56944444444446
21146143.743055555556148.875-5.131944444444452.25694444444446
22144139.0625147.625-8.56254.93749999999997
23149140.854166666667146.25-5.395833333333348.14583333333334
24150148.375144.7083333333333.666666666666671.625
25149152.180555555556143.258.93055555555556-3.18055555555554
26156159.326388888889141.517.8263888888889-3.32638888888889
27150149.145833333333139.2083333333339.93750.854166666666657
28137136.291666666667136.625-0.3333333333333240.708333333333314
29130129.194444444444133.791666666667-4.597222222222230.805555555555543
30126123.388888888889131.125-7.736111111111112.61111111111111
31125123.923611111111128.791666666667-4.868055555555551.07638888888889
32123122.888888888889126.625-3.736111111111110.111111111111114
33117119.409722222222124.541666666667-5.13194444444445-2.40972222222223
34111114.0625122.625-8.5625-3.06249999999999
35114115.354166666667120.75-5.39583333333334-1.35416666666666
36121122.25118.5833333333333.66666666666667-1.25
37122125.263888888889116.3333333333338.93055555555556-3.26388888888887
38131131.951388888889114.12517.8263888888889-0.951388888888872
39125122.020833333333112.0833333333339.93752.97916666666667
40116109.666666666667110-0.3333333333333246.33333333333333
41106103.027777777778107.625-4.597222222222232.97222222222223
429897.7222222222222105.458333333333-7.736111111111110.277777777777757
439998.7986111111111103.666666666667-4.868055555555550.201388888888886
449698.2222222222222101.958333333333-3.73611111111111-2.22222222222221
459594.9513888888889100.083333333333-5.131944444444450.0486111111111143
468389.437598-8.5625-6.43749999999999
478590.770833333333396.1666666666667-5.39583333333334-5.77083333333333
489898.458333333333394.79166666666673.66666666666667-0.458333333333329
49102102.63888888888993.70833333333338.93055555555556-0.638888888888886
50110110.61805555555692.791666666666717.8263888888889-0.618055555555557
51101101.89583333333391.95833333333339.9375-0.895833333333329
529091.12591.4583333333333-0.333333333333324-1.125
538886.486111111111191.0833333333333-4.597222222222231.51388888888889
548383.055555555555590.7916666666667-7.73611111111111-0.0555555555555429
558886.006944444444490.875-4.868055555555551.99305555555556
568587.513888888888991.25-3.73611111111111-2.51388888888889
578686.284722222222291.4166666666667-5.13194444444445-0.284722222222214
588082.645833333333391.2083333333333-8.5625-2.64583333333333
597985.437590.8333333333333-5.39583333333334-6.43749999999999
609794.166666666666790.53.666666666666672.83333333333334
6110599.222222222222290.29166666666678.930555555555565.77777777777777
62116107.95138888888990.12517.82638888888898.04861111111111
639999.687589.759.9375-0.687499999999986
648788.958333333333389.2916666666666-0.333333333333324-1.95833333333331
658284.569444444444489.1666666666667-4.59722222222223-2.56944444444444
668180.930555555555688.6666666666667-7.736111111111110.0694444444444287
678582.923611111111187.7916666666667-4.868055555555552.07638888888889
688483.347222222222287.0833333333333-3.736111111111110.652777777777786
697881.576388888888986.7083333333333-5.13194444444445-3.57638888888889
707778.062586.625-8.5625-1.0625
717981.104166666666786.5-5.39583333333334-2.10416666666666
728589.791666666666786.1253.66666666666667-4.79166666666666
739694.347222222222285.41666666666678.930555555555561.65277777777777
74108102.74305555555684.916666666666717.82638888888895.25694444444444
759894.479166666666784.54166666666679.93753.52083333333334
768683.458333333333383.7916666666666-0.3333333333333242.54166666666669
778078.402777777777883-4.597222222222231.59722222222223
787474.513888888888982.25-7.73611111111111-0.513888888888872
7975NANA-4.86805555555555NA
8082NANA-3.73611111111111NA
8171NANA-5.13194444444445NA
8266NANA-8.5625NA
8371NANA-5.39583333333334NA
8475NANA3.66666666666667NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/14/t1281784806nskcetud9rswcba/1857u1281784731.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/14/t1281784806nskcetud9rswcba/1857u1281784731.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/14/t1281784806nskcetud9rswcba/2857u1281784731.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/14/t1281784806nskcetud9rswcba/2857u1281784731.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/14/t1281784806nskcetud9rswcba/36he31281784731.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/14/t1281784806nskcetud9rswcba/36he31281784731.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/14/t1281784806nskcetud9rswcba/46he31281784731.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/14/t1281784806nskcetud9rswcba/46he31281784731.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