Home » date » 2009 » Dec » 07 »

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: Mon, 07 Dec 2009 15:22:41 -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/07/t1260224694klr17nvid2qjshh.htm/, Retrieved Mon, 07 Dec 2009 23:24: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/07/t1260224694klr17nvid2qjshh.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:
Classical Decomposition
 
Dataseries X:
» Textbox « » Textfile « » CSV «
220206 220115 218444 214912 210705 209673 237041 242081 241878 242621 238545 240337 244752 244576 241572 240541 236089 236997 264579 270349 269645 267037 258113 262813 267413 267366 264777 258863 254844 254868 277267 285351 286602 283042 276687 277915 277128 277103 275037 270150 267140 264993 287259 291186 292300 288186 281477 282656 280190 280408 276836 275216 274352 271311 289802 290726 292300 278506 269826 265861 269034 264176 255198 253353 246057 235372 258556 260993 254663 250643 243422 247105 248541 245039 237080 237085 225554 226839 247934 248333 246969 245098 246263 255765 264319 268347 273046 273963 267430 271993 292710 295881 293299 288576
 
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
1220206NANA1.00980672858271NA
2220115NANA1.00380005873708NA
3218444NANA0.985244011995279NA
4214912NANA0.97556863535601NA
5210705NANA0.954822892747436NA
6209673NANA0.945635036746163NA
7237041236126.479057893229069.251.030808277662291.00387301308077
8242081241065.788958836231111.2083333331.043072686510061.00421134432036
9241878242011.051667823233094.0833333331.038254803412310.9994502248269
10242621239314.61125234235125.6251.017815949462511.01381607554323
11238545235615.107306975237251.1666666670.9931041040485571.01243507993402
12240337239942.226611225239447.3333333331.002066814739601.00164528517698
13244752244103.862372167241733.251.009806728582711.00265517153860
14244576244985.936635283244058.51.003800058737080.998326693193442
15241572242757.515210389246393.2916666670.9852440119952790.99511646340027
16240541242494.738066241248567.5833333330.975568635356010.991943173357817
17236089239087.891049681250400.250.9548228927474360.98745695134741
18236997238443.844588538252152.0833333330.9456350367461630.993932136973237
19264579261859.10444766254032.7916666671.030808277662291.01038686647186
20270349266950.02882684255926.5833333331.043072686510061.01273261212257
21269645267706.776536857257843.0416666671.038254803412311.00724009861916
22267037264197.878721814259573.3333333331.017815949462511.0107461925581
23258113259317.564337639261118.2083333330.9931041040485570.995354867917581
24262813263187.128759955262644.2916666671.002066814739600.998578468629077
25267413266505.751441289263917.5833333331.009806728582711.00340423632062
26267366266078.619969515265071.3333333331.003800058737081.00483834451123
27264777262471.919475744266402.9583333330.9852440119952791.00878219860189
28258863261234.232739329267776.3750.975568635356010.99092296321786
29254844257054.713853935269217.1666666670.9548228927474360.991399831495829
30254868255908.068855925270620.3333333330.9456350367461630.995935771542589
31277267280023.578413176271654.3751.030808277662290.990155906053351
32285351284200.669145877272464.8751.043072686510061.00404760079412
33286602283753.047784211273298.0833333331.038254803412311.01004025238860
34283042279080.934851827274195.8751.017815949462511.01419324881607
35276687273280.897695926275178.50.9931041040485571.01246374090832
36277915276683.382148708276112.7083333331.002066814739601.00445136184807
37277128279666.899137151276950.9166666671.009806728582710.990921703122594
38277103278665.310731022277610.3751.003800058737080.994393594498994
39275037273987.410436111278090.9166666670.9852440119952791.00383079486104
40270150271737.489208424278542.6666666670.975568635356010.994158004429024
41267140266354.131849275278956.5833333330.9548228927474361.00295046352489
42264993264166.654244968279353.7083333330.9456350367461631.00312812287907
43287259288295.256486932279678.8333333331.030808277662290.99640557219165
44291186292002.070536457279944.1251.043072686510060.997205257706022
45292300290874.134656498280156.7916666671.038254803412311.00490200115313
46288186285439.188679122280442.8333333331.017815949462511.00962310512999
47281477279016.984242235280954.4166666670.9931041040485571.00881672405874
48282656282100.012562999281518.1666666671.002066814739601.00197088767189
49280190284651.767977519281887.3751.009806728582710.984325521639229
50280408283045.685062338281974.1666666671.003800058737080.99068106245196
51276836277794.4754021292819550.9852440119952790.996549695955108
52275216274672.97523221281551.6666666670.975568635356011.00197698651398
53274352267983.338194312280662.8750.9548228927474361.02376514095466
54271311264283.834186605279477.6250.9456350367461631.02658946520517
55289802286887.3441810252783131.030808277662291.01015958311893
56290726289110.368819918277171.8333333331.043072686510061.00558828514756
57292300286136.707770378275593.9166666671.038254803412311.02153967688259
58278506278659.050140775273781.3751.017815949462510.999450761994998
59269826269817.902305771271691.4583333330.9931041040485571.00003001170108
60265861269571.045919958269015.0416666671.002066814739600.98623722400417
61269034268826.371454133266215.6666666671.009806728582711.00077235185203
62264176264676.855012491263674.8751.003800058737080.998107673553595
63255198257018.429662015260867.7916666670.9852440119952790.992917124019437
64253353251831.946123927258138.6250.975568635356011.0060399560083
65246057244317.694738982255877.50.9548228927474361.00711903107499
66235372240187.359187539253995.8333333330.9456350367461630.979951654392524
67258556260135.249404650252360.4583333331.030808277662290.99392912183849
68260993261507.92746906250709.2083333331.043072686510060.998030929792288
69254663258688.365532567249156.9166666671.038254803412310.98443932519238
70250643252137.607900641247724.1666666671.017815949462510.994072253191082
71243422244494.32696326246192.0416666670.9931041040485570.995614102885008
72247105245488.541172457244982.2083333331.002066814739601.00658466101849
73248541246578.730362802244184.0833333331.009806728582711.00795798418749
74245039244138.2274856792432141.003800058737081.00368960045134
75237080238789.56810758242365.9166666670.9852440119952790.992840691822811
76237085235906.43853083241814.2916666670.975568635356011.00499588513357
77225554230782.244764256241701.6250.9548228927474360.977345550262774
78226839229014.681228383242180.8333333330.9456350367461630.990499817667963
79247934250691.628219881243199.0833333331.030808277662290.988999918986276
80248333255373.052001989244827.6666666671.043072686510060.972432283098007
81246969256757.730725622247297.4166666671.038254803412310.961875614424702
82245098254792.495986818250332.5833333331.017815949462510.961951406970322
83246263251865.1042441712536140.9931041040485570.977757521189836
84255765257771.917940319257240.251.002066814739600.99221436548886
85264319NA260987.333333333NANA
86268347NA264834.166666667NANA
87273046NA268745.75NANA
88273963NA272487.75NANA
89267430NANANANA
90271993NANANANA
91292710NANANANA
92295881NANANANA
93293299NANANANA
94288576NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/07/t1260224694klr17nvid2qjshh/1vq8u1260224559.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/07/t1260224694klr17nvid2qjshh/1vq8u1260224559.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/07/t1260224694klr17nvid2qjshh/2ac3h1260224559.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/07/t1260224694klr17nvid2qjshh/2ac3h1260224559.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/07/t1260224694klr17nvid2qjshh/3aqdu1260224559.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/07/t1260224694klr17nvid2qjshh/3aqdu1260224559.ps (open in new window)


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