[Yuima-commits] r370 - pkg/yuima/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Apr 2 11:01:16 CEST 2015
Author: hirokimasuda
Date: 2015-04-02 11:01:16 +0200 (Thu, 02 Apr 2015)
New Revision: 370
Modified:
pkg/yuima/R/rng.R
Log:
a small bug in rstable of rng.R has been fixed
Modified: pkg/yuima/R/rng.R
===================================================================
--- pkg/yuima/R/rng.R 2015-04-01 21:44:24 UTC (rev 369)
+++ pkg/yuima/R/rng.R 2015-04-02 09:01:16 UTC (rev 370)
@@ -1,7 +1,7 @@
##################################################################
###### "Random number generators and
###### related density functions for yuima packages"
-###### (Last modified: March 9, 2010)
+###### (Last modified: Apr 2, 2015)
##################################################################
@@ -255,7 +255,7 @@
## }
-## Non-Gaussian stable
+## Non-Gaussian stable: a bug modified on 1 Arp, 2015 (HM).
rstable <- function(x,alpha,beta,sigma,gamma){
a <- (1 + (beta*tan(alpha*pi/2))^2)^(1/(2*alpha))
@@ -268,7 +268,7 @@
s <- a * (sin(alpha*(u+b))/cos(u)^(1/alpha)) * (cos(u-alpha*(u+b))/v)^((1-alpha)/alpha)
X <- sigma * s + gamma * rep(1,x)
}else{
- s <- (2/pi) * ((pi/2 +beta*u)*tan(u) - beta * log(v*cos(u)/(beta*u + pi/2)))
+ s <- (2/pi) * ((pi/2 +beta*u)*tan(u) - beta * log((pi/2)*v*cos(u)/(beta*u + pi/2)))
X <- sigma * s + (gamma + (2/pi)*beta*sigma*log(sigma)) * rep(1,x)
}
More information about the Yuima-commits
mailing list