Home » date » 2010 » Aug » 16 »

Classical_Decomposition_Reeks_B_Jeroen_Kinne

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 16 Aug 2010 15:14:53 +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/16/t12819719308avxechb3di7h4s.htm/, Retrieved Mon, 16 Aug 2010 17:18:51 +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/16/t12819719308avxechb3di7h4s.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:
Jeroen_Kinne
 
Dataseries X:
» Textbox « » Textfile « » CSV «
430 429 428 426 424 423 424 426 427 427 428 430 432 435 426 411 405 403 402 399 392 387 380 379 386 385 365 356 338 338 343 338 320 316 317 315 317 321 303 303 290 285 300 291 278 273 277 269 275 278 255 254 245 240 261 247 229 213 218 206 217 219 196 193 188 171 190 180 149 135 151 134 145 151 137 124 125 109 131 133 103 85 104 82
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1430NANA1.02692740276108NA
2429NANA1.05845208192879NA
3428NANA1.00352682637368NA
4426NANA0.99314617753391NA
5424NANA0.985689219406246NA
6423NANA0.961430830072772NA
7424442.197401121241426.9166666666671.035793248771210.95884778817085
8426437.626910989946427.251.024287679321110.973431910383105
9427417.392634992478427.4166666666670.9765474010352391.02301757195044
10427409.065762426125426.7083333333330.9586542621059461.04384194235056
11428423.659264815661425.2916666666670.9961616886034941.01024581673253
12430414.932008143991423.6666666666670.9793831820865251.03631436370361
13432433.277786681611421.9166666666671.026927402761080.99705088347271
14435444.417567899851419.8751.058452081928790.978809190769945
15426418.763381922185417.2916666666671.003526826373681.0172809237632
16411411.328041861961414.1666666666670.993146177533910.999202481162053
17405404.625424566264410.50.9856892194062461.00092573380464
18403390.701453570823406.3750.9614308300727721.03147811792553
19402416.734150422282402.3333333333331.035793248771210.964643765318125
20399408.007925596244398.3333333333331.024287679321110.977922179861874
21392384.474849682582393.7083333333330.9765474010352391.01957254245273
22387372.79667617645388.8750.9586542621059461.03809938427892
23380382.318554738616383.7916666666670.9961616886034940.993935542207202
24379370.492496256815378.2916666666670.9793831820865251.02296268839218
25386383.172287155227373.1251.026927402761081.00737974258464
26385389.642672660036368.1251.058452081928790.988084794131143
27365363.862101795991362.5833333333331.003526826373681.00312727870914
28356354.18075556303356.6250.993146177533911.00513648584344
29338346.017986395734351.0416666666670.9856892194062460.976827833491394
30338332.414709497661345.750.9614308300727721.01680217614551
31343352.385494842371340.2083333333331.035793248771210.973365830944407
32338342.794943346133334.6666666666671.024287679321110.98601221097567
33320321.690989691025329.4166666666670.9765474010352390.994743434708417
34316311.203139836143324.6250.9586542621059461.01541391955873
35317319.186807723369320.4166666666670.9961616886034940.993148815457108
36315309.689123702277316.2083333333330.9793831820865251.01714905655786
37317320.615292870364312.2083333333331.026927402761080.9887238913715
38321326.488365104951308.4583333333331.058452081928790.983189706918998
39303305.82480033738304.751.003526826373680.990763337916795
40303299.14390489136301.2083333333330.993146177533911.01289043515709
41290293.48896507821297.750.9856892194062460.988112108142532
42285282.820902513074294.1666666666670.9614308300727721.00770486717058
43300300.897938768035290.51.035793248771210.997015802860891
44291293.927885311855286.9583333333331.024287679321110.990038763049827
45278276.525672393145283.1666666666670.9765474010352391.00533161204924
46273267.584370910322279.1250.9586542621059461.02023895891697
47277274.151998051087275.2083333333330.9961616886034941.01038840485993
48269265.861726303905271.4583333333330.9793831820865251.011804157521
49275275.173755298187267.9583333333331.026927402761080.999368561518527
50278279.960575670165264.51.058452081928790.992996957998562
51255261.544179123641260.6251.003526826373680.97497868564474
52254254.328183630142256.0833333333330.993146177533910.998709605732808
53245247.531205223394251.1250.9856892194062460.989774197474984
54240236.552043815822246.0416666666670.9614308300727721.01457588836925
55261249.6261729538612411.035793248771211.04556343956866
56247241.859928279698236.1251.024287679321111.02125226678459
57229225.785897014356231.2083333333330.9765474010352391.01423518044371
58213216.855582873883226.2083333333330.9586542621059460.982220504435319
59218220.442280340548221.2916666666670.9961616886034940.988920998563546
60206211.587574963276216.0416666666670.9793831820865250.973592140444702
61217215.868697788735210.2083333333331.026927402761081.00524069595478
62219216.409348584357204.4583333333331.058452081928791.01197106979245
63196199.032820564114198.3333333333331.003526826373680.984762208787888
64193190.435779542127191.750.993146177533911.01346501410627
65188183.050702120568185.7083333333330.9856892194062461.02703785247528
66171172.97743017726179.9166666666670.9614308300727720.9885682763628
67190180.141709182126173.9166666666671.035793248771211.05472519863741
68180172.165687432557168.0833333333331.024287679321111.04550449444528
69149158.973778993528162.7916666666670.9765474010352390.937261483895818
70135150.948102354099157.4583333333330.9586542621059460.894347115959847
71151151.375069930706151.9583333333330.9961616886034940.997522247680033
72134143.724481971198146.750.9793831820865250.932339418881007
73145145.524170699601141.7083333333331.026927402761080.996398050598187
74151145.316650414807137.2916666666671.058452081928791.03911010588924
75137133.887204085356133.4166666666671.003526826373681.02324939067859
76124128.52966780918129.4166666666670.993146177533910.964757803498684
77125123.580785883058125.3750.9856892194062461.01148410011152
78109116.573488146324121.250.9614308300727720.935032499526674
79131NANA1.03579324877121NA
80133NANA1.02428767932111NA
81103NANA0.976547401035239NA
8285NANA0.958654262105946NA
83104NANA0.996161688603494NA
8482NANA0.979383182086525NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/16/t12819719308avxechb3di7h4s/11vo71281971689.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t12819719308avxechb3di7h4s/11vo71281971689.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/16/t12819719308avxechb3di7h4s/21vo71281971689.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t12819719308avxechb3di7h4s/21vo71281971689.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/16/t12819719308avxechb3di7h4s/3u45r1281971689.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t12819719308avxechb3di7h4s/3u45r1281971689.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/16/t12819719308avxechb3di7h4s/4u45r1281971689.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t12819719308avxechb3di7h4s/4u45r1281971689.ps (open in new window)


 
Parameters (Session):
par1 = 4 ;
 
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