Home » date » 2009 » Jun » 06 »

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: Sat, 06 Jun 2009 05:39:03 -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/06/t1244288390ydkbpqfvebva69l.htm/, Retrieved Sat, 06 Jun 2009 13:39:55 +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/06/t1244288390ydkbpqfvebva69l.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 time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
12.98NANA0.989036721983282NA
22.98NANA1.00075659555749NA
32.98NANA1.00365853400266NA
43.03NANA1.00190572192095NA
53.07NANA0.999877824940684NA
63.08NANA1.00603355088746NA
73.083.078512493138863.054166666666671.007971348367431.00048319013304
83.083.075365157079683.06251.004200867617851.00150708702336
93.083.079277688295413.07251.002205919705591.00023457179823
103.083.078901852193593.083333333333330.9985627628735951.00035666866277
113.083.074888389044253.091666666666670.9945730638418041.00166237284383
123.083.070707938133103.097916666666670.99121708830121.00302603245053
133.083.069722725855613.103750.9890367219832821.00334794867883
143.083.112353012183793.111.000756595557490.989604967027476
153.123.129323670809143.117916666666671.003658534002660.997020547635864
163.153.133460145307783.12751.001905721920951.00527846339995
173.153.137116675751403.13750.9998778249406841.00410674054561
183.153.166490601418283.14751.006033550887460.994792152103376
193.153.183089520531983.157916666666671.007971348367430.98960459003162
203.163.182061499264073.168751.004200867617850.993066916126802
213.193.184926895664373.177916666666671.002205919705591.00159284796851
223.23.179590264116673.184166666666670.9985627628735951.00641898300975
233.23.171859262768823.189166666666670.9945730638418041.00887200058385
243.23.169003632722963.197083333333330.99121708830121.00978110815556
253.213.173571581663863.208750.9890367219832821.01147868179392
263.213.223270201524743.220833333333331.000756595557490.995883000587893
273.213.243071637996113.231251.003658534002660.989802372044873
283.213.246174539023893.241.001905721920950.988856255697587
293.213.247936468015663.248333333333330.9998778249406840.98831982448264
303.283.276315930723493.256666666666671.006033550887461.00112445483110
313.33.290606464357843.264583333333331.007971348367431.00285465179258
323.33.292105177673863.278333333333331.004200867617851.00239810756341
333.33.307279535028433.31.002205919705590.997798935665603
343.33.318972983101113.323750.9985627628735950.994283477690926
353.33.331405358426783.349583333333330.9945730638418040.99057293993139
363.33.348661729977563.378333333333330.99121708830120.985468305280903
373.33.371378926060513.408750.9890367219832820.978827972878172
383.453.442185706802943.439583333333331.000756595557491.00227015444914
393.493.483531495100913.470833333333331.003658534002661.00185688141709
403.53.509174791028143.50251.001905721920950.997385484743708
413.543.533734879644533.534166666666670.9998778249406841.00177294578367
423.643.587347970206203.565833333333331.006033550887461.01467714596719
433.673.627016901875473.598333333333331.007971348367431.01185081274430
443.673.646085983509153.630833333333331.004200867617851.00655881857943
453.683.670579180921713.66251.002205919705591.00256657563124
463.683.688441205364343.693750.9985627628735950.997711443698203
473.683.702712635594383.722916666666670.9945730638418040.99386594698815
483.683.713347017048373.746250.99121708830120.99101968738842
493.73.722899060998743.764166666666670.9890367219832820.993849131920167
503.833.783693895036933.780833333333331.000756595557491.0122383327636
513.873.810975091819283.797083333333331.003658534002661.01548813801156
523.873.82018302554113.812916666666671.001905721920951.01304046798958
533.873.828282222241643.828750.9998778249406841.01089725765671
543.873.868199003162283.8451.006033550887461.00046559053354
553.873.891609380821923.860833333333331.007971348367430.99444718657314
563.873.886675774709273.870416666666671.004200867617850.995709501981674
573.873.881460009859763.872916666666671.002205919705590.997047500211095
583.873.868182502681593.873750.9985627628735951.00046985821304
593.873.853556216943723.874583333333330.9945730638418041.00426717092746
603.883.84179223140743.875833333333330.99121708830121.00994529799926
613.883.834989889490183.87750.9890367219832821.0117366960036
623.883.882935590763053.881.000756595557490.999243976446575
633.883.899213404600353.8851.003658534002660.995072492165297
643.883.900752944012243.893333333333331.001905721920950.994679759443854
653.883.90285644335183.903333333333330.9998778249406840.994143662806062
663.893.936525448493393.912916666666671.006033550887460.988181087839482
673.89NANA1.00797134836743NA
683.91NANA1.00420086761785NA
693.95NANA1.00220591970559NA
703.99NANA0.998562762873595NA
713.99NANA0.994573063841804NA
723.99NANA0.9912170883012NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288390ydkbpqfvebva69l/168r61244288340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288390ydkbpqfvebva69l/168r61244288340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288390ydkbpqfvebva69l/2ml981244288340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288390ydkbpqfvebva69l/2ml981244288340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288390ydkbpqfvebva69l/3rkq51244288341.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288390ydkbpqfvebva69l/3rkq51244288341.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288390ydkbpqfvebva69l/41vw91244288341.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288390ydkbpqfvebva69l/41vw91244288341.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