Home » date » 2010 » Dec » 07 »

Paper Classical Decomposition

*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: Tue, 07 Dec 2010 16:51:46 +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/07/t1291740610318nht9kgto4pga.htm/, Retrieved Tue, 07 Dec 2010 17:50:15 +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/07/t1291740610318nht9kgto4pga.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 «
17.848 19.592 21.092 20.899 25.890 24.965 22.225 20.977 22.897 22.785 22.769 19.637 20.203 20.450 23.083 21.738 26.766 25.280 22.574 22.729 21.378 22.902 24.989 21.116 15.169 15.846 20.927 18.273 22.538 15.596 14.034 11.366 14.861 15.149 13.577 13.026 13.190 13.196 15.826 14.733 16.307 15.703 14.589 12.043 15.057 14.053 12.698 10.888 10.045 11.549 13.767 12.434 13.116 14.211 12.266 12.602 15.714 13.742 12.745 10.491 10.057 10.900 11.771 11.992 11.933 14.504 11.727 11.477 13.578 11.555 11.846 11.397 10.066 10.269 14.279 13.870 13.695 14.420 11.424 9.704 12.464 14.301 13.464 9.893 11.572 12.380 16.692 16.052 16.459 14.761 13.654 13.480 18.068 16.560 14.530 10.650 11.651 13.735 13.360 17.818 20.613 16.231 13.862 12.004 17.734 15.034 12.609 12.320 10.833 11.350 13.648 14.890 16.325 18.045 15.616 11.926 16.855 15.083 12.520 12.355
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
117.848NANA-2.65356095679012NA
219.592NANA-1.81561651234568NA
321.092NANA0.88514737654321NA
420.899NANA0.776221450617283NA
525.89NANA2.63177237654321NA
624.965NANA1.71282330246914NA
722.22521.444749228395121.896125-0.4513757716049370.78025077160494
820.97720.541147376543222.03-1.488852623456790.435852623456793
922.89723.551253858024722.14870833333331.40254552469136-0.654253858024692
1022.78523.101452932098822.2666250.834827932098766-0.316452932098759
1122.76922.483457561728422.33808333333330.1453742283950620.285542438271605
1219.63720.408402006172822.3877083333333-1.97930632716049-0.771402006172835
1320.20319.761814043209922.415375-2.653560956790120.441185956790122
1420.4520.68730015432122.5029166666667-1.81561651234568-0.237300154320984
1523.08323.397772376543222.5126250.88514737654321-0.314772376543207
1621.73823.230429783950622.45420833333330.776221450617283-1.49242978395061
1726.76625.183355709876522.55158333333332.631772376543211.58264429012346
1825.2824.418531635802522.70570833333331.712823302469140.861468364197531
1922.57422.106207561728422.5575833333333-0.4513757716049370.467792438271612
2022.72920.667147376543222.156-1.488852623456792.06185262345679
2121.37823.276878858024721.87433333333331.40254552469136-1.89887885802469
2222.90222.474952932098821.6401250.8348279320987660.427047067901238
2324.98921.464957561728421.31958333333330.1453742283950623.52404243827161
2421.11618.760610339506220.7399166666667-1.979306327160492.35538966049383
2515.16917.327022376543219.9805833333333-2.65356095679012-2.15802237654321
2615.84617.33567515432119.1512916666667-1.81561651234568-1.48967515432099
2720.92719.291439043209918.40629166666670.885147376543211.63556095679012
2818.27318.587929783950617.81170833333330.776221450617283-0.314929783950618
2922.53819.644939043209917.01316666666672.631772376543212.89306095679012
3015.59617.913406635802516.20058333333331.71282330246914-2.31740663580247
3114.03415.329665895061715.7810416666667-0.451375771604937-1.29566589506173
3211.36614.099314043209915.5881666666667-1.48885262345679-2.73331404320988
3314.86116.667753858024715.26520833333331.40254552469136-1.80675385802469
3415.14915.739994598765414.90516666666670.834827932098766-0.590994598765432
3513.57714.643415895061714.49804166666670.145374228395062-1.06641589506173
3613.02612.263568672839514.242875-1.979306327160490.762431327160494
3713.1911.616897376543214.2704583333333-2.653560956790121.57310262345679
3813.19612.506175154321014.3217916666667-1.815616512345680.689824845679013
3915.82615.243314043209914.35816666666670.885147376543210.582685956790126
4014.73315.096888117283914.32066666666670.776221450617283-0.363888117283949
4116.30716.870147376543214.2383752.63177237654321-0.56314737654321
4215.70315.825489969135814.11266666666671.71282330246914-0.122489969135804
4314.58913.441165895061713.8925416666667-0.4513757716049371.14783410493827
4412.04312.204022376543213.692875-1.48885262345679-0.16102237654321
4515.05714.941003858024713.53845833333331.402545524691360.115996141975309
4614.05314.191702932098813.3568750.834827932098766-0.138702932098763
4712.69813.273499228395113.1281250.145374228395062-0.575499228395062
4810.88810.953693672839512.933-1.97930632716049-0.0656936728395063
4910.04510.120480709876512.7740416666667-2.65356095679012-0.0754807098765422
5011.54910.884925154321012.7005416666667-1.815616512345680.664074845679012
5113.76713.636355709876512.75120833333330.885147376543210.130644290123456
5212.43413.541846450617312.7656250.776221450617283-1.10784645061728
5313.11615.386397376543212.7546252.63177237654321-2.27039737654321
5414.21114.452864969135812.74004166666671.71282330246914-0.241864969135801
5512.26612.272624228395112.724-0.451375771604937-0.00662422839506149
5612.60211.208605709876512.6974583333333-1.488852623456791.39339429012346
5715.71413.989795524691412.587251.402545524691361.72420447530864
5813.74213.320494598765412.48566666666670.8348279320987660.421505401234567
5912.74512.563332561728412.41795833333330.1453742283950620.181667438271601
6010.49110.401568672839512.380875-1.979306327160490.0894313271604936
6110.0579.7170640432098812.370625-2.653560956790120.339935956790125
6210.910.485675154321012.3012916666667-1.815616512345680.414324845679014
6311.77113.050564043209912.16541666666670.88514737654321-1.27956404320988
6411.99212.761513117284011.98529166666670.776221450617283-0.769513117283951
6511.93314.488480709876511.85670833333332.63177237654321-2.55548070987654
6614.50413.569823302469111.8571.712823302469140.934176697530864
6711.72711.443749228395111.895125-0.4513757716049370.283250771604939
6811.47710.380355709876511.8692083333333-1.488852623456791.09664429012346
6913.57813.349962191358011.94741666666671.402545524691360.228037808641975
7011.55512.964994598765412.13016666666670.834827932098766-1.40999459876543
7111.84612.427207561728412.28183333333330.145374228395062-0.581207561728393
7211.39710.372443672839512.35175-1.979306327160491.02455632716050
7310.0669.6820640432098812.335625-2.653560956790120.383935956790125
7410.26910.433508487654312.249125-1.81561651234568-0.164508487654322
7514.27913.013980709876512.12883333333330.885147376543211.26501929012346
7613.8712.973054783950612.19683333333330.7762214506172830.896945216049382
7713.69515.010439043209912.37866666666672.63177237654321-1.31543904320988
7814.4214.096239969135812.38341666666671.712823302469140.323760030864198
7911.42411.932124228395112.3835-0.451375771604937-0.508124228395063
809.70411.045355709876512.5342083333333-1.48885262345679-1.34135570987654
8112.46414.125253858024712.72270833333331.40254552469136-1.66125385802469
8214.30113.748994598765412.91416666666670.8348279320987660.552005401234567
8313.46413.265624228395113.120250.1453742283950620.198375771604937
849.89311.270318672839513.249625-1.97930632716049-1.37731867283951
8511.57210.703189043209913.35675-2.653560956790120.868810956790121
8612.3811.791383487654313.607-1.815616512345680.588616512345679
8716.69214.882980709876513.99783333333330.885147376543211.80901929012346
8816.05215.101679783950614.32545833333330.7762214506172830.950320216049384
8916.45917.095772376543214.4642.63177237654321-0.636772376543206
9014.76116.252781635802514.53995833333331.71282330246914-1.49178163580247
9113.65414.123415895061714.5747916666667-0.451375771604937-0.469415895061729
9213.4813.145689043209914.6345416666667-1.488852623456790.334310956790123
9318.06815.954712191358014.55216666666671.402545524691362.11328780864197
9416.5615.321744598765414.48691666666670.8348279320987661.23825540123457
9514.5314.878957561728414.73358333333330.145374228395062-0.348957561728398
9610.6512.988610339506214.9679166666667-1.97930632716049-2.33861033950617
9711.65112.384272376543215.0378333333333-2.65356095679012-0.733272376543207
9813.73513.169383487654314.985-1.815616512345680.565616512345679
9913.3615.794730709876514.90958333333330.88514737654321-2.43473070987654
10017.81815.608304783950614.83208333333330.7762214506172832.20969521604939
10120.61317.320230709876514.68845833333332.631772376543213.29276929012346
10216.23116.390823302469114.6781.71282330246914-0.159823302469134
10313.86214.262124228395114.7135-0.451375771604937-0.400124228395063
10412.00413.091189043209914.5800416666667-1.48885262345679-1.08718904320988
10517.73415.895212191358014.49266666666671.402545524691361.83878780864198
10615.03415.217494598765414.38266666666670.834827932098766-0.183494598765433
10712.60914.227374228395114.0820.145374228395062-1.61837422839506
10812.3211.999610339506213.9789166666667-1.979306327160490.320389660493831
10910.83311.474022376543214.1275833333333-2.65356095679012-0.641022376543209
11011.3512.381800154321014.1974166666667-1.81561651234568-1.03180015432099
11113.64815.042689043209914.15754166666670.88514737654321-1.39468904320987
11214.8914.899179783950614.12295833333330.776221450617283-0.00917978395061603
11316.32516.753064043209914.12129166666672.63177237654321-0.428064043209876
11418.04515.831864969135814.11904166666671.712823302469142.2131350308642
11515.616NANA-0.451375771604937NA
11611.926NANA-1.48885262345679NA
11716.855NANA1.40254552469136NA
11815.083NANA0.834827932098766NA
11912.52NANA0.145374228395062NA
12012.355NANA-1.97930632716049NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291740610318nht9kgto4pga/1giev1291740702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291740610318nht9kgto4pga/1giev1291740702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t1291740610318nht9kgto4pga/2giev1291740702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291740610318nht9kgto4pga/2giev1291740702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t1291740610318nht9kgto4pga/38rdx1291740702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291740610318nht9kgto4pga/38rdx1291740702.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t1291740610318nht9kgto4pga/48rdx1291740702.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291740610318nht9kgto4pga/48rdx1291740702.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])
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