Home » date » 2010 » Jan » 15 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 15 Jan 2010 02:12:07 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/15/t1263546788h5nt58zft9xkqvi.htm/, Retrieved Fri, 15 Jan 2010 10:13:13 +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/2010/Jan/15/t1263546788h5nt58zft9xkqvi.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
104.0 99.0 105.4 107.1 110.7 117.1 118.7 126.5 127.5 134.6 131.8 135.9 142.7 141.7 153.4 145.0 137.7 148.3 152.2 169.4 168.6 161.1 174.1 179.0 190.6 190.0 181.6 174.8 180.5 196.8 193.8 197.0 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.0 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.0 159.7 163.4 157.6 166.2 176.7 198.3 226.2 216.2 235.9
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1104NANA1.07536671520055NA
299NANA1.02963575865129NA
3105.4NANA0.974669573580213NA
4107.1NANA0.928468928421948NA
5110.7NANA0.89515699042328NA
6117.1NANA0.912413213065011NA
7118.7110.542129097104119.8041666666670.9226901882692221.07379874957655
8126.5123.557401164046123.1958333333331.002934903080161.02381564202736
9127.5131.777042987223126.9751.037818806751120.967543337668931
10134.6136.297302959724130.5541666666671.043990448100520.987547053955827
11131.8143.656661600067133.2583333333331.078031354637490.917465285159725
12135.9149.091983640802135.6833333333331.098823119819200.911517820618815
13142.7148.808349910523138.3791666666671.075366715200550.958951564786548
14141.7145.757812084073141.56251.029635758651290.972160585933242
15153.4141.388005017480145.06250.9746695735802131.08495766653639
16145137.301211410931147.8791666666670.9284689284219481.05607225537164
17137.7134.941186485516150.7458333333330.895156990423281.02044456245225
18148.3140.789160497652154.3041666666670.9124132130650111.05334813756825
19152.2145.873474222913158.0958333333330.9226901882692221.04336995338453
20169.4162.579926684723162.1041666666671.002934903080161.04194904902684
21168.6171.542800265903165.2916666666671.037818806751120.98284509602652
22161.1175.085898066859167.7083333333331.043990448100520.920119791363677
23174.1184.055886615107170.7333333333331.078031354637490.945908349913704
24179191.785840275444174.53751.098823119819200.933332720199359
25190.6191.728923930965178.2916666666671.075366715200550.994111874683179
26190186.544258573647181.1751.029635758651291.01852504844038
27181.6179.643785780503184.31250.9746695735802131.01088940656087
28174.8175.306539547669188.81250.9284689284219480.997110549617966
29180.5172.899572700256193.150.895156990423281.04395862396329
30196.8179.825239129950197.08750.9124132130650111.09439587541870
31193.8185.214677125242200.7333333333330.9226901882692221.04635336145069
32197203.453702880668202.8583333333331.002934903080160.968279255726038
33216.3211.792872987734204.0751.037818806751121.02128082474488
34221.4214.748835174278205.71.043990448100521.03097183190924
35217.9224.041866277536207.8251.078031354637490.97258607786311
36229.7229.319806676602208.6958333333331.098823119819201.00165791751226
37227.4224.500724576701208.7666666666671.075366715200551.01291432546049
38204.2215.867426950237209.6541666666671.029635758651290.945950961128902
39196.6205.184189731528210.5166666666670.9746695735802130.958163493284937
40198.8195.829571486329210.9166666666670.9284689284219481.01516843697878
41207.5189.389110428012211.5708333333330.895156990423281.09562793515983
42190.7194.089299027533212.7208333333330.9124132130650110.98253742455398
43201.6197.105846926561213.6208333333330.9226901882692221.02280070907847
44210.5216.475141038992215.8416666666671.002934903080160.972398026811235
45223.5228.981746974549220.63751.037818806751120.9760603321139
46223.8237.212029649241227.2166666666671.043990448100520.943459740768322
47231.2252.34018933677234.0751.078031354637490.916223454566102
48244265.471087318654241.5958333333331.098823119819200.919120806956725
49234.7269.455533966731250.5708333333331.075366715200550.87101569800744
50250.2268.035638721903260.3208333333331.029635758651290.93345795802771
51265.7263.778075596591270.6333333333330.9746695735802131.00728614157587
52287.6262.246048832779282.450.9284689284219481.09668001207289
53283.3265.343181065427296.4208333333330.895156990423281.06767394158188
54295.4283.59323350749310.8166666666670.9124132130650111.04163275105856
55312.3298.228847018417323.2166666666670.9226901882692221.04718240077129
56333.8332.510530429937331.53751.002934903080161.00387798115264
57347.7346.039059886019333.4291666666671.037818806751121.00479986309791
58383.2342.750764031803328.3083333333331.043990448100521.11801355449187
59407.1344.035739643311319.1333333333331.078031354637491.18330729366104
60413.6338.968618745560308.4833333333331.098823119819201.22017194845538
61362.7318.886557308783296.53751.075366715200551.13739507573156
62321.9291.498463572169283.1083333333331.029635758651291.10429398513898
63239.4262.1861152930772690.9746695735802130.913091830711148
64191235.989721261113254.1708333333330.9284689284219480.809357284627943
65159.7213.879113757676238.9291666666670.895156990423280.746683475511964
66163.4203.620215382342223.1666666666670.9124132130650110.802474350069715
67157.6193.449687055545209.6583333333330.9226901882692220.814682113984236
68166.2NANA1.00293490308016NA
69176.7NANA1.03781880675112NA
70198.3NANA1.04399044810052NA
71226.2NANA1.07803135463749NA
72216.2NANA1.09882311981920NA
73235.9NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263546788h5nt58zft9xkqvi/1eo3e1263546719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263546788h5nt58zft9xkqvi/1eo3e1263546719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/15/t1263546788h5nt58zft9xkqvi/2qrkh1263546719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263546788h5nt58zft9xkqvi/2qrkh1263546719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/15/t1263546788h5nt58zft9xkqvi/3is7b1263546719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263546788h5nt58zft9xkqvi/3is7b1263546719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/15/t1263546788h5nt58zft9xkqvi/4uwfr1263546719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263546788h5nt58zft9xkqvi/4uwfr1263546719.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