Home » date » 2009 » Dec » 04 »

*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: Fri, 04 Dec 2009 15:40:18 -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/04/t12599664543vvmqek8ce5dwai.htm/, Retrieved Fri, 04 Dec 2009 23:40:59 +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/04/t12599664543vvmqek8ce5dwai.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 «
102.80 118.72 119.01 118.61 120.43 111.83 116.79 131.71 120.57 117.83 130.80 107.46 112.09 129.47 119.72 134.81 135.80 129.27 126.94 153.45 121.86 133.47 135.34 117.10 120.65 132.49 137.60 138.69 125.53 133.09 129.08 145.94 129.07 139.69 142.09 137.29 127.03 137.25 156.87 150.89 139.14 158.30 149.00 158.36 168.06 153.38 173.86 162.47 145.17 168.89 166.64 140.07 128.84 123.40 120.30 129.66 118.12 113.91 131.09 119.14 115.33
 
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
1102.8NANA0.91305423037476NA
2118.72NANA1.02683812043166NA
3119.01NANA1.04797023984225NA
4118.61NANA1.02408310415181NA
5120.43NANA0.961623699822525NA
6111.83NANA0.983786916052064NA
7116.79112.473451041067118.433750.949673982636431.03837838102217
8131.71126.544503019225119.268751.061003012266201.04081960778644
9120.57120.715449862084119.746251.008093780490700.998795101519728
10117.83120.215197698611120.4508333333330.9980437193483770.980158933776482
11130.8125.569087440401121.766251.031230636078561.04165764573293
12107.46122.468235837208123.1333333333330.9945985585046650.877452012478095
13112.09113.477042825814124.2829166666670.913054230374760.987776886044319
14129.47128.982847704288125.6116666666671.026838120431661.00377687657221
15119.72132.642903219633126.571251.047970239842250.90257373062594
16134.81130.341883886095127.2766666666671.024083104151811.03427997187619
17135.8123.200824362012128.11750.9616236998225251.10226535173958
18129.27126.621574320201128.7083333333330.9837869160520641.02091606974576
19126.94122.951124951996129.4666666666670.949673982636431.03244276983688
20153.45137.876457274816129.9491666666671.061003012266201.11295287848993
21121.86131.878828363793130.821.008093780490700.924030047217619
22133.47131.468972337364131.7266666666670.9980437193483771.01522053171224
23135.34135.566009098319131.4604166666671.031230636078560.998332848331064
24117.1130.483042554491131.1916666666670.9945985585046650.89743462221229
25120.65120.011848040458131.440.913054230374761.00531740798897
26132.49134.737847520091131.216251.026838120431660.983316881177312
27137.6137.497625355703131.203751.047970239842251.0007445557262
28138.69134.936603413389131.7633333333331.024083104151811.02781600019316
29125.53127.226421575394132.303750.9616236998225250.986666122064991
30133.09131.262999007892133.426250.9837869160520641.01391862905706
31129.08127.762806464021134.5333333333330.949673982636431.01030967910328
32145.94143.232754148407134.99751.061003012266201.01890102489259
33129.07137.099494029509135.998751.008093780490700.941433087799864
34139.69137.041383103726137.310.9980437193483771.01932713196765
35142.09142.707281253163138.3854166666671.031230636078560.995674493636606
36137.29139.246699103115140.0029166666670.9945985585046650.985947967774328
37127.03129.547177719672141.8833333333330.913054230374760.980569412904394
38137.25147.074879687860143.2308333333331.026838120431660.933198111678133
39156.87152.346490345734145.3729166666671.047970239842251.02969224721883
40150.89151.121810173215147.5679166666671.024083104151810.998466070695225
41139.14143.726281558182149.4620833333330.9616236998225250.968090167584793
42158.3149.373286398765151.8350.9837869160520641.05976111135029
43149145.907910692261153.640.949673982636431.02119206075304
44158.36165.213199885855155.7141666666671.061003012266200.958519053619265
45168.06158.713864761380157.4395833333331.008093780490701.05888669684070
46153.38157.087922909937157.3958333333330.9980437193483770.97639587537189
47173.86161.403922364699156.5158333333331.031230636078561.07717332672471
48162.47153.797261597973154.63250.9945985585046651.05639072056236
49145.17138.768264567932151.98250.913054230374761.04613256101458
50168.89153.605570133806149.5908333333331.026838120431661.09950439852461
51166.64153.332892333986146.3141666666671.047970239842251.08678573438130
52140.07146.022729717126142.588751.024083104151810.959234225187698
53128.84133.821557450010139.1620833333330.9616236998225250.962774626562904
54123.4133.376501232544135.5745833333330.9837869160520640.925200457799163
55120.3125.856335943878132.5258333333330.949673982636430.955851758259067
56129.66NANA1.06100301226620NA
57118.12NANA1.00809378049070NA
58113.91NANA0.998043719348377NA
59131.09NANA1.03123063607856NA
60119.14NANA0.994598558504665NA
61115.33NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599664543vvmqek8ce5dwai/13o6z1259966415.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599664543vvmqek8ce5dwai/13o6z1259966415.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599664543vvmqek8ce5dwai/2blmu1259966415.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599664543vvmqek8ce5dwai/2blmu1259966415.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599664543vvmqek8ce5dwai/3az6m1259966415.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599664543vvmqek8ce5dwai/3az6m1259966415.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599664543vvmqek8ce5dwai/41qds1259966415.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599664543vvmqek8ce5dwai/41qds1259966415.ps (open in new window)


 
Parameters (Session):
par1 = 36 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = MA ; par7 = 0.95 ;
 
Parameters (R input):
par1 = multiplicative ; par2 = 12 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = MA ; par7 = 0.95 ;
 
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