Home » date » 2010 » Aug » 13 »

Tijdreeks A-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: Fri, 13 Aug 2010 13:20:54 +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/13/t1281705746ud229ob2dqryfdi.htm/, Retrieved Fri, 13 Aug 2010 15:22:32 +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/13/t1281705746ud229ob2dqryfdi.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:
Cols Julien
 
Dataseries X:
» Textbox « » Textfile « » CSV «
356 355 354 352 372 371 356 346 347 347 348 350 353 351 348 351 370 370 351 335 330 328 332 334 343 334 336 343 365 364 351 326 320 312 315 316 319 311 315 322 336 339 317 295 291 283 285 289 296 283 285 289 306 306 283 258 255 248 244 249 258 252 246 249 267 284 261 235 229 218 218 229 237 231 229 233 245 256 224 194 192 178 170 187 192 182 178 186 204 224 194 173 178 168 152 163 172 170 156 155 178 194 164 135 139 135 109 121 131 135 119 121 151 169 135 105 112 105 82 81
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1356NANA0.999664410096985NA
2355NANA0.989005406058823NA
3354NANA0.971978608995618NA
4352NANA0.998217115416108NA
5372NANA1.10170869475212NA
6371NANA1.16917145924892NA
7356369.631996163271354.3751.043053251959850.963120086180934
8346338.291842596487354.0833333333330.9554017677471981.02278552549287
9347339.720334989182353.6666666666670.9605664514302981.02142840525296
10347331.680958881023353.3750.9386090099215361.04618607342025
11348322.820281661419353.250.9138578390981441.07799918335054
12350338.564238550025353.1250.9587659852744061.03377722791678
13353352.756578712974352.8750.9996644100969851.00069005456373
14351348.335945725635352.2083333333330.9890054060588231.00764794534430
15348341.20499086617351.0416666666670.9719786089956181.01991474133066
16351348.918474217739349.5416666666670.9982171154161081.00596565082124
17370383.486434831633348.0833333333331.101708694752120.964832042005464
18370405.410203494563346.751.169171459248920.912655865122947
19351360.548740760787345.6666666666671.043053251959850.973516089001896
20335329.175717395899344.5416666666670.9554017677471981.01769353660160
21330329.794481657736343.3333333333330.9605664514302981.00062317095553
22328321.473585898126342.50.9386090099215361.02030155629627
23332312.501303561603341.9583333333330.9138578390981441.06239556832618
24334327.41858397121341.50.9587659852744061.02010092386622
25343341.135479945596341.250.9996644100969851.00546562924121
26334337.127217790301340.8750.9890054060588230.990723923714025
27336330.553725275927340.0833333333330.9719786089956181.01647621644417
28343338.3956021260613390.9982171154161081.01360655352792
29365371.964398065684337.6251.101708694752120.981276707927155
30364393.036472217512336.1666666666671.169171459248920.926122702929609
31351348.814391676239334.4166666666671.043053251959851.00626582037874
32326317.631279368954332.4583333333330.9554017677471981.02634728118614
33320317.587283004142330.6250.9605664514302981.00759702017359
34312308.685038137945328.8750.9386090099215361.01073897809253
35315298.641126335281326.7916666666670.9138578390981441.05477769879006
36316311.159510804265324.5416666666670.9587659852744061.01555629517229
37319321.975245418737322.0833333333330.9996644100969850.990759397000015
38311315.863601560037319.3750.9890054060588230.984602209510638
39315307.995721725487316.8750.9719786089956181.02274147911949
40322313.897690418557314.4583333333330.9982171154161081.02581194391918
41336343.7331127626613121.101708694752120.97750256674282
42339362.004713069947309.6251.169171459248920.93645189623401
43317320.782335529818307.5416666666671.043053251959850.98820902802029
44295291.79562323279305.4166666666670.9554017677471981.01098157927014
45291291.051634783383030.9605664514302980.99982259236091
46283281.934681355181300.3750.9386090099215361.00377860091457
47285272.101171591472297.750.9138578390981441.04740453094371
48289282.955811404109295.1250.9587659852744061.02136089223931
49296292.235229218352292.3333333333330.9996644100969851.01288267260493
50283286.193439378272289.3750.9890054060588230.988841675108942
51285278.309875042412286.3333333333330.9719786089956181.02403840308063
52289282.869775081040283.3750.9982171154161081.02167154450207
53306308.707957175333280.2083333333331.101708694752120.99122809402093
54306323.665632302076276.8333333333331.169171459248920.94542011712387
55283285.361985515348273.5833333333331.043053251959850.991722844543983
56258258.635220210565270.7083333333330.9554017677471980.997543953178352
57255257.231690972605267.7916666666670.9605664514302980.991324198957885
58248248.262083124246264.50.9386090099215360.998944328828035
59244238.707283054428261.2083333333330.9138578390981441.02217241500908
60249248.000801524313258.6666666666670.9587659852744061.00402901309006
61258256.747142659909256.8333333333330.9996644100969851.00487973235889
62252252.155169986414254.9583333333330.9890054060588230.99938462500522
63246245.829589858475252.9166666666670.9719786089956181.00069320435194
64249250.136572171353250.5833333333330.9982171154161080.995456193544643
65267273.499183472213248.251.101708694752120.976236918188557
66284288.005902794984246.3333333333331.169171459248920.98609090037354
67261255.156901760678244.6251.043053251959851.02290002033652
68235232.043204341601242.8750.9554017677471981.01274243590451
69229231.776680009702241.2916666666670.9605664514302980.988020019919234
70218225.187944963675239.9166666666670.9386090099215360.968080240863539
71218217.802784985058238.3333333333330.9138578390981441.00090547517543
72229226.508464021078236.250.9587659852744061.01099974780055
73237233.4632924414233.5416666666670.9996644100969851.01514888067248
74231227.75970330363230.2916666666670.9890054060588231.01422682173084
75229220.679643350714227.0416666666670.9719786089956181.03770332651872
76233223.434264333972223.8333333333330.9982171154161081.04281230407763
77245242.559530961258220.1666666666671.101708694752121.01006131991215
78256253.028189972454216.4166666666671.169171459248921.01174497603556
79224221.953039906623212.7916666666671.043053251959851.00922249181286
80194199.559544238196208.8750.9554017677471980.9721409253593
81192196.635957328211204.7083333333330.9605664514302980.976423654192237
82178188.308432615508200.6250.9386090099215360.945257721747618
83170179.991916892372196.9583333333330.9138578390981440.944486857716246
84187185.920703977795193.9166666666670.9587659852744061.00580514164971
85192191.269123798556191.3333333333330.9996644100969851.00382119281423
86182187.128064538047189.2083333333330.9890054060588230.972595962285476
87178182.488983838927187.750.9719786089956180.975401343442794
88186186.417046303958186.750.9982171154161080.997762831714016
89204204.458771934414185.5833333333331.101708694752120.997756164090817
90224214.932686591926183.8333333333331.169171459248921.04218675880272
91194189.8356918566921821.043053251959851.02193638141794
92173172.609252706327180.6666666666670.9554017677471981.00226376794724
93178172.181536418881179.250.9605664514302981.03379261041651
94168166.172903464859177.0416666666670.9386090099215361.01099515322321
95152159.620502562476174.6666666666670.9138578390981440.95225862317096
96163165.227338128956172.3333333333330.9587659852744060.986519554486694
97172169.776338981471169.8333333333330.9996644100969851.01309759081783
98170165.1639028118231670.9890054060588231.02928059403928
99156159.201996331741163.7916666666670.9719786089956180.979887209925003
100155160.504993682948160.7916666666670.9982171154161080.96570204106034
101178173.656833010303157.6251.101708694752121.02501005525904
102194180.149835679271154.0833333333331.169171459248921.07688135972207
103164157.109896076452150.6251.043053251959851.04385531462764
104135140.881952335722147.4583333333330.9554017677471980.958249071380658
105139138.761828629535144.4583333333330.9605664514302981.00171640409194
106135132.813174903897141.50.9386090099215361.01646542293477
107109126.988162224680138.9583333333330.9138578390981440.858347723838595
108121131.151197068995136.7916666666670.9587659852744060.922599280099178
109131134.496515841798134.5416666666670.9996644100969850.974002926247463
110135130.631130716936132.0833333333330.9890054060588231.03344431958207
111119126.073725408473129.7083333333330.9719786089956180.94389215210739
112121127.106312696318127.3333333333330.9982171154161080.951959013153761
113151137.667682315067124.9583333333331.101708694752121.09684420817386
114169142.833779938243122.1666666666671.169171459248921.18319349997648
115135NANA1.04305325195985NA
116105NANA0.955401767747198NA
117112NANA0.960566451430298NA
118105NANA0.938609009921536NA
11982NANA0.913857839098144NA
12081NANA0.958765985274406NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281705746ud229ob2dqryfdi/1az821281705651.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281705746ud229ob2dqryfdi/1az821281705651.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t1281705746ud229ob2dqryfdi/2az821281705651.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281705746ud229ob2dqryfdi/2az821281705651.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t1281705746ud229ob2dqryfdi/328751281705651.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281705746ud229ob2dqryfdi/328751281705651.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t1281705746ud229ob2dqryfdi/4vh6q1281705651.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281705746ud229ob2dqryfdi/4vh6q1281705651.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