Home » date » 2010 » Jan » 23 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 23 Jan 2010 04:52:51 -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/23/t1264247772y43tacoskwt5guk.htm/, Retrieved Sat, 23 Jan 2010 12:56:18 +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/23/t1264247772y43tacoskwt5guk.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 «
0,62 0,62 0,62 0,63 0,62 0,63 0,63 0,62 0,63 0,63 0,63 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,63 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,65 0,65 0,65 0,65 0,65 0,65 0,66 0,66 0,66 0,66 0,68 0,69 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,71 0,7 0,71 0,7 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,71 0,71 0,7 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,7 0,7 0,68 0,68 0,69 0,69 0,7 0,7 0,7 0,7 0,7 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,76 0,77 0,78 0,85 0,89 0,9 0,91 0,91 0,91 0,9 0,89 0,88 0,87 0,86 0,87 0,87 0,87 0,85
 
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
10.62NANA0.00237847222222222NA
20.62NANA0.000378472222222232NA
30.62NANA0.00037847222222221NA
40.63NANA-0.00262152777777777NA
50.62NANA-0.00462152777777778NA
60.63NANA-0.00649652777777779NA
70.630.6255034722222220.6275-0.001996527777777790.00449652777777787
80.620.6267534722222220.629166666666667-0.00241319444444445-0.00675347222222211
90.630.6300034722222220.630833333333333-0.000829861111111101-3.47222222218946e-06
100.630.6369201388888890.6320833333333330.00483680555555556-0.00692013888888876
110.630.6389201388888890.6333333333333330.00558680555555555-0.00892013888888887
120.640.6400034722222220.6345833333333330.00542013888888891-3.47222222218946e-06
130.640.6377951388888890.6354166666666670.002378472222222220.00220486111111118
140.640.6366284722222220.636250.0003784722222222320.00337152777777772
150.640.6374618055555560.6370833333333330.000378472222222210.00253819444444447
160.640.6352951388888890.637916666666667-0.002621527777777770.00470486111111112
170.640.6341284722222220.63875-0.004621527777777780.00587152777777777
180.640.6326701388888890.639166666666667-0.006496527777777790.00732986111111111
190.640.6371701388888890.639166666666667-0.001996527777777790.00282986111111116
200.630.6367534722222220.639166666666667-0.00241319444444445-0.00675347222222222
210.640.6383368055555560.639166666666667-0.0008298611111111010.00166319444444440
220.640.6440034722222220.6391666666666670.00483680555555556-0.00400347222222219
230.640.6447534722222220.6391666666666670.00558680555555555-0.00475347222222222
240.640.6445868055555560.6391666666666670.00542013888888891-0.00458680555555557
250.640.6415451388888890.6391666666666670.00237847222222222-0.00154513888888885
260.640.6399618055555560.6395833333333330.0003784722222222323.81944444444171e-05
270.640.6407951388888890.6404166666666670.00037847222222221-0.000795138888888824
280.640.6386284722222220.64125-0.002621527777777770.00137152777777783
290.640.6374618055555560.642083333333333-0.004621527777777780.00253819444444447
300.640.6364201388888890.642916666666667-0.006496527777777790.00357986111111108
310.640.6417534722222220.64375-0.00199652777777779-0.00175347222222222
320.640.6421701388888890.644583333333333-0.00241319444444445-0.00217013888888895
330.650.6450034722222220.645833333333333-0.0008298611111111010.0049965277777777
340.650.6523368055555560.64750.00483680555555556-0.0023368055555556
350.650.6547534722222220.6491666666666670.00558680555555555-0.00475347222222233
360.650.6562534722222220.6508333333333330.00542013888888891-0.00625347222222228
370.650.6557118055555560.6533333333333330.00237847222222222-0.00571180555555562
380.650.6574618055555560.6570833333333330.000378472222222232-0.00746180555555565
390.660.6616284722222220.661250.00037847222222221-0.00162847222222229
400.660.6627951388888890.665416666666667-0.00262152777777777-0.00279513888888894
410.660.6649618055555560.669583333333333-0.00462152777777778-0.00496180555555559
420.660.6672534722222220.67375-0.00649652777777779-0.00725347222222217
430.680.6759201388888890.677916666666667-0.001996527777777790.00407986111111114
440.690.6796701388888890.682083333333333-0.002413194444444450.010329861111111
450.70.6850034722222220.685833333333333-0.0008298611111111010.0149965277777776
460.70.6940034722222220.6891666666666670.004836805555555560.0059965277777777
470.70.6980868055555560.69250.005586805555555550.00191319444444438
480.70.7016701388888890.696250.00542013888888891-0.00167013888888889
490.70.7015451388888890.6991666666666670.00237847222222222-0.00154513888888896
500.70.7012118055555560.7008333333333330.000378472222222232-0.00121180555555567
510.70.7020451388888890.7016666666666670.00037847222222221-0.00204513888888902
520.70.6994618055555560.702083333333333-0.002621527777777770.000538194444444362
530.70.6982951388888890.702916666666667-0.004621527777777780.00170486111111101
540.710.6972534722222220.70375-0.006496527777777790.0127465277777777
550.70.7025868055555560.704583333333333-0.00199652777777779-0.00258680555555557
560.710.7030034722222220.705416666666667-0.002413194444444450.0069965277777777
570.70.7054201388888890.70625-0.000829861111111101-0.00542013888888893
580.710.7119201388888890.7070833333333330.00483680555555556-0.00192013888888887
590.710.7135034722222220.7079166666666670.00558680555555555-0.00350347222222225
600.710.7137534722222220.7083333333333330.00542013888888891-0.00375347222222222
610.710.7111284722222220.708750.00237847222222222-0.00112847222222223
620.710.7095451388888890.7091666666666670.0003784722222222320.000454861111111149
630.710.7099618055555560.7095833333333330.000378472222222213.81944444444171e-05
640.710.7073784722222220.71-0.002621527777777770.0026215277777778
650.710.7049618055555550.709583333333333-0.004621527777777780.00503819444444453
660.710.7022534722222220.70875-0.006496527777777790.00774652777777773
670.710.7059201388888890.707916666666667-0.001996527777777790.00407986111111114
680.710.7046701388888890.707083333333333-0.002413194444444450.00532986111111111
690.710.7054201388888890.70625-0.0008298611111111010.00457986111111108
700.710.7102534722222220.7054166666666670.00483680555555556-0.000253472222222162
710.70.7101701388888890.7045833333333330.00558680555555555-0.0101701388888890
720.70.7091701388888890.703750.00542013888888891-0.00917013888888896
730.70.7052951388888890.7029166666666670.00237847222222222-0.00529513888888899
740.70.7028784722222220.70250.000378472222222232-0.00287847222222226
750.70.7028784722222220.70250.00037847222222221-0.00287847222222226
760.70.6994618055555550.702083333333333-0.002621527777777770.000538194444444473
770.70.6974618055555560.702083333333333-0.004621527777777780.00253819444444436
780.70.6964201388888890.702916666666667-0.006496527777777790.00357986111111097
790.70.7017534722222220.70375-0.00199652777777779-0.00175347222222222
800.710.7021701388888890.704583333333333-0.002413194444444450.00782986111111106
810.710.7045868055555560.705416666666667-0.0008298611111111010.00541319444444444
820.70.7110868055555550.706250.00483680555555556-0.0110868055555555
830.710.7126701388888890.7070833333333330.00558680555555555-0.00267013888888890
840.710.7133368055555560.7079166666666670.00542013888888891-0.0033368055555556
850.710.7111284722222220.708750.00237847222222222-0.00112847222222223
860.710.7095451388888890.7091666666666670.0003784722222222320.000454861111111149
870.710.7095451388888890.7091666666666670.000378472222222210.000454861111111149
880.710.7069618055555560.709583333333333-0.002621527777777770.00303819444444442
890.710.7049618055555550.709583333333333-0.004621527777777780.00503819444444453
900.710.7022534722222220.70875-0.006496527777777790.00774652777777773
910.710.7050868055555550.707083333333333-0.001996527777777790.00491319444444449
920.710.7021701388888890.704583333333333-0.002413194444444450.00782986111111117
930.710.7016701388888890.7025-0.0008298611111111010.00832986111111111
940.710.7056701388888890.7008333333333330.004836805555555560.00432986111111111
950.70.7051701388888890.6995833333333330.00558680555555555-0.00517013888888895
960.70.7041701388888890.698750.00542013888888891-0.00417013888888895
970.680.7002951388888890.6979166666666670.00237847222222222-0.0202951388888889
980.680.6974618055555550.6970833333333330.000378472222222232-0.0174618055555554
990.690.6966284722222220.696250.00037847222222221-0.00662847222222218
1000.690.6932118055555560.695833333333333-0.00262152777777777-0.00321180555555556
1010.70.6916284722222220.69625-0.004621527777777780.00837152777777772
1020.70.6905868055555560.697083333333333-0.006496527777777790.00941319444444444
1030.70.6967534722222220.69875-0.001996527777777790.00324652777777779
1040.70.6988368055555550.70125-0.002413194444444450.00116319444444446
1050.70.7025034722222220.703333333333333-0.000829861111111101-0.00250347222222236
1060.710.7098368055555550.7050.004836805555555560.00016319444444457
1070.710.7118368055555560.706250.00558680555555555-0.00183680555555554
1080.710.7125034722222220.7070833333333330.00542013888888891-0.00250347222222225
1090.710.7123784722222220.710.00237847222222222-0.00237847222222221
1100.710.7157951388888890.7154166666666670.000378472222222232-0.00579513888888883
1110.710.7220451388888890.7216666666666670.00037847222222221-0.0120451388888889
1120.710.7282118055555560.730833333333333-0.00262152777777777-0.0182118055555556
1130.710.7395451388888890.744166666666667-0.00462152777777778-0.0295451388888889
1140.710.7530868055555560.759583333333333-0.00649652777777779-0.0430868055555557
1150.760.7738368055555560.775833333333333-0.00199652777777779-0.0138368055555557
1160.770.7900868055555560.7925-0.00241319444444445-0.0200868055555556
1170.780.8083368055555560.809166666666667-0.000829861111111101-0.0283368055555556
1180.850.8302534722222220.8254166666666670.004836805555555560.0197465277777776
1190.890.8464201388888890.8408333333333330.005586805555555550.0435798611111111
1200.90.8608368055555560.8554166666666670.005420138888888910.0391631944444445
1210.910.8694618055555550.8670833333333330.002378472222222220.0405381944444447
1220.910.8757951388888890.8754166666666660.0003784722222222320.0342048611111114
1230.910.8832951388888890.8829166666666670.000378472222222210.0267048611111113
1240.90.8848784722222220.8875-0.002621527777777770.0151215277777781
1250.890.8828784722222220.8875-0.004621527777777780.00712152777777797
1260.880.8780868055555560.884583333333333-0.006496527777777790.00191319444444449
1270.87NANA-0.00199652777777779NA
1280.86NANA-0.00241319444444445NA
1290.87NANA-0.000829861111111101NA
1300.87NANA0.00483680555555556NA
1310.87NANA0.00558680555555555NA
1320.85NANA0.00542013888888891NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264247772y43tacoskwt5guk/1ye701264247568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264247772y43tacoskwt5guk/1ye701264247568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/23/t1264247772y43tacoskwt5guk/2zynx1264247568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264247772y43tacoskwt5guk/2zynx1264247568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/23/t1264247772y43tacoskwt5guk/3nle51264247568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264247772y43tacoskwt5guk/3nle51264247568.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/23/t1264247772y43tacoskwt5guk/45dm01264247568.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264247772y43tacoskwt5guk/45dm01264247568.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