[Yuima-commits] r446 - pkg/yuima/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri May 27 05:54:21 CEST 2016
Author: yumauehara
Date: 2016-05-27 05:54:18 +0200 (Fri, 27 May 2016)
New Revision: 446
Modified:
pkg/yuima/R/rng.R
Log:
added error message concerning rpts and rnts
Modified: pkg/yuima/R/rng.R
===================================================================
--- pkg/yuima/R/rng.R 2016-05-27 03:53:11 UTC (rev 445)
+++ pkg/yuima/R/rng.R 2016-05-27 03:54:18 UTC (rev 446)
@@ -396,6 +396,9 @@
stop("a must be positive value.")
if( b <= 0 )
stop("b must be positive value.")
+ ar<-exp(a*gamma(-alpha)*b^(alpha))
+ if(ar <= 0.1)
+ stop("Acceptance rate is too small.")
else
.C("rpts",as.integer(x),as.double(alpha),as.double(a),as.double(b),rn=double(length=x))$rn}
More information about the Yuima-commits
mailing list