Home » date » 2010 » Jul » 01 »

Tijdreeks1-Stap29

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 01 Jul 2010 16:30:35 +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/01/t1278001933ua434gxm74bi5rd.htm/, Retrieved Thu, 01 Jul 2010 18:32:15 +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/01/t1278001933ua434gxm74bi5rd.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:
Steffi Poppe
 
Dataseries X:
» Textbox « » Textfile « » CSV «
300 299 298 296 316 315 300 290 291 291 292 294 302 296 282 282 298 300 289 275 270 269 268 260 271 269 260 262 285 286 272 248 240 234 231 222 233 236 226 232 248 253 233 216 209 202 204 193 201 201 188 198 220 225 215 198 195 183 180 170 175 180 161 174 195 198 188 173 162 149 140 129 132 133 116 128 148 154 152 141 136 119 114 100 108 115 101 116 131 133 135 124 131 113 118 99 107 112 106 121 138 134 132 121 132 113 112 91 96 99 99 110 127 122 124 114 129 113 115 94
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1300NANA-7.09182098765432NA
2299NANA-3.68441358024691NA
3298NANA-13.4529320987654NA
4296NANA-2.54552469135802NA
5316NANA17.653549382716NA
6315NANA21.0655864197531NA
7300313.111882716049298.58333333333314.5285493827161-13.1118827160494
8290300.496141975309298.5416666666671.95447530864198-10.4961419753086
9291299.329475308642297.751.57947530864196-8.32947530864197
10291289.528549382716296.5-6.971450617283941.47145061728401
11292288.375771604938295.166666666667-6.79089506172843.62422839506172
12294277.547067901235293.791666666667-16.244598765432116.4529320987655
13302285.616512345679292.708333333333-7.0918209876543216.383487654321
14296287.940586419753291.625-3.684413580246918.059413580247
15282276.672067901235290.125-13.45293209876545.32793209876542
16282285.787808641975288.333333333333-2.54552469135802-3.78780864197529
17298304.070216049383286.41666666666717.653549382716-6.07021604938274
18300305.06558641975328421.0655864197531-5.06558641975306
19289295.820216049383281.29166666666714.5285493827161-6.82021604938268
20275280.829475308642278.8751.95447530864198-5.82947530864192
21270278.412808641975276.8333333333331.57947530864196-8.41280864197535
22269268.111882716049275.083333333333-6.971450617283940.888117283950635
23268266.917438271605273.708333333333-6.79089506172841.08256172839509
24260256.338734567901272.583333333333-16.24459876543213.66126543209879
25271264.199845679012271.291666666667-7.091820987654326.80015432098764
26269265.773919753086269.458333333333-3.684413580246913.22608024691363
27260253.630401234568267.083333333333-13.45293209876546.3695987654321
28262261.829475308642264.375-2.545524691358020.170524691358025
29285279.028549382716261.37517.6535493827165.97145061728401
30286279.315586419753258.2521.06558641975316.68441358024694
31272269.611882716049255.08333333333314.52854938271612.38811728395063
32248254.079475308642252.1251.95447530864198-6.07947530864197
33240250.912808641975249.3333333333331.57947530864196-10.9128086419753
34234239.695216049383246.666666666667-6.97145061728394-5.69521604938268
35231237.084104938272243.875-6.7908950617284-6.08410493827157
36222224.713734567901240.958333333333-16.2445987654321-2.71373456790118
37233230.866512345679237.958333333333-7.091820987654322.13348765432102
38236231.315586419753235-3.684413580246914.68441358024694
39226218.922067901235232.375-13.45293209876547.07793209876547
40232227.204475308642229.75-2.545524691358024.79552469135805
41248244.945216049383227.29166666666717.6535493827163.05478395061729
42253246.023919753086224.95833333333321.06558641975316.9760802469136
43233236.945216049383222.41666666666714.5285493827161-3.94521604938271
44216221.579475308642219.6251.95447530864198-5.57947530864197
45209218.162808641975216.5833333333331.57947530864196-9.16280864197529
46202206.611882716049213.583333333333-6.97145061728394-4.61188271604937
47204204.209104938272211-6.7908950617284-0.209104938271594
48193192.422067901235208.666666666667-16.24459876543210.577932098765473
49201199.658179012346206.75-7.091820987654321.34182098765433
50201201.565586419753205.25-3.68441358024691-0.565586419753117
51188190.463734567901203.916666666667-13.4529320987654-2.46373456790127
52198199.996141975309202.541666666667-2.54552469135802-1.99614197530863
53220218.403549382716200.7517.6535493827161.59645061728395
54225219.85725308642198.79166666666721.06558641975315.14274691358028
55215211.278549382716196.7514.52854938271613.72145061728395
56198196.746141975309194.7916666666671.954475308641981.25385802469137
57195194.371141975309192.7916666666671.579475308641960.62885802469134
58183183.695216049383190.666666666667-6.97145061728394-0.695216049382736
59180181.834104938272188.625-6.7908950617284-1.83410493827159
60170170.213734567901186.458333333333-16.2445987654321-0.213734567901213
61175177.116512345679184.208333333333-7.09182098765432-2.11651234567901
62180178.35725308642182.041666666667-3.684413580246911.64274691358023
63161166.172067901235179.625-13.4529320987654-5.17206790123456
64174174.287808641975176.833333333333-2.54552469135802-0.287808641975289
65195191.403549382716173.7517.6535493827163.59645061728395
66198191.440586419753170.37521.06558641975316.55941358024691
67188181.403549382716166.87514.52854938271616.59645061728395
68173165.079475308642163.1251.954475308641987.92052469135803
69162160.871141975309159.2916666666671.579475308641961.12885802469134
70149148.528549382716155.5-6.971450617283940.471450617283949
71140144.834104938272151.625-6.7908950617284-4.83410493827159
72129131.588734567901147.833333333333-16.2445987654321-2.58873456790124
73132137.408179012346144.5-7.09182098765432-5.40817901234567
74133137.98225308642141.666666666667-3.68441358024691-4.98225308641975
75116125.797067901235139.25-13.4529320987654-9.79706790123456
76128134.371141975309136.916666666667-2.54552469135802-6.37114197530863
77148152.236882716049134.58333333333317.653549382716-4.23688271604939
78154153.35725308642132.29166666666721.06558641975310.642746913580254
79152144.611882716049130.08333333333314.52854938271617.38811728395063
80141130.287808641975128.3333333333331.9544753086419810.7121913580247
81136128.537808641975126.9583333333331.579475308641967.4621913580247
82119118.861882716049125.833333333333-6.971450617283940.138117283950635
83114117.834104938272124.625-6.7908950617284-3.83410493827159
84100106.797067901235123.041666666667-16.2445987654321-6.79706790123458
85108114.366512345679121.458333333333-7.09182098765432-6.36651234567898
86115116.35725308642120.041666666667-3.68441358024691-1.35725308641975
87101105.672067901235119.125-13.4529320987654-4.67206790123456
88116116.121141975309118.666666666667-2.54552469135802-0.121141975308632
89131136.236882716049118.58333333333317.653549382716-5.23688271604938
90133139.773919753086118.70833333333321.0655864197531-6.77391975308643
91135133.153549382716118.62514.52854938271611.84645061728395
92124120.412808641975118.4583333333331.954475308641983.58719135802468
93131120.121141975309118.5416666666671.5794753086419610.8788580246914
94113111.986882716049118.958333333333-6.971450617283941.01311728395063
95118112.667438271605119.458333333333-6.79089506172845.33256172839508
9699103.547067901235119.791666666667-16.2445987654321-4.54706790123458
97107112.616512345679119.708333333333-7.09182098765432-5.616512345679
98112115.773919753086119.458333333333-3.68441358024691-3.77391975308642
99106105.922067901235119.375-13.45293209876540.0779320987654586
100121116.871141975309119.416666666667-2.545524691358024.12885802469137
101138136.820216049383119.16666666666717.6535493827161.17978395061729
102134139.648919753086118.58333333333321.0655864197531-5.64891975308642
103132132.320216049383117.79166666666714.5285493827161-0.320216049382694
104121118.746141975309116.7916666666671.954475308641982.25385802469137
105132117.537808641975115.9583333333331.5794753086419614.4621913580247
106113108.236882716049115.208333333333-6.971450617283944.76311728395062
107112107.500771604938114.291666666667-6.79089506172844.49922839506173
1089197.0887345679012113.333333333333-16.2445987654321-6.08873456790124
10996105.408179012346112.5-7.09182098765432-9.40817901234566
11099108.190586419753111.875-3.68441358024691-9.19058641975309
1119998.0054012345679111.458333333333-13.45293209876540.994598765432116
112110108.787808641975111.333333333333-2.545524691358021.2121913580247
113127129.111882716049111.45833333333317.653549382716-2.11188271604938
114122132.773919753086111.70833333333321.0655864197531-10.7739197530864
115124NANA14.5285493827161NA
116114NANA1.95447530864198NA
117129NANA1.57947530864196NA
118113NANA-6.97145061728394NA
119115NANA-6.7908950617284NA
12094NANA-16.2445987654321NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/01/t1278001933ua434gxm74bi5rd/1kl5k1278001831.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/01/t1278001933ua434gxm74bi5rd/1kl5k1278001831.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/01/t1278001933ua434gxm74bi5rd/2kl5k1278001831.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/01/t1278001933ua434gxm74bi5rd/2kl5k1278001831.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/01/t1278001933ua434gxm74bi5rd/3vc451278001831.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/01/t1278001933ua434gxm74bi5rd/3vc451278001831.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/01/t1278001933ua434gxm74bi5rd/4vc451278001831.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/01/t1278001933ua434gxm74bi5rd/4vc451278001831.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