Home » date » 2010 » Dec » 11 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 11 Dec 2010 18:40:27 +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/Dec/11/t1292092982fpiecd25t9rgcnr.htm/, Retrieved Sat, 11 Dec 2010 19:43:07 +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/Dec/11/t1292092982fpiecd25t9rgcnr.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
132 131,4 132,7 130,9 126 109,7 68,3 70,6 75,3 74,1 74,9 74 74,2 76 76,2 74,9 74,1 76,5 57,8 59,2 57,3 57,5 60,4 59,9 59,9 60 60,2 65,4 62,4 78,8 65,6 64,4 67,4 65,3 66,7 66,8 69,4 71,7 77,1 81,1 82,1 92,1 77,1 78,2 77,7 77,3 78,5 78,8 78,7 79,8 82,2 84 81,7 77,6 64,3 72,6 73,8 73,8 70,1 70 72,3 72,1 73,3 79,1 77 76,1 66,4 72,7 73,2 70,7 73,6 74,2 72,6 73,6 79,1 79,6 78 85,4 82 91,9 89,4 92,1 93,8 93,6 95,6 99,9 103,7 99,2 93,7 93,5 80,7 91,8 105,8 111,3 110,3 109,4 111,4 111,6 111,8 106,6 104,3 105,5 98,5 108,5 106 101,8 101,3 92,4 88,9 84,9 86,4 90,7 86,8 90,6 88,3 95,4 93,6 91,3 91,3 89,3
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1132NANA0.997041713452915NA
2131.4NANA1.00422688480432NA
3132.7NANA1.03029730272513NA
4130.9NANA1.04802055534001NA
5126NANA1.01874576779311NA
6109.7NANA1.07223392131078NA
768.387.759944366131997.58333333333330.8993333325308140.778259381239514
870.689.589159858264992.86666666666670.9647073925872030.788041768799855
975.387.066561027735388.20416666666670.9871025861711210.864855566949670
1074.182.398833750807783.51666666666670.9866154510174540.89928457269304
1174.979.045780675116379.02083333333331.000315705880720.947552157247258
127474.822849687514775.4750.9913593863864150.98900269515327
1374.273.436276536279973.65416666666670.9970417134529151.01039981191507
147673.049137312141172.74166666666671.004226884804321.04039558571718
1576.273.683428766558971.51666666666671.030297302725131.03415382909791
1674.973.440040415451170.0751.048020555340011.01987961303248
1774.170.068484954003868.77916666666671.018745767793111.05753678060319
1876.572.469610156592467.58751.072233921310781.05561489615714
1957.859.719480502264966.40416666666670.8993333325308140.96785838580441
2059.262.842647398784765.14166666666670.9647073925872030.942035424197372
2157.362.985370852602363.80833333333330.9871025861711210.90973505790881
2257.561.906008653632762.74583333333330.9866154510174540.928827447456926
2360.461.882030355046261.86251.000315705880720.97605071542509
2459.960.939687613994961.47083333333330.9913593863864150.982939072143256
2559.961.7085733817961.89166666666670.9970417134529150.970691699991177
266062.697231841283262.43333333333331.004226884804320.956980049005813
2760.264.981709463959663.07083333333331.030297302725130.926414532590719
2865.466.881178439948263.81666666666671.048020555340010.977853583407204
2962.465.61147221990964.40416666666671.018745767793110.951053190680662
3078.869.64606083047464.95416666666671.072233921310781.13143513158350
3165.659.029991613991365.63750.8993333325308141.11129949719409
3264.464.173139677727966.52083333333330.9647073925872031.00353512892483
3367.466.839183866112167.71250.9871025861711211.00839052934894
3465.368.14635138131869.07083333333330.9866154510174540.958231786095325
3566.770.568105067777170.54583333333331.000315705880720.94518621317574
3666.871.299393201732971.92083333333330.9913593863864150.936894368946416
3769.472.738347336862972.95416666666670.9970417134529150.954104712863458
3871.774.321158032893274.00833333333331.004226884804320.964732007650727
3977.177.285176420668875.01251.030297302725130.997603985275768
4081.179.588427673445875.94166666666671.048020555340011.01899236322090
4182.178.375507735550176.93333333333331.018745767793111.04752112454591
4292.183.553828318142677.9251.072233921310781.10228342439698
4377.170.878708270084878.81250.8993333325308141.08777377412422
4478.276.730414237904679.53750.9647073925872031.01915258475653
4577.779.054578369979780.08750.9871025861711210.982865276143272
4677.379.344436750366280.42083333333330.9866154510174540.974233395130167
4778.580.550422216045280.5251.000315705880720.974544860726543
4878.879.213745636384579.90416666666670.9913593863864150.99477684544443
4978.778.53365229630878.76666666666670.9970417134529151.00211817098566
5079.878.3296970147372781.004226884804321.01877069669995
5182.279.955363596898177.60416666666671.030297302725131.02807361885587
528481.007622175468877.29583333333331.048020555340011.03693946006771
5381.778.23967496651176.81.018745767793111.04422724193282
5477.681.579130846395376.08333333333331.072233921310780.951223667068879
5564.367.854699939449975.450.8993333325308140.947613062284235
5672.672.220407177559574.86250.9647073925872031.00525603270980
5773.873.214221401800574.17083333333330.9871025861711211.00800088544253
5873.872.61078629717273.59583333333330.9866154510174541.01637792073978
5970.173.21894168836173.19583333333331.000315705880720.95740252977657
607072.307275244559172.93750.9913593863864150.968090690227845
6172.372.746656017808372.96250.9970417134529150.99386011615848
6272.173.362958213642573.05416666666671.004226884804320.982784797063873
6373.375.246046342358773.03333333333331.030297302725130.974137560218055
6479.176.37886472271772.87916666666671.048020555340011.03562680968304
657774.262321698085472.89583333333331.018745767793111.03686497054381
6676.178.505393605304473.21666666666671.072233921310780.969360148458107
6766.466.014813829980673.40416666666670.8993333325308141.00583484444888
6872.770.885895284480573.47916666666670.9647073925872031.02559189960484
6973.272.831719149659273.78333333333330.9871025861711211.00505659971563
7070.773.054763250129974.04583333333330.9866154510174540.967767149664595
7173.674.131729769977274.10833333333331.000315705880720.992827231043615
7274.273.893450262777474.53750.9913593863864151.00414853733494
7372.675.351427494204175.5750.9970417134529150.963485396551834
7473.677.35057580205377.0251.004226884804320.95151198600446
7579.180.878338263922778.51.030297302725130.978012180985722
7679.683.911512464223480.06666666666671.048020555340010.948618344043535
777883.333403805476681.81.018745767793110.935999208457556
7885.489.477920733384783.451.072233921310780.954425396791063
798276.638188820500985.21666666666670.8993333325308141.06996265519867
8091.984.190818073912487.27083333333330.9647073925872031.09156796551519
8189.488.238745348813589.39166666666660.9871025861711211.01316037129263
8292.190.012216314492491.23333333333330.9866154510174541.02319444816483
8393.892.733433917250892.70416666666671.000315705880721.01150141904268
8493.692.886243840297193.69583333333330.9913593863864151.00768419660644
8595.693.701149362210493.97916666666670.9970417134529151.02026496633941
8699.994.317825876559393.92083333333331.004226884804321.05918472008405
87103.797.466124837797394.61.030297302725131.0639594030498
8899.2100.69730835891996.08333333333331.048020555340010.985130601966219
8993.799.399873518380597.57083333333331.018745767793110.942657135098602
9093.5106.06180538299198.91666666666671.072233921310780.881561459965437
9180.790.1431776973386100.2333333333330.8993333325308140.8952424582918
9291.897.8012315376635101.3791666666670.9647073925872030.938638487028127
93105.8100.885997234131102.2041666666670.9871025861711211.04870847194447
94111.3101.473399137145102.850.9866154510174541.09683918097169
95110.3103.632707129243103.61.000315705880721.06433579760145
96109.4103.638362518480104.5416666666670.9913593863864151.05559367536797
97111.4105.470395921428105.7833333333330.9970417134529151.05622055389827
98111.6107.674043444457107.2208333333331.004226884804321.03646149461795
99111.8111.194836396610107.9251.030297302725131.00544237145358
100106.6112.701510469876107.53751.048020555340010.945861324800016
101104.3108.768089808045106.7666666666671.018745767793110.958920949922629
102105.5113.317254917194105.6833333333331.072233921310780.931014434448604
10398.593.5643915831745104.03750.8993333325308141.05275092728453
104108.598.3880952014873101.98750.9647073925872031.10277569433380
10510698.529289809647499.81666666666670.9871025861711211.07582222712440
106101.896.782864847099798.09583333333330.9866154510174541.051839084954
107101.396.734696740773796.70416666666671.000315705880721.04719406183140
10892.494.530248156054695.35416666666670.9913593863864150.977464904645782
10988.994.029342259555394.30833333333330.9970417134529150.94544955716699
11084.993.732026860423493.33751.004226884804320.905773649026333
11186.495.070683608961492.2751.030297302725130.908797504342926
11290.795.706110464112491.32083333333331.048020555340010.947692885649244
11386.892.162533793016990.46666666666671.018745767793110.941814384085182
11490.696.416167732533289.92083333333331.072233921310780.939676427000627
11588.3NANA0.899333332530814NA
11695.4NANA0.964707392587203NA
11793.6NANA0.987102586171121NA
11891.3NANA0.986615451017454NA
11991.3NANA1.00031570588072NA
12089.3NANA0.991359386386415NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292092982fpiecd25t9rgcnr/1kxug1292092820.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292092982fpiecd25t9rgcnr/1kxug1292092820.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292092982fpiecd25t9rgcnr/2dptj1292092820.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292092982fpiecd25t9rgcnr/2dptj1292092820.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292092982fpiecd25t9rgcnr/3dptj1292092820.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292092982fpiecd25t9rgcnr/3dptj1292092820.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292092982fpiecd25t9rgcnr/4ogam1292092820.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292092982fpiecd25t9rgcnr/4ogam1292092820.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