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 15:31:10 +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/t13055596459zo5dha6lbrenxb.htm/, Retrieved Mon, 16 May 2011 17:27:29 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
31.900 31.815 31.075 31.070 31.300 31.410 30.310 31.440 31.355 31.380 31.975 31.905 32.565 32.780 32.850 32.910 32.910 33.755 34.130 34.330 34.120 33.600 33.715 33.535 33.745 34.295 33.940 34.245 34.395 33.640 33.890 33.905 33.930 33.975 33.880 33.800 33.165 33.660 33.545 33.590 33.810 33.720 33.660 33.915 34.265 34.175 33.735 33.855 34.210 33.950 33.130 32.195 33.160 33.255 32.260 31.795 31.875 31.985 31.835 32.200 32.275 32.515 32.700 32.680 32.135 31.460 30.755 31.090 31.270 31.110 30.835 31.025 30.800 30.790
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ www.yougetit.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
131.9NANA0.0506527777777762NA
231.815NANA0.297861111111113NA
331.075NANA0.0944861111111137NA
431.07NANA-0.0115555555555553NA
531.3NANA0.158194444444441NA
631.41NANA0.0590277777777785NA
730.3131.293027777777831.4389583333333-0.145930555555557-0.983027777777778
831.4431.460236111111131.506875-0.0466388888888922-0.0202361111111031
931.35531.474944444444431.6210416666667-0.146097222222221-0.119944444444442
1031.3831.750152777777831.7716666666667-0.021513888888886-0.370152777777779
1131.97531.748444444444431.9154166666667-0.166972222222220.226555555555557
1231.90531.958694444444432.0802083333333-0.12151388888889-0.0536944444444387
1332.56532.387736111111132.33708333333330.05065277777777620.177263888888888
1432.7832.914527777777832.61666666666670.297861111111113-0.134527777777777
1532.8532.946777777777832.85229166666670.0944861111111137-0.0967777777777812
1632.9133.048444444444433.06-0.0115555555555553-0.138444444444445
1732.9133.383194444444433.2250.158194444444441-0.473194444444445
1833.75533.424444444444433.36541666666670.05902777777777850.330555555555563
1934.1333.336569444444433.4825-0.1459305555555570.79343055555556
2034.3333.548152777777833.5947916666667-0.04663888888889220.781847222222225
2134.1233.557236111111133.7033333333333-0.1460972222222210.562763888888895
2233.633.782861111111133.804375-0.021513888888886-0.182861111111109
2333.71533.754902777777833.921875-0.16697222222222-0.0399027777777761
2433.53533.857444444444433.9789583333333-0.12151388888889-0.322444444444443
2533.74534.014819444444433.96416666666670.0506527777777762-0.269819444444444
2634.29534.234319444444433.93645833333330.2978611111111130.0606805555555638
2733.9434.005319444444433.91083333333330.0944861111111137-0.065319444444448
2834.24533.906986111111133.9185416666667-0.01155555555555530.338013888888888
2934.39534.099236111111133.94104166666670.1581944444444410.295763888888892
3033.6434.017986111111133.95895833333330.0590277777777785-0.377986111111113
3133.8933.799902777777833.9458333333333-0.1459305555555570.0900972222222265
3233.90533.848569444444433.8952083333333-0.04663888888889220.0564305555555578
3333.9333.706194444444433.8522916666667-0.1460972222222210.223805555555558
3433.97533.787027777777833.8085416666667-0.0215138888888860.187972222222214
3533.8833.589902777777833.756875-0.166972222222220.290097222222229
3633.833.614319444444433.7358333333333-0.121513888888890.185680555555557
3733.16533.780236111111133.72958333333330.0506527777777762-0.615236111111116
3833.6634.018277777777833.72041666666670.297861111111113-0.358277777777779
3933.54533.829277777777833.73479166666670.0944861111111137-0.284277777777774
4033.5933.745527777777833.7570833333333-0.0115555555555553-0.155527777777777
4133.8133.917569444444433.7593750.158194444444441-0.107569444444437
4233.7233.814652777777833.7556250.0590277777777785-0.0946527777777817
4333.6633.655527777777833.8014583333333-0.1459305555555570.0044722222222191
4433.91533.810444444444433.8570833333333-0.04663888888889220.104555555555557
4534.26533.705777777777833.851875-0.1460972222222210.559222222222232
4634.17533.754944444444433.7764583333333-0.0215138888888860.420055555555557
4733.73533.524277777777833.69125-0.166972222222220.210722222222223
4833.85533.523277777777833.6447916666667-0.121513888888890.331722222222218
4934.2133.617736111111133.56708333333330.05065277777777620.592263888888894
5033.9533.718277777777833.42041666666670.2978611111111130.231722222222224
5133.1333.326986111111133.23250.0944861111111137-0.196986111111116
5232.19533.030111111111133.0416666666667-0.0115555555555553-0.835111111111111
5333.1633.029444444444432.871250.1581944444444410.13055555555556
5433.25532.782152777777832.7231250.05902777777777850.472847222222228
5532.2632.427611111111132.5735416666667-0.145930555555557-0.167611111111107
5631.79532.386486111111132.433125-0.0466388888888922-0.591486111111109
5731.87532.209319444444432.3554166666667-0.146097222222221-0.334319444444439
5831.98532.336194444444432.3577083333333-0.021513888888886-0.351194444444445
5931.83532.168236111111132.3352083333333-0.16697222222222-0.333236111111113
6032.232.096194444444432.2177083333333-0.121513888888890.103805555555567
6132.27532.130861111111132.08020833333330.05065277777777620.144138888888889
6232.51532.285986111111131.9881250.2978611111111130.229013888888897
6332.732.028027777777831.93354166666670.09448611111111370.671972222222223
6432.6831.860319444444431.871875-0.01155555555555530.819680555555554
6532.13531.951944444444431.793750.1581944444444410.183055555555551
6631.4631.762152777777831.7031250.0590277777777785-0.302152777777778
6730.75531.446777777777831.5927083333333-0.145930555555557-0.691777777777773
6831.0931.412736111111131.459375-0.0466388888888922-0.322736111111109
6931.27NANA-0.146097222222221NA
7031.11NANA-0.021513888888886NA
7130.835NANA-0.16697222222222NA
7231.025NANA-0.12151388888889NA
7330.8NANANANA
7430.79NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t13055596459zo5dha6lbrenxb/1hdwk1305559868.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t13055596459zo5dha6lbrenxb/1hdwk1305559868.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2011/May/16/t13055596459zo5dha6lbrenxb/36fzp1305559868.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t13055596459zo5dha6lbrenxb/36fzp1305559868.ps (open in new window)


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