Home » date » 2009 » Jun » 02 »

Classical decomposition - King size sigarets - Vincent Bruyninckx

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 01 Jun 2009 16:44:48 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/02/t124389632332ym2dze3ggth0t.htm/, Retrieved Tue, 02 Jun 2009 00:45:27 +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/2009/Jun/02/t124389632332ym2dze3ggth0t.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 «
2.98 2.98 2.98 3.03 3.07 3.08 3.08 3.08 3.08 3.08 3.08 3.08 3.08 3.08 3.12 3.15 3.15 3.15 3.15 3.16 3.19 3.2 3.2 3.2 3.21 3.21 3.21 3.21 3.21 3.28 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.45 3.49 3.5 3.54 3.64 3.67 3.67 3.68 3.68 3.68 3.68 3.7 3.83 3.87 3.87 3.87 3.87 3.87 3.87 3.87 3.87 3.87 3.88 3.88 3.88 3.88 3.88 3.88 3.89 3.89 3.91 3.95 3.99 3.99 3.99
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
12.98NANA-0.038298611111111NA
22.98NANA0.00403472222222222NA
32.98NANA0.0138680555555555NA
43.03NANA0.0070347222222218NA
53.07NANA-0.000131944444444739NA
63.08NANA0.0207013888888887NA
73.083.081284722222223.054166666666670.0271180555555554-0.00128472222222165
83.083.076618055555563.06250.01411805555555570.00338194444444495
93.083.079618055555563.07250.00711805555555560.000381944444444837
103.083.077868055555563.08333333333333-0.005465277777777480.00213194444444431
113.083.072368055555563.09166666666667-0.01929861111111080.00763194444444393
123.083.067118055555563.09791666666667-0.03079861111111090.0128819444444441
133.083.065451388888893.10375-0.0382986111111110.0145486111111106
143.083.114034722222223.110.00403472222222222-0.0340347222222226
153.123.131784722222223.117916666666670.0138680555555555-0.0117847222222225
163.153.134534722222223.12750.00703472222222180.0154652777777775
173.153.137368055555563.1375-0.0001319444444447390.0126319444444443
183.153.168201388888893.14750.0207013888888887-0.018201388888889
193.153.185034722222223.157916666666670.0271180555555554-0.0350347222222220
203.163.182868055555563.168750.0141180555555557-0.0228680555555552
213.193.185034722222223.177916666666670.00711805555555560.004965277777778
223.23.178701388888893.18416666666667-0.005465277777777480.0212986111111109
233.23.169868055555563.18916666666667-0.01929861111111080.0301319444444443
243.23.166284722222223.19708333333333-0.03079861111111090.0337152777777781
253.213.170451388888893.20875-0.0382986111111110.0395486111111114
263.213.224868055555563.220833333333330.00403472222222222-0.0148680555555556
273.213.245118055555563.231250.0138680555555555-0.0351180555555555
283.213.247034722222223.240.0070347222222218-0.0370347222222223
293.213.248201388888893.24833333333333-0.000131944444444739-0.038201388888889
303.283.277368055555563.256666666666670.02070138888888870.00263194444444448
313.33.291701388888893.264583333333330.02711805555555540.00829861111111097
323.33.292451388888893.278333333333330.01411805555555570.00754861111111094
333.33.307118055555563.30.0071180555555556-0.00711805555555545
343.33.318284722222223.32375-0.00546527777777748-0.0182847222222224
353.33.330284722222223.34958333333333-0.0192986111111108-0.0302847222222224
363.33.347534722222223.37833333333333-0.0307986111111109-0.0475347222222218
373.33.370451388888893.40875-0.038298611111111-0.0704513888888889
383.453.443618055555563.439583333333330.004034722222222220.00638194444444506
393.493.484701388888893.470833333333330.01386805555555550.00529861111111174
403.53.509534722222223.50250.0070347222222218-0.00953472222222196
413.543.534034722222223.53416666666667-0.0001319444444447390.00596527777777833
423.643.586534722222223.565833333333330.02070138888888870.0534652777777787
433.673.625451388888893.598333333333330.02711805555555540.0445486111111113
443.673.644951388888893.630833333333330.01411805555555570.0250486111111119
453.683.669618055555563.66250.00711805555555560.0103819444444451
463.683.688284722222223.69375-0.00546527777777748-0.0082847222222222
473.683.703618055555563.72291666666667-0.0192986111111108-0.0236180555555552
483.683.715451388888893.74625-0.0307986111111109-0.0354513888888888
493.73.725868055555563.76416666666667-0.038298611111111-0.0258680555555557
503.833.784868055555563.780833333333330.004034722222222220.0451319444444445
513.873.810951388888893.797083333333330.01386805555555550.0590486111111104
523.873.819951388888893.812916666666670.00703472222222180.0500486111111109
533.873.828618055555563.82875-0.0001319444444447390.0413819444444443
543.873.865701388888893.8450.02070138888888870.00429861111111185
553.873.887951388888893.860833333333330.0271180555555554-0.0179513888888883
563.873.884534722222223.870416666666670.0141180555555557-0.0145347222222214
573.873.880034722222223.872916666666670.0071180555555556-0.0100347222222212
583.873.868284722222223.87375-0.005465277777777480.00171527777777891
593.873.855284722222223.87458333333333-0.01929861111111080.0147152777777788
603.883.845034722222223.87583333333333-0.03079861111111090.0349652777777791
613.883.839201388888893.8775-0.0382986111111110.0407986111111120
623.883.884034722222223.880.00403472222222222-0.00403472222222145
633.883.898868055555553.8850.0138680555555555-0.0188680555555547
643.883.900368055555553.893333333333330.0070347222222218-0.0203680555555548
653.883.903201388888893.90333333333333-0.000131944444444739-0.0232013888888885
663.893.933618055555553.912916666666670.0207013888888887-0.0436180555555548
673.89NANA0.0271180555555554NA
683.91NANA0.0141180555555557NA
693.95NANA0.0071180555555556NA
703.99NANA-0.00546527777777748NA
713.99NANA-0.0192986111111108NA
723.99NANA-0.0307986111111109NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124389632332ym2dze3ggth0t/14qmi1243896285.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124389632332ym2dze3ggth0t/14qmi1243896285.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124389632332ym2dze3ggth0t/2spiu1243896285.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124389632332ym2dze3ggth0t/2spiu1243896285.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124389632332ym2dze3ggth0t/33eqd1243896285.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124389632332ym2dze3ggth0t/33eqd1243896285.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124389632332ym2dze3ggth0t/4k7k81243896285.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124389632332ym2dze3ggth0t/4k7k81243896285.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