Home » date » 2008 » May » 19 » attachments

decompositie

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 19 May 2008 11:55:37 -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/19/t12112198772vm14dklsk2oj1s.htm/, Retrieved Mon, 19 May 2008 19:58:02 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
16.100 15.800 16.900 17.800 17.600 18.300 18.000 15.700 14.500 14.000 15.500 15.800 15.800 15.900 18.000 19.900 20.600 20.600 20.800 20.000 18.500 17.700 17.000 16.600 16.700 17.300 19.100 20.200 20.700 21.500 21.000 16.800 16.800 16.500 17.200 17.300 17.600 18.400 19.900 20.500 21.200 21.300 20.800 18.800 18.100 18.100 18.800 18.700 18.700 19.000 20.100 20.500 21.600 21.800 21.500 21.200 20.400 20.400 20.600 19.300 18.600 19.400 23.500 24.600 25.900 26.600 24.100 21.800 21.300 21.100 21.200 21.600
 
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 time2 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
116.1NANA-1.40425347222222NA
215.8NANA-1.04800347222222NA
316.9NANA0.458246527777778NA
417.8NANA1.33012152777777NA
517.6NANA1.96032986111111NA
618.3NANA2.14574652777778NA
71818.125954861111116.32083333333331.80512152777778-0.125954861111111
815.716.226996527777816.3125-0.0855034722222209-0.526996527777779
914.515.433246527777816.3625-0.929253472222222-0.93324652777778
101415.185329861111116.4958333333333-1.31050347222222-1.18532986111111
1115.515.518663194444416.7083333333333-1.18967013888889-0.0186631944444429
1215.815.196788194444416.9291666666667-1.732378472222220.60321180555556
1315.815.737413194444417.1416666666667-1.404253472222220.0625868055555578
1415.916.389496527777817.4375-1.04800347222222-0.489496527777774
151818.241579861111117.78333333333330.458246527777778-0.241579861111113
1619.919.434288194444418.10416666666671.330121527777770.465711805555557
1720.620.281163194444418.32083333333331.960329861111110.318836805555559
1820.620.562413194444418.41666666666672.145746527777780.0375868055555557
1920.820.292621527777818.48751.805121527777780.507378472222225
202018.497829861111118.5833333333333-0.08550347222222091.50217013888889
2118.517.758246527777818.6875-0.9292534722222220.741753472222221
2217.717.435329861111118.7458333333333-1.310503472222220.264670138888892
231717.572829861111118.7625-1.18967013888889-0.572829861111106
2416.617.071788194444418.8041666666667-1.73237847222222-0.471788194444443
2516.717.445746527777818.85-1.40425347222222-0.74574652777778
2617.317.676996527777818.725-1.04800347222222-0.376996527777777
2719.118.979079861111118.52083333333330.4582465277777780.120920138888891
2820.219.730121527777818.41.330121527777770.469878472222224
2920.720.318663194444418.35833333333331.960329861111110.381336805555556
3021.520.541579861111118.39583333333332.145746527777780.95842013888889
312120.267621527777818.46251.805121527777780.732378472222223
3216.818.460329861111118.5458333333333-0.0855034722222209-1.66032986111111
3316.817.695746527777818.625-0.929253472222222-0.895746527777778
3416.517.360329861111118.6708333333333-1.31050347222222-0.860329861111111
3517.217.514496527777818.7041666666667-1.18967013888889-0.314496527777781
3617.316.984288194444418.7166666666667-1.732378472222220.315711805555559
3717.617.295746527777818.7-1.404253472222220.304253472222225
3818.417.726996527777818.775-1.048003472222220.673003472222224
3919.919.370746527777818.91250.4582465277777780.529253472222223
4020.520.363454861111119.03333333333331.330121527777770.136545138888891
4121.221.126996527777819.16666666666671.960329861111110.0730034722222221
4221.321.437413194444419.29166666666672.14574652777778-0.137413194444445
4320.821.200954861111119.39583333333331.80512152777778-0.400954861111114
4418.819.381163194444419.4666666666667-0.0855034722222209-0.58116319444444
4518.118.570746527777819.5-0.929253472222222-0.470746527777774
4618.118.197829861111119.5083333333333-1.31050347222222-0.097829861111105
4718.818.335329861111119.525-1.189670138888890.464670138888895
4818.717.830121527777819.5625-1.732378472222220.869878472222222
4918.718.208246527777819.6125-1.404253472222220.491753472222221
501918.693663194444419.7416666666667-1.048003472222220.306336805555553
5120.120.395746527777819.93750.458246527777778-0.295746527777776
5220.521.459288194444420.12916666666671.33012152777777-0.95928819444444
5321.622.260329861111120.31.96032986111111-0.660329861111116
5421.822.545746527777820.42.14574652777778-0.745746527777776
5521.522.225954861111120.42083333333331.80512152777778-0.72595486111111
5621.220.347829861111120.4333333333333-0.08550347222222090.85217013888889
5720.419.662413194444420.5916666666667-0.9292534722222220.737586805555555
5820.419.593663194444420.9041666666667-1.310503472222220.806336805555553
5920.620.064496527777821.2541666666667-1.189670138888890.535503472222224
6019.319.900954861111121.6333333333333-1.73237847222222-0.600954861111113
6118.620.537413194444421.9416666666667-1.40425347222222-1.93741319444444
6219.421.026996527777822.075-1.04800347222222-1.62699652777778
6323.522.595746527777822.13750.4582465277777780.904253472222223
6424.623.534288194444422.20416666666671.330121527777771.06571180555556
6525.924.218663194444422.25833333333331.960329861111111.68133680555555
6626.624.524913194444422.37916666666672.145746527777782.07508680555556
6724.1NANA1.80512152777778NA
6821.8NANA-0.0855034722222209NA
6921.3NANA-0.929253472222222NA
7021.1NANA-1.31050347222222NA
7121.2NANA-1.18967013888889NA
7221.6NANA-1.73237847222222NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112198772vm14dklsk2oj1s/1rcwu1211219735.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112198772vm14dklsk2oj1s/1rcwu1211219735.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112198772vm14dklsk2oj1s/2wyqy1211219735.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112198772vm14dklsk2oj1s/2wyqy1211219735.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112198772vm14dklsk2oj1s/3ujse1211219735.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112198772vm14dklsk2oj1s/3ujse1211219735.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112198772vm14dklsk2oj1s/488mz1211219735.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112198772vm14dklsk2oj1s/488mz1211219735.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