Home » date » 2009 » Jun » 02 »

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 02 Jun 2009 09:33:58 -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/02/t1243956850mdpssc0x4z38fol.htm/, Retrieved Tue, 02 Jun 2009 17:34:16 +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/02/t1243956850mdpssc0x4z38fol.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.0 94.7 101.0 109.4 102.3 90.7 96.2 96.1 106.0 103.1 102.0 104.7 86.0 92.1 106.9 112.6 101.7 92.0 97.4 97.0 105.4 102.7 98.1 104.5 87.4 89.9 109.8 111.7 98.6 96.9 95.1 97.0 112.7 102.9 97.4 111.4 87.4 96.8 114.1 110.3 103.9 101.6
 
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.8NANA-3.53599537037038NA
2100.5NANA-3.18738425925927NA
3110.4NANA7.93483796296295NA
496.4NANA2.60706018518519NA
5101.9NANA-1.16099537037037NA
6106.2NANA6.36539351851853NA
78184.568171296296399.3333333333333-14.7651620370370-3.5681712962963
894.791.80983796296399.0416666666667-7.23182870370372.89016203703703
9101105.12650462963098.6756.45150462962964-4.12650462962962
10109.4110.43344907407498.770833333333311.6626157407407-1.03344907407406
11102.3100.32233796296399.05416666666671.268171296296291.97766203703705
1290.792.587615740740798.9958333333333-6.40821759259259-1.88761574074074
1396.295.605671296296399.1416666666667-3.535995370370380.59432870370371
1496.196.054282407407499.2416666666667-3.187384259259270.045717592592581
15106107.31400462963099.37916666666677.93483796296295-1.31400462962964
16103.1102.36539351851999.75833333333332.607060185185190.734606481481478
1710298.705671296296399.8666666666667-1.160995370370373.2943287037037
18104.7106.26122685185299.89583333333336.36539351851853-1.56122685185186
198685.234837962963100-14.76516203703700.76516203703703
2092.192.8556712962963100.0875-7.2318287037037-0.755671296296285
21106.9106.551504629630100.16.451504629629640.348495370370372
22112.6111.720949074074100.05833333333311.66261574074070.879050925925924
23101.7101.14733796296399.87916666666671.268171296296290.552662037037052
249293.300115740740799.7083333333333-6.40821759259259-1.30011574074074
2597.496.22233796296399.7583333333333-3.535995370370381.17766203703707
269796.537615740740799.725-3.187384259259270.462384259259267
27105.4107.68900462963099.75416666666677.93483796296295-2.28900462962963
28102.7102.44456018518599.83752.607060185185190.255439814814821
2998.198.50983796296399.6708333333333-1.16099537037037-0.409837962962953
30104.5106.11122685185299.74583333333336.36539351851853-1.61122685185185
3187.485.089004629629699.8541666666667-14.76516203703702.31099537037038
3289.992.526504629629699.7583333333333-7.2318287037037-2.62650462962962
33109.8106.514004629630100.06256.451504629629643.28599537037037
34111.7112.037615740741100.37511.6626157407407-0.337615740740731
3598.6101.622337962963100.3541666666671.26817129629629-3.02233796296296
3696.994.2042824074074100.6125-6.408217592592592.6957175925926
3795.197.3640046296296100.9-3.53599537037038-2.26400462962964
389798.0001157407407101.1875-3.18738425925927-1.00011574074074
39112.7109.589004629630101.6541666666677.934837962962953.11099537037038
40102.9104.382060185185101.7752.60706018518519-1.48206018518518
4197.4100.776504629630101.9375-1.16099537037037-3.37650462962961
42111.4108.719560185185102.3541666666676.365393518518532.68043981481482
4387.4NANA-14.7651620370370NA
4496.8NANA-7.2318287037037NA
45114.1NANA6.45150462962964NA
46110.3NANA11.6626157407407NA
47103.9NANA1.26817129629629NA
48101.6NANA-6.40821759259259NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243956850mdpssc0x4z38fol/1wcko1243956837.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243956850mdpssc0x4z38fol/1wcko1243956837.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243956850mdpssc0x4z38fol/2eks51243956837.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243956850mdpssc0x4z38fol/2eks51243956837.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243956850mdpssc0x4z38fol/3cwgh1243956837.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243956850mdpssc0x4z38fol/3cwgh1243956837.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243956850mdpssc0x4z38fol/408og1243956837.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243956850mdpssc0x4z38fol/408og1243956837.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