Home » date » 2009 » Dec » 04 »

*Unverified author*
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 10:37:01 -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/t1259948263w0drygcwt9m2l35.htm/, Retrieved Fri, 04 Dec 2009 18:37:49 +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/t1259948263w0drygcwt9m2l35.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 «
95.5 76.7 79.4 55.2 60 64.8 82.3 210.5 106 80.8 97.3 189.5 90 69.3 87.3 57.4 56.2 61.6 77.7 177.2 97.6 81.6 96.8 191.3 106 75.1 72 63.5 57.4 62.3 79.4 178.1 109.3 85.2 102.7 193.7 108.4 73.4 85.9 58.5 58.6 62.7 77.5 180.5 102.2 82.6 97.8 197.8 93.8 72.4 77.7 58.7 53.1 64.3 76.4 188.4 105.5 79.8 96.1 202.5
 
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
195.5NANA1.01620313949398NA
276.7NANA0.742857619514316NA
379.4NANA0.828646739957447NA
455.2NANA0.610976910802136NA
560NANA0.578256310761869NA
664.8NANA0.643264605442063NA
782.380.309762242332199.60416666666670.8062891837757671.02478201531294
8210.5188.17600962725499.06666666666671.899488657071881.11863356235987
9106104.75351621287999.08751.057181947398801.01189920713103
1080.883.707961673536299.50833333333330.8412155934029260.965260632138227
1197.399.989164599971299.44166666666671.005505719600820.973105439867111
12189.5195.33676074093999.151.970113572778000.97011949661293
1390100.42627526049298.8251.016203139493980.896179807192411
1469.372.23980825768697.24583333333330.7428576195143160.959304871806977
1587.379.142669055435895.50833333333330.8286467399574471.10307121356812
1657.458.159910434106695.19166666666670.6109769108021360.986934119594844
1756.255.052410185824895.20416666666670.5782563107618691.02084540550180
1861.661.276314206735295.25833333333330.6432646054420631.00528239659084
1977.777.4037616424736960.8062891837757671.00382718295908
20177.2184.07627994240796.90833333333331.899488657071880.96264439967736
2197.6102.03127269832796.51251.057181947398800.956569465604642
2281.680.865353980828896.12916666666660.8412155934029261.00908480558121
2396.896.964268226838896.43333333333331.005505719600820.99830588906777
24191.3190.14058619273796.51251.970113572778001.00609766610316
2510698.177925814361996.61251.016203139493981.07967243268541
2675.171.849808007440996.72083333333330.7428576195143161.04523591757159
277280.582442766111997.24583333333330.8286467399574470.893494879634983
2863.559.804456619015797.88333333333330.6109769108021361.06179377909119
2957.456.830548341417598.27916666666670.5782563107618691.01002016829332
3062.363.441971711723598.6250.6432646054420630.98199974431891
3179.479.681528586640298.8250.8062891837757670.996466827486448
32178.1187.77236828762698.85416666666671.899488657071880.948488862467718
33109.3105.04424124841399.36251.057181947398801.04051396536363
3485.283.897235182051899.73333333333330.8412155934029261.01552810191088
35102.7100.12323202925199.5751.005505719600821.02573596475587
36193.7196.30539991422199.64166666666671.970113572778000.986727823506842
37108.4101.19266179486199.57916666666671.016203139493981.07122392155026
3873.473.988618903625999.60.7428576195143160.992044466941698
3985.982.3709386465299.40416666666670.8286467399574471.04284352480945
4058.560.4867141694114990.6109769108021360.96715453638551
4158.657.06666966831298.68750.5782563107618691.02686910486629
4262.763.460733596048998.65416666666670.6432646054420630.988012530695103
4377.579.191035999843298.21666666666670.8062891837757670.978646118484337
44180.5185.32677664164697.56666666666671.899488657071880.973955319737852
45102.2102.74046558804097.18333333333331.057181947398800.994739506143496
4682.681.471730221073496.850.8412155934029261.01384860461248
4797.897.16117976359496.62916666666661.005505719600821.00657485055205
48197.8190.05028932065196.46666666666671.970113572778001.04077715801986
4993.898.050900421925196.48751.016203139493980.956645982814712
5072.471.886950888416696.77083333333330.7428576195143161.00713688792253
5177.780.575537376612297.23750.8286467399574470.96431252623024
5258.759.422596049764497.25833333333330.6109769108021360.987839709171251
5353.156.131821965913697.07083333333330.5782563107618690.945987465581383
5464.362.522639379779297.19583333333330.6432646054420631.02842747263795
5576.4NANA0.806289183775767NA
56188.4NANA1.89948865707188NA
57105.5NANA1.05718194739880NA
5879.8NANA0.841215593402926NA
5996.1NANA1.00550571960082NA
60202.5NANA1.97011357277800NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948263w0drygcwt9m2l35/1oi5w1259948219.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948263w0drygcwt9m2l35/1oi5w1259948219.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948263w0drygcwt9m2l35/40mds1259948219.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948263w0drygcwt9m2l35/40mds1259948219.ps (open in new window)


 
Parameters (Session):
par1 = FALSE ; par2 = -0.4 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
 
Parameters (R input):
par1 = multiplicative ; par2 = 12 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
 
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