Home » date » 2009 » Dec » 04 »

*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 05:19:05 -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/t1259929209lh7p9vmb3g2ce8d.htm/, Retrieved Fri, 04 Dec 2009 13:20:14 +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/t1259929209lh7p9vmb3g2ce8d.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 «
1,4816 1,4562 1,4268 1,4088 1,4016 1,3650 1,3190 1,3050 1,2785 1,3239 1,3449 1,2732 1,3322 1,4369 1,4975 1,5770 1,5553 1,5557 1,5750 1,5527 1,4748 1,4718 1,4570 1,4684 1,4227 1,3896 1,3622 1,3716 1,3419 1,3511 1,3516 1,3242 1,3074 1,2999 1,3213 1,2881 1,2611 1,2727 1,2811 1,2684 1,2650 1,2770 1,2271 1,2020 1,1938 1,2103 1,1856 1,1786 1,2015 1,2256 1,2292 1,2037 1,2165 1,2694 1,2938 1,3201 1,3014 1,3119 1,3408 1,2991
 
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
11.4816NANA0.981860655178136NA
21.4562NANA1.00184099483241NA
31.4268NANA1.00952760851050NA
41.4088NANA1.01710725137427NA
51.4016NANA1.01001172492984NA
61.365NANA1.02474042705716NA
71.3191.374402419093371.359151.011222027806620.959689812587847
81.3051.350291621492201.352120833333330.9986471535708650.966457896374898
91.27851.325947391119011.35426250.979091860786970.964216234040047
101.32391.353283623557831.364216666666670.991985845521480.978287165346332
111.34491.371157909124451.377629166666670.9953026128519920.980849828491882
121.27321.362276889122741.391979166666670.978661837579760.934611759302395
131.33221.385004458022151.410591666666670.9818606551781360.961874160248149
141.43691.434214696514681.431579166666671.001840994832411.00187231625212
151.49751.463894953275901.450079166666671.009527608510501.02295591404895
161.5771.489473048646881.464420833333331.017107251374271.05876370266158
171.55531.490024005584941.475254166666671.010011724929841.04380868641740
181.55571.524873531985961.488058333333331.024740427057161.02021575387559
191.5751.516795120883891.49996251.011222027806621.03837359331839
201.55271.499730845964471.50176250.9986471535708651.03531910687712
211.47481.462914183344271.494154166666670.979091860786971.00812475317490
221.47181.468097718628231.479958333333330.991985845521481.0025218221681
231.4571.455638365484481.462508333333330.9953026128519921.00093542087637
241.46841.414256065971201.445091666666670.978661837579761.03828439229046
251.42271.401368802275121.427258333333330.9818606551781361.01522168731761
261.38961.411022077484311.408429166666671.001840994832410.984818042306961
271.36221.405195129206051.391933333333331.009527608510500.96940273396027
281.37161.401366132996581.377795833333331.017107251374270.97875920339752
291.34191.37864496261831.364979166666671.010011724929840.97334704466006
301.35111.385256918551211.35181251.024740427057160.975342538922723
311.35161.352576876993211.337566666666671.011222027806620.999277766011066
321.32421.324168676366711.32596250.9986471535708651.00002365531964
331.30741.290161583607251.31771250.979091860786971.01336143984737
341.29991.299534523827991.310033333333330.991985845521481.00028123621598
351.32131.296410682899261.302529166666670.9953026128519921.01919863622620
361.28811.268578173689791.29623750.978661837579761.01538874522287
371.26111.264599704094871.28796250.9818606551781360.99723255977086
381.27271.280035541747451.277683333333331.001840994832410.994269267135007
391.28111.279937991180111.267858333333331.009527608510501.00090786337143
401.26841.280936396486991.259391666666671.017107251374270.99021309994675
411.2651.262518864544491.250004166666671.010011724929841.00196522644151
421.2771.270460372210131.23978751.024740427057161.00514744728204
431.22711.246575527928381.232741666666671.011222027806620.984376776623598
441.2021.226634137701291.228295833333330.9986471535708650.97991728996924
451.19381.198575699129471.224170833333330.979091860786970.996015521478587
461.21031.209540741267411.21931250.991985845521481.00062772481049
471.18561.208890406475811.214595833333330.9953026128519920.980734062946445
481.17861.186390968121381.212258333333330.978661837579760.993433051725171
491.20151.192686593275201.214720833333330.9818606551781361.00738954120428
501.22561.224671303770531.222420833333331.001840994832411.00075832284680
511.22921.243561346353451.2318251.009527608510500.988451437160248
521.20371.261763924798581.240541666666671.017107251374270.953981942535048
531.21651.263768754054091.251241666666671.010011724929840.962596991021929
541.26941.293969625507531.262729166666671.024740427057160.98101220846054
551.2938NANA1.01122202780662NA
561.3201NANA0.998647153570865NA
571.3014NANA0.97909186078697NA
581.3119NANA0.99198584552148NA
591.3408NANA0.995302612851992NA
601.2991NANA0.97866183757976NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929209lh7p9vmb3g2ce8d/1rxev1259929144.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929209lh7p9vmb3g2ce8d/1rxev1259929144.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929209lh7p9vmb3g2ce8d/377b71259929144.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929209lh7p9vmb3g2ce8d/377b71259929144.ps (open in new window)


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