Home » date » 2010 » Jun » 02 »

hoofdstuk 9 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: Wed, 02 Jun 2010 15:50:13 +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/Jun/02/t12754939019z9ll527jg8p0sm.htm/, Retrieved Wed, 02 Jun 2010 17:51:50 +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/Jun/02/t12754939019z9ll527jg8p0sm.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 «
14861 14583,3 15305,8 17903,9 16379,4 15420,3 17870,5 15912,8 13866,5 17823,2 17872 17420,4 16704,4 15991,2 16583,6 19123,5 17838,7 17209,4 18586,5 16258,1 15141,6 19202,1 17746,5 19090,1 18040,3 17515,5 17751,8 21072,4 17170 19439,5 19795,4 17574,9 16165,4 19464,6 19932,1 19961,2 17343,4 18924,2 18574,1 21350,6 18594,6 19823,1 20844,4 19640,2 17735,4 19813,6 22160 20664,3 17877,4 20906,5 21164,1 21374,4 22952,3 21343,5 23899,3 22392,9 18274,1 22786,7 22321,5 17842,2 16373,5 16087,1 16555,9 17880,2 16764,5 16049 18288,3 17570,4 15133,4 19334,2 19291,8 20176,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
114861NANA-1428.75784722222NA
214583.3NANA-828.952847222221NA
315305.8NANA-612.323680555557NA
417903.9NANA1398.84715277778NA
516379.4NANA-121.776180555555NA
615420.3NANA-47.6970138888881NA
717870.517926.214652777816345.06666666671581.14798611111-55.7146527777786
815912.816193.109652777816480.5375-287.427847222222-280.309652777778
913866.514162.884652777816592.4416666667-2429.55701388889-296.384652777777
1017823.217838.162986111116696.51141.66298611111-14.9629861111134
111787218135.152152777816808.12083333331327.03131944444-263.152152777773
1217420.417251.273819444416943.4708333333307.802986111111169.126180555559
1316704.415619.092152777817047.85-1428.757847222221085.30784722222
1415991.216263.117986111117092.0708333333-828.952847222221-271.917986111112
1516583.616547.263819444417159.5875-612.32368055555736.3361805555542
1619123.518669.017986111117270.17083333331398.84715277778454.482013888886
1717838.717200.619652777817322.3958333333-121.776180555555638.080347222225
1817209.417339.040486111117386.7375-47.6970138888881-129.640486111111
1918586.519093.118819444417511.97083333331581.14798611111-506.618819444444
2016258.117343.717986111117631.1458333333-287.427847222222-1085.61798611111
2115141.615313.776319444417743.3333333333-2429.55701388889-172.176319444443
2219202.119014.875486111117873.21251141.66298611111187.224513888887
2317746.519253.585486111117926.55416666671327.03131944444-1507.08548611111
2419090.118299.415486111117991.6125307.802986111111790.684513888886
2518040.316706.146319444418134.9041666667-1428.757847222221334.15368055556
2617515.517411.188819444418240.1416666667-828.952847222221104.311180555556
2717751.817725.342986111118337.6666666667-612.32368055555726.4570138888885
2821072.419790.109652777818391.26251398.847152777781282.29034722222
291717018371.490486111118493.2666666667-121.776180555555-1201.49048611111
3019439.518572.932152777818620.6291666667-47.6970138888881866.567847222221
3119795.420209.035486111118627.88751581.14798611111-413.635486111110
3217574.918370.117986111118657.5458333333-287.427847222222-795.21798611111
3316165.416320.947152777818750.5041666667-2429.55701388889-155.547152777781
3419464.619938.021319444418796.35833333331141.66298611111-473.421319444446
3519932.120194.339652777818867.30833333331327.03131944444-262.239652777778
3619961.219250.452986111118942.65307.802986111111710.747013888893
3717343.417573.583819444419002.3416666667-1428.75784722222-230.183819444443
3818924.218303.151319444419132.1041666667-828.952847222221621.048680555563
3918574.118671.251319444419283.575-612.323680555557-97.1513194444451
4021350.620762.380486111119363.53333333331398.84715277778588.219513888889
4118594.619349.127986111119470.9041666667-121.776180555555-754.527986111112
4219823.119545.332152777819593.0291666667-47.6970138888881277.767847222218
4320844.421225.722986111119644.5751581.14798611111-381.322986111107
4419640.219461.992986111119749.4208333333-287.427847222222178.207013888888
4517735.417510.376319444419939.9333333333-2429.55701388889225.023680555561
4619813.621190.504652777820048.84166666671141.66298611111-1376.90465277778
472216021558.435486111120231.40416666671327.03131944444601.56451388889
4820664.320784.127986111120476.325307.802986111111-119.827986111111
4917877.419238.204652777820666.9625-1428.75784722222-1360.80465277778
5020906.520079.992986111120908.9458333333-828.952847222221826.507013888888
5121164.120433.763819444421046.0875-612.323680555557730.336180555554
5221374.422591.259652777821192.41251398.84715277778-1216.85965277778
5322952.321201.244652777821323.0208333333-121.7761805555551751.05534722222
5421343.521164.465486111121212.1625-47.6970138888881179.034513888888
5523899.322613.060486111121031.91251581.147986111111286.23951388889
5622392.920481.013819444420768.4416666667-287.4278472222221911.88618055555
5718274.117946.067986111120375.625-2429.55701388889328.032013888886
5822786.721179.687986111120038.0251141.662986111111607.01201388889
5922321.520961.639652777819634.60833333331327.031319444441359.86034722222
6017842.219463.982152777819156.1791666667307.802986111111-1621.78215277777
6116373.517273.025486111118701.7833333333-1428.75784722222-899.52548611111
6216087.117438.101319444418267.0541666667-828.952847222221-1351.00131944444
6316555.917322.930486111117935.2541666667-612.323680555557-767.030486111107
6417880.219059.384652777817660.53751398.84715277778-1179.18465277778
6516764.517268.669652777817390.4458333333-121.776180555555-504.169652777775
661604917313.782152777817361.4791666667-47.6970138888881-1264.78215277778
6718288.3NANA1581.14798611111NA
6817570.4NANA-287.427847222222NA
6915133.4NANA-2429.55701388889NA
7019334.2NANA1141.66298611111NA
7119291.8NANA1327.03131944444NA
7220176.7NANA307.802986111111NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754939019z9ll527jg8p0sm/1y50q1275493810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754939019z9ll527jg8p0sm/1y50q1275493810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t12754939019z9ll527jg8p0sm/2y50q1275493810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754939019z9ll527jg8p0sm/2y50q1275493810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t12754939019z9ll527jg8p0sm/39xib1275493810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754939019z9ll527jg8p0sm/39xib1275493810.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t12754939019z9ll527jg8p0sm/49xib1275493810.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754939019z9ll527jg8p0sm/49xib1275493810.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