Home » date » 2010 » Dec » 20 »

classical decomposition - jonas poels

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 20 Dec 2010 13:11:31 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/20/t12928510171tenwpjkc47nroq.htm/, Retrieved Mon, 20 Dec 2010 14:17:02 +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/2010/Dec/20/t12928510171tenwpjkc47nroq.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
493 514 522 490 484 506 501 462 465 454 464 427 460 473 465 422 415 413 420 363 376 380 384 346 389 407 393 346 348 353 364 305 307 312 312 286 324 336 327 302 299 311 315 264 278 278 287 279 324 354 354 360 363 385 412 370 389 395 417 404
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1493NANA11.2647569444444NA
2514NANA31.4001736111111NA
3522NANA25.4001736111111NA
4490NANA-0.443576388888881NA
5484NANA-0.589409722222195NA
6506NANA9.38975694444442NA
7501500.202256944444480.45833333333319.74392361111110.7977430555556
8462449.046006944444477.375-28.328993055555512.9539930555555
9465456.379340277778473.291666666667-16.91232638888898.62065972222223
10454453.775173611111468.083333333333-14.30815972222220.224826388888914
11464456.431423611111462.375-5.943576388888927.56857638888891
12427424.952256944444455.625-30.67274305555552.0477430555556
13460459.639756944444448.37511.26475694444440.3602430555556
14473472.275173611111440.87531.40017361111110.724826388888971
15465458.441840277778433.04166666666725.40017361111116.55815972222229
16422425.806423611111426.25-0.443576388888881-3.80642361111109
17415419.243923611111419.833333333333-0.589409722222195-4.24392361111109
18413422.514756944444413.1259.38975694444442-9.5147569444444
19420426.535590277778406.79166666666719.7439236111111-6.53559027777777
20363372.754340277778401.083333333333-28.3289930555555-9.75434027777777
21376378.421006944444395.333333333333-16.9123263888889-2.42100694444446
22380374.858506944444389.166666666667-14.30815972222225.14149305555554
23384377.264756944444383.208333333333-5.943576388888926.73524305555554
24346347.243923611111377.916666666667-30.6727430555555-1.24392361111109
25389384.348090277778373.08333333333311.26475694444444.65190972222223
26407399.733506944444368.33333333333331.40017361111117.2664930555556
27393388.441840277778363.04166666666725.40017361111114.55815972222217
28346356.889756944444357.333333333333-0.443576388888881-10.8897569444445
29348350.910590277778351.5-0.589409722222195-2.91059027777783
30353355.3897569444443469.38975694444442-2.38975694444446
31364360.535590277778340.79166666666719.74392361111113.46440972222229
32305306.796006944444335.125-28.3289930555555-1.7960069444444
33307312.504340277778329.416666666667-16.9123263888889-5.50434027777777
34312310.525173611111324.833333333333-14.30815972222221.47482638888886
35312315.014756944444320.958333333333-5.94357638888892-3.01475694444446
36286286.493923611111317.166666666667-30.6727430555555-0.493923611111086
37324324.639756944445313.37511.2647569444444-0.639756944444514
38336341.025173611111309.62531.4001736111111-5.02517361111109
39327332.108506944444306.70833333333325.4001736111111-5.10850694444446
40302303.639756944444304.083333333333-0.443576388888881-1.63975694444446
41299301.035590277778301.625-0.589409722222195-2.03559027777777
42311309.681423611111300.2916666666679.389756944444421.31857638888891
43315319.74392361111130019.7439236111111-4.74392361111109
44264272.421006944444300.75-28.3289930555555-8.4210069444444
45278285.712673611111302.625-16.9123263888889-7.71267361111114
46278291.858506944444306.166666666667-14.3081597222222-13.8585069444444
47287305.306423611111311.25-5.94357638888892-18.3064236111111
48279286.327256944444317-30.6727430555555-7.3272569444444
49324335.389756944444324.12511.2647569444444-11.3897569444445
50354363.983506944444332.58333333333331.4001736111111-9.98350694444446
51354367.025173611111341.62525.4001736111111-13.0251736111111
52360350.681423611111351.125-0.4435763888888819.31857638888886
53363360.827256944444361.416666666667-0.5894097222221952.17274305555554
54385381.431423611111372.0416666666679.389756944444423.56857638888897
55412NANA19.7439236111111NA
56370NANA-28.3289930555555NA
57389NANA-16.9123263888889NA
58395NANA-14.3081597222222NA
59417NANA-5.94357638888892NA
60404NANA-30.6727430555555NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928510171tenwpjkc47nroq/1f7sn1292850688.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928510171tenwpjkc47nroq/1f7sn1292850688.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928510171tenwpjkc47nroq/2f7sn1292850688.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928510171tenwpjkc47nroq/2f7sn1292850688.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928510171tenwpjkc47nroq/3f7sn1292850688.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928510171tenwpjkc47nroq/3f7sn1292850688.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928510171tenwpjkc47nroq/4pyr81292850688.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928510171tenwpjkc47nroq/4pyr81292850688.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