Home » date » 2011 » May » 15 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 15 May 2011 10:05: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/2011/May/15/t1305453699gzahfw7vvryu9u8.htm/, Retrieved Sun, 15 May 2011 12:01:43 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2851 2672 2755 2721 2946 3036 2282 2212 2922 4301 5764 7132 2541 2475 3031 3266 3776 3230 3028 1759 3595 4474 6838 8357 3113 3006 4047 3523 3937 3986 3260 1573 3528 5211 7614 9254 5375 3088 3718 4514 4520 4539 3663 1643 4734 5428 8314 10651 3633 4292 4154 4121 4647 4753 3965 1723 5048 6923 9858 11331 4016 3957 4510 4276 4968 4677 3523 1821 5222 6872 10803 13916 2639 2899 3370 3740 2927 3986 4217 1738 5221 6424 9842 13076 3934 3162 4286 4676 5010 4874 4633 1659 5951 6981 9851 12670
 
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' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
12851NANA0.7550230268283NA
22672NANA0.682232053480883NA
32755NANA0.809315043541521NA
42721NANA0.831053012578926NA
52946NANA0.875495129494772NA
63036NANA0.867044777449368NA
722822521.625896361323453.250.7302181702342210.904971670576868
822121353.780922276323432.1250.3944439442841741.63394236364376
929223133.326075509373435.416666666670.9120658073041230.932555351592311
1043014143.428585800343469.6251.194200694830231.0380292337461
1157646213.268537367863526.916666666671.761671489459970.92769207790298
1271327807.524207645523569.583333333332.187236850513510.913477795306224
1325412724.689348066633608.750.75502302682830.932583379387097
1424752470.333839318713620.958333333330.6822320534808831.00188887858273
1530312937.914772436163630.1250.8093150435415211.03168411433755
1632663046.120935981483665.3750.8310530125789261.07218330087334
1737763254.50722804193717.333333333330.8754951294947721.16023709133744
1832303306.150117011623813.1250.8670447774493680.976967132671988
1930282839.0882458706538880.7302181702342211.06653958516581
2017591551.726041649593933.958333333330.3944439442841741.13357638705996
2135953646.819125021593998.416666666670.9120658073041230.985790596340232
2244744838.25435674244051.458333333331.194200694830230.92471368186032
2368387168.021081676444068.8751.761671489459970.953959247898968
2483578983.164014796534107.083333333332.187236850513510.930295827420589
2531133132.024271040494148.250.75502302682830.993925886457396
2630062831.376727287914150.166666666670.6822320534808831.06167433355976
2740473350.260787120574139.6250.8093150435415211.20796566510819
2835233463.448057131534167.541666666670.8310530125789261.01719440912239
2939373703.855103255094230.583333333330.8754951294947721.06294654899972
3039863728.545431092374300.291666666670.8670447774493681.06904959954644
3132603236.266078963884431.916666666670.7302181702342211.00733373599606
3215731786.666715963864529.583333333330.3944439442841740.880410423469165
3335284121.891402401134519.291666666670.9120658073041230.855917746388183
3452115429.881284306214546.8751.194200694830230.959689489908586
3576148125.636342155394612.458333333331.761671489459970.937034304685647
36925410192.06804904914659.791666666672.187236850513510.907960970773088
3753753548.325092457954699.6250.75502302682831.51479919678856
3830883219.680471060784719.333333333330.6822320534808830.959101385294487
3937183862.456045301914772.50.8093150435415210.962599951013652
4045144015.475020737084831.791666666670.8310530125789261.12415093524138
4145204263.6612806395448700.8754951294947721.06012173634065
4245394298.266103608064957.3750.8670447774493681.05600721095184
4336633609.4684154677649430.7302181702342211.01483087767241
4416431940.894298178974920.583333333330.3944439442841740.84651699041083
4547344550.220307156334988.916666666670.9120658073041231.04038918567407
4654285959.90735936174990.708333333331.194200694830230.910752411524286
4783148772.46339070214979.6251.761671489459970.947738352355163
481065110922.69629198944993.833333333332.187236850513510.975125529015336
4936333786.69215388625015.333333333330.75502302682830.959412556489847
5042923432.480019075695031.250.6822320534808831.25040786141437
5141544085.152568116425047.666666666670.8093150435415211.01685308705994
5241214257.51921065075123.041666666670.8310530125789260.967934563792648
5346474596.057598137725249.666666666670.8754951294947721.01108393460581
5447534632.042216060345342.333333333330.8670447774493681.02611327321678
5539653933.411451237915386.6250.7302181702342211.00803082747729
5617232125.510499268315388.6250.3944439442841740.81062878804557
5750484915.578668465575389.50.9120658073041231.02693911347283
5869236461.571167914965410.791666666671.194200694830231.07141124350317
5998589566.977232448555430.6251.761671489459971.03041951083195
601133111900.39116416895440.833333333332.187236850513510.952153575767886
6140164091.658538139265419.250.75502302682830.981509078180882
6239573687.407396393055404.916666666670.6822320534808831.07311169464775
6345104383.452604581765416.250.8093150435415211.02886934269255
6442764505.450026070075421.3750.8310530125789260.949072784129799
6549684778.99960123845458.6250.8754951294947721.03954810933917
6646774860.400134321075605.708333333330.8670447774493680.962266453532084
6735234130.144396601855656.041666666670.7302181702342210.852996811176532
6818212190.971758855135554.583333333330.3944439442841740.831138052163457
6952224982.6155053024254630.9120658073041231.04804394287354
7068726440.523380668575393.166666666671.194200694830231.06699403042717
71108039311.828478391775285.791666666671.761671489459971.16013734843468
721391611312.29785598715171.958333333332.187236850513511.2301656283418
7326393905.042013341535172.083333333330.75502302682830.675792985320999
7428993545.929524302455197.541666666670.6822320534808830.817557139850456
7533704203.616057614815194.041666666670.8093150435415210.801690723846028
7637404300.97635776685175.333333333330.8310530125789260.869569997344027
7729274479.580266951185116.6250.8754951294947720.653409432485094
7839864371.278499242445041.583333333330.8670447774493680.911861369777924
7942173695.299476227375060.541666666670.7302181702342211.14117949766422
8017382021.706001264195125.458333333330.3944439442841740.859670000936444
8152214719.560525379135174.583333333330.9120658073041231.10624706938801
8264246271.643499074675251.751.194200694830231.02429291475955
8398429473.461837549725377.541666666671.761671489459971.0389021636198
841307612032.7189936255501.333333333332.187236850513511.08670367910426
8539344194.656262715755555.666666666670.75502302682830.937859923104403
8631623799.833553539585569.708333333330.6822320534808830.832141712379629
8742864529.60141286135596.833333333330.8093150435415210.946220121671275
8846764695.830420368365650.458333333330.8310530125789260.995777015225603
8950104967.595843717065674.041666666670.8754951294947721.00853615262131
9048744905.30582841985657.50.8670447774493680.993617966032123
914633NANA0.730218170234221NA
921659NANA0.394443944284174NA
935951NANA0.912065807304123NA
946981NANA1.19420069483023NA
959851NANA1.76167148945997NA
9612670NANA2.18723685051351NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/15/t1305453699gzahfw7vvryu9u8/187ph1305453934.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/15/t1305453699gzahfw7vvryu9u8/187ph1305453934.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/15/t1305453699gzahfw7vvryu9u8/2ku6v1305453934.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/15/t1305453699gzahfw7vvryu9u8/2ku6v1305453934.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/15/t1305453699gzahfw7vvryu9u8/3sysz1305453934.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/15/t1305453699gzahfw7vvryu9u8/3sysz1305453934.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/15/t1305453699gzahfw7vvryu9u8/44ruz1305453934.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/15/t1305453699gzahfw7vvryu9u8/44ruz1305453934.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