Home » date » 2010 » Jun » 03 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 03 Jun 2010 11:59:14 +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/Jun/03/t1275566421eoa3n8fg48ifw8r.htm/, Retrieved Thu, 03 Jun 2010 14:00:21 +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/Jun/03/t1275566421eoa3n8fg48ifw8r.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 «
2953 2635 2404 2413 2136 1565 1451 2037 2477 2785 2994 2681 3098 2708 2517 2445 2087 1801 1216 2173 2286 3121 3458 3511 3524 2767 2744 2603 2527 1846 1066 2327 3066 3048 3806 4042 3583 3438 2957 2885 2744 1837 1447 2504 3248 3098 4318 3561 3316 3379 2717 2354 2445 1542 1606 2590 3588 3202 4704 4005 3810 3488 2781 2944 2817 1960 1937 2903 3357 3552 4581 3905 4581 4037 3345 3175 2808 2050 1719 3143 3756 4776 4540 4309 4563 3506 3665 3361 3094 2440 1633 2935 4159 4159 4894 4921 4577 4155 3851 3429 3370 2726
 
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
12953NANA1.26607355069009NA
22635NANA1.11560837753282NA
32404NANA0.986383429225698NA
42413NANA0.93545668492051NA
52136NANA0.870630098833737NA
61565NANA0.62923156655111NA
714511167.246603418182383.6250.4896938920418171.24309635663182
820372041.14461343592392.708333333330.8530687108830930.997969466049285
924772562.615680266082400.458333333331.067552660540280.966590511044876
1027852724.693795484442406.51.132222645121311.02213320433125
1129943310.357469753622405.791666666671.375995068741870.904434045977167
1226813084.76058749672413.583333333331.278083314917670.869111207808722
1330983055.826773784372413.6251.266073550690091.01380092175952
1427082688.058385665322409.51.115608377532821.00741859419461
1525172374.430410694012407.208333333330.9863834292256981.06004370086564
1624452257.490844884422413.250.935456684920511.08306087067440
1720872130.069089304982446.583333333330.8706300988337370.979780426127385
1818011573.393532161052500.50.629231566551111.14465959290320
1912161250.106890734092552.833333333330.4896938920418170.972716820468002
2021732194.981337631822573.041666666670.8530687108830930.989985638030283
2122862759.579146135762584.958333333331.067552660540280.828387184763695
2231212944.9110999605426011.132222645121311.05979430076576
2334583613.248384260422625.916666666671.375995068741870.957033569865638
2435113381.968211686512646.1251.278083314917671.03815286845915
2535243344.649802535542641.751.266073550690091.05362301228921
2627672947.344366076912641.916666666671.115608377532820.938811233545485
2727442644.329576515892680.833333333330.9863834292256981.03769213352574
2826032535.360457667692710.291666666670.935456684920511.02667847174462
2925272369.637471500732721.750.8706300988337371.06640784946721
3018461735.656622385422758.3750.629231566551111.06357442836990
3110661362.797697640212782.958333333330.4896938920418170.782214412194754
3223272400.002184480722813.3750.8530687108830930.969582450819095
3330663042.747489344062850.208333333331.067552660540281.00764194555656
3430483250.422510369112870.833333333331.132222645121310.93772424670228
3538063978.861740650712891.6251.375995068741870.95655497679534
3640423706.814387561422900.291666666671.278083314917671.09042416948724
3735833691.606708489242915.791666666671.266073550690090.970580097755407
3834383278.819505251352939.041666666671.115608377532821.0485481114449
3929572913.7766499327129540.9863834292256981.01483413290044
4028852772.381795209422963.666666666670.935456684920511.04062146309905
4127442600.644657724612987.083333333330.8706300988337371.05512300261767
4218371880.379882692172988.3750.629231566551110.976930255906553
4314471448.126858328502957.208333333330.4896938920418170.999221851095424
4425042511.114384073242943.6250.8530687108830930.997166841893636
4532483129.174773486972931.166666666671.067552660540281.03797334285059
4630983282.360624150242899.041666666671.132222645121310.94383291622688
4743183941.480541283222864.458333333331.375995068741871.09552741787587
4835613629.383840065992839.708333333331.278083314917670.981158278352628
4933163588.105195720322834.041666666671.266073550690090.924164654914557
5033793173.069127797722844.251.115608377532821.06489958582945
5127172823.0293744439528620.9863834292256980.96244127836437
5223542694.582980913532880.50.935456684920510.873604567635892
5324452525.625364208442900.916666666670.8706300988337370.968077069009914
5415421847.109263610782935.50.629231566551110.834817966851432
5516061456.635289702722974.583333333330.4896938920418171.10254091147810
5625902558.957320941942999.708333333330.8530687108830931.01213098741586
5735883210.04188752293006.916666666671.067552660540281.11774242384381
5832023435.352209072253034.166666666671.132222645121310.932073279573488
5947044230.152840079693074.251.375995068741871.1120165577543
6040053971.217873335023107.166666666671.278083314917671.00850674219912
6138103973.413579647013138.3751.266073550690090.95887325183463
6234883531.132933303353165.208333333331.115608377532820.98778495907176
6327813125.479193430283168.6250.9863834292256980.889783558900546
6429442968.749744318983173.583333333330.935456684920510.991663243300873
6528172771.251880841903183.041666666670.8706300988337371.01650810576778
6619601997.023684341593173.750.629231566551110.981460568228667
6719371567.857014932723201.708333333330.4896938920418171.23544429214620
6829032778.195979638893256.708333333330.8530687108830931.04492268409996
6933573526.215400486243303.083333333331.067552660540280.95201217700345
7035523777.330623842443336.208333333331.132222645121310.940346597562799
7145814603.334169348063345.458333333331.375995068741870.99514826242753
7239054280.088007773453348.833333333331.278083314917670.912364417018477
7345814233.116916732313343.51.266073550690091.08218130755912
7440373731.059251293713344.416666666671.115608377532821.0819983624222
7533453325.139639229383371.041666666670.9863834292256981.00597278999544
7631753216.723720546663438.666666666670.935456684920510.987029125230695
7728083036.721508477963487.958333333330.8706300988337370.924681434290431
7820502204.250613592423503.083333333330.629231566551110.930021290391737
7917191723.314421743833519.166666666670.4896938920418170.997496439599535
8031432982.577024954633496.291666666670.8530687108830931.0537866997912
8137563723.089903634213487.51.067552660540281.00883945787440
8247763972.497502295223508.583333333331.132222645121311.20226633175742
8345404854.85460128853528.251.375995068741870.935146440594753
8443094545.396802561783556.416666666671.278083314917670.947992042756632
8545634518.722008542153569.083333333331.266073550690091.00979878633254
8635063968.033064154643556.833333333331.115608377532820.88356118593657
8736653516.415825880063564.958333333330.9863834292256981.04225443789281
8833613326.522948939213556.041666666670.935456684920511.01036429075945
8930943086.456252873833545.083333333330.8706300988337371.00244414516459
9024402256.004909941253585.333333333330.629231566551111.08155792979349
9116331768.488683284693611.416666666670.4896938920418170.923387305462969
9229353104.352583433203639.041666666670.8530687108830930.94544673039494
9341593922.010549381553673.833333333331.067552660540281.06042550055247
9441594171.579984062393684.416666666671.132222645121310.99698435985635
9548945089.461760508993698.751.375995068741870.961594807131542
9649214757.239112009383722.166666666671.278083314917671.03442351417174
974577NANANANA
984155NANANANA
993851NANANANA
1003429NANANANA
1013370NANANANA
1022726NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275566421eoa3n8fg48ifw8r/1kaex1275566350.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275566421eoa3n8fg48ifw8r/1kaex1275566350.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t1275566421eoa3n8fg48ifw8r/2kaex1275566350.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275566421eoa3n8fg48ifw8r/2kaex1275566350.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t1275566421eoa3n8fg48ifw8r/3v1di1275566350.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275566421eoa3n8fg48ifw8r/3v1di1275566350.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t1275566421eoa3n8fg48ifw8r/4v1di1275566350.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275566421eoa3n8fg48ifw8r/4v1di1275566350.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