Home » date » 2008 » May » 24 »

Classical decomposition - Joachim Van Der Aa - Eigen tijdreeks

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 24 May 2008 08:16:33 -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/24/t1211639449tyojciufja8ayvg.htm/, Retrieved Sat, 24 May 2008 16:30:54 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
66.2 66.2 66.08 66.31 66.39 66.37 66.23 66.27 66.27 66.27 66.28 66.28 66.28 66.26 66.13 65.86 65.9 65.94 65.94 65.91 65.95 65.91 66.08 66.47 66.47 66.56 66.78 67.08 67.28 67.27 67.27 67.26 67.37 67.5 67.63 67.64 67.64 67.71 67.87 67.93 68.33 68.39 68.39 68.58 68.44 68.49 68.52 68.54 68.54 68.54 68.62 68.75 68.71 68.72 68.72 68.72 68.92 68.9 69.12 69.09 69.09 69.1 69.16 68.83 68.52 68.53 68.53 68.51 68.38 68.44 68.41 68.42 68.42 68.45 68.63 68.84 68.72 68.37 68.37 68.47 68.69 68.46 68.17 68.17
 
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 time13 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
166.2NANA0.0286319444444478NA
266.2NANA0.0207986111111130NA
366.08NANA0.0625486111111092NA
466.31NANA0.00488194444444663NA
566.39NANA0.0270486111111102NA
666.37NANA0.0134652777777778NA
766.2366.243631944444466.2658333333333-0.0222013888888905-0.0136319444444410
866.2766.239381944444466.2716666666667-0.03228472222222320.03061805555555
966.2766.220881944444466.27625-0.05536805555555540.049118055555553
1066.2766.194548611111166.2595833333333-0.06503472222222470.0754513888888795
1166.2866.211048611111166.2204166666667-0.009368055555557460.0689513888888911
1266.2866.208965277777866.18208333333330.02688194444444650.0710347222222225
1366.2866.180715277777866.15208333333330.02863194444444780.0992847222222224
1466.2666.145798611111166.1250.02079861111111300.114201388888887
1566.1366.159215277777866.09666666666670.0625486111111092-0.0292152777777801
1665.8666.073215277777866.06833333333330.00488194444444663-0.213215277777778
1765.966.072048611111166.0450.0270486111111102-0.172048611111109
1865.9466.058048611111166.04458333333330.0134652777777778-0.118048611111107
1965.9466.038215277777866.0604166666667-0.0222013888888905-0.0982152777777827
2065.9166.048548611111166.0808333333333-0.0322847222222232-0.138548611111105
2165.9566.065048611111166.1204166666667-0.0553680555555554-0.115048611111092
2265.9166.133298611111166.1983333333333-0.0650347222222247-0.223298611111119
2366.0866.297298611111166.3066666666667-0.00936805555555746-0.217298611111104
2466.4766.446465277777866.41958333333330.02688194444444650.0235347222222231
2566.4766.559048611111166.53041666666670.0286319444444478-0.0890486111111102
2666.5666.662881944444566.64208333333330.0207986111111130-0.102881944444448
2766.7866.820048611111166.75750.0625486111111092-0.0400486111111036
2867.0866.887798611111166.88291666666670.004881944444446630.192201388888890
2967.2867.040798611111167.013750.02704861111111020.239201388888901
3067.2767.140548611111167.12708333333330.01346527777777780.129451388888896
3167.2767.202381944444467.2245833333333-0.02220138888889050.0676180555555561
3267.2667.288965277777867.32125-0.0322847222222232-0.0289652777777576
3367.3767.359215277777867.4145833333333-0.05536805555555540.0107847222222262
3467.567.430381944444567.4954166666667-0.06503472222222470.0696180555555372
3567.6367.565215277777867.5745833333333-0.009368055555557460.064784722222214
3667.6467.691881944444467.6650.0268819444444465-0.0518819444444318
3767.6467.786965277777867.75833333333330.0286319444444478-0.146965277777767
3867.7167.880798611111167.860.0207986111111130-0.170798611111124
3967.8768.022131944444567.95958333333330.0625486111111092-0.152131944444449
4067.9368.050298611111168.04541666666670.00488194444444663-0.120298611111110
4168.3368.150798611111168.123750.02704861111111020.179201388888885
4268.3968.211798611111168.19833333333330.01346527777777780.178201388888880
4368.3968.251131944444468.2733333333333-0.02220138888889050.138868055555562
4468.5868.313131944444568.3454166666667-0.03228472222222320.266868055555548
4568.4468.355881944444468.41125-0.05536805555555540.0841180555555496
4668.4968.411631944444468.4766666666667-0.06503472222222470.0783680555555577
4768.5268.517298611111168.5266666666667-0.009368055555557460.00270138888888027
4868.5468.583131944444468.556250.0268819444444465-0.0431319444444398
4968.5468.612381944444468.583750.0286319444444478-0.0723819444444302
5068.5468.624131944444468.60333333333330.0207986111111130-0.0841319444444366
5168.6268.691715277777868.62916666666670.0625486111111092-0.0717152777777699
5268.7568.671131944444468.666250.004881944444446630.0788680555555601
5368.7168.735381944444468.70833333333330.0270486111111102-0.0253819444444474
5468.7268.769715277777868.756250.0134652777777778-0.0497152777777927
5568.7268.779881944444568.8020833333333-0.0222013888888905-0.0598819444444558
5668.7268.816048611111168.8483333333333-0.0322847222222232-0.0960486111111152
5768.9268.838798611111168.8941666666667-0.05536805555555540.0812013888888998
5868.968.854965277777868.92-0.06503472222222470.0450347222222405
5969.1268.906048611111168.9154166666667-0.009368055555557460.213951388888901
6069.0968.926465277777868.89958333333330.02688194444444650.163534722222238
6169.0968.912381944444468.883750.02863194444444780.177618055555570
6269.168.887881944444468.86708333333330.02079861111111300.212118055555550
6369.1668.898381944444568.83583333333330.06254861111110920.261618055555545
6468.8368.799048611111168.79416666666670.004881944444446630.0309513888888802
6568.5268.772465277777868.74541666666670.0270486111111102-0.252465277777787
6668.5368.701381944444468.68791666666670.0134652777777778-0.171381944444448
6768.5368.609881944444468.6320833333333-0.0222013888888905-0.0798819444444376
6868.5168.544798611111168.5770833333333-0.0322847222222232-0.0347986111110856
6968.3868.472548611111168.5279166666667-0.0553680555555554-0.0925486111110985
7068.4468.441215277777868.50625-0.0650347222222247-0.00121527777777430
7168.4168.505631944444468.515-0.00936805555555746-0.0956319444444489
7268.4268.543548611111168.51666666666670.0268819444444465-0.123548611111104
7368.4268.531965277777868.50333333333330.0286319444444478-0.111965277777770
7468.4568.515798611111168.4950.0207986111111130-0.06579861111112
7568.6368.568798611111168.506250.06254861111110920.0612013888888896
7668.8468.524881944444468.520.004881944444446630.315118055555573
7768.7268.537881944444468.51083333333330.02704861111111020.182118055555563
7868.3768.503881944444468.49041666666660.0134652777777778-0.133881944444425
7968.37NANA-0.0222013888888905NA
8068.47NANA-0.0322847222222232NA
8168.69NANA-0.0553680555555554NA
8268.46NANA-0.0650347222222247NA
8368.17NANA-0.00936805555555746NA
8468.17NANA0.0268819444444465NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/24/t1211639449tyojciufja8ayvg/1orvy1211638578.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/24/t1211639449tyojciufja8ayvg/1orvy1211638578.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/24/t1211639449tyojciufja8ayvg/2e4tf1211638578.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/24/t1211639449tyojciufja8ayvg/2e4tf1211638578.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/24/t1211639449tyojciufja8ayvg/36x471211638578.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/24/t1211639449tyojciufja8ayvg/36x471211638578.ps (open in new window)


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