Home » date » 2010 » May » 25 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 25 May 2010 18:02:49 +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/May/25/t1274810686id7oqkz4vtiyobs.htm/, Retrieved Tue, 25 May 2010 20:04:46 +0200
 
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/May/25/t1274810686id7oqkz4vtiyobs.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
66857.2 64722.8 68489.6 71342.9 63542.5 69425.0 58927.9 61009.0 66837.0 66147.6 65982.3 65527.5 65914.6 59189.9 66211.4 66400.8 60167.7 64547.9 57706.2 58642.6 60082.1 63414.8 66044.0 57628.5 62838.8 55758.6 61004.5 66173.4 57489.0 59552.2 57061.8 55895.3 56314.7 61232.8 60014.1 57685.4 60403.1 52349.7 55693.3 65676.1 54898.8 55518.2 53779.1 52340.9 55704.4 60330.3 52837.4 55388.1 60383.4 52070.3 54077.0 62887.8 49212.8 57722.0 53936.8 46991.0 54984.2 56485.1 51277.8 53596.4 54252.5 49413.0 53213.2 58695.3 48723.5 54510.0 49454.1 46136.6 54622.5 50583.0 53224.3 53056.4
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
166857.2NANA1.04725585796514NA
264722.8NANA0.929807391279941NA
368489.6NANA1.00648705996556NA
471342.9NANA1.11653084294536NA
563542.5NANA0.945795982000637NA
669425NANA1.02582053138681NA
758927.962351.5062469715656950.9491058108984170.945091843757379
86100960672.95073143865425.18750.9273638036029781.00553869993977
96683764913.467337817665099.7250.9971388871123121.02963225877570
1066147.667966.321512924664798.87916666671.048881128608890.973240842340148
1165982.365122.523193985364452.34166666671.010398094312611.01320244922718
1265527.563814.549962824864108.51250.9954146099213391.02684262504669
1365914.666871.890093283163854.39583333331.047255857965140.985684716075054
1459189.959233.279132354663704.89166666670.9298073912799410.999267656071215
1566211.463735.62951817263324.83751.006487059965561.03884437167318
1666400.870262.746289977162929.51666666671.116530842945360.94503564842116
1760167.759413.220860595462818.22083333330.9457959820006371.01269884258884
1864547.964105.234707247662491.66666666671.025820531386811.00690529088262
1957706.258877.193697166662034.38333333330.9491058108984170.980111251511246
2058642.657277.006306897561763.25416666670.9273638036029781.02384191809512
2160082.161227.64731024161403.32916666670.9971388871123120.981290358840076
2263414.864167.295916793361176.91.048881128608890.988272905908812
236604461690.676596708161055.81251.010398094312611.07056695830637
2457628.560457.54737135260736.04583333330.9954146099213390.953206051281323
2562838.863360.070298409660501.04166666671.047255857965140.991772889519304
2655758.656122.914566427260359.72083333330.9298073912799410.99350863066821
2761004.560478.071243152260088.2751.006487059965561.00870445677296
2866173.466813.633645339959840.38333333331.116530842945360.99041761972207
295748956273.178200353359498.22083333330.9457959820006371.02160570699096
3059552.260779.195427071159249.34583333331.025820531386810.97981224630485
3157061.856139.826218056459150.22916666670.9491058108984171.01642281147011
3255895.354627.945233715458906.70416666670.9273638036029781.02319975171796
3356314.758375.86748580858543.36666666670.9971388871123120.964691445719258
3461232.861151.18141708458301.34583333331.048881128608891.00133470165293
3560014.158777.585221019358172.71.010398094312611.02103718236010
3657685.457631.21275111157896.69166666670.9954146099213391.00094024134323
3760403.160313.380465719357591.82916666671.047255857965141.00148755605453
3852349.753284.4256817157306.950.9298073912799410.982457806952945
3955693.357504.048760316957133.42083333331.006487059965560.968510934458471
4065676.163720.847862593157070.38751.116530842945361.03068465350027
4154898.853658.556734645256733.75416666670.9457959820006371.02311361581132
4255518.257793.707192053956339.00416666671.025820531386810.960627076846063
4353779.153380.047977986356242.46250.9491058108984171.00747567746995
4452340.952145.6666765955562300.9273638036029781.00374399899066
4555704.455990.358114479656151.01250.9971388871123120.994892725745835
4660330.358703.24145440455967.48751.048881128608891.02771667296873
4752837.456192.675356355255614.39166666671.010398094312610.940289809391043
4855388.155214.951622109755469.30.9954146099213391.00313589657880
4960383.458193.594975083455567.69583333331.047255857965141.03762965711010
5052070.351466.098221520455351.35416666670.9298073912799411.01173980152680
515407755455.860174375255098.43333333331.006487059965560.975135897810628
5262887.861306.708135035954908.20833333331.116530842945361.02578986726023
5349212.851718.96956537454683.00833333330.9457959820006370.951542546449883
545772255951.70965187854543.37083333331.025820531386811.03163961135659
5553936.851454.122466511254213.26250.9491058108984171.04825031337585
564699149935.839876942453847.08750.9273638036029780.941027528841021
5754984.253546.732165013853700.3750.9971388871123121.02684510850366
5856485.156104.33253461353489.69583333331.048881128608891.00678677471391
5951277.853848.783327113253294.62083333331.010398094312610.952255498299835
6053596.452896.730537063953140.40.9954146099213391.01322708333450
6154252.555315.831875848952819.78751.047255857965140.980777078825545
624941348905.459030502552597.40833333330.9298073912799411.01037800236536
6353213.252887.611337157252546.73751.006487059965561.00615623686930
6458695.358378.647869318352285.74583333331.116530842945361.00542410868081
6548723.549295.765383973252120.92916666670.9457959820006370.988391185743528
665451053526.836611515952179.53333333331.025820531386811.01836767219441
6749454.1NANA0.949105810898417NA
6846136.6NANA0.927363803602978NA
6954622.5NANA0.997138887112312NA
7050583NANA1.04888112860889NA
7153224.3NANA1.01039809431261NA
7253056.4NANA0.995414609921339NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/25/t1274810686id7oqkz4vtiyobs/1kbt41274810565.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/25/t1274810686id7oqkz4vtiyobs/1kbt41274810565.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/25/t1274810686id7oqkz4vtiyobs/2kbt41274810565.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/25/t1274810686id7oqkz4vtiyobs/2kbt41274810565.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/25/t1274810686id7oqkz4vtiyobs/3d3aq1274810565.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/25/t1274810686id7oqkz4vtiyobs/3d3aq1274810565.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/25/t1274810686id7oqkz4vtiyobs/4d3aq1274810565.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/25/t1274810686id7oqkz4vtiyobs/4d3aq1274810565.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