Home » date » 2008 » May » 25 »

sven van roy - oefening 9 - eigen opgave

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 25 May 2008 14:31:34 -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/25/t12117477366gsrk2gfu8s703k.htm/, Retrieved Sun, 25 May 2008 22:35:40 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
7,1 7,1 7,3 7,1 7,4 7,3 7,4 7,6 7,8 7,7 8 8,1 7,7 7,9 8,1 8,1 8,2 8,1 8,3 8,3 8,3 8,5 8,7 8,7 8,4 8,4 8,6 8,7 8,7 8,6 8 8,1 8,1 8,5 8,6 8,6 8,3 8,3 8,5 9,2 9,2 9 7,4 7,3 7,4 8,6 8,7 8,7 8,5 8,4 8,6 8,4 8,4 8,2 7,7 7,6 7,7 8,1 8,2 8,3 8,1 8 8,2 7,6 7,7 7,6 6,9 6,9 7 7,4 7,4 7,5
 
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 time6 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
17.1NANA0.991268649237307NA
27.1NANA0.993975349937138NA
37.3NANA1.01809627062146NA
47.1NANA1.03550986601162NA
57.4NANA1.03779566256016NA
67.3NANA1.01922553907837NA
77.47.094280772530017.516666666666670.9438067546603121.04309375922275
87.67.121181638257137.5750.9400899852484661.06723861095896
97.87.22818802029837.641666666666670.94589156208921.07910862004363
107.77.811506580983117.716666666666671.012290269673840.985725342502486
1188.015314656251417.791666666666671.028703485294300.998089325633714
128.18.120382075577717.858333333333331.033346605587830.997490010274392
137.77.859934331244147.929166666666670.9912686492373070.979651950702898
147.97.947661235539037.995833333333330.9939753499371380.994003111843027
158.18.191432910708538.045833333333331.018096270621460.988837983329021
168.18.387629914694098.11.035509866011620.965707843858228
178.28.47100709564738.16251.037795662560160.968007688744996
188.18.374636512760628.216666666666671.019225539078370.967206157265196
198.37.806068366669668.270833333333330.9438067546603121.06327534043121
208.37.822332085588288.320833333333330.9400899852484661.06106464276706
218.37.910018187970938.36250.94589156208921.04930226489518
228.58.511674017507518.408333333333331.012290269673840.99862846985405
238.78.696830715258888.454166666666671.028703485294301.00036441835479
248.78.779140536639958.495833333333331.033346605587830.99098538902417
258.48.42991380455568.504166666666660.9912686492373070.996451469700743
268.48.432224218633398.483333333333330.9939753499371380.99617844381294
278.68.61988175792848.466666666666671.018096270621460.99769349992416
288.78.758687616681588.458333333333331.035509866011620.993299496539892
298.78.773697497227348.454166666666671.037795662560160.991600178003558
308.68.608209032132758.445833333333331.019225539078370.999046371654997
3187.963369492446388.43750.9438067546603121.00459987541560
328.17.924175167323538.429166666666670.9400899852484661.02218840812625
338.17.965195195759478.420833333333330.94589156208921.01692423109886
348.58.5411991503738.43751.012290269673840.995176420822455
358.68.722548302391248.479166666666671.028703485294300.985950401403034
368.68.800668590923038.516666666666661.033346605587830.977198483405
378.38.434044090594088.508333333333330.9912686492373070.984106783275704
388.38.399091706968828.450.9939753499371380.988202092508813
398.58.539282469837538.38751.018096270621460.995399792666856
409.28.659451254522138.36251.035509866011621.06242297919231
419.28.687214525347338.370833333333331.037795662560161.05902760581732
4298.540260662860868.379166666666671.019225539078371.05383200294324
437.47.920111682857788.391666666666670.9438067546603120.93433025900588
447.37.900672917692328.404166666666670.9400899852484660.923971929486259
457.47.957312766075398.41250.94589156208920.929962189188869
468.68.486366760765678.383333333333331.012290269673841.01339009289107
478.78.555383986030928.316666666666661.028703485294301.01690350943981
488.78.525109496099618.251.033346605587831.02051475162640
498.58.157314926015338.229166666666660.9912686492373071.04200954322504
508.48.204438200939468.254166666666670.9939753499371381.0238360987396
518.68.428988707186878.279166666666671.018096270621461.02028847098434
528.48.56452951680448.270833333333331.035509866011620.980789427313949
538.48.54019347315138.229166666666671.037795662560160.98358427433851
548.28.349155874283678.191666666666671.019225539078370.98213521504095
557.77.699890106770388.158333333333330.9438067546603121.00001427205169
567.67.638231130143798.1250.9400899852484660.994994766524816
577.77.653839223238448.091666666666670.94589156208921.00603106172147
588.18.14050091862718.041666666666671.012290269673840.995024763336807
598.28.20819655974417.979166666666671.028703485294300.999001417706748
608.38.189271849283577.9251.033346605587831.01352112284881
618.17.797980040666817.866666666666670.9912686492373071.03873053762104
6287.757149293467757.804166666666670.9939753499371381.03130669493969
638.27.88600402952217.745833333333331.018096270621461.03981686660347
647.67.96048209496437.68751.035509866011620.954716047261468
657.77.913191927021217.6251.037795662560160.973058668488348
667.67.70364636620077.558333333333331.019225539078370.986545804249863
676.9NANA0.943806754660312NA
686.9NANA0.940089985248466NA
697NANA0.9458915620892NA
707.4NANA1.01229026967384NA
717.4NANA1.02870348529430NA
727.5NANA1.03334660558783NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117477366gsrk2gfu8s703k/190u71211747487.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117477366gsrk2gfu8s703k/190u71211747487.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117477366gsrk2gfu8s703k/2dadz1211747487.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117477366gsrk2gfu8s703k/2dadz1211747487.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117477366gsrk2gfu8s703k/3vi8z1211747487.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117477366gsrk2gfu8s703k/3vi8z1211747487.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117477366gsrk2gfu8s703k/4ey261211747487.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117477366gsrk2gfu8s703k/4ey261211747487.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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