Home » date » 2010 » Jan » 13 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 13 Jan 2010 07:10:20 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/13/t1263392437dix72nj5voa4ywi.htm/, Retrieved Wed, 13 Jan 2010 15:20:43 +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/2010/Jan/13/t1263392437dix72nj5voa4ywi.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
23,98 24,24 24,92 25,46 25,84 26,08 26,18 26,34 26,42 26,38 26,04 25,58 25,65 25,56 25,62 25,62 25,69 25,68 25,68 25,83 25,93 26,11 24,72 24,62 24,65 25,24 25,56 25,9 25,87 25,78 25,78 25,74 25,78 25,73 24,67 24,31 24,56 25 25,38 25,99 26,22 26,19 26,22 26,22 26,61 26,72 25,46 25,48 25,59 25,88 26 26,97 27,2 27,19 27,19 27,19 27,26 26,9 26,11 25,87 26,02 26,31 26,37 26,52 26,86 26,92 26,98 26,98 27,03 26,75 26,39 26,3 26,3 26,52 26,53 26,98 27,22 27,34 27,41 27,47 27,46 27,53 27,21 26,91 26,95 26,91 27,39 27,62 27,79 27,88 27,9 28,09 28,46 28,73 27,93 27,61 27,65 28,19 28,98 28,99 29,02 29 29,04 29,19 29,23 29,26 29,02 28,47 28,53 28,48 28,68 28,89 29,2 29,21 29,15 29,22 29,34 29,13 28,84 28,76
 
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
123.98NANA-0.612912808641977NA
224.24NANA-0.396662808641977NA
324.92NANA-0.154625771604939NA
425.46NANA0.149124228395063NA
525.84NANA0.300096450617284NA
626.08NANA0.285744598765433NA
726.1825.999077932098825.691250.3078279320987670.180922067901232
826.3426.157411265432125.81583333333330.3415779320987660.182588734567904
926.4226.330096450617325.90.4300964506172860.0899035493827256
1026.3826.324864969135825.93583333333330.3890316358024680.0551350308642
1126.0425.564957561728425.93625-0.3712924382716050.475042438271604
1225.5825.245327932098825.9133333333333-0.6680054012345690.334672067901234
1325.6525.262920524691425.8758333333333-0.6129128086419770.387079475308642
1425.5625.437087191358025.83375-0.3966628086419770.122912808641974
1525.6225.637457561728425.7920833333333-0.154625771604939-0.0174575617283956
1625.6225.909540895061725.76041666666670.149124228395063-0.289540895061723
1725.6925.994263117283925.69416666666670.300096450617284-0.304263117283945
1825.6825.884911265432125.59916666666670.285744598765433-0.204911265432099
1925.6825.825327932098825.51750.307827932098767-0.145327932098763
2025.8325.804077932098825.46250.3415779320987660.0259220679012380
2125.9325.876763117283925.44666666666670.4300964506172860.0532368827160532
2226.1125.844864969135825.45583333333330.3890316358024680.265135030864201
2324.7225.103707561728425.475-0.371292438271605-0.383707561728393
2424.6224.818661265432125.4866666666667-0.668005401234569-0.198661265432094
2524.6524.882087191358025.495-0.612912808641977-0.232087191358023
2625.2425.098753858024725.4954166666667-0.3966628086419770.141246141975312
2725.5625.330790895061725.4854166666667-0.1546257716049390.229209104938271
2825.925.612457561728425.46333333333330.1491242283950630.287542438271604
2925.8725.745513117284025.44541666666670.3000964506172840.124486882716049
3025.7825.716161265432125.43041666666670.2857445987654330.0638387345679021
3125.7825.721577932098825.413750.3078279320987670.0584220679012404
3225.7425.741577932098825.40.341577932098766-0.00157793209876544
3325.7825.812596450617325.38250.430096450617286-0.0325964506172873
3425.7325.767781635802525.378750.389031635802468-0.0377816358024639
3524.6725.025790895061725.3970833333333-0.371292438271605-0.355790895061723
3624.3124.760744598765425.42875-0.668005401234569-0.450744598765432
3724.5624.851253858024725.4641666666667-0.612912808641977-0.291253858024692
382525.10583719135825.5025-0.396662808641977-0.105837191358020
3925.3825.402457561728425.5570833333333-0.154625771604939-0.0224575617283946
4025.9925.782040895061725.63291666666670.1491242283950630.207959104938276
4126.2226.007179783950625.70708333333330.3000964506172840.212820216049387
4226.1926.074494598765425.788750.2857445987654330.115505401234575
4326.2226.188244598765425.88041666666670.3078279320987670.0317554012345731
4426.2226.301577932098825.960.341577932098766-0.0815779320987602
4526.6126.452596450617326.02250.4300964506172860.157403549382721
4626.7226.478198302469126.08916666666670.3890316358024680.241801697530871
4725.4625.799540895061726.1708333333333-0.371292438271605-0.339540895061724
4825.4825.585327932098826.2533333333333-0.668005401234569-0.105327932098760
4925.5925.722503858024726.3354166666667-0.612912808641977-0.132503858024691
5025.8826.019587191358026.41625-0.396662808641977-0.139587191358025
512626.329124228395126.48375-0.154625771604939-0.329124228395060
5226.9726.667457561728426.51833333333330.1491242283950630.302542438271605
5327.226.853013117284026.55291666666670.3000964506172840.346986882716045
5427.1926.881994598765426.596250.2857445987654330.308005401234571
5527.1926.938244598765426.63041666666670.3078279320987670.251755401234568
5627.1927.007827932098826.666250.3415779320987660.182172067901238
5727.2627.129679783950626.69958333333330.4300964506172860.130320216049387
5826.927.085281635802526.696250.389031635802468-0.185281635802468
5926.1126.292040895061726.6633333333333-0.371292438271605-0.182040895061728
6025.8725.969911265432126.6379166666667-0.668005401234569-0.0999112654320982
6126.0226.005003858024726.6179166666667-0.6129128086419770.0149961419753097
6226.3126.203753858024726.6004166666667-0.3966628086419770.106246141975308
6326.3726.427457561728426.5820833333333-0.154625771604939-0.0574575617283948
6426.5226.715374228395126.566250.149124228395063-0.195374228395060
6526.8626.871763117284026.57166666666670.300096450617284-0.0117631172839516
6626.9226.886994598765426.601250.2857445987654330.0330054012345684
6726.9826.938661265432126.63083333333330.3078279320987670.0413387345679048
6826.9826.992827932098826.651250.341577932098766-0.0128279320987659
6927.0327.096763117283926.66666666666670.430096450617286-0.0667631172839478
7026.7527.081531635802526.69250.389031635802468-0.33153163580247
7126.3926.355374228395126.7266666666667-0.3712924382716050.0346257716049401
7226.326.091161265432126.7591666666667-0.6680054012345690.208838734567902
7326.326.181670524691426.7945833333333-0.6129128086419770.118329475308641
7426.5226.436253858024726.8329166666667-0.3966628086419770.0837461419753076
7526.5326.716624228395126.87125-0.154625771604939-0.186624228395061
7626.9827.070790895061726.92166666666670.149124228395063-0.0907908950617262
7727.2227.288429783950626.98833333333330.300096450617284-0.0684297839506165
7827.3427.333661265432127.04791666666670.2857445987654330.00633873456790113
7927.4127.408244598765427.10041666666670.3078279320987670.00175540123456486
8027.4727.485327932098827.143750.341577932098766-0.0153279320987671
8127.4627.625929783950627.19583333333330.430096450617286-0.16592978395062
8227.5327.647364969135827.25833333333330.389031635802468-0.117364969135803
8327.2126.937457561728427.30875-0.3712924382716050.272542438271607
8426.9126.686994598765427.355-0.6680054012345690.223005401234566
8526.9526.785003858024727.3979166666667-0.6129128086419770.164996141975312
8626.9127.047503858024727.4441666666667-0.396662808641977-0.137503858024683
8727.3927.357040895061727.5116666666667-0.1546257716049390.0329591049382749
8827.6227.752457561728427.60333333333330.149124228395063-0.132457561728394
8927.7927.983429783950627.68333333333330.300096450617284-0.193429783950616
9027.8828.028244598765427.74250.285744598765433-0.148244598765430
9127.928.108661265432127.80083333333330.307827932098767-0.208661265432099
9228.0928.224911265432127.88333333333330.341577932098766-0.134911265432095
9328.4628.433013117283928.00291666666670.4300964506172860.0269868827160522
9428.7328.515281635802528.126250.3890316358024680.214718364197530
9527.9327.863290895061728.2345833333333-0.3712924382716050.0667091049382762
9627.6127.664494598765428.3325-0.668005401234569-0.0544945987654266
9727.6527.813753858024728.4266666666667-0.612912808641977-0.163753858024691
9828.1928.12333719135828.52-0.3966628086419770.0666628086419792
9928.9828.443290895061728.5979166666667-0.1546257716049390.536709104938272
10028.9928.801207561728428.65208333333330.1491242283950630.188792438271605
10129.0229.019679783950628.71958333333330.3000964506172840.000320216049384925
1022929.086577932098828.80083333333330.285744598765433-0.0865779320987627
10329.0429.181161265432128.87333333333330.307827932098767-0.141161265432096
10429.1929.263661265432128.92208333333330.341577932098766-0.0736612654320936
10529.2329.351763117283928.92166666666670.430096450617286-0.121763117283948
10629.2629.294031635802528.9050.389031635802468-0.0340316358024637
10729.0228.537040895061728.9083333333333-0.3712924382716050.482959104938274
10828.4728.256577932098828.9245833333333-0.6680054012345690.213422067901242
10928.5328.325003858024728.9379166666667-0.6129128086419770.204996141975315
11028.4828.54708719135828.94375-0.396662808641977-0.06708719135802
11128.6828.794957561728428.9495833333333-0.154625771604939-0.114957561728396
11228.8929.097874228395128.948750.149124228395063-0.207874228395063
11329.229.235929783950628.93583333333330.300096450617284-0.0359297839506212
11429.2129.226161265432128.94041666666670.285744598765433-0.0161612654320997
11529.15NANA0.307827932098767NA
11629.22NANA0.341577932098766NA
11729.34NANA0.430096450617286NA
11829.13NANA0.389031635802468NA
11928.84NANA-0.371292438271605NA
12028.76NANA-0.668005401234569NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263392437dix72nj5voa4ywi/10ypg1263391816.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263392437dix72nj5voa4ywi/10ypg1263391816.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t1263392437dix72nj5voa4ywi/2boqk1263391816.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263392437dix72nj5voa4ywi/2boqk1263391816.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t1263392437dix72nj5voa4ywi/3qdeu1263391816.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263392437dix72nj5voa4ywi/3qdeu1263391816.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t1263392437dix72nj5voa4ywi/491jl1263391816.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263392437dix72nj5voa4ywi/491jl1263391816.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