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 20:46:04 +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/t1305579126dj7ji18ak91qvoz.htm/, Retrieved Mon, 16 May 2011 22:52:09 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1,3014 1,3201 1,2938 1,2694 1,2165 1,2037 1,2292 1,2256 1,2015 1,1786 1,1856 1,2103 1,1938 1,202 1,2271 1,277 1,265 1,2684 1,2811 1,2727 1,2611 1,2881 1,3213 1,2999 1,3074 1,3242 1,3516 1,3511 1,3419 1,3716 1,3622 1,3896 1,4227 1,4684 1,457 1,4718 1,4748 1,5527 1,5751 1,5557 1,5553 1,577 1,4975 1,437 1,3322 1,2732 1,3449 1,3239 1,2785 1,305 1,319 1,365 1,4016 1,4088 1,4268 1,4562 1,4816 1,4914 1,4614 1,4272 1,3686 1,3569 1,3406 1,2565 1,2209 1,277 1,2894 1,3067 1,3898 1,3661 1,322 1,336
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11.3014NANA-0.0262893055555556NA
21.3201NANA-0.00392680555555558NA
31.2938NANA0.0083481944444445NA
41.2694NANA0.0035965277777778NA
51.2165NANA-0.00322263888888885NA
61.2037NANA0.0182131944444444NA
71.22921.243810694444441.2318250.0119856944444445-0.0146106944444444
81.22561.230399861111111.222420833333330.0079790277777777-0.0047998611111113
91.20151.205603194444441.21472083333333-0.00911763888888879-0.00410319444444451
101.17861.202978194444441.21225833333333-0.00928013888888894-0.0243781944444441
111.18561.219486527777781.214595833333330.00489069444444448-0.0338865277777776
121.21031.216135694444441.2193125-0.00317680555555564-0.00583569444444465
131.19381.197881527777781.22417083333333-0.0262893055555556-0.00408152777777793
141.2021.224369027777781.22829583333333-0.00392680555555558-0.0223690277777777
151.22711.241089861111111.232741666666670.0083481944444445-0.0139898611111109
161.2771.243384027777781.23978750.00359652777777780.033615972222222
171.2651.246781527777781.25000416666667-0.003222638888888850.0182184722222218
181.26841.277604861111111.259391666666670.0182131944444444-0.00920486111111107
191.28111.279844027777781.267858333333330.01198569444444450.00125597222222207
201.27271.285662361111111.277683333333330.0079790277777777-0.0129623611111109
211.26111.278844861111111.2879625-0.00911763888888879-0.0177448611111111
221.28811.286957361111111.2962375-0.009280138888888940.0011426388888891
231.32131.307419861111111.302529166666670.004890694444444480.0138801388888889
241.29991.306856527777781.31003333333333-0.00317680555555564-0.00695652777777767
251.30741.291423194444441.3177125-0.02628930555555560.0159768055555554
261.32421.322035694444441.3259625-0.003926805555555580.00216430555555558
271.35161.345914861111111.337566666666670.00834819444444450.00568513888888877
281.35111.355409027777781.35181250.0035965277777778-0.00430902777777753
291.34191.361756527777781.36497916666667-0.00322263888888885-0.0198565277777778
301.37161.396009027777781.377795833333330.0182131944444444-0.0244090277777778
311.36221.403919027777781.391933333333330.0119856944444445-0.0417190277777777
321.38961.416408194444441.408429166666670.0079790277777777-0.0268081944444447
331.42271.418144861111111.4272625-0.009117638888888790.00455513888888892
341.46841.435819861111111.4451-0.009280138888888940.0325801388888887
351.4571.467407361111111.462516666666670.00489069444444448-0.0104073611111111
361.47181.476789861111111.47996666666667-0.00317680555555564-0.00498986111111099
371.47481.467873194444441.4941625-0.02628930555555560.0069268055555558
381.55271.497848194444441.501775-0.003926805555555580.0548518055555554
391.57511.508327361111111.499979166666670.00834819444444450.0667726388888887
401.55571.491671527777781.4880750.00359652777777780.0640284722222224
411.55531.472048194444441.47527083333333-0.003222638888888850.0832518055555556
421.5771.482650694444441.46443750.01821319444444440.0943493055555558
431.49751.462081527777781.450095833333330.01198569444444450.0354184722222224
441.4371.439574861111111.431595833333330.0079790277777777-0.00257486111111094
451.33221.401486527777781.41060416666667-0.00911763888888879-0.0692865277777779
461.27321.382707361111111.3919875-0.00928013888888894-0.109507361111111
471.34491.382528194444441.37763750.00489069444444448-0.0376281944444445
481.32391.361048194444441.364225-0.00317680555555564-0.0371481944444443
491.27851.327981527777781.35427083333333-0.0262893055555556-0.049481527777778
501.3051.348198194444441.352125-0.00392680555555558-0.0431981944444446
511.3191.367498194444441.359150.0083481944444445-0.0484981944444445
521.3651.378063194444441.374466666666670.0035965277777778-0.0130631944444446
531.40161.385189861111111.3884125-0.003222638888888850.0164101388888886
541.40881.415784027777781.397570833333330.0182131944444444-0.00698402777777773
551.42681.417614861111111.405629166666670.01198569444444450.00918513888888883
561.45621.419524861111111.411545833333330.00797902777777770.0366751388888886
571.48161.405490694444441.41460833333333-0.009117638888888790.0761093055555555
581.49141.401707361111111.4109875-0.009280138888888940.089692638888889
591.46141.403828194444441.39893750.004890694444444480.0575718055555556
601.42721.382739861111111.38591666666667-0.003176805555555640.044460138888889
611.36861.348410694444441.3747-0.02628930555555560.0201893055555555
621.35691.358819027777781.36274583333333-0.00392680555555558-0.00191902777777786
631.34061.361039861111111.352691666666670.0083481944444445-0.0204398611111112
641.25651.347242361111111.343645833333330.0035965277777778-0.0907423611111113
651.22091.329394027777781.33261666666667-0.00322263888888885-0.108494027777778
661.2771.341221527777781.323008333333330.0182131944444444-0.0642215277777776
671.2894NANA0.0119856944444445NA
681.3067NANA0.0079790277777777NA
691.3898NANA-0.00911763888888879NA
701.3661NANA-0.00928013888888894NA
711.322NANA0.00489069444444448NA
721.336NANA-0.00317680555555564NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t1305579126dj7ji18ak91qvoz/1kna01305578763.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305579126dj7ji18ak91qvoz/1kna01305578763.ps (open in new window)


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


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


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