Home » date » 2008 » May » 31 »

Classical Decomposition - Niels Braspennincx - Gem p badpak

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 31 May 2008 14:27:03 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/31/t1212265925q8xfscpaf0ruy34.htm/, Retrieved Sat, 31 May 2008 20:32:05 +0000
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
38 38 37.93 38 38.02 38.02 38.02 37.96 37.96 37.99 38 38 38 38.01 38.06 38.02 38.05 38.05 38.05 38.05 38.03 37.98 38.03 38.04 38.04 38.08 38.14 38.37 38.49 38.55 38.55 38.55 38.48 38.51 38.48 38.48 38.48 38.43 38.43 38.45 38.48 38.47 38.47 38.42 38.55 38.56 38.57 38.57 38.57 38.57 38.62 38.73 38.74 38.68 38.69 38.69 38.61 38.77 38.78 38.81 38.81 38.81 38.76 38.93 38.95 38.97 38.97 38.96 38.92 38.95 38.95 38.97 38.97 39.05 39.08 38.83 38.86 38.87 38.87 38.75 38.86 38.93 38.96 38.95
 
Text written by user:
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
138NANA-0.0345694444444452NA
238NANA-0.0508194444444446NA
337.93NANA-0.0451527777777789NA
438NANA0.0368472222222219NA
538.02NANA0.062930555555557NA
638.02NANA0.0489305555555598NA
738.0238.026430555555637.99166666666670.034763888888889-0.0064305555555535
837.9637.998097222222237.99208333333330.00601388888888816-0.0380972222222198
937.9637.970763888888937.9979166666667-0.0271527777777768-0.0107638888888815
1037.9937.997763888888938.0041666666667-0.00640277777777859-0.00776388888888846
113837.994347222222238.00625-0.01190277777777780.00565277777776885
123837.995263888888938.00875-0.0134861111111140.00473611111110728
133837.976680555555638.01125-0.03456944444444520.0233194444444393
1438.0137.965430555555638.01625-0.05081944444444460.0445694444444413
1538.0637.977763888888938.0229166666667-0.04515277777777890.082236111111122
1638.0238.062263888888938.02541666666670.0368472222222219-0.0422638888888827
1738.0538.089180555555638.026250.062930555555557-0.0391805555555607
1838.0538.078097222222238.02916666666670.0489305555555598-0.0280972222222218
1938.0538.067263888888938.03250.034763888888889-0.0172638888888912
2038.0538.043097222222238.03708333333330.006013888888888160.00690277777777482
2138.0338.016180555555638.0433333333333-0.02715277777777680.0138194444444437
2237.9838.054847222222238.06125-0.00640277777777859-0.0748472222222247
2338.0338.082263888888938.0941666666667-0.0119027777777778-0.0522638888888878
2438.0438.119847222222238.1333333333333-0.013486111111114-0.0798472222222202
2538.0438.140430555555638.175-0.0345694444444452-0.100430555555555
2638.0838.165847222222238.2166666666667-0.0508194444444446-0.0858472222222275
2738.1438.211097222222238.25625-0.0451527777777789-0.071097222222221
2838.3738.333930555555638.29708333333330.03684722222222190.0360694444444363
2938.4938.400847222222238.33791666666670.0629305555555570.0891527777777767
3038.5538.423930555555638.3750.04893055555555980.126069444444447
3138.5538.446430555555638.41166666666670.0347638888888890.103569444444446
3238.5538.450597222222238.44458333333330.006013888888888160.099402777777783
3338.4838.444097222222238.47125-0.02715277777777680.0359027777777854
3438.5138.480263888888938.4866666666667-0.006402777777778590.0297361111111059
3538.4838.477680555555638.4895833333333-0.01190277777777780.00231944444444565
3638.4838.472347222222238.4858333333333-0.0134861111111140.00765277777777129
3738.4838.444597222222238.4791666666667-0.03456944444444520.0354027777777759
3838.4338.419597222222238.4704166666667-0.05081944444444460.0104027777777773
3938.4338.422763888888938.4679166666667-0.04515277777777890.00723611111111211
4038.4538.509763888888938.47291666666670.0368472222222219-0.0597638888888739
4138.4838.541680555555638.478750.062930555555557-0.0616805555555544
4238.4738.535180555555538.486250.0489305555555598-0.0651805555555498
4338.4738.528513888888938.493750.034763888888889-0.0585138888888892
4438.4238.509347222222238.50333333333330.00601388888888816-0.0893472222222229
4538.5538.489930555555638.5170833333333-0.02715277777777680.0600694444444443
4638.5638.530263888888938.5366666666667-0.006402777777778590.0297361111111201
4738.5738.547263888888938.5591666666667-0.01190277777777780.0227361111111151
4838.5738.565263888888938.57875-0.0134861111111140.00473611111111438
4938.5738.562097222222238.5966666666667-0.03456944444444520.00790277777777249
5038.5738.566263888888938.6170833333333-0.05081944444444460.00373611111110961
5138.6238.585680555555638.6308333333333-0.04515277777777890.0343194444444421
5238.7338.678930555555638.64208333333330.03684722222222190.0510694444444439
5338.7438.722513888888938.65958333333330.0629305555555570.0174861111111113
5438.6838.727263888888938.67833333333330.0489305555555598-0.0472638888888852
5538.6938.733097222222238.69833333333330.034763888888889-0.0430972222222223
5638.6938.724347222222238.71833333333330.00601388888888816-0.0343472222222232
5738.6138.707013888888938.7341666666667-0.0271527777777768-0.0970138888888883
5838.7738.741930555555638.7483333333333-0.006402777777778590.0280694444444478
5938.7838.753513888888938.7654166666667-0.01190277777777780.0264861111111045
6038.8138.772763888888938.78625-0.0134861111111140.0372361111111132
6138.8138.775430555555638.81-0.03456944444444520.0345694444444504
6238.8138.782097222222238.8329166666667-0.05081944444444460.0279027777777827
6338.7638.811930555555638.8570833333333-0.0451527777777789-0.0519305555555576
6438.9338.914347222222238.87750.03684722222222190.0156527777777740
6538.9538.955013888888938.89208333333330.062930555555557-0.00501388888889664
6638.9738.954763888888938.90583333333330.04893055555555980.0152361111111148
6738.9738.953930555555638.91916666666670.0347638888888890.0160694444444474
6838.9638.941847222222238.93583333333330.006013888888888160.0181527777777859
6938.9238.932013888888938.9591666666667-0.0271527777777768-0.0120138888888803
7038.9538.961930555555638.9683333333333-0.00640277777777859-0.0119305555555513
7138.9538.948513888888938.9604166666667-0.01190277777777780.00148611111111308
7238.9738.939013888888938.9525-0.0134861111111140.0309861111111118
7338.9738.909597222222238.9441666666667-0.03456944444444520.0604027777777745
7439.0538.880430555555638.93125-0.05081944444444460.169569444444441
7539.0838.874847222222238.92-0.04515277777777890.205152777777776
7638.8338.953513888888938.91666666666670.0368472222222219-0.123513888888894
7738.8638.979180555555638.916250.062930555555557-0.119180555555566
7838.8738.964763888888938.91583333333330.0489305555555598-0.0947638888888989
7938.87NANA0.034763888888889NA
8038.75NANA0.00601388888888816NA
8138.86NANA-0.0271527777777768NA
8238.93NANA-0.00640277777777859NA
8338.96NANA-0.0119027777777778NA
8438.95NANA-0.013486111111114NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265925q8xfscpaf0ruy34/1xxuz1212265618.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265925q8xfscpaf0ruy34/1xxuz1212265618.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265925q8xfscpaf0ruy34/2qmu21212265618.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265925q8xfscpaf0ruy34/2qmu21212265618.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265925q8xfscpaf0ruy34/3h1eo1212265618.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265925q8xfscpaf0ruy34/3h1eo1212265618.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265925q8xfscpaf0ruy34/4wc9w1212265618.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265925q8xfscpaf0ruy34/4wc9w1212265618.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