Home » date » 2009 » Dec » 09 »

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 09 Dec 2009 09:07:46 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374939iq4kxnwfk5otmtw.htm/, Retrieved Wed, 09 Dec 2009 17:09:04 +0100
 
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/2009/Dec/09/t1260374939iq4kxnwfk5otmtw.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
153.4 145 137.7 148.3 152.2 169.4 168.6 161.1 174.1 179 190.6 190 181.6 174.8 180.5 196.8 193.8 197 216.3 221.4 217.9 229.7 227.4 204.2 196.6 198.8 207.5 190.7 201.6 210.5 223.5 223.8 231.2 244 234.7 250.2 265.7 287.6 283.3 295.4 312.3 333.8 347.7 383.2 407.1 413.6 362.7 321.9 239.4 191 159.7 163.4 157.6 166.2 176.7 198.3 226.2 216.2 235.9 226.9
 
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
1153.4NANA0.95714564467741NA
2145NANA0.91854708876129NA
3137.7NANA0.893643458283059NA
4148.3NANA0.903290503909825NA
5152.2NANA0.915789291918695NA
6169.4NANA0.95501459237464NA
7168.6172.597249064462165.2916666666671.044198128950610.97684059806209
8161.1177.381286982606167.7083333333331.057677239150940.908213051897618
9174.1186.722617678812170.7333333333331.093650630684180.93239909639375
10179197.288756282014174.53751.130351679621940.90729955104045
11190.6194.381536205865178.2916666666671.090244652708750.980545805534431
12190188.503001342085181.1751.040447088958661.00794151099588
13181.6176.413906634605184.31250.957145644677411.02939730469286
14174.8173.433172196741188.81250.918547088761291.00788100561125
15180.5172.607233967373193.150.8936434582830591.04572673955322
16196.8178.027267189328197.08750.9032905039098251.10544863776799
17193.8183.829437197813200.7333333333330.9157892919186951.05423811851993
18197193.732668518132202.8583333333330.955014592374641.01686515499353
19216.3213.094733165596204.0751.044198128950611.01504151128838
20221.4217.564208093349205.71.057677239150941.01763062012942
21217.9227.287942321939207.8251.093650630684180.958695818942116
22229.7235.899685738433208.6958333333331.130351679621940.973718974151973
23227.4227.606741997164208.7666666666671.090244652708750.99909167015287
24204.2218.134067396386209.6541666666671.040447088958660.936121544137047
25196.6201.495110632006210.5166666666670.957145644677410.975706057498606
26198.8193.736890137902210.9166666666670.918547088761291.02613394825577
27207.5189.068891171829211.5708333333330.8936434582830591.09748356122436
28190.7192.148708733784212.7208333333330.9032905039098250.992460481554463
29201.6195.631671697415213.6208333333330.9157892919186951.03050798600656
30210.5206.131941309130215.8416666666670.955014592374641.02119059599948
31223.5230.389264676341220.63751.044198128950610.970097284324342
32223.8240.32189668908227.2166666666671.057677239150940.931250972480233
33231.2255.996271377399234.0751.093650630684180.903138154145834
34244273.088255997995241.5958333333331.130351679621940.89348404642414
35234.7273.183511166443250.5708333333331.090244652708750.859129451107333
36250.2270.850053236958260.3208333333331.040447088958660.923758356366678
37265.7259.035516304530270.6333333333330.957145644677411.02572806922598
38287.6259.443625220626282.450.918547088761291.10852598423041
39283.3264.894538607146296.4208333333330.8936434582830591.06948222296176
40295.4280.757743456905310.8166666666670.9032905039098251.05215263651434
41312.3295.998362302988323.2166666666670.9157892919186951.05507340503569
42333.8316.623150419407331.53750.955014592374641.05425013792529
43347.7348.166111970895333.4291666666671.044198128950610.998661236820963
44383.2347.244251590248328.3083333333331.057677239150941.10354598598850
45407.1349.020371272344319.1333333333331.093650630684181.16640756101407
46413.6348.694653968707308.4833333333331.130351679621941.18613805887921
47362.7323.298423702622296.53751.090244652708751.12187370370114
48321.9294.559241276604283.1083333333331.040447088958661.09281921899616
49239.4257.4721784182232690.957145644677410.929809199078326
50191233.467879006364254.1708333333330.918547088761290.818099692398342
51159.7213.517486784689238.9291666666670.8936434582830590.747948106756432
52163.4201.584330789209223.1666666666670.9032905039098250.810578874658976
53157.6192.002856628187209.6583333333330.9157892919186950.82082112093359
54166.2191.400841221751200.4166666666670.955014592374640.868334741577473
55176.7NANA1.04419812895061NA
56198.3NANA1.05767723915094NA
57226.2NANA1.09365063068418NA
58216.2NANA1.13035167962194NA
59235.9NANA1.09024465270875NA
60226.9NANA1.04044708895866NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374939iq4kxnwfk5otmtw/1hut81260374863.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374939iq4kxnwfk5otmtw/1hut81260374863.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374939iq4kxnwfk5otmtw/2rmea1260374863.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374939iq4kxnwfk5otmtw/2rmea1260374863.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374939iq4kxnwfk5otmtw/3w3vs1260374863.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374939iq4kxnwfk5otmtw/3w3vs1260374863.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374939iq4kxnwfk5otmtw/4fqc91260374863.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374939iq4kxnwfk5otmtw/4fqc91260374863.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