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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 6 06:41:27 CET 2013


Author: hirokimasuda
Date: 2013-02-06 06:41:27 +0100 (Wed, 06 Feb 2013)
New Revision: 222

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/NEWS
   pkg/yuima/R/rng.R
Log:
rng.R: NG and NIG multivariate cases modified

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2013-02-06 05:39:11 UTC (rev 221)
+++ pkg/yuima/DESCRIPTION	2013-02-06 05:41:27 UTC (rev 222)
@@ -1,8 +1,8 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project package (unstable version)
-Version: 0.1.202
-Date: 2013-02-03
+Version: 0.1.203
+Date: 2013-02-06
 Depends: methods, zoo, stats4, utils
 Suggests: cubature, mvtnorm
 Author: YUIMA Project Team.

Modified: pkg/yuima/NEWS
===================================================================
--- pkg/yuima/NEWS	2013-02-06 05:39:11 UTC (rev 221)
+++ pkg/yuima/NEWS	2013-02-06 05:41:27 UTC (rev 222)
@@ -3,4 +3,5 @@
             modify bns.test.R, cce.R, llag.R, mpv.R, bns.test.Rd, cce.Rd, llag.Rd, mpv.Rd
 2012/12/19: modify cce.R
 2012/12/19: modify cce.R, noisy.sampling.R
-2012/12/22: modify cce.R
\ No newline at end of file
+2012/12/22: modify cce.R
+2013/02/06: modify rng.R

Modified: pkg/yuima/R/rng.R
===================================================================
--- pkg/yuima/R/rng.R	2013-02-06 05:39:11 UTC (rev 221)
+++ pkg/yuima/R/rng.R	2013-02-06 05:41:27 UTC (rev 222)
@@ -78,7 +78,7 @@
     sqrt.L <- svd(Lambda)
     sqrt.L <- sqrt.L$u %*% diag(sqrt(sqrt.L$d)) %*% t(sqrt.L$v)
     
-    z <- mu + t(matrix(rep(tau,length(beta)),x,length(beta))) * matrix(rep(Lambda %*% beta,x),length(beta),x)+t(matrix(rep(tau,length(beta)),x,length(beta))) * (Lambda %*% t(matrix(eta,x,length(beta))))
+    z <- mu + t(matrix(rep(tau,length(beta)),x,length(beta))) * matrix(rep(Lambda %*% beta,x),length(beta),x)+t(matrix(rep(sqrt(tau),length(beta)),x,length(beta))) * (sqrt.L %*% t(matrix(eta,x,length(beta))))
     X <- z
     return(X)
   }
@@ -212,7 +212,8 @@
   eta <- rnorm(x*length(beta))
   sqrt.L <- svd(Lambda)
   sqrt.L <- sqrt.L$u %*% diag(sqrt(sqrt.L$d)) %*% t(sqrt.L$v)
-  z <- mu + t(matrix(rep(tau,length(beta)),x,length(beta))) * matrix(rep(Lambda %*% beta,x),length(beta),x)+t(matrix(rep(tau,length(beta)),x,length(beta))) * (Lambda %*% t(matrix(eta,x,length(beta))))
+
+  z <- mu + t(matrix(rep(tau,length(beta)),x,length(beta))) * matrix(rep(Lambda %*% beta,x),length(beta),x)+t(matrix(rep(sqrt(tau),length(beta)),x,length(beta))) * (sqrt.L %*% t(matrix(eta,x,length(beta))))
   X <- z
   return(X)
 }



More information about the Yuima-commits mailing list