Home » date » 2010 » Aug » 04 »

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: Wed, 04 Aug 2010 11:53:12 +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/04/t12809227703lbh0ylqvhekf0m.htm/, Retrieved Wed, 04 Aug 2010 13:52:56 +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/04/t12809227703lbh0ylqvhekf0m.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:
Bogaerts Yannik
 
Dataseries X:
» Textbox « » Textfile « » CSV «
442 441 440 438 458 457 442 432 433 433 434 436 439 439 441 436 460 453 435 421 412 408 402 409 410 410 416 410 437 431 411 398 394 395 389 404 397 401 402 383 406 400 377 372 362 365 361 372 355 365 367 341 370 366 333 320 298 306 293 313 293 304 304 286 320 313 283 272 251 262 247 268 251 257 261 242 274 272 243 234 217 231 209 226 208 214 222 194 230 226 197 188 175 190 165 176 159 169 170 141 170 164 132 123 113 125 101 99 87 90 89 66 102 97 65 54 33 49 30 34
 
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
1442NANA-7.96450617283951NA
2441NANA1.08641975308642NA
3440NANA7.24382716049382NA
4438NANA-8.34876543209876NA
5458NANA25.2993827160494NA
6457NANA23.8086419753086NA
7442440.66975308642440.3750.2947530864197411.33024691358025
8432433.396604938272440.166666666667-6.77006172839505-1.39660493827159
9433424.938271604938440.125-15.18672839506178.06172839506178
10433434.910493827160440.083333333333-5.17283950617283-1.91049382716045
11434425.614197530864440.083333333333-14.46913580246918.3858024691359
12436440.1790123456794400.179012345679010-4.17901234567893
13439431.577160493827439.541666666667-7.964506172839517.42283950617286
14439439.878086419753438.7916666666671.08641975308642-0.878086419753004
15441444.702160493827437.4583333333337.24382716049382-3.70216049382708
16436427.192901234568435.541666666667-8.348765432098768.8070987654321
17460458.466049382716433.16666666666725.29938271604941.53395061728406
18453454.516975308642430.70833333333323.8086419753086-1.51697530864192
19435428.66975308642428.3750.2947530864197416.33024691358031
20421419.188271604938425.958333333333-6.770061728395051.81172839506178
21412408.521604938272423.708333333333-15.18672839506173.47839506172846
22408416.410493827160421.583333333333-5.17283950617283-8.41049382716045
23402405.072530864198419.541666666667-14.4691358024691-3.07253086419752
24409417.845679012346417.6666666666670.179012345679010-8.84567901234556
25410407.785493827160415.75-7.964506172839512.21450617283955
26410414.878086419753413.7916666666671.08641975308642-4.87808641975306
27416419.327160493827412.0833333333337.24382716049382-3.32716049382714
28410402.442901234568410.791666666667-8.348765432098767.5570987654321
29437435.007716049383409.70833333333325.29938271604941.99228395061732
30431432.766975308642408.95833333333323.8086419753086-1.76697530864203
31411408.503086419753408.2083333333330.2947530864197412.49691358024688
32398400.521604938272407.291666666667-6.77006172839505-2.52160493827159
33394391.146604938272406.333333333333-15.18672839506172.85339506172835
34395399.452160493827404.625-5.17283950617283-4.45216049382719
35389387.739197530864402.208333333333-14.46913580246911.26080246913580
36404399.804012345679399.6250.1790123456790104.19598765432107
37397388.952160493827396.916666666667-7.964506172839518.04783950617286
38401395.503086419753394.4166666666671.086419753086425.49691358024688
39402399.2438271604943927.243827160493822.75617283950612
40383381.067901234568389.416666666667-8.348765432098761.9320987654321
41406412.29938271604938725.2993827160494-6.29938271604937
42400408.308641975309384.523.8086419753086-8.3086419753086
43377381.711419753086381.4166666666670.294753086419741-4.71141975308643
44372371.396604938272378.166666666667-6.770061728395050.603395061728406
45362360.021604938272375.208333333333-15.18672839506171.97839506172841
46365366.827160493827372-5.17283950617283-1.82716049382714
47361354.280864197531368.75-14.46913580246916.71913580246911
48372366.012345679012365.8333333333330.1790123456790105.98765432098759
49355354.618827160494362.583333333333-7.964506172839510.381172839506121
50365359.66975308642358.5833333333331.086419753086425.3302469135802
51367360.993827160494353.757.243827160493826.00617283950623
52341340.276234567901348.625-8.348765432098760.723765432098787
53370368.632716049383343.33333333333325.29938271604941.36728395061732
54366361.850308641975338.04166666666723.80864197530864.14969135802471
55333333.294753086423330.294753086419741-0.294753086419746
56320321.104938271605327.875-6.77006172839505-1.10493827160491
57298307.521604938272322.708333333333-15.1867283950617-9.52160493827165
58306312.618827160494317.791666666667-5.17283950617283-6.61882716049382
59293298.947530864198313.416666666667-14.4691358024691-5.94753086419757
60313309.304012345679309.1250.1790123456790103.69598765432102
61293296.868827160494304.833333333333-7.96450617283951-3.86882716049382
62304301.836419753086300.751.086419753086422.16358024691363
63304304.035493827161296.7916666666677.24382716049382-0.0354938271605079
64286284.651234567901293-8.348765432098761.34876543209873
65320314.549382716049289.2525.29938271604945.45061728395063
66313309.266975308642285.45833333333323.80864197530863.73302469135797
67283282.128086419753281.8333333333330.2947530864197410.87191358024694
68272271.354938271605278.125-6.770061728395050.645061728395035
69251259.188271604938274.375-15.1867283950617-8.18827160493828
70262265.577160493827270.75-5.17283950617283-3.57716049382719
71247252.530864197531267-14.4691358024691-5.53086419753089
72268263.554012345679263.3750.1790123456790104.44598765432102
73251252.035493827160260-7.96450617283951-1.03549382716051
74257257.836419753086256.751.08641975308642-0.836419753086403
75261260.993827160494253.757.243827160493820.00617283950617775
76242242.692901234568251.041666666667-8.34876543209876-0.692901234567898
77274273.466049382716248.16666666666725.29938271604940.533950617283978
78272268.641975308642244.83333333333323.80864197530863.35802469135808
79243241.586419753086241.2916666666670.2947530864197411.41358024691360
80234230.938271604938237.708333333333-6.770061728395053.06172839506172
81217219.104938271605234.291666666667-15.1867283950617-2.10493827160494
82231225.493827160494230.666666666667-5.172839506172835.50617283950615
83209212.364197530864226.833333333333-14.4691358024691-3.36419753086417
84226223.262345679012223.0833333333330.1790123456790102.73765432098764
85208211.285493827160219.25-7.96450617283951-3.28549382716048
86214216.503086419753215.4166666666671.08641975308642-2.50308641975306
87222218.993827160494211.757.243827160493823.00617283950618
88194199.942901234568208.291666666667-8.34876543209876-5.9429012345679
89230230.049382716049204.7525.2993827160494-0.049382716049422
90226224.641975308642200.83333333333323.80864197530861.35802469135803
91197197.003086419753196.7083333333330.294753086419741-0.00308641975306045
92188186.021604938272192.791666666667-6.770061728395051.97839506172841
93175173.563271604938188.75-15.18672839506171.43672839506175
94190179.202160493827184.375-5.1728395061728310.7978395061728
95165165.197530864198179.666666666667-14.4691358024691-0.197530864197518
96176174.762345679012174.5833333333330.1790123456790101.23765432098767
97159161.327160493827169.291666666667-7.96450617283951-2.32716049382717
98169164.961419753086163.8751.086419753086424.03858024691357
99170165.827160493827158.5833333333337.243827160493824.17283950617286
100141144.942901234568153.291666666667-8.34876543209876-3.9429012345679
101170173.216049382716147.91666666666725.2993827160494-3.21604938271605
102164165.850308641975142.04166666666723.8086419753086-1.85030864197532
103132136.128086419753135.8333333333330.294753086419741-4.12808641975309
104123122.771604938272129.541666666667-6.770061728395050.228395061728349
105113107.688271604938122.875-15.18672839506175.31172839506172
106125111.202160493827116.375-5.1728395061728313.7978395061728
10710195.9475308641975110.416666666667-14.46913580246915.05246913580247
10899104.970679012346104.7916666666670.179012345679010-5.97067901234567
1098791.243827160493899.2083333333333-7.96450617283951-4.24382716049382
1109094.628086419753193.54166666666671.08641975308642-4.62808641975309
1118994.577160493827287.33333333333337.24382716049382-5.57716049382715
1126672.484567901234680.8333333333333-8.34876543209876-6.48456790123457
113102100.00771604938374.708333333333325.29938271604941.99228395061728
1149792.850308641975369.041666666666723.80864197530864.14969135802471
11565NANA0.294753086419741NA
11654NANA-6.77006172839505NA
11733NANA-15.1867283950617NA
11849NANA-5.17283950617283NA
11930NANA-14.4691358024691NA
12034NANA0.179012345679010NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/04/t12809227703lbh0ylqvhekf0m/1z17o1280922790.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/04/t12809227703lbh0ylqvhekf0m/1z17o1280922790.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/04/t12809227703lbh0ylqvhekf0m/2z17o1280922790.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/04/t12809227703lbh0ylqvhekf0m/2z17o1280922790.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/04/t12809227703lbh0ylqvhekf0m/3as691280922790.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/04/t12809227703lbh0ylqvhekf0m/3as691280922790.ps (open in new window)


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