Home » date » 2010 » Jul » 28 »

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: Wed, 28 Jul 2010 14:35:03 +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/28/t1280327688j6d5n4y7mfpbpr8.htm/, Retrieved Wed, 28 Jul 2010 16:34:53 +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/28/t1280327688j6d5n4y7mfpbpr8.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:
Patrick Fieremans
 
Dataseries X:
» Textbox « » Textfile « » CSV «
136 135 134 132 152 151 136 126 127 127 128 130 125 118 111 104 126 131 122 116 115 115 113 122 114 106 93 89 114 122 115 116 120 120 120 121 118 112 99 96 120 135 128 134 134 132 130 125 124 114 101 101 123 143 133 136 137 135 141 136 133 124 110 104 130 160 142 142 137 135 139 135 134 120 103 101 127 159 141 140 135 127 130 128 126 110 101 102 129 169 146 145 138 123 124 137 132 112 105 106 137 175 151 142 140 122 127 135 128 117 107 108 134 171 154 146 148 122 124 135
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1136NANA1.00545093599349NA
2135NANA0.915655008614405NA
3134NANA0.822818034373304NA
4132NANA0.804931659473869NA
5152NANA1.00750525863161NA
6151NANA1.20192687286610NA
7136143.408974239302134.0416666666671.069883550433090.948336746158306
8126140.375200272994132.8751.056445533569100.897594445136764
9127137.292780229990131.2083333333331.046372412041840.92503043340846
10127130.107090862263129.0833333333331.007930981502360.976118973672597
11128129.725801539071126.8333333333331.022805268376380.986696543643624
12130129.697787641879124.9166666666671.038274484124451.00233012731840
13125124.173190595196123.51.005450935993491.00665851783981
14118112.167738555265122.50.9156550086144051.05199589043923
15111100.040959345888121.5833333333330.8228180343733041.10954553740555
1610497.0613426048907120.5833333333330.8049316594738691.07148734201375
17126120.354899020701119.4583333333331.007505258631611.04690379058295
18131142.428334434633118.51.201926872866100.919760808268964
19122125.934209582228117.7083333333331.069883550433090.968759802477186
20116123.340016044192116.751.056445533569100.940489580919446
21115120.856013590833115.51.046372412041840.951545534087707
22115115.030123263957114.1251.007930981502360.999738127169627
23113115.5769953265311131.022805268376380.977703215771872
24122116.416526532454112.1251.038274484124451.04796117556376
25114112.065885574274111.4583333333331.005450935993491.0172587261129
26106101.790315124301111.1666666666670.9156550086144051.04135643818921
279391.6413585783267111.3750.8228180343733041.01482563596558
288989.9846517653496111.7916666666670.8049316594738690.989057558749938
29114113.134444667175112.2916666666671.007505258631611.00765067911343
30122135.266853483805112.5416666666671.201926872866100.901920883482413
31115120.540213348795112.6666666666671.069883550433090.954038464053788
32116119.466382421105113.0833333333331.056445533569100.970984453108433
33120118.850466467752113.5833333333331.046372412041841.00967209945751
34120115.030123263957114.1251.007930981502361.04320500226396
35120117.281670773825114.6666666666671.022805268376381.02317778394731
36121119.877441479536115.4583333333331.038274484124451.00936421820995
37118117.176927832241116.5416666666671.005450935993491.00702418285738
38112107.894681848397117.8333333333330.9156550086144051.03804930957923
399998.0524824294854119.1666666666670.8228180343733041.00966337156426
409696.7930320517327120.250.8049316594738690.991806930365515
41120122.076053837530121.1666666666671.007505258631610.982993766817746
42135146.334596771447121.751.201926872866100.922543287633133
43128130.704107077909122.1666666666671.069883550433090.979311231005945
44134129.414577862214122.51.056445533569101.03543203720579
45134128.355015877133122.6666666666671.046372412041841.04397945872463
46132123.933513600562122.9583333333331.007930981502361.06508720817387
47130126.103366213571123.2916666666671.022805268376381.03090031537960
48125128.486467410401123.751.038274484124450.97286510026566
49124124.969172586190124.2916666666671.005450935993490.992244706705392
50114114.075353156545124.5833333333330.9156550086144050.999339444021346
51101102.680833872835124.7916666666670.8228180343733040.983630500362737
52101100.649996253378125.0416666666670.8049316594738691.00347743427372
53123126.567848115596125.6251.007505258631610.97181078631962
54143152.093829703931126.5416666666671.201926872866100.940209081975034
55133136.276417236415127.3751.069883550433090.975957562556618
56136135.401102552439128.1666666666671.056445533569101.00442313567815
57137134.938442302896128.9583333333331.046372412041841.01527776415617
58135130.485064980327129.4583333333331.007930981502361.03460116313199
59141132.836834230382129.8751.022805268376381.06145257689189
60136135.884173109788130.8751.038274484124451.00085239426757
61133132.677629762140131.9583333333331.005450935993491.00242972563225
62124121.400593225460132.5833333333330.9156550086144051.02141181278837
63110109.297662232587132.8333333333330.8228180343733041.00642591756371
64104106.921755433446132.8333333333330.8049316594738690.97267389202879
65130133.746323083347132.751.007505258631610.97198933774791
66160159.405551513866132.6251.201926872866101.00372915799035
67142141.893305876188132.6251.069883550433091.00075193204607
68142139.979033197905132.51.056445533569101.01443763938016
69137138.164757240025132.0416666666671.046372412041840.991569794907964
70135132.668915440249131.6251.007930981502361.01757069131089
71139134.371042132947131.3751.022805268376381.03444907320487
72135136.230264604496131.2083333333331.038274484124450.990969226933035
73134131.839753982146131.1251.005450935993491.01638539175480
74120119.9508061284871310.9156550086144051.00041011705632
75103107.652026163841130.8333333333330.8228180343733040.956786450477388
76101104.976503923050130.4166666666670.8049316594738690.962120057589599
77127130.681827921675129.7083333333331.007505258631610.971826014525278
78159155.098646886096129.0416666666671.201926872866101.02515401128399
79141137.390879268116128.4166666666671.069883550433091.02626899799397
80140134.872879785655127.6666666666671.056445533569101.03801446386029
81135133.063691731321127.1666666666671.046372412041841.01455174017409
82127128.133226023488127.1251.007930981502360.99115587690518
83130130.151970400894127.251.022805268376380.99883236188875
84128132.639565346899127.751.038274484124450.965021256404417
85126129.074763908164128.3751.005450935993490.976178427021168
86110117.928734651130128.7916666666670.9156550086144050.932766728358564
87101106.246378688453129.1250.8228180343733040.950620635232784
88102103.903261710419129.0833333333330.8049316594738690.981682368011477
89129129.632343277268128.6666666666671.007505258631610.995122025404454
90169154.798165167880128.7916666666671.201926872866101.09174420650735
91146138.460762818549129.4166666666671.069883550433091.05445035133405
92145137.073807980590129.751.056445533569101.05782426370275
93138136.0284135654391301.046372412041841.01449393095812
94123131.367004589141130.3333333333331.007930981502360.936308172548276
95124133.817022612576130.8333333333331.022805268376380.9266384618271
96137136.446571788688131.4166666666671.038274484124451.00405600671425
97132132.593842184141131.8751.005450935993490.995521344171351
98112120.828308845076131.9583333333330.9156550086144050.926935095513127
99105108.543412367745131.9166666666670.8228180343733040.967354883263298
100106106.217440231406131.9583333333330.8049316594738690.997952876373859
101137133.032673525149132.0416666666671.007505258631611.02982219607953
102175158.754507791064132.0833333333331.201926872866101.10233090344947
103151141.046314732096131.8333333333331.069883550433091.07057033207008
104142139.318754739425131.8751.056445533569101.01924540070424
105140138.29555379153132.1666666666671.046372412041841.01232466382136
106122133.382866552146132.3333333333331.007930981502360.914660204519626
107127135.308613628959132.2916666666671.022805268376380.938595087140998
108135137.0522319044281321.038274484124450.98502591401898
109128132.677629762140131.9583333333331.005450935993490.964744397600965
110117121.095374889255132.250.9156550086144050.966180583750615
111107109.229094063056132.750.8228180343733040.979592487860704
112108107.122988348314133.0833333333330.8049316594738691.00818696028937
113134133.956220012228132.9583333333331.007505258631611.0003268231051
114171159.655952945713132.8333333333331.201926872866101.07105307910532
115154NANA1.06988355043309NA
116146NANA1.05644553356910NA
117148NANA1.04637241204184NA
118122NANA1.00793098150236NA
119124NANA1.02280526837638NA
120135NANA1.03827448412445NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327688j6d5n4y7mfpbpr8/1kzhn1280327700.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327688j6d5n4y7mfpbpr8/1kzhn1280327700.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327688j6d5n4y7mfpbpr8/2kzhn1280327700.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327688j6d5n4y7mfpbpr8/2kzhn1280327700.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327688j6d5n4y7mfpbpr8/3dqg81280327700.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327688j6d5n4y7mfpbpr8/3dqg81280327700.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327688j6d5n4y7mfpbpr8/45hfb1280327700.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327688j6d5n4y7mfpbpr8/45hfb1280327700.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