[Yuima-commits] r624 - pkg/yuima/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Sep 8 10:44:24 CEST 2017
Author: yumauehara
Date: 2017-09-08 10:44:24 +0200 (Fri, 08 Sep 2017)
New Revision: 624
Modified:
pkg/yuima/R/rng.R
Log:
fixed a bug in dGIG and dIG
Modified: pkg/yuima/R/rng.R
===================================================================
--- pkg/yuima/R/rng.R 2017-09-03 16:02:47 UTC (rev 623)
+++ pkg/yuima/R/rng.R 2017-09-08 08:44:24 UTC (rev 624)
@@ -47,6 +47,8 @@
## Generalized inverse Gaussian
rGIG<-function(x,lambda,delta,gamma){
+ if(x <= 0)
+ stop("x must be positive")
if((delta < 0)||(gamma<0)){
stop("delta and gamma must be nonnegative.")
}
@@ -408,6 +410,8 @@
dIG <- function(x,delta,gamma){
+ if(x <= 0)
+ stop("x must be positive")
if( delta <= 0 )
stop("delta must be positive.")
if( gamma <= 0 )
More information about the Yuima-commits
mailing list