Home » date » 2010 » May » 31 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 31 May 2010 18:37:21 +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/May/31/t1275331075cg0eslmxcbfvqul.htm/, Retrieved Mon, 31 May 2010 20:38:00 +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/2010/May/31/t1275331075cg0eslmxcbfvqul.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
127.87 127.94 122.44 120.25 118.13 114.93 112.57 110.81 109.02 106.39 103.75 102.60 101.63 100.00 97.98 96.56 94.32 91.79 89.61 86.83 83.94 81.41 80.47 79.24 78.23 74.60 70.14 65.15 59.92 55.67 52.20 49.97 47.83 44.66 40.91 36.28 32.20 30.10 28.55 27.36 26.33 25.38 24.69 24.01 23.05 22.15 21.26 20.81 20.52 20.32 20.26 20.02 19.76 19.15 18.63 18.73 18.48 18.53 18.37 16.80 16.94 17.21 15.26 14.99 15.80 4.71 4.65 4.50
 
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
1127.87NANA0.993528169696577NA
2127.94NANA0.995624810269576NA
3122.44NANA0.998193115366954NA
4120.25NANA0.999299974571145NA
5118.13NANA0.996161766663678NA
6114.93NANA0.990811501964716NA
7112.57112.717790793206113.6316666666670.9919575598926850.998688842354294
8110.81111.810171147522111.3741666666671.003914772104740.99105473914173
9109.02110.102972624731109.1908333333331.008353625149220.990164001943684
10106.39108.571857759772107.1845833333331.012942854124130.979904021126727
11103.75106.642183284439105.2054166666671.013656774178510.9728795567067
12102.6102.790231969635103.2491666666670.995555076018060.998149318607523
13101.63100.672553555071101.3283333333330.9935281696965771.00951050123513
1410098.937726458513599.37250.9956248102695761.01073678948881
1597.9897.152472263473397.32833333333330.9981931153669541.00851782478867
1696.5695.175827828092395.24250.9992999745711451.01454331633876
1794.3292.873821775665893.23166666666670.9961617666636781.01557143010468
1891.7990.449530661855791.28833333333330.9908115019647161.01482008063873
1989.6188.621488400812589.340.9919575598926851.01115431050669
2086.8387.648452369891587.30666666666671.003914772104740.99066210129487
2183.9485.799129374572285.08833333333331.008353625149220.978331605598749
2281.4183.688916548213182.61958333333331.012942854124130.972769195226703
2380.4780.96836897944479.87751.013656774178510.993844892941212
2479.2476.597177919599576.93916666666670.995555076018061.03450286488589
2578.2373.397307506405373.87541666666670.9935281696965771.06584291246887
2674.670.471153758222570.78083333333330.9956248102695761.05858916764642
2770.1467.618017548755567.74041666666670.9981931153669541.03729749174362
2865.1564.659288479636664.70458333333330.9992999745711451.00758918837342
2959.9261.288852693982861.5250.9961617666636780.97766555199169
3055.6757.552937444123858.08666666666670.9908115019647160.967283382434617
3152.253.941412160014454.378750.9919575598926850.967716600469255
3249.9750.804780233647450.60666666666671.003914772104740.983568864390156
3347.8347.412367307172747.01958333333331.008353625149221.00880851804175
3444.6644.277842451378543.71208333333331.012942854124131.00863089815275
3540.9141.294265195086340.73791666666671.013656774178510.990694465847233
3636.2837.907003963232638.076250.995555076018060.957079067372068
3732.235.437079962723335.66791666666670.9935281696965770.908652745482177
3830.133.293693655414633.440.9956248102695760.904075117394034
3928.5531.26923116646631.32583333333330.9981931153669540.913038118782334
4027.3629.334867128525429.35541666666670.9992999745711450.932678504392985
4126.3327.492819557709227.598750.9961617666636780.957704608824557
4225.3825.895271441973726.13541666666670.9908115019647160.980101716905022
4324.6924.803072153816725.00416666666670.9919575598926850.99544120368979
4424.0124.204385155445424.111.003914772104740.99196901081366
4523.0523.552199652079223.35708333333331.008353625149220.978677165636422
4622.1522.999711621933522.70583333333331.012942854124130.963055553221669
4721.2622.428423199667322.126251.013656774178510.947904353807423
4820.8121.496937793535021.59291666666670.995555076018060.96804485363764
4920.5220.944401757345221.08083333333330.9935281696965770.979736744822687
5020.3220.518167964972220.60833333333330.9956248102695760.990341829479586
5120.2620.161421361422120.19791666666670.9981931153669541.00488946869423
5220.0219.842766495067719.85666666666670.9992999745711451.00893189490368
5319.7619.510243267510919.58541666666670.9961617666636781.01280131308793
5419.1519.120597797289919.29791666666670.9908115019647161.00153772403048
5518.6318.82900774936318.98166666666670.9919575598926850.989430789343123
5618.7318.776134323110718.70291666666671.003914772104740.99754292751017
5718.4818.518414325865518.3651.008353625149220.997925614731935
5818.5318.179369814870317.94708333333331.012942854124131.01928725740773
5918.3717.812483664251917.57251.013656774178511.03129919141299
6016.816.731132681713516.80583333333330.995555076018061.00411611811326
6116.94NA15.6216666666667NANA
6217.21NA14.44625NANA
6315.26NANANANA
6414.99NANANANA
6515.8NANANANA
664.71NANANANA
674.65NANANANA
684.5NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t1275331075cg0eslmxcbfvqul/1u3ov1275331039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275331075cg0eslmxcbfvqul/1u3ov1275331039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275331075cg0eslmxcbfvqul/2u3ov1275331039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275331075cg0eslmxcbfvqul/2u3ov1275331039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275331075cg0eslmxcbfvqul/3nuny1275331039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275331075cg0eslmxcbfvqul/3nuny1275331039.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275331075cg0eslmxcbfvqul/4nuny1275331039.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275331075cg0eslmxcbfvqul/4nuny1275331039.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