Home » date » 2008 » Aug » 11 »

Michaël Mertens opdracht 9

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 11 Aug 2008 12:38:25 -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/Aug/11/t1218479932npcmyf853pw25q0.htm/, Retrieved Mon, 11 Aug 2008 18:38:57 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
15,14 15,09 15,17 15,18 15,21 15,27 15,28 15,3 15,34 15,33 15,27 15,35 15,38 15,38 15,39 15,4 15,39 15,43 15,43 15,47 15,48 15,47 15,58 15,56 15,61 15,56 15,62 15,63 15,58 15,65 15,79 15,76 15,77 15,79 15,87 15,79 15,9 15,96 16,05 16,18 16,29 16,43 16,38 16,39 16,35 16,48 16,52 16,44 16,46 16,52 16,47 16,59 16,59 16,59 16,54 16,48 16,47 16,56 16,61 16,57 16,72 16,69 16,72 16,81 16,75 16,85 16,84 16,92 17,02 17,11 17,2 17,3 17,37 17,42 17,51 17,56 17,62 17,59 17,78 17,73 17,79 17,85 17,86 17,79 17,97 17,96 18,03 18,02 18,03 18,14 18,16 18,24 18,28 18,18 18,19 18,32
 
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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
115.14NANA1.00061085861474NA
215.09NANA0.999410858151133NA
315.17NANA0.99969937898369NA
415.18NANA1.00175638135208NA
515.21NANA1.00007670526470NA
615.27NANA1.00128367876243NA
715.2815.274649177368315.25416666666671.001342748584651.00035030739951
815.315.262671268936815.276250.9991111214425561.00244575345989
915.3415.269747042070215.29750.9981857847406541.00460079382692
1015.3315.312195328322315.31583333333330.9997624677069931.00116277720444
1115.2715.354981823366615.33251.001466285561160.994465521070352
1215.3515.305134455884315.34666666666670.9972937308352061.00293140476779
1315.3815.368965867131315.35958333333331.000610858614741.00071794894751
1415.3815.363859838119215.37291666666670.9994108581511331.00105052780036
1515.3915.381208028479915.38583333333330.999699378983691.00057160474677
1615.415.424543881868615.39751.001756381352080.998408777461648
1715.3915.417432507537015.416251.000076705264700.99822068249538
1815.4315.457733992427915.43791666666671.001283678762430.998205817719371
1915.4315.477003857811515.456251.001342748584650.996962987265281
2015.4715.459579419121115.47333333333330.9991111214425561.00067405332295
2115.4815.462313716376415.49041666666670.9981857847406541.00114383163788
2215.4715.505899306440615.50958333333330.9997624677069930.99768479688078
2315.5815.54985047143215.52708333333331.001466285561161.00193889507963
2415.5615.502099967724215.54416666666670.9972937308352061.00373497993151
2515.6115.577843383867215.56833333333331.000610858614741.00206425339763
2615.5615.586228754057815.59541666666670.9994108581511330.998317184068597
2715.6215.614887758317315.61958333333330.999699378983691.00032739535255
2815.6315.672478586253315.6451.001756381352080.99728960636191
2915.5815.671618670125115.67041666666671.000076705264700.994153847662224
3015.6515.712226927446715.69208333333331.001283678762430.996039585748474
3115.7915.73484961557215.713751.001342748584651.00350498325535
3215.7615.728506829309415.74250.9991111214425561.00200229882165
3315.7715.748460308002015.77708333333330.9981857847406541.0013677331991
3415.7915.814159400650215.81791666666670.9997624677069930.998472293086331
3515.8715.893687229474715.87041666666671.001466285561160.998509645425088
3615.7915.889382366531915.93250.9972937308352060.993745359999565
3715.915.999350708058615.98958333333331.000610858614740.993790328753242
3815.9616.030966585935116.04041666666670.9994108581511330.9955731561441
3916.0516.085996090663416.09083333333330.999699378983690.997762271577059
4016.1816.172104581452616.143751.001756381352081.00048821218708
4116.2916.20082592666116.19958333333331.000076705264701.00550429180232
4216.4316.274614593684916.253751.001283678762431.00954771650171
4316.3816.326059063382216.30416666666671.001342748584651.00330397779454
4416.3916.33629942818716.35083333333330.9991111214425561.00328719316447
4516.3516.361928654873916.39166666666670.9981857847406540.999270950563012
4616.4816.42234823517216.426250.9997624677069931.00351056767293
4716.5216.479962284146916.45583333333331.001466285561161.00242947860940
4816.4416.4304142155116.4750.9972937308352061.00058341709249
4916.4616.498405373792716.48833333333331.000610858614740.997672176618127
5016.5216.48902989592116.498750.9994108581511331.00187822475152
5116.4716.502537498573316.50750.999699378983690.99802833360772
5216.5916.544841435014016.51583333333331.001756381352081.00272946496123
5316.5916.524184061363216.52291666666671.000076705264701.00398300686995
5416.5916.553305217607116.53208333333331.001283678762431.00221676468297
5516.5416.570553584494916.54833333333331.001342748584650.998156151854604
5616.4816.551524615597716.566250.9991111214425560.995678669049597
5716.4716.553663507692816.583750.9981857847406540.994945921931182
5816.5616.599389505495116.60333333333330.9997624677069930.997627050953768
5916.6116.643535110788616.61916666666671.001466285561160.99798509688204
6016.5716.591643368661716.63666666666670.9972937308352060.998695525923455
6116.7216.670176904521616.661.000610858614741.00298875625398
6216.6916.681000064924216.69083333333330.9994108581511331.00053953210484
6316.7216.727053317436716.73208333333330.999699378983690.99957832875266
6416.8116.807385086626716.77791666666671.001756381352081.00015558121384
6516.7516.826707264705816.82541666666671.000076705264700.995441338373627
6616.8516.902085699042716.88041666666671.001283678762430.996918386288525
6716.8416.960660030297716.93791666666671.001342748584650.992885888280163
6816.9216.980309805216816.99541666666670.9991111214425560.9964482505968
6917.0217.027801755444617.058750.9981857847406540.999541822511403
7017.1117.118849421007917.12291666666670.9997624677069930.999483059825446
7117.217.215622726415417.19041666666671.001466285561160.999092526209265
7217.317.210796559888617.25750.9972937308352061.0051829931172
7317.3717.338084652646917.32751.000610858614741.00184076545896
7417.4217.390165353020617.40041666666670.9994108581511331.00171560456003
7517.5117.460999278173917.466250.999699378983691.00280629539269
7617.5617.559954568117517.52916666666671.001756381352081.00000258724374
7717.6217.588849053843017.58751.000076705264701.00177106222594
7817.5917.658054876508317.63541666666671.001283678762430.99614595848839
7917.7817.704574247267117.68083333333331.001342748584651.00426024097951
8017.7317.712574997974117.72833333333330.9991111214425561.00098376447399
8117.7917.740256859303317.77250.9981857847406541.00280396958687
8217.8517.809102091420617.81333333333330.9997624677069931.00229646101019
8317.8617.875755919647817.84958333333331.001466285561160.999118587224024
8417.7917.841169305587317.88958333333330.9972937308352060.997131953365226
8517.9717.939285010198017.92833333333331.000610858614741.00171216354412
8617.9617.95483248787617.96541666666670.9994108581511331.00028780620078
8718.0318.001670025640918.00708333333330.999699378983691.00157374145392
8818.0218.072937315068218.041251.001756381352080.9970709069508
8918.0318.070135968251618.068751.000076705264700.997778878458794
9018.1418.127823802461018.10458333333331.001283678762431.00067168556312
9118.16NANA1.00134274858465NA
9218.24NANA0.999111121442556NA
9318.28NANA0.998185784740654NA
9418.18NANA0.999762467706993NA
9518.19NANA1.00146628556116NA
9618.32NANA0.997293730835206NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218479932npcmyf853pw25q0/1xlju1218479900.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218479932npcmyf853pw25q0/1xlju1218479900.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218479932npcmyf853pw25q0/23ifp1218479900.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218479932npcmyf853pw25q0/23ifp1218479900.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218479932npcmyf853pw25q0/3r6nj1218479900.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218479932npcmyf853pw25q0/3r6nj1218479900.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218479932npcmyf853pw25q0/48pej1218479900.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/11/t1218479932npcmyf853pw25q0/48pej1218479900.ps (open in new window)


 
Parameters (Session):
 
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