[Yuima-commits] r368 - pkg/yuima/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Mar 15 21:11:31 CET 2015


Author: lorenzo
Date: 2015-03-15 21:11:31 +0100 (Sun, 15 Mar 2015)
New Revision: 368

Modified:
   pkg/yuima/R/MM.COGARCH.R
   pkg/yuima/R/simulate.R
Log:


Modified: pkg/yuima/R/MM.COGARCH.R
===================================================================
--- pkg/yuima/R/MM.COGARCH.R	2015-03-15 18:49:08 UTC (rev 367)
+++ pkg/yuima/R/MM.COGARCH.R	2015-03-15 20:11:31 UTC (rev 368)
@@ -367,7 +367,7 @@
   # Build an object of class mle
   if(Est.Incr=="NoIncr"){
       res<-new("cogarch.gmm", call = call, coef = coef, fullcoef = unlist(coef), 
-                vcov = vcov, min = min, details = list(), 
+                vcov = vcov, min = exp(min), details = list(), 
                 method = character(),
                 objFun = objFun 
                )

Modified: pkg/yuima/R/simulate.R
===================================================================
--- pkg/yuima/R/simulate.R	2015-03-15 18:49:08 UTC (rev 367)
+++ pkg/yuima/R/simulate.R	2015-03-15 20:11:31 UTC (rev 368)
@@ -601,7 +601,7 @@
           #         sim[t,1]<-sim[t-1,1]+sqrt(sim[t,2])*incr.L[1,t]  
           #        sim[t,3:ncolsim]<-expm(AMatrix*Delta)%*%sim[t-1,3:ncolsim]+expm(AMatrix)%*%evect*sim[t-1,2]*incr.L[2,t]
           sim[t,3:ncolsim]<-sim[t-1,3:ncolsim]+(AMatrix*Delta)%*%sim[t-1,3:ncolsim]+evect*sim[t-1,2]*incr.L[2,t-1]
-          sim[t,2]<-value.a0+tavect%*%sim[t,3:ncolsim]
+          sim[t,2]<-value.a0+tavect%*%sim[t-1,3:ncolsim]
           sim[t,1]<-sim[t-1,1]+sqrt(sim[t,2])*incr.L[1,t]
       }
       X <- ts(sim[-(samp at n[1]+1),])
@@ -676,7 +676,7 @@
 #         sim[t,1]<-sim[t-1,1]+sqrt(sim[t,2])*incr.L[1,t]  
 #        sim[t,3:ncolsim]<-expm(AMatrix*Delta)%*%sim[t-1,3:ncolsim]+expm(AMatrix)%*%evect*sim[t-1,2]*incr.L[2,t]
 #        sim[t,3:ncolsim]<-sim[t-1,3:ncolsim]+AMatrix*Delta%*%sim[t-1,3:ncolsim]+evect*sim[t-1,2]*incr.L[2,t-1]
-        sim[t,2]<-value.a0+tavect%*%sim[t,3:ncolsim]
+        sim[t,2]<-value.a0+tavect%*%sim[t-1,3:ncolsim]
         sim[t,1]<-sim[t-1,1]+sqrt(sim[t,2])*incr.L[1,t]
         
       }



More information about the Yuima-commits mailing list