[Yuima-commits] r338 - in pkg/yuima: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Oct 13 20:43:43 CEST 2014


Author: lorenzo
Date: 2014-10-13 20:43:43 +0200 (Mon, 13 Oct 2014)
New Revision: 338

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/R/qmle.R
Log:
bug fixed kalman.carma

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2014-10-13 14:57:43 UTC (rev 337)
+++ pkg/yuima/DESCRIPTION	2014-10-13 18:43:43 UTC (rev 338)
@@ -1,7 +1,7 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project package for SDEs
-Version: 1.0.37
+Version: 1.0.38
 Date: 2014-10-13
 Depends: methods, zoo, stats4, utils, expm, cubature, mvtnorm
 Author: YUIMA Project Team

Modified: pkg/yuima/R/qmle.R
===================================================================
--- pkg/yuima/R/qmle.R	2014-10-13 14:57:43 UTC (rev 337)
+++ pkg/yuima/R/qmle.R	2014-10-13 18:43:43 UTC (rev 338)
@@ -1806,7 +1806,8 @@
   ATrans<-elForVInf$ATrans  
   matrixV<-elForVInf$matrixV
   matrixV[upper.tri(matrixV,diag=TRUE)]<-v
-  matrixV[lower.tri(matrixV)]<-matrixV[upper.tri(matrixV)]
+  matrixV<-as.matrix(forceSymmetric(matrixV))
+#matrixV[lower.tri(matrixV)]<-matrixV[upper.tri(matrixV)]
 #  l<-rbind(matrix(rep(0,p-1),p-1,1),1)
 #  matrixV<-matrix(v,p,p)
 
@@ -1859,6 +1860,7 @@
   elForVInf$lTrans<-lTrans
   elForVInf$l<-l
   elForVInf$matrixV<-matrixV
+
   elForVInf$sigma<-sigma
 #   elForVInf<-list(A=A,
 #                   ATrans=ATrans,
@@ -1874,28 +1876,29 @@
   V_inf<-matrix(0,p,p)
   
   V_inf[upper.tri(V_inf,diag=TRUE)]<-V_inf_vect
-  V_inf[lower.tri(V_inf)]<-V_inf[upper.tri(V_inf)]
+  V_inf<-as.matrix(forceSymmetric(V_inf))
+#  V_inf[lower.tri(V_inf)]<-V_inf[upper.tri(V_inf)]
   
   V_inf[abs(V_inf)<=1.e-06]=0
   
   expAT<-t(expA)
-  #SIGMA_err<-V_inf-expA%*%V_inf%*%t(expA)
+  #IGMA_err<-V_inf-expA%*%V_inf%*%t(expA)
   
   # input: V_inf, p, expA
   # output: SigMatr (pre-alloc in R)
-  
-  SigMatr1 <- .Call("carma_tmp",  V_inf, as.integer(p), expA, PACKAGE="yuima")
-
-print( (expA %*% V_inf) %*% expAT)
-  SigMatr <- V_inf - expA %*% V_inf %*% expAT
-  cat("\nSigMatr\n")
-  print(SigMatr)
-  cat("\nAVAT\n")
-  print(expA %*% V_inf)
-  cat("\nSigMatr1\n")
-  print(SigMatr1)
-  stop("")
-  
+#   
+#   SigMatr1 <- .Call("carma_tmp",  V_inf, as.integer(p), expA, PACKAGE="yuima")
+# 
+# print( (expA %*% V_inf) %*% expAT)
+   SigMatr <- V_inf - expA %*% V_inf %*% expAT
+#   cat("\nSigMatr\n")
+#   print(SigMatr)
+#   cat("\nAVAT\n")
+#   print(expA %*% V_inf)
+#   cat("\nSigMatr1\n")
+#   print(SigMatr1)
+#   stop("")
+#   
   statevar<-matrix(rep(0, p),p,1)
   Qmatr<-SigMatr
   



More information about the Yuima-commits mailing list