Home » date » 2010 » Jan » 27 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 27 Jan 2010 02:56:28 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/27/t1264586288x5f4d1umme730uy.htm/, Retrieved Wed, 27 Jan 2010 10:58:13 +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/Jan/27/t1264586288x5f4d1umme730uy.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 «
1,61 1,58 1,69 1,78 1,76 1,83 1,8 1,57 1,45 1,4 1,55 1,58 1,58 1,59 1,8 1,99 2,06 2,06 2,08 2 1,85 1,77 1,7 1,66 1,67 1,73 1,91 2,02 2,07 2,15 2,1 1,68 1,68 1,65 1,72 1,73 1,76 1,84 1,99 2,05 2,12 2,13 2,08 1,88 1,81 1,81 1,88 1,87 1,87 1,9 2,01 2,05 2,16 2,18 2,15 2,12 2,04 2,04 2,06 1,93 1,86 1,94 2,35 2,46 2,59 2,66 2,41 2,18 2,13 2,11 2,12 2,16 2,07 2,2 2,29 2,32 2,37 2,38 2,38 2,28 2,22 2,25 2,3 2,3 2,23 2,27 2,3 2,32 2,41 2,43 2,45 2,47 2,46 2,5 2,46 2,43 2,37 2,45 2,53 2,56 2,62 2,67 2,62 2,6 2,53 2,49 2,48 2,44
 
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
11.61NANA-0.154939236111111NA
21.58NANA-0.100824652777778NA
31.69NANA0.0456857638888889NA
41.78NANA0.108133680555556NA
51.76NANA0.176362847222222NA
61.83NANA0.199539930555556NA
71.81.784019097222221.632083333333330.1519357638888890.0159809027777778
81.571.615946180555561.63125-0.0153038194444445-0.0459461805555557
91.451.544539930555561.63625-0.0917100694444444-0.0945399305555557
101.41.535685763888891.64958333333333-0.113897569444444-0.135685763888889
111.551.580894097222221.67083333333333-0.0899392361111112-0.0308940972222218
121.581.577873263888891.69291666666667-0.1150434027777780.00212673611111147
131.581.559227430555561.71416666666667-0.1549392361111110.0207725694444447
141.591.642925347222221.74375-0.100824652777778-0.052925347222222
151.81.824019097222221.778333333333330.0456857638888889-0.0240190972222218
161.991.918550347222221.810416666666670.1081336805555560.071449652777778
172.062.008446180555561.832083333333330.1763628472222220.0515538194444447
182.062.041206597222221.841666666666670.1995399305555560.0187934027777779
192.082.000685763888891.848750.1519357638888890.0793142361111112
2021.843029513888891.85833333333333-0.01530381944444450.156970486111112
211.851.777039930555561.86875-0.09171006944444440.0729600694444448
221.771.760685763888891.87458333333333-0.1138975694444440.00931423611111093
231.71.786310763888891.87625-0.0899392361111112-0.086310763888889
241.661.765373263888891.88041666666667-0.115043402777778-0.105373263888889
251.671.730060763888891.885-0.154939236111111-0.0600607638888888
261.731.771675347222221.8725-0.100824652777778-0.041675347222222
271.911.897769097222221.852083333333330.04568576388888890.0122309027777783
282.021.948133680555561.840.1081336805555560.0718663194444444
292.072.012196180555561.835833333333330.1763628472222220.0578038194444448
302.152.039123263888891.839583333333330.1995399305555560.110876736111111
312.11.998185763888891.846250.1519357638888890.101814236111111
321.681.839279513888891.85458333333333-0.0153038194444445-0.159279513888889
331.681.770789930555561.8625-0.0917100694444444-0.090789930555556
341.651.753185763888891.86708333333333-0.113897569444444-0.103185763888889
351.721.780477430555561.87041666666667-0.0899392361111112-0.0604774305555553
361.731.756623263888891.87166666666667-0.115043402777778-0.0266232638888888
371.761.715060763888891.87-0.1549392361111110.0449392361111114
381.841.776675347222221.8775-0.1008246527777780.063324652777778
391.991.936935763888891.891250.04568576388888890.0530642361111111
402.052.011467013888891.903333333333330.1081336805555560.038532986111111
412.122.093029513888891.916666666666670.1763628472222220.0269704861111111
422.132.128706597222221.929166666666670.1995399305555560.00129340277777779
432.082.091519097222221.939583333333330.151935763888889-0.0115190972222221
441.881.931362847222221.94666666666667-0.0153038194444445-0.0513628472222223
451.811.858289930555561.95-0.0917100694444444-0.0482899305555557
461.811.836935763888891.95083333333333-0.113897569444444-0.0269357638888890
471.881.862560763888891.9525-0.08993923611111120.0174392361111111
481.871.841206597222221.95625-0.1150434027777780.0287934027777776
491.871.806310763888891.96125-0.1549392361111110.0636892361111108
501.91.873342013888891.97416666666667-0.1008246527777780.0266579861111111
512.012.039435763888891.993750.0456857638888889-0.0294357638888887
522.052.121050347222222.012916666666670.108133680555556-0.0710503472222224
532.162.206362847222222.030.176362847222222-0.0463628472222213
542.182.239539930555562.040.199539930555556-0.0595399305555555
552.152.194019097222222.042083333333330.151935763888889-0.0440190972222223
562.122.028029513888892.04333333333333-0.01530381944444450.0919704861111112
572.041.967456597222222.05916666666667-0.09171006944444440.0725434027777778
582.041.976519097222222.09041666666667-0.1138975694444440.063480902777778
592.062.035477430555552.12541666666667-0.08993923611111120.0245225694444451
601.932.048289930555562.16333333333333-0.115043402777778-0.118289930555556
611.862.039227430555562.19416666666667-0.154939236111111-0.179227430555555
621.942.106675347222222.2075-0.100824652777778-0.166675347222222
632.352.259435763888892.213750.04568576388888890.0905642361111112
642.462.328550347222222.220416666666670.1081336805555560.131449652777778
652.592.402196180555562.225833333333330.1763628472222220.187803819444444
662.662.437456597222222.237916666666670.1995399305555560.222543402777778
672.412.408185763888892.256250.1519357638888890.00181423611111109
682.182.260529513888892.27583333333333-0.0153038194444445-0.080529513888889
692.132.192456597222222.28416666666667-0.0917100694444444-0.0624565972222224
702.112.161935763888892.27583333333333-0.113897569444444-0.0519357638888889
712.122.170894097222222.26083333333333-0.0899392361111112-0.0508940972222223
722.162.124956597222222.24-0.1150434027777780.0350434027777782
732.072.072144097222222.22708333333333-0.154939236111111-0.00214409722222264
742.22.129175347222222.23-0.1008246527777780.070824652777778
752.292.283602430555562.237916666666670.04568576388888890.00639756944444425
762.322.355633680555562.24750.108133680555556-0.0356336805555553
772.372.437196180555562.260833333333330.176362847222222-0.0671961805555559
782.382.473706597222222.274166666666670.199539930555556-0.0937065972222224
792.382.438602430555562.286666666666670.151935763888889-0.0586024305555557
802.282.280946180555562.29625-0.0153038194444445-0.000946180555555287
812.222.207873263888892.29958333333333-0.09171006944444440.0121267361111115
822.252.186102430555562.3-0.1138975694444440.0638975694444448
832.32.211727430555552.30166666666667-0.08993923611111120.0882725694444448
842.32.190373263888892.30541666666667-0.1150434027777780.109626736111111
852.232.155477430555562.31041666666667-0.1549392361111110.0745225694444445
862.272.220425347222222.32125-0.1008246527777780.0495746527777778
872.32.384852430555562.339166666666670.0456857638888889-0.0848524305555554
882.322.467717013888892.359583333333330.108133680555556-0.147717013888889
892.412.553029513888892.376666666666670.176362847222222-0.143029513888889
902.432.588289930555562.388750.199539930555556-0.158289930555556
912.452.551935763888892.40.151935763888889-0.101935763888889
922.472.398029513888892.41333333333333-0.01530381944444450.0719704861111117
932.462.338706597222222.43041666666667-0.09171006944444440.121293402777778
942.52.336102430555562.45-0.1138975694444440.163897569444445
952.462.378810763888892.46875-0.08993923611111120.0811892361111108
962.432.372456597222222.4875-0.1150434027777780.0575434027777781
972.372.349644097222222.50458333333333-0.1549392361111110.0203559027777773
982.452.416258680555562.51708333333333-0.1008246527777780.0337413194444447
992.532.571102430555562.525416666666670.0456857638888889-0.0411024305555556
1002.562.636050347222222.527916666666670.108133680555556-0.0760503472222216
1012.622.704696180555562.528333333333330.176362847222222-0.084696180555556
1022.672.729123263888892.529583333333330.199539930555556-0.0591232638888886
1032.62NANA0.151935763888889NA
1042.6NANA-0.0153038194444445NA
1052.53NANA-0.0917100694444444NA
1062.49NANA-0.113897569444444NA
1072.48NANA-0.0899392361111112NA
1082.44NANA-0.115043402777778NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264586288x5f4d1umme730uy/158a71264586186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264586288x5f4d1umme730uy/158a71264586186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t1264586288x5f4d1umme730uy/2ap8m1264586186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264586288x5f4d1umme730uy/2ap8m1264586186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t1264586288x5f4d1umme730uy/3hi7p1264586186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264586288x5f4d1umme730uy/3hi7p1264586186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t1264586288x5f4d1umme730uy/4udww1264586186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264586288x5f4d1umme730uy/4udww1264586186.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