Home » date » 2009 » Dec » 04 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 04 Dec 2009 09:38:19 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t12599447674elo3tlvy1cuwbw.htm/, Retrieved Fri, 04 Dec 2009 17:39:34 +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/2009/Dec/04/t12599447674elo3tlvy1cuwbw.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
12008 9169 8788 8417 8247 8197 8236 8253 7733 8366 8626 8863 10102 8463 9114 8563 8872 8301 8301 8278 7736 7973 8268 9476 11100 8962 9173 8738 8459 8078 8411 8291 7810 8616 8312 9692 9911 8915 9452 9112 8472 8230 8384 8625 8221 8649 8625 10443 10357 8586 8892 8329 8101 7922 8120 7838 7735 8406 8209 9451 10041 9411 10405 8467 8464 8102 7627 7513 7510 8291 8064 9383
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
112008NANA1572.86736111111NA
29169NANA149.309027777778NA
38788NANA697.134027777779NA
48417NANA-65.7826388888885NA
58247NANA-228.674305555556NA
68197NANA-575.324305555555NA
782368235.950694444448662.5-426.5493055555560.0493055555562023
882538108.092361111118553.66666666667-445.574305555556144.907638888890
977337666.767361111118537.83333333333-871.06597222222366.2326388888905
1083668227.542361111118557.5-329.957638888889138.457638888889
1186268263.442361111118589.625-326.182638888889362.557638888889
1288639469.800694444448620849.800694444444-606.800694444444
131010210199.90902777788627.041666666671572.86736111111-97.9090277777777
1484638780.100694444448630.79166666667149.309027777778-317.100694444443
1591149329.092361111118631.95833333333697.134027777779-215.092361111110
1685638549.925694444448615.70833333333-65.782638888888513.0743055555558
1788728355.742361111118584.41666666667-228.674305555556516.25763888889
1883018019.717361111118595.04166666667-575.324305555555281.28263888889
1983018235.617361111118662.16666666667-426.54930555555665.3826388888901
2082788278.96736111118724.54166666666-445.574305555556-0.967361111108403
2177367876.725694444448747.79166666667-871.065972222223-140.725694444443
2279738427.584027777788757.54166666667-329.957638888889-454.584027777777
2382688421.442361111118747.625-326.182638888889-153.442361111111
2494769570.925694444448721.125849.800694444444-94.9256944444442
251110010289.28402777788716.416666666671572.86736111111810.71597222222
2689628870.850694444448721.54166666667149.30902777777891.1493055555566
2791739422.300694444448725.16666666667697.134027777779-249.300694444444
2887388689.259027777788755.04166666667-65.782638888888548.7409722222219
2984598554.992361111118783.66666666667-228.674305555556-95.9923611111099
3080788219.175694444458794.5-575.324305555555-141.175694444446
3184118327.409027777788753.95833333333-426.54930555555683.5909722222223
3282918256.884027777788702.45833333333-445.57430555555634.1159722222219
3378107841.059027777788712.125-871.065972222223-31.0590277777792
3486168409.375694444448739.33333333333-329.957638888889206.624305555555
3583128429.275694444448755.45833333333-326.182638888889-117.275694444445
3696929612.134027777788762.33333333333849.80069444444479.8659722222219
37991110340.40902777788767.541666666671572.86736111111-429.409027777780
3889158929.642361111118780.33333333333149.309027777778-14.6423611111113
3994529508.509027777788811.375697.134027777779-56.5090277777781
4091128764.092361111118829.875-65.7826388888885347.907638888888
4184728615.617361111118844.29166666667-228.674305555556-143.617361111112
4282308313.300694444448888.625-575.324305555555-83.3006944444442
4383848511.950694444448938.5-426.549305555556-127.950694444444
4486258497.800694444448943.375-445.574305555556127.199305555556
4582218035.267361111118906.33333333333-871.065972222223185.732638888889
4686498520.41736111118850.375-329.957638888889128.582638888891
4786258476.109027777788802.29166666667-326.182638888889148.890972222223
48104439623.800694444448774849.800694444444819.199305555558
491035710323.03402777788750.166666666671572.8673611111133.9659722222223
5085868855.684027777788706.375149.309027777778-269.684027777777
5188929350.467361111118653.33333333333697.134027777779-458.46736111111
5283298557.175694444448622.95833333333-65.7826388888885-228.175694444444
5381018366.825694444448595.5-228.674305555556-265.825694444444
5479227961.509027777788536.83333333333-575.324305555555-39.5090277777763
5581208055.784027777788482.33333333333-426.54930555555664.2159722222241
5678388057.967361111118503.54166666667-445.574305555556-219.967361111112
5777357729.892361111118600.95833333333-871.0659722222235.10763888888869
5884068339.792361111118669.75-329.95763888888966.207638888889
5982098364.442361111118690.625-326.182638888889-155.442361111109
6094519563.050694444448713.25849.800694444444-112.050694444444
611004110273.07569444448700.208333333331572.86736111111-232.075694444444
6294118815.434027777788666.125149.309027777778595.565972222223
63104059340.34236111118643.20833333333697.1340277777791064.65763888889
6484678563.259027777788629.04166666667-65.7826388888885-96.259027777778
6584648389.534027777788618.20833333333-228.67430555555674.4659722222241
6681028034.009027777788609.33333333333-575.32430555555567.9909722222255
677627NANA-426.549305555556NA
687513NANA-445.574305555556NA
697510NANA-871.065972222223NA
708291NANA-329.957638888889NA
718064NANA-326.182638888889NA
729383NANA849.800694444444NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599447674elo3tlvy1cuwbw/1tp3k1259944697.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599447674elo3tlvy1cuwbw/1tp3k1259944697.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599447674elo3tlvy1cuwbw/20qcf1259944697.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599447674elo3tlvy1cuwbw/20qcf1259944697.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599447674elo3tlvy1cuwbw/34l4c1259944697.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599447674elo3tlvy1cuwbw/34l4c1259944697.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599447674elo3tlvy1cuwbw/4e7dv1259944697.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599447674elo3tlvy1cuwbw/4e7dv1259944697.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