Home » date » 2010 » Aug » 06 »

Tijdsreeks A - stap 29

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 06 Aug 2010 17:35:03 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Aug/06/t1281116162j47soyitn3pmx53.htm/, Retrieved Fri, 06 Aug 2010 19:36:08 +0200
 
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/2010/Aug/06/t1281116162j47soyitn3pmx53.htm/},
    year = {2010},
}
@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 = {2010},
    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:
Gosselin Claudia
 
Dataseries X:
» Textbox « » Textfile « » CSV «
155 154 153 151 171 170 155 145 146 146 147 149 146 155 149 140 155 152 137 127 134 125 132 141 133 143 141 132 144 140 130 122 124 119 128 131 121 123 116 109 116 109 103 98 95 83 92 94 76 75 77 68 80 66 69 67 68 64 72 70 55 55 54 55 67 54 57 53 49 47 64 58 38 41 38 41 60 49 53 55 56 52 68 68 41 46 41 47 62 48 53 61 59 46 69 69 42 42 42 50 64 47 51 66 64 49 71 68 39 30 22 33 46 24 27 45 38 18 36 31
 
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' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1155NANA-6.289737654321NA
2154NANA-3.12307098765432NA
3153NANA-5.4934413580247NA
4151NANA-4.95640432098766NA
5171NANA9.37229938271605NA
6170NANA-1.23418209876543NA
7155152.742669753086153.125-0.3823302469135792.25733024691357
8145151.964891975309152.791666666667-0.826774691358022-6.96489197530863
9146153.131558641975152.6666666666670.464891975308641-7.13155864197532
10146146.548225308642152.041666666667-5.49344135802469-0.548225308641975
11147158.992669753086150.9166666666678.07600308641976-11.9926697530864
12149159.386188271605149.59.88618827160494-10.3861882716049
13146141.710262345679148-6.2897376543214.28973765432096
14155143.376929012346146.5-3.1230709876543211.6230709876543
15149139.756558641975145.25-5.49344135802479.24344135802465
16140138.918595679012143.875-4.956404320987661.08140432098762
17155151.747299382716142.3759.372299382716053.25270061728395
18152140.182484567901141.416666666667-1.2341820987654311.8175154320988
19137140.159336419753140.541666666667-0.382330246913579-3.15933641975312
20127138.673225308642139.5-0.826774691358022-11.673225308642
21134139.131558641975138.6666666666670.464891975308641-5.13155864197532
22125132.506558641975138-5.49344135802469-7.50655864197535
23132145.284336419753137.2083333333338.07600308641976-13.2843364197531
24141146.136188271605136.259.88618827160494-5.13618827160494
25133129.168595679012135.458333333333-6.2897376543213.83140432098764
26143131.835262345679134.958333333333-3.1230709876543211.1647376543210
27141128.839891975309134.333333333333-5.493441358024712.1601080246913
28132128.710262345679133.666666666667-4.956404320987663.28973765432099
29144142.622299382716133.259.372299382716051.37770061728395
30140131.432484567901132.666666666667-1.234182098765438.56751543209876
31130131.367669753086131.75-0.382330246913579-1.36766975308643
32122129.589891975309130.416666666667-0.826774691358022-7.58989197530863
33124129.006558641975128.5416666666670.464891975308641-5.0065586419753
34119121.048225308642126.541666666667-5.49344135802469-2.04822530864196
35128132.492669753086124.4166666666678.07600308641976-4.49266975308642
36131131.844521604938121.9583333333339.88618827160494-0.844521604938265
37121113.251929012346119.541666666667-6.2897376543217.74807098765432
38123114.293595679012117.416666666667-3.123070987654328.70640432098764
39116109.714891975309115.208333333333-5.49344135802476.28510802469137
40109107.543595679012112.5-4.956404320987661.45640432098766
41116118.872299382716109.59.37229938271605-2.87229938271604
42109105.224151234568106.458333333333-1.234182098765433.77584876543212
43103102.659336419753103.041666666667-0.3823302469135790.340663580246925
449898.339891975308699.1666666666667-0.826774691358022-0.339891975308632
459596.006558641975395.54166666666660.464891975308641-1.00655864197529
468386.714891975308692.2083333333333-5.49344135802469-3.71489197530863
479297.0760030864197898.07600308641976-5.07600308641973
489495.594521604938385.70833333333339.88618827160494-1.59452160493828
497676.21026234567982.5-6.289737654321-0.210262345679013
507576.668595679012479.7916666666667-3.12307098765432-1.66859567901236
517771.881558641975377.375-5.49344135802475.1184413580247
526870.501929012345775.4583333333333-4.95640432098766-2.50192901234567
538083.205632716049473.83333333333339.37229938271605-3.20563271604938
546670.765817901234672-1.23418209876543-4.76581790123457
556969.742669753086470.125-0.382330246913579-0.742669753086403
566767.589891975308668.4166666666667-0.826774691358022-0.589891975308632
576867.089891975308666.6250.4648919753086410.910108024691354
586459.631558641975365.125-5.493441358024694.3684413580247
597272.117669753086464.04166666666678.07600308641976-0.117669753086432
607072.886188271605639.88618827160494-2.88618827160493
615555.71026234567962-6.289737654321-0.710262345679006
625557.793595679012360.9166666666667-3.12307098765432-2.79359567901234
635454.04822530864259.5416666666667-5.4934413580247-0.0482253086419746
645553.08526234567958.0416666666667-4.956404320987661.91473765432099
656766.372299382716579.372299382716050.627700617283942
665454.932484567901256.1666666666667-1.23418209876543-0.932484567901241
675754.576003086419854.9583333333333-0.3823302469135792.42399691358025
685352.839891975308653.6666666666667-0.8267746913580220.160108024691361
694952.881558641975352.41666666666670.464891975308641-3.88155864197531
704745.67322530864251.1666666666667-5.493441358024691.32677469135803
716458.367669753086450.29166666666678.076003086419765.63233024691358
725859.677854938271649.79166666666679.88618827160494-1.6778549382716
733843.126929012345749.4166666666667-6.289737654321-5.12692901234567
744146.21026234567949.3333333333333-3.12307098765432-5.21026234567902
753844.214891975308649.7083333333333-5.4934413580247-6.21489197530864
764145.251929012345750.2083333333333-4.95640432098766-4.25192901234568
776059.955632716049450.58333333333339.372299382716050.0443672839506277
784949.932484567901251.1666666666667-1.23418209876543-0.93248456790122
795351.326003086419751.7083333333333-0.3823302469135791.67399691358025
805551.214891975308652.0416666666667-0.8267746913580223.78510802469136
815652.839891975308652.3750.4648919753086413.16010802469136
825247.256558641975352.75-5.493441358024694.74344135802469
836861.159336419753153.08333333333338.076003086419766.8406635802469
846863.011188271604953.1259.886188271604944.98881172839507
854146.793595679012353.0833333333333-6.289737654321-5.79359567901234
864650.21026234567953.3333333333333-3.12307098765432-4.21026234567901
874148.214891975308653.7083333333333-5.4934413580247-7.21489197530864
884748.626929012345753.5833333333333-4.95640432098766-1.62692901234566
896262.74729938271653.3759.37229938271605-0.747299382716044
904852.224151234567953.4583333333333-1.23418209876543-4.2241512345679
915353.159336419753153.5416666666667-0.382330246913579-0.159336419753082
926152.589891975308653.4166666666667-0.8267746913580228.41010802469137
935953.756558641975353.29166666666670.4648919753086415.2434413580247
944647.964891975308653.4583333333333-5.49344135802469-1.96489197530864
956961.742669753086453.66666666666678.076003086419767.25733024691358
966963.594521604938353.70833333333339.886188271604945.40547839506173
974247.293595679012353.5833333333333-6.289737654321-5.29359567901234
984250.58526234567953.7083333333333-3.12307098765432-8.585262345679
994248.631558641975354.125-5.4934413580247-6.6315586419753
1005049.501929012345754.4583333333333-4.956404320987660.49807098765433
1016464.038966049382754.66666666666679.37229938271605-0.0389660493827151
1024753.474151234567954.7083333333333-1.23418209876543-6.4741512345679
1035154.159336419753154.5416666666667-0.382330246913579-3.15933641975308
1046653.089891975308653.9166666666667-0.82677469135802212.9101080246914
1056453.04822530864252.58333333333330.46489197530864110.9517746913580
1064945.54822530864251.0416666666667-5.493441358024693.45177469135803
1077157.659336419753149.58333333333338.0760030864197613.3406635802469
1086857.761188271604947.8759.8861882716049410.2388117283951
1093939.626929012345745.9166666666667-6.289737654321-0.62692901234567
1103040.918595679012344.0416666666667-3.12307098765432-10.9185956790123
1112236.589891975308642.0833333333333-5.4934413580247-14.5898919753086
1123334.751929012345739.7083333333333-4.95640432098766-1.75192901234567
1134646.330632716049436.95833333333339.37229938271605-0.330632716049386
1142432.724151234567933.9583333333333-1.23418209876543-8.7241512345679
11527NANA-0.382330246913579NA
11645NANA-0.826774691358022NA
11738NANA0.464891975308641NA
11818NANA-5.49344135802469NA
11936NANA8.07600308641976NA
12031NANA9.88618827160494NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281116162j47soyitn3pmx53/1ko1y1281116100.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281116162j47soyitn3pmx53/1ko1y1281116100.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/06/t1281116162j47soyitn3pmx53/2ko1y1281116100.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281116162j47soyitn3pmx53/2ko1y1281116100.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/06/t1281116162j47soyitn3pmx53/3vyj11281116100.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281116162j47soyitn3pmx53/3vyj11281116100.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/06/t1281116162j47soyitn3pmx53/45pim1281116100.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281116162j47soyitn3pmx53/45pim1281116100.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