Home » date » 2009 » Dec » 04 »

WS 9 Classical Decomposition

*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 07:05:31 -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/t1259935669xerbhcbvm68fxna.htm/, Retrieved Fri, 04 Dec 2009 15:07:55 +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/t1259935669xerbhcbvm68fxna.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 «
98,8 100,5 110,4 96,4 101,9 106,2 81 94,7 101 109,4 102,3 90,7 96,2 96,1 106 103,1 102 104,7 86 92,1 106,9 112,6 101,7 92 97,4 97 105,4 102,7 98,1 104,5 87,4 89,9 109,8 111,7 98,6 96,9 95,1 97 112,7 102,9 97,4 111,4 87,4 96,8 114,1 110,3 103,9 101,6 94,6 95,9 104,7 102,8 98,1 113,9 80,9 95,7 113,2 105,9 108,8 102,3 99 100,7 115,5 100,7 109,9 114,6 85,4 100,5 114,8 116,5 112,9 102 106 105,3 118,8 106,1 109,3 117,2 92,5 104,2 112,5 122,4 113,3 100 110,7 112,8 109,8 117,3 109,1 115,9 96 99,8 116,8 115,7 99,4 94,3
 
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
198.8NANA0.964989564232974NA
2100.5NANA0.971818484774287NA
3110.4NANA1.06541920173552NA
496.4NANA1.01252753388232NA
5101.9NANA0.995781731101289NA
6106.2NANA1.07618654582335NA
78183.023477414654599.33333333333330.8358068196106160.975627648013966
894.792.709733900664899.04166666666670.936067990583071.02146771450631
9101105.83961423567798.6751.072608201020290.954274075254087
10109.4108.06130603906998.77083333333331.094060892190531.01238828226310
11102.3101.66215501445599.05416666666671.026328911095321.00627416353170
1290.793.88805658724398.99583333333330.9484041239504310.966044066698936
1396.295.670673713997599.14166666666670.9649895642329741.00553279563584
1496.196.444886126474999.24166666666670.9718184847742870.996424008152981
15106105.88047241914199.37916666666671.065419201735521.00112889164667
16103.1101.00805923421199.75833333333331.012527533882321.02071063221736
1710299.445402212648799.86666666666670.9957817311012891.02568844542344
18104.7107.50655181714699.89583333333331.076186545823350.97389413231373
198683.58068196106161000.8358068196106161.02894589972436
2092.193.6887050074829100.08750.936067990583070.983042726363268
21106.9107.368080922131100.11.072608201020290.995640408973404
22112.6109.469909437764100.0583333333331.094060892190531.02859315932855
23101.7102.50887636610899.87916666666671.026328911095320.992109206589881
249294.563794525557699.70833333333330.9484041239504310.972888201679929
2597.496.26575061194199.75833333333330.9649895642329741.01178248110931
269796.914598394115899.7250.9718184847742871.00088120476481
27105.4106.28000461979299.75416666666671.065419201735520.991719941837228
28102.7101.08821766397699.83751.012527533882321.01594431451330
2998.199.250394956974799.67083333333330.9957817311012890.98840916494616
30104.5107.34512383527299.74583333333331.076186545823350.97349554657333
3187.483.45879346653599.85416666666670.8358068196106161.04722338257916
3289.993.380582627249499.75833333333330.936067990583070.962726912498041
33109.8107.327858114593100.06251.072608201020291.02303355278709
34111.7109.816362053624100.3751.094060892190531.01715261652408
3598.6102.996382598879100.3541666666671.026328911095320.957315174689188
3696.995.4213099209628100.61250.9484041239504311.01549643449940
3795.197.3674470311071100.90.9649895642329740.976712473211065
389798.3358829280982101.18750.9718184847742870.986415102114098
39112.7108.304301103089101.6541666666671.065419201735521.04058655890985
40102.9103.049989760873101.7751.012527533882320.998544495140453
4197.4101.507500214138101.93750.9957817311012890.959535007704135
42111.4110.152177075628102.3541666666671.076186545823351.01132817305568
4387.485.6945767089934102.5291666666670.8358068196106161.01990118110739
4496.895.9118664851177102.46250.936067990583071.00925989189273
45114.1109.495420520821102.0833333333331.072608201020291.04205271286486
46110.3111.316137193335101.7458333333331.094060892190530.990871609283651
47103.9104.450348556264101.7708333333331.026328911095320.99473100316207
48101.696.6463319143987101.9041666666670.9484041239504311.05125562437267
4994.698.1756257911522101.73750.9649895642329740.963579292086627
5095.998.5626405745455101.4208333333330.9718184847742870.972985295858306
51104.7107.966918355873101.33751.065419201735520.969741487433172
52102.8102.383409134401101.1166666666671.012527533882321.00406892942051
5398.1100.710874829257101.13750.9957817311012890.97407554215289
54113.9109.093926972235101.3708333333331.076186545823351.04405445070273
5580.984.9040427587784101.5833333333330.8358068196106160.952840375691482
5695.795.4477327731203101.9666666666670.936067990583071.00264298815226
57113.2110.067478228032102.6166666666671.072608201020291.02846001218887
58105.9112.665478960370102.9791666666671.094060892190530.939950737148597
59108.8106.105303925405103.3833333333331.026328911095321.02539643142146
60102.398.5431401622996103.9041666666670.9484041239504311.03812401179334
6199100.475517585907104.1208333333330.9649895642329740.985314655536401
62100.7101.563130146286104.5083333333330.9718184847742870.991501540519252
63115.5111.629296861839104.7751.065419201735521.03467461721050
64100.7106.602273858910105.2833333333331.012527533882320.944632758333822
65109.9105.449136233080105.8958333333330.9957817311012891.04220863181925
66114.6114.134067295174106.0541666666671.076186545823351.00408232805391
6785.488.8741251519288106.3333333333330.8358068196106160.960909599436396
68100.599.9876625274482106.8166666666670.936067990583071.00512400689846
69114.8114.925499538486107.1458333333331.072608201020290.998907992229832
70116.5117.620663084583107.5083333333331.094060892190530.990472226093662
71112.9110.544176465892107.7083333333331.026328911095321.02131115007071
72102102.230061194157107.7916666666670.9484041239504310.99774957393677
73106104.407850060157108.1958333333330.9649895642329741.01524933172099
74105.3105.584029127040108.6458333333330.9718184847742870.99730992339099
75118.8115.815506475324108.7041666666671.065419201735521.02576937765507
76106.1110.217840927815108.8541666666671.012527533882320.962639071014718
77109.3108.656383225336109.1166666666670.9957817311012891.00592341430443
78117.2117.358142822037109.051.076186545823350.998652476784022
7992.591.2387619457438109.16250.8358068196106161.01382348935210
80104.2102.659356583904109.6708333333330.936067990583071.01500733559378
81112.5117.566797233499109.6083333333331.072608201020290.956902821606718
82122.4120.018479873301109.71.094060892190531.01984294526321
83113.3113.058682298076110.1583333333331.026328911095321.00213444643984
84100104.415342363093110.0958333333330.9484041239504310.957713662923799
85110.7106.329787608921110.18750.9649895642329741.04110054660461
86112.8107.045806097888110.150.9718184847742871.05375450110442
87109.8117.351485824493110.1458333333331.065419201735520.935650701212366
88117.3111.424436239025110.0458333333331.012527533882321.05273137526468
89109.1108.726917764622109.18750.9957817311012891.00343136955455
90115.9116.627232792998108.3708333333331.076186545823350.99376446842146
9196NANA0.835806819610616NA
9299.8NANA0.93606799058307NA
93116.8NANA1.07260820102029NA
94115.7NANA1.09406089219053NA
9599.4NANA1.02632891109532NA
9694.3NANA0.948404123950431NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259935669xerbhcbvm68fxna/1zq5f1259935529.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259935669xerbhcbvm68fxna/1zq5f1259935529.ps (open in new window)


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


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


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