Home » date » 2010 » Jul » 29 »

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: Thu, 29 Jul 2010 12:47:58 +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/Jul/29/t1280407660apkm2jh5ssxqof0.htm/, Retrieved Thu, 29 Jul 2010 14:47:46 +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/Jul/29/t1280407660apkm2jh5ssxqof0.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:
Habimana Christelle
 
Dataseries X:
» Textbox « » Textfile « » CSV «
376 375 374 372 370 369 370 372 373 373 374 376 371 374 369 363 357 366 362 366 361 362 358 363 360 360 348 345 332 333 323 327 332 337 336 337 343 337 326 321 309 302 293 287 292 292 289 302 310 295 276 264 257 243 227 226 226 229 224 240 244 226 208 199 193 180 167 164 166 173 169 191 193 166 143 147 139 129 115 108 106 116 108 135
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1376NANA18.6950231481481NA
2375NANA11.7991898148148NA
3374NANA0.820023148148155NA
4372NANA-0.707754629629636NA
5370NANA-5.74247685185185NA
6369NANA-7.8883101851852NA
7370359.333912037037372.625-13.291087962963010.6660879629629
8372361.806134259259372.375-10.568865740740710.1938657407408
9373365.945023148148372.125-6.179976851851847.0549768518519
10373371.195023148148371.541666666667-0.3466435185185121.80497685185190
11374370.778356481481370.6250.1533564814814783.22164351851853
12376383.215856481481369.95833333333313.2575231481482-7.21585648148141
13371388.195023148148369.518.6950231481481-17.1950231481481
14374380.715856481481368.91666666666711.7991898148148-6.71585648148147
15369368.986689814815368.1666666666670.8200231481481550.0133101851852189
16363366.500578703704367.208333333333-0.707754629629636-3.50057870370375
17357360.340856481481366.083333333333-5.74247685185185-3.34085648148147
18366356.986689814815364.875-7.88831018518529.01331018518516
19362350.583912037037363.875-13.291087962963011.416087962963
20366352.264467592593362.833333333333-10.568865740740713.7355324074074
21361355.195023148148361.375-6.179976851851845.80497685185185
22362359.403356481481359.75-0.3466435185185122.59664351851853
23358358.111689814815357.9583333333330.153356481481478-0.111689814814781
24363368.799189814815355.54166666666713.2575231481482-5.79918981481484
25360371.236689814815352.54166666666718.6950231481481-11.2366898148148
26360361.090856481481349.29166666666711.7991898148148-1.09085648148147
27348347.278356481481346.4583333333330.8200231481481550.721643518518533
28345343.500578703704344.208333333333-0.7077546296296361.49942129629636
29332336.507523148148342.25-5.74247685185185-4.50752314814815
30333332.361689814815340.25-7.88831018518520.638310185185219
31323325.167245370370338.458333333333-13.2910879629630-2.16724537037032
32327326.222800925926336.791666666667-10.56886574074070.777199074074133
33332328.736689814815334.916666666667-6.179976851851843.26331018518516
34337332.653356481481333-0.3466435185185124.34664351851853
35336331.195023148148331.0416666666670.1533564814814784.8049768518519
36337342.049189814815328.79166666666713.2575231481482-5.04918981481484
37343344.945023148148326.2518.6950231481481-1.94502314814815
38337335.132523148148323.33333333333311.79918981481481.86747685185179
39326320.8200231481483200.8200231481481555.17997685185185
40321315.750578703704316.458333333333-0.7077546296296365.24942129629625
41309306.882523148148312.625-5.742476851851852.11747685185190
42302301.320023148148309.208333333333-7.88831018518520.679976851851904
43293293.083912037037306.375-13.2910879629630-0.0839120370369528
44287292.681134259259303.25-10.5688657407407-5.68113425925924
45292293.236689814815299.416666666667-6.17997685185184-1.23668981481472
46292294.611689814815294.958333333333-0.346643518518512-2.61168981481478
47289290.570023148148290.4166666666670.153356481481478-1.57002314814815
48302299.049189814815285.79166666666713.25752314814822.95081018518522
49310299.278356481481280.58333333333318.695023148148110.7216435185185
50295287.090856481482275.29166666666711.79918981481487.90914351851848
51276270.8200231481482700.8200231481481555.17997685185185
52264263.917245370370264.625-0.7077546296296360.0827546296296191
53257253.549189814815259.291666666667-5.742476851851853.45081018518516
54243246.111689814815254-7.8883101851852-3.11168981481481
55227235.375578703704248.666666666667-13.2910879629630-8.37557870370367
56226232.472800925926243.041666666667-10.5688657407407-6.4728009259259
57226231.153356481481237.333333333333-6.17997685185184-5.15335648148147
58229231.445023148148231.791666666667-0.346643518518512-2.44502314814812
59224226.570023148148226.4166666666670.153356481481478-2.57002314814815
60240234.382523148148221.12513.25752314814825.61747685185185
61244234.69502314814821618.69502314814819.30497685185182
62226222.715856481481210.91666666666711.79918981481483.28414351851856
63208206.653356481481205.8333333333330.8200231481481551.34664351851853
64199200.292245370370201-0.707754629629636-1.29224537037032
65193190.632523148148196.375-5.742476851851852.36747685185185
66180184.153356481481192.041666666667-7.8883101851852-4.15335648148147
67167174.583912037037187.875-13.2910879629630-7.58391203703704
68164172.681134259259183.25-10.5688657407407-8.6811342592593
69166171.861689814815178.041666666667-6.17997685185184-5.86168981481484
70173172.820023148148173.166666666667-0.3466435185185120.179976851851848
71169168.903356481481168.750.1533564814814780.0966435185185617
72191177.632523148148164.37513.257523148148213.3674768518519
73193178.778356481481160.08333333333318.695023148148114.2216435185185
74166167.382523148148155.58333333333311.7991898148148-1.38252314814815
75143151.570023148148150.750.820023148148155-8.57002314814812
76147145.167245370370145.875-0.7077546296296361.83275462962965
77139135.215856481481140.958333333333-5.742476851851853.78414351851853
78129128.195023148148136.083333333333-7.88831018518520.804976851851848
79115NANA-13.2910879629630NA
80108NANA-10.5688657407407NA
81106NANA-6.17997685185184NA
82116NANA-0.346643518518512NA
83108NANA0.153356481481478NA
84135NANA13.2575231481482NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280407660apkm2jh5ssxqof0/1m9kt1280407676.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280407660apkm2jh5ssxqof0/1m9kt1280407676.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280407660apkm2jh5ssxqof0/2m9kt1280407676.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280407660apkm2jh5ssxqof0/2m9kt1280407676.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280407660apkm2jh5ssxqof0/3f1jd1280407676.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280407660apkm2jh5ssxqof0/3f1jd1280407676.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280407660apkm2jh5ssxqof0/48s1g1280407676.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280407660apkm2jh5ssxqof0/48s1g1280407676.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