Home » date » 2011 » May » 20 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 20 May 2011 07:59:13 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/20/t1305878134kvw3peg5o8ikyd3.htm/, Retrieved Fri, 20 May 2011 09:55:40 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
19097,1 19304,6 19601,7 16006,9 17681,2 19790,4 17014,2 17424,5 18908,9 15692,1 15160 15794,3 16032,1 16065 16236,8 12521 14762,1 15446,9 13635 14212,6 15021,7 14134,3 13721,4 14384,5 15638,6 19711,6 20359,8 16141,4 20056,9 20605,5 19325,8 20547,7 19211,2 19009,5 18746,8 16471,5 18957,2 20515,2 18374,4 16192,9 18147,5 19301,4 18344,7 17183,6 19630 17167,2 17428,5 16016,5 18466,5 18406,6 18174,1 14851,9 16260,7 18329,6 18003,8 15903,8 19554,2 16554,2 16198,9 16571,8 17535,2 16198,1 17487,5 13768 14915,8 17160,9 15607,4 16181,5 17413,2 15116,3 14544,5 15050,6 15535,4 15919,3 15853,1 12336,4 14355,5 16040,8 13867,7 14656,6
 
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'George Udny Yule' @ 216.218.223.82


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
119097.1NANA291.177847222223NA
219304.6NANA1166.63951388889NA
319601.7NANA1136.68201388889NA
416006.9NANA-2277.53548611111NA
517681.2NANA-134.04798611111NA
619790.4NANA1217.53868055556NA
717014.217537.638680555617495.283333333342.3553472222221-523.438680555555
817424.517102.800347222217232.5916666667-129.791319444445321.699652777777
918908.918192.244513888916957.40416666671234.84034722222716.655486111114
1015692.116141.770347222216671.9541666667-530.183819444445-449.670347222222
111516015611.542013888916405.0791666667-793.537152777778-451.542013888889
1215794.314878.332847222216102.4708333333-1224.13798611111915.967152777775
1316032.116071.869513888915780.6916666667291.177847222223-39.7695138888866
141606516672.702013888915506.06251166.63951388889-607.702013888887
1516236.816346.948680555615210.26666666671136.68201388889-110.148680555554
161252112705.856180555614983.3916666667-2277.53548611111-184.856180555555
1714762.114724.493680555614858.5416666667-134.0479861111137.606319444445
1815446.915957.397013888914739.85833333331217.53868055556-510.497013888886
191363514707.076180555614664.720833333342.3553472222221-1072.07618055555
2014212.614670.475347222214800.2666666667-129.791319444445-457.87534722222
2115021.716358.8403472222151241234.84034722222-1337.14034722222
2214134.314916.457847222215446.6416666667-530.183819444445-782.157847222221
2313721.415024.571180555615818.1083333333-793.537152777778-1303.17118055556
2414384.515029.528680555616253.6666666667-1224.13798611111-645.028680555555
2515638.616996.902847222216705.725291.177847222223-1358.30284722222
2619711.618373.443680555617206.80416666671166.639513888891338.15631944444
2720359.818782.011180555617645.32916666671136.682013888891577.78881944445
2816141.415745.489513888918023.025-2277.53548611111395.910486111112
2920056.918301.502013888918435.55-134.047986111111755.39798611111
3020605.519949.438680555618731.91217.53868055556656.061319444445
3119325.818999.488680555618957.133333333342.3553472222221326.311319444445
3220547.718999.100347222219128.8916666667-129.7913194444451548.59965277778
3319211.220314.490347222219079.651234.84034722222-1103.29034722222
3419009.518468.887013888918999.0708333333-530.183819444445540.612986111115
3518746.818128.121180555618921.6583333333-793.537152777778618.678819444449
3616471.517563.624513888918787.7625-1224.13798611111-1092.12451388889
3718957.218983.723680555618692.5458333333291.177847222223-26.5236805555505
3820515.219678.135347222218511.49583333331166.63951388889837.064652777779
3918374.419525.457013888918388.7751136.68201388889-1151.05701388889
4016192.916051.927013888918329.4625-2277.53548611111140.972986111112
4118147.518063.722847222218197.7708333333-134.0479861111183.7771527777768
4219301.419341.422013888918123.88333333331217.53868055556-40.0220138888908
4318344.718126.834513888918084.479166666742.3553472222221217.86548611111
4417183.617846.383680555617976.175-129.791319444445-662.783680555556
451963019114.811180555617879.97083333331234.84034722222515.188819444444
4617167.217285.566180555617815.75-530.183819444445-118.366180555553
4717428.516887.721180555617681.2583333333-793.537152777778540.778819444447
4816016.516338.012013888917562.15-1224.13798611111-321.512013888889
4918466.517798.632013888917507.4541666667291.177847222223667.867986111112
5018406.618606.564513888917439.9251166.63951388889-199.964513888888
5118174.118520.123680555617383.44166666671136.68201388889-346.023680555554
5214851.915077.206180555617354.7416666667-2277.53548611111-225.306180555555
5316260.717143.918680555617277.9666666667-134.04798611111-883.218680555554
5418329.618467.409513888917249.87083333331217.53868055556-137.809513888889
5518003.817276.559513888917234.204166666742.3553472222221727.240486111114
5615903.816973.587847222217103.3791666667-129.791319444445-1069.78784722222
5719554.218217.590347222216982.751234.840347222221336.60965277778
5816554.216378.795347222216908.9791666667-530.183819444445175.404652777783
5916198.916014.242013888916807.7791666667-793.537152777778184.657986111113
6016571.815478.907847222216703.0458333333-1224.137986111111092.89215277778
6117535.216845.677847222216554.5291.177847222223689.52215277778
6216198.117632.860347222216466.22083333331166.63951388889-1434.76034722222
6317487.517525.265347222216388.58333333331136.68201388889-37.765347222221
641376813961.927013888916239.4625-2277.53548611111-193.927013888888
6514915.815976.568680555616110.6166666667-134.04798611111-1060.76868055556
6617160.917195.838680555615978.31217.53868055556-34.938680555555
6715607.415873.947013888915831.591666666742.3553472222221-266.54701388889
6816181.515606.858680555615736.65-129.791319444445574.641319444443
6917413.216891.773680555615656.93333333331234.84034722222521.426319444441
7015116.314998.999513888915529.1833333333-530.183819444445117.300486111109
7114544.514652.650347222215446.1875-793.537152777778-108.150347222225
7215050.614152.032847222215376.1708333333-1224.13798611111898.567152777778
7315535.4NA15257.0125NANA
7415919.3NA15120.9875NANA
7515853.1NANANANA
7612336.4NANANANA
7714355.5NANANANA
7816040.8NANANANA
7913867.7NANANANA
8014656.6NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/20/t1305878134kvw3peg5o8ikyd3/1ndnl1305878350.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t1305878134kvw3peg5o8ikyd3/1ndnl1305878350.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/20/t1305878134kvw3peg5o8ikyd3/2i1s91305878350.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t1305878134kvw3peg5o8ikyd3/2i1s91305878350.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/20/t1305878134kvw3peg5o8ikyd3/31svc1305878350.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t1305878134kvw3peg5o8ikyd3/31svc1305878350.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/20/t1305878134kvw3peg5o8ikyd3/466831305878350.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t1305878134kvw3peg5o8ikyd3/466831305878350.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