Home » date » 2011 » May » 16 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 16 May 2011 21:13:52 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/16/t1305580190we3l280str32x6k.htm/, Retrieved Mon, 16 May 2011 23:09:54 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
814 1150 1225 1691 1759 1754 2100 2062 2012 1897 1964 2186 966 1549 1538 1612 2078 2137 2907 2249 1883 1739 1828 1868 1138 1430 1809 1763 2200 2067 2503 2141 2103 1972 2181 2344 970 1199 1718 1683 2025 2051 2439 2353 2230 1852 2147 2286 1007 1665 1642 1518 1831 2207 2822 2393 2306 1785 2047 2171 1212 1335 2011 1860 1954 2152 2835 2224 2182 1992 2389 2724 891 1247 2017 2257 2255 2255 3057 3330 1896 2096 2374 2535 1041 1728 2201 2455 2204 2660 3670 2665 2639 2226 2586 2684 1185 1749 2459 2618 2585 3310 3923
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1814NANA-977.26240079365NA
21150NANA-571.91121031746NA
31225NANA-181.66121031746NA
41691NANA-157.065972222222NA
51759NANA37.1304563492063NA
61754NANA170.749503968254NA
721002562.648313492061724.16666666667838.481646825397-462.648313492063
820622171.969742063491747.125424.844742063492-109.969742063492
920121892.678075396831776.79166666667115.886408730159119.321924603174
1018971665.672123015871786.54166666667-120.869543650794231.327876984127
1119641936.666170634921796.54166666667140.12450396825427.3338293650795
1221862107.344742063491825.79166666667281.55307539682578.6552579365084
13966898.112599206351875.375-977.2624007936567.8874007936506
1415491344.880456349211916.79166666667-571.91121031746204.119543650794
1515381737.547123015871919.20833333333-181.66121031746-199.547123015873
1616121750.184027777781907.25-157.065972222222-138.184027777778
1720781932.13045634921189537.1304563492063145.869543650794
1821372046.832837301591876.08333333333170.74950396825490.167162698413
1929072708.48164682541870838.481646825397198.518353174604
2022492297.053075396831872.20833333333424.844742063492-48.0530753968253
2118831994.428075396831878.54166666667115.886408730159-111.428075396825
2217391775.255456349211896.125-120.869543650794-36.2554563492065
2318282047.624503968251907.5140.124503968254-219.624503968254
2418682191.219742063491909.66666666667281.553075396825-323.219742063492
251138912.6542658730161889.91666666667-977.26240079365225.345734126984
2614301296.672123015871868.58333333333-571.91121031746133.327876984127
2718091691.588789682541873.25-181.66121031746117.41121031746
2817631735.059027777781892.125-157.06597222222227.9409722222226
2922001953.672123015871916.5416666666737.1304563492063246.327876984127
3020672121.832837301591951.08333333333170.749503968254-54.8328373015872
3125032802.398313492061963.91666666667838.481646825397-299.398313492064
3221412372.136408730161947.29166666667424.844742063492-231.136408730159
3321032049.761408730161933.875115.88640873015953.2385912698412
3419721805.880456349211926.75-120.869543650794166.119543650794
3521812056.249503968251916.125140.124503968254124.750496031746
3623442189.719742063491908.16666666667281.553075396825154.280257936508
37970927.5709325396831904.83333333333-977.2624007936542.4290674603174
3811991339.088789682541911-571.91121031746-140.088789682539
3917181743.463789682541925.125-181.66121031746-25.4637896825395
4016831768.350694444441925.41666666667-157.065972222222-85.3506944444443
4120251956.13045634921191937.130456349206368.8695436507937
4220512085.916170634921915.16666666667170.749503968254-34.9161706349207
4324392752.773313492061914.29166666667838.481646825397-313.773313492064
4423532360.094742063491935.25424.844742063492-7.09474206349182
4522302067.386408730161951.5115.886408730159162.613591269842
4618521820.588789682541941.45833333333-120.86954365079431.4112103174602
4721472066.624503968251926.5140.12450396825480.3754960317463
4822862206.469742063491924.91666666667281.55307539682579.5302579365084
491007970.1125992063491947.375-977.2624007936536.8874007936511
5016651393.088789682541965-571.91121031746271.91121031746
5116421788.172123015871969.83333333333-181.66121031746-146.172123015873
5215181813.142361111111970.20833333333-157.065972222222-295.142361111111
5318312000.380456349211963.2537.1304563492063-169.380456349206
5422072125.041170634921954.29166666667170.74950396825481.9588293650795
5528222796.523313492061958.04166666667838.48164682539725.4766865079366
5623932377.678075396831952.83333333333424.84474206349215.3219246031747
5723062070.344742063491954.45833333333115.886408730159235.655257936508
5817851863.213789682541984.08333333333-120.869543650794-78.21378968254
5920472143.582837301592003.45833333333140.124503968254-96.5828373015877
6021712287.844742063492006.29166666667281.553075396825-116.844742063492
6112121027.279265873022004.54166666667-977.26240079365184.720734126984
6213351426.130456349211998.04166666667-571.91121031746-91.1304563492063
6320111804.172123015871985.83333333333-181.66121031746206.827876984127
6418601832.225694444441989.29166666667-157.06597222222227.7743055555559
6519542049.297123015872012.1666666666737.1304563492063-95.2971230158728
6621522220.207837301592049.45833333333170.749503968254-68.207837301587
6728352897.60664682542059.125838.481646825397-62.6066468253964
6822242466.928075396832042.08333333333424.844742063492-242.928075396825
6921822154.553075396832038.66666666667115.88640873015927.4469246031749
7019921934.588789682542055.45833333333-120.86954365079457.4112103174607
7123892224.666170634922084.54166666667140.124503968254164.33382936508
7227242382.928075396832101.375281.553075396825341.071924603175
738911137.654265873022114.91666666667-977.26240079365-246.654265873015
7412471598.338789682542170.25-571.91121031746-351.338789682539
7520172022.755456349212204.41666666667-181.66121031746-5.75545634920627
7622572039.767361111112196.83333333333-157.065972222222217.232638888889
7722552237.672123015872200.5416666666737.130456349206317.3278769841272
7822552362.791170634922192.04166666667170.749503968254-107.791170634921
7930573028.898313492062190.41666666667838.48164682539728.1016865079368
8033302641.553075396832216.70833333333424.844742063492688.446924603174
8118962360.303075396832244.41666666667115.886408730159-464.303075396825
8220962139.463789682542260.33333333333-120.869543650794-43.4637896825393
8323742406.582837301592266.45833333333140.124503968254-32.5828373015875
8425352562.761408730162281.20833333333281.553075396825-27.7614087301586
8510411346.362599206352323.625-977.26240079365-305.362599206349
8617281749.547123015872321.45833333333-571.91121031746-21.5471230158728
8722012143.047123015872324.70833333333-181.6612103174657.9528769841272
8824552204.017361111112361.08333333333-157.065972222222250.982638888888
8922042412.463789682542375.3333333333337.1304563492063-208.46378968254
9026602561.124503968252390.375170.74950396825498.875496031746
9136703241.064980158732402.58333333333838.481646825397428.93501984127
9226652834.303075396832409.45833333333424.844742063492-169.303075396825
9326392536.969742063492421.08333333333115.886408730159102.030257936508
9422262317.755456349212438.625-120.869543650794-91.7554563492058
9525862601.416170634922461.29166666667140.124503968254-15.4161706349205
9626842785.803075396832504.25281.553075396825-101.803075396826
971185NA2541.875NANA
981749NANANANA
992459NANANANA
1002618NANANANA
1012585NANANANA
1023310NANANANA
1033923NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t1305580190we3l280str32x6k/18zab1305580428.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305580190we3l280str32x6k/18zab1305580428.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305580190we3l280str32x6k/25kak1305580428.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305580190we3l280str32x6k/25kak1305580428.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305580190we3l280str32x6k/31scr1305580428.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305580190we3l280str32x6k/31scr1305580428.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305580190we3l280str32x6k/4dxqo1305580428.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305580190we3l280str32x6k/4dxqo1305580428.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