Home » date » 2010 » Dec » 10 »

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 10 Dec 2010 19:31:37 +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/10/t12920097509xvqeyj1udfphrs.htm/, Retrieved Fri, 10 Dec 2010 20:35:51 +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/10/t12920097509xvqeyj1udfphrs.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
42.33600 42.14710 40.25640 39.18980 39.13170 38.15070 38.27070 39.13350 40.12190 41.28450 42.57490 43.90190 43.18350 43.61880 44.76240 45.19720 44.38810 43.55520 43.56780 44.21350 45.14510 45.80790 42.32820 37.89990 34.79640 35.21440 36.37270 36.25020 36.82610 36.77230 36.90420 37.04940 36.82590 36.13570 36.03000 35.79270 35.91740 35.40080 35.17230 34.92110 35.02920 34.77390 34.89990 34.90540 34.56800 34.40600 34.45780 34.73160 34.26020 33.88490 34.05490 34.27550 34.13930 34.15870 34.53860 33.79870 33.49730 33.68020 34.32840 34.15380 33.91840 34.32620 34.77500 35.01190 34.55130 34.69510 35.47300 35.97940 36.47890 36.39100 36.67040 37.41620 37.11850 36.30010 35.70020 35.58590 35.67770 35.24080 34.80160 34.43890 34.98810 36.06800 36.35660 36.12540 34.87100 35.21990 34.33900 33.82340 34.51990 35.53000 35.79660 33.84840 33.98710 34.11610 33.82350 32.45400 31.87740 31.11500 31.04360 30.88680 31.30010 30.05070 28.6 etc...
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
142.336NANA-0.614778125NA
242.1471NANA-0.567256875NA
340.2564NANA-0.305278958333334NA
439.1898NANA-0.179240208333333NA
539.1317NANA-0.041592291666666NA
638.1507NANA-0.0445681250000004NA
738.270740.59372562540.57690416666670.0168214583333331-2.32302562500001
839.133540.725851041666740.67353750.0523135416666637-1.59235104166666
940.121941.272922708333340.92260833333330.350314375000002-1.15102270833334
1041.284542.04778562541.36066666666670.687118958333333-0.763285625000002
1142.574942.49747312541.82999166666670.6674814583333330.0774268750000005
1243.901942.25286062542.2741958333333-0.0213352083333321.649039375
1343.183542.105317708333342.7200958333333-0.6147781251.07818229166668
1443.618842.58521812543.152475-0.5672568751.033581875
1544.762443.268162708333343.5734416666667-0.3052789583333341.49423729166667
1645.197243.791976458333343.9712166666667-0.1792402083333331.40522354166667
1744.388144.107820208333344.1494125-0.0415922916666660.280279791666672
1843.555243.84448187543.88905-0.0445681250000004-0.289281875
1943.567843.30632562543.28950416666670.01682145833333310.261474375000006
2044.213542.64217187542.58985833333330.05231354166666371.57132812500001
2145.145142.240418541666741.89010416666670.3503143750000022.90468145833334
2245.807941.85486062541.16774166666670.6871189583333333.953039375
2342.328241.14734812540.47986666666670.6674814583333331.18085187499999
2437.899939.860827291666739.8821625-0.021335208333332-1.96092729166666
2534.796438.707113541666739.3218916666667-0.614778125-3.91071354166667
2635.214438.17848062538.7457375-0.567256875-2.96408062500001
2736.372737.795321041666738.1006-0.305278958333334-1.42262104166666
2836.250237.17171812537.3509583333333-0.179240208333333-0.921518124999999
2936.826136.643932708333336.685525-0.0415922916666660.182167291666666
3036.772336.29073187536.3353-0.04456812500000040.481568124999995
3136.904236.311029791666736.29420833333330.01682145833333310.59317020833334
3237.049436.40099687536.34868333333330.05231354166666370.648403125000002
3336.825936.656747708333336.30643333333330.3503143750000020.169152291666656
3436.135736.888156458333336.20103750.687118958333333-0.752456458333327
3536.0336.738268958333336.07078750.667481458333333-0.708268958333335
3635.792735.891314791666735.91265-0.021335208333332-0.0986147916666624
3735.917435.131092708333335.7458708333333-0.6147781250.786307291666674
3835.400835.00576812535.573025-0.5672568750.395031874999994
3935.172335.084333541666735.3896125-0.3052789583333340.0879664583333266
4034.921135.044222291666735.2234625-0.179240208333333-0.123122291666661
4135.029235.044291041666735.0858833333333-0.041592291666666-0.0150910416666576
4234.773934.93159437534.9761625-0.0445681250000004-0.157694374999998
4334.899934.879721458333334.86290.01682145833333310.0201785416666738
4434.905434.783001041666734.73068750.05231354166666370.122398958333335
4534.56834.971281041666734.62096666666670.350314375000002-0.403281041666673
4634.40635.234627291666734.54750833333330.687118958333333-0.82862729166667
4734.457835.15101062534.48352916666670.667481458333333-0.693210624999999
4834.731634.399481458333334.4208166666667-0.0213352083333320.332118541666674
4934.260233.765351041666734.3801291666667-0.6147781250.494848958333328
5033.884933.75170562534.3189625-0.5672568750.133194375000002
5134.054933.922958541666734.2282375-0.3052789583333340.13194145833333
5234.275533.97414312534.1533833333333-0.1792402083333330.301356874999996
5334.139334.076157708333334.11775-0.0415922916666660.0631422916666651
5434.158734.043715208333334.0882833333333-0.04456812500000040.114984791666664
5534.538634.06678812534.04996666666670.01682145833333310.471811874999993
5633.798734.106426041666734.05411250.0523135416666637-0.307726041666669
5733.497334.452818541666734.10250416666670.350314375000002-0.955518541666663
5833.680234.85031062534.16319166666670.687118958333333-1.17011062499999
5934.328434.87852312534.21104166666670.667481458333333-0.550123124999999
6034.153834.22922312534.2505583333333-0.021335208333332-0.0754231250000075
6133.918433.697063541666734.3118416666667-0.6147781250.221336458333333
6234.326233.87438062534.4416375-0.5672568750.451819375000007
6334.77534.35145437534.6567333333333-0.3052789583333340.423545624999996
6435.011934.714676458333334.8939166666667-0.1792402083333330.297223541666661
6534.551335.062857708333335.10445-0.041592291666666-0.511557708333328
6634.695135.293398541666735.3379666666667-0.0445681250000004-0.598298541666665
6735.47335.624058958333335.60723750.0168214583333331-0.15105895833333
6835.979435.87513437535.82282083333330.05231354166666370.104265625000004
6936.478936.293931041666735.94361666666670.3503143750000020.184968958333343
7036.39136.693202291666736.00608333333330.687118958333333-0.302202291666667
7136.670436.744414791666736.07693333333330.667481458333333-0.0740147916666629
7237.416236.125268958333336.1466041666667-0.0213352083333321.29093104166667
7337.118535.526588541666736.1413666666667-0.6147781251.59191145833333
7436.300135.481947291666736.0492041666667-0.5672568750.818152708333329
7535.700235.617621041666735.9229-0.3052789583333340.082578958333336
7635.585935.668084791666735.847325-0.179240208333333-0.0821847916666627
7735.677735.77919937535.8207916666667-0.041592291666666-0.101499374999996
7835.240835.709365208333335.7539333333333-0.0445681250000004-0.468565208333331
7934.801635.62332562535.60650416666670.0168214583333331-0.821725624999999
8034.438935.520163541666735.467850.0523135416666637-1.08126354166667
8134.988135.71643937535.3661250.350314375000002-0.728339374999997
8236.06835.923089791666735.23597083333330.6871189583333330.144910208333336
8336.356635.78177312535.11429166666670.6674814583333330.574826875000007
8436.125435.056764791666735.0781-0.0213352083333321.06863520833333
8534.87134.516830208333335.1316083333333-0.6147781250.354169791666678
8635.219934.58120562535.1484625-0.5672568750.638694375000007
8734.33934.776871041666735.08215-0.305278958333334-0.437871041666668
8833.823434.779872291666734.9591125-0.179240208333333-0.956472291666664
8934.519934.730645208333334.7722375-0.041592291666666-0.210745208333336
9035.5334.469148541666734.5137166666667-0.04456812500000041.06085145833332
9135.796634.252829791666734.23600833333330.01682145833333311.54377020833333
9233.848433.992551041666733.94023750.0523135416666637-0.14415104166666
9333.987133.982206041666733.63189166666670.3503143750000020.00489395833334072
9434.116134.059343958333333.3722250.6871189583333330.0567560416666737
9533.823533.783189791666733.11570833333330.6674814583333330.040310208333338
9632.45432.73191062532.7532458333333-0.021335208333332-0.277910624999997
9731.877431.61363437532.2284125-0.6147781250.263765625000005
9831.11531.106101458333331.6733583333333-0.5672568750.00889854166666737
9931.043630.828400208333331.1336791666667-0.3052789583333340.215199791666667
10030.886830.370734791666730.549975-0.1792402083333330.516065208333337
10131.300129.922178541666729.9637708333333-0.0415922916666661.37792145833334
10230.050729.404915208333329.4494833333333-0.04456812500000040.645784791666667
10328.679929.011471458333328.994650.0168214583333331-0.331571458333332
10427.643828.64234687528.59003333333330.0523135416666637-0.998546874999999
10527.239428.584772708333328.23445833333330.350314375000002-1.34537270833334
10626.854928.56146062527.87434166666670.687118958333333-1.706560625
10727.015828.10156062527.43407916666670.667481458333333-1.08576062500001
10826.918826.941927291666726.9632625-0.021335208333332-0.0231272916666647
10926.496625.99637187526.61115-0.6147781250.500228125
11026.78525.829284791666726.3965416666667-0.5672568750.955715208333334
11126.839825.966533541666726.2718125-0.3052789583333340.873266458333333
11226.447826.02676812526.2060083333333-0.1792402083333330.421031875000004
11325.172826.13038687526.1719791666667-0.041592291666666-0.957586874999997
11424.878426.040177708333326.0847458333333-0.0445681250000004-1.16177770833333
11525.401525.91856312525.90174166666670.0168214583333331-0.517063124999996
11625.771625.721542708333325.66922916666670.05231354166666370.0500572916666684
11726.118125.79017687525.43986250.3503143750000020.327923125000002
11826.396925.96366062525.27654166666670.6871189583333330.433239374999999
11926.657125.929477291666725.26199583333330.6674814583333330.727622708333335
12025.183925.362293958333325.3836291666667-0.021335208333332-0.178393958333334
12123.839424.859955208333325.4747333333333-0.614778125-1.02055520833333
12223.861924.973426458333325.5406833333333-0.567256875-1.11152645833333
12324.258125.346862708333325.6521416666667-0.305278958333334-1.08876270833333
12425.109825.607922291666725.7871625-0.179240208333333-0.498122291666668
12526.161725.90924937525.9508416666667-0.0415922916666660.252450624999998
12626.808726.076790208333326.1213583333333-0.04456812500000040.731909791666673
12725.657726.367204791666726.35038333333330.0168214583333331-0.709504791666671
12827.098226.70348437526.65117083333330.05231354166666370.394715625
12927.466527.26612687526.91581250.3503143750000020.200373124999999
13028.28927.757506458333327.07038750.6871189583333330.53149354166667
13128.693327.746052291666727.07857083333330.6674814583333330.947247708333332
13227.240126.957906458333326.9792416666667-0.0213352083333320.282193541666675
13327.2798NA26.9441625NANA
13427.6404NA26.9746291666667NANA
13526.831NA26.9327416666667NANA
13626.2467NA26.7858291666667NANA
13725.2212NA26.6027291666667NANA
13825.3653NANANANA
13926.2592NANANANA
14027.2279NANANANA
14126.3315NANANANA
14225.8981NANANANA
14326.6898NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t12920097509xvqeyj1udfphrs/1m8zd1292009493.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12920097509xvqeyj1udfphrs/1m8zd1292009493.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12920097509xvqeyj1udfphrs/2m8zd1292009493.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12920097509xvqeyj1udfphrs/2m8zd1292009493.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12920097509xvqeyj1udfphrs/3sxsa1292009493.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12920097509xvqeyj1udfphrs/3sxsa1292009493.ps (open in new window)


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