Home » date » 2011 » Jan » 02 »

opgave 9 oefening 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 02 Jan 2011 09:56:53 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/Jan/02/t1293962211i9den5beghwub2n.htm/, Retrieved Sun, 02 Jan 2011 10:56:54 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2011/Jan/02/t1293962211i9den5beghwub2n.htm/},
    year = {2011},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2011},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
17,88 18,11 18,16 18,27 18,29 18,35 18,35 18,38 18,41 18,41 18,42 18,43 18,48 18,54 18,65 18,66 18,69 18,72 18,72 18,73 18,84 18,83 18,91 18,91 18,94 18,97 19 19,08 19,18 19,24 19,23 19,25 19,3 19,33 19,35 19,35 19,31 19,47 19,7 19,76 19,9 19,97 20,1 20,26 20,44 20,43 20,57 20,6 20,69 20,93 20,98 21,11 21,14 21,16 21,32 21,32 21,48 21,58 21,74 21,75 21,81 21,89 22,21 22,37 22,47 22,51 22,55 22,61 22,58 22,85 22,93 22,98 23,01 23,11 23,18 23,18 23,21 23,22 23,12 23,15 23,16 23,21 23,21 23,22
 
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'Gwilym Jenkins' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
117.88NANA0.996280864644009NA
218.11NANA0.998504763589337NA
318.16NANA1.00182984494166NA
418.27NANA1.00214888932017NA
518.29NANA1.00244279201957NA
618.35NANA1.00113251145279NA
718.3518.322433680391418.31333333333331.000496924666441.00150451190543
818.3818.344587173514718.356250.9993646400280411.00193042373482
918.4118.397534793067418.39458333333331.000160452655031.00067754767543
1018.4118.424719606576518.431250.9996456890648470.999201094676566
1118.4218.468865186634118.46416666666671.00025446693870.997354185753144
1218.4318.454414454466418.496250.9977381606794010.998677039874301
1318.4818.458178602664918.52708333333330.9962808646440091.00118220750838
1418.5418.529336106657618.55708333333330.9985047635893371.00057551405409
1518.6518.623599388363418.58958333333331.001829844941661.00141758910756
1618.6618.665023063588118.6251.002148889320170.999730883612037
1718.6918.708506290561918.66291666666671.002442792019570.999010808758622
1818.7218.724515072538618.70333333333331.001132511452790.999758868386117
1918.7218.751813610560818.74251.000496924666440.998303438204886
2018.7318.767651537793318.77958333333330.9993646400280410.997993806645576
2118.8418.815101782050918.81208333333331.000160452655031.00132331029816
2218.8318.837489972352818.84416666666670.9996456890648470.999602390108034
2318.9118.886888199275518.88208333333331.00025446693871.00122369553315
2418.9118.881363242390418.92416666666670.9977381606794011.00151666790379
2518.9418.896542183108318.96708333333330.9962808646440091.00229977614267
2618.9718.981575555833319.010.9985047635893370.999390168861417
271919.085693404342819.05083333333331.001829844941660.995510071207406
2819.0819.131857421196419.09083333333331.002148889320170.997289472733631
2919.1819.176730611334419.131.002442792019571.00017048728127
3019.2419.188373136178419.16666666666671.001132511452791.00269052844945
3119.2319.209957827314319.20041666666671.000496924666441.00104332205546
3219.2519.224444458672819.23666666666670.9993646400280411.00132932534837
3319.319.289761263540119.28666666666671.000160452655031.00053078606417
3419.3319.337312816885219.34416666666670.9996456890648470.999621828691789
3519.3519.407437294778219.40251.00025446693870.997040449292413
3619.3519.418894676456519.46291666666670.9977381606794010.99645218342216
3719.3119.456950169470619.52958333333330.9962808646440090.992447420166541
3819.4719.578598195729419.60791666666670.9985047635893370.99445321903827
3919.719.733543370738419.69751.001829844941660.99830018511586
4019.7619.833361643720519.79083333333331.002148889320170.996301098873787
4119.919.936081026289219.88751.002442792019570.998190164544295
4219.9720.013056042487619.99041666666671.001132511452790.997848602312599
4320.120.109988185795520.11.000496924666440.999503322145036
4420.2620.205487413633620.21833333333330.9993646400280411.00269790999101
4520.4420.335762403608520.33251.000160452655031.00512582682285
4620.4320.43484047967120.44208333333330.9996456890648470.99976312613373
4720.5720.555229295590420.551.00025446693871.00071858621459
4820.620.604540190730520.651250.9977381606794010.999779650956126
4920.6920.674488409470920.75166666666670.9962808646440091.00075027687369
5020.9320.815495971625720.84666666666670.9985047635893371.00550090319877
5120.9820.972472945649620.93416666666671.001829844941661.00035890161212
5221.1121.070597959993721.02541666666671.002148889320171.00187000103562
5321.1421.173680189936721.12208333333331.002442792019570.998409336986554
5421.1621.242780477388821.218751.001132511452790.99610312418956
5521.3221.323924454390821.31333333333331.000496924666440.999815960031225
5621.3221.386403296600121.40.9993646400280410.996895069466372
5721.4821.494698328122521.491251.000160452655030.999316188210781
5821.5821.587348655355421.5950.9996456890648470.999659585089735
5921.7421.708439341431821.70291666666671.00025446693871.00145384281531
6021.7521.765242250987521.81458333333330.9977381606794010.99929969761826
6121.8121.840552138131321.92208333333330.9962808646440090.998601127941358
6221.8921.994147636312622.02708333333330.9985047635893370.995264756878294
6322.2122.167155035742522.12666666666671.001829844941661.00193281294728
6422.3722.273176627177922.22541666666671.002148889320171.00434708413814
6522.4722.382459123313622.32791666666671.002442792019571.00391113756554
6622.5122.454150816246722.428751.001132511452791.00248725432595
6722.5522.541195712734922.531.000496924666441.00039058652333
6822.6122.616454607701322.63083333333330.9993646400280410.999714605679218
6922.5822.72572915193222.72208333333331.000160452655030.993587481793971
7022.8522.788173039344522.796250.9996456890648471.00271311616551
7122.9322.866650659607922.86083333333331.00025446693871.00277038125675
7222.9822.869405815472722.921250.9977381606794011.00483590109072
7323.0122.889137748169222.97458333333330.9962808646440091.00528033223272
7423.1122.986411745129523.02083333333330.9985047635893371.00537657883452
7523.1823.109709948191823.06751.001829844941661.00304158087513
7623.1823.156320335891323.10666666666671.002148889320171.00102260047215
7723.2123.18984325538623.13333333333331.002442792019571.00086920572908
7823.2223.181223302689323.1551.001132511452791.00167276320168
7923.12NANA1.00049692466644NA
8023.15NANA0.999364640028041NA
8123.16NANA1.00016045265503NA
8223.21NANA0.999645689064847NA
8323.21NANA1.0002544669387NA
8423.22NANA0.997738160679401NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/02/t1293962211i9den5beghwub2n/1zric1293962211.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/02/t1293962211i9den5beghwub2n/1zric1293962211.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/02/t1293962211i9den5beghwub2n/2kc0e1293962211.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/02/t1293962211i9den5beghwub2n/2kc0e1293962211.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/02/t1293962211i9den5beghwub2n/3dlxb1293962211.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/02/t1293962211i9den5beghwub2n/3dlxb1293962211.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/02/t1293962211i9den5beghwub2n/4oke91293962211.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/02/t1293962211i9den5beghwub2n/4oke91293962211.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