[r-cran-bayesm] 11/44: Import Upstream version 1.1-2
Andreas Tille
tille at debian.org
Thu Sep 7 11:16:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository r-cran-bayesm.
commit e123ee25f8d2250aaa4ac365de85c6e8d8d4c63c
Author: Andreas Tille <tille at debian.org>
Date: Thu Sep 7 13:08:33 2017 +0200
Import Upstream version 1.1-2
---
DESCRIPTION | 6 +++---
R/llmnp.R | 1 +
src/bayesmc.c | 8 ++++++--
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index a8ce985..13c949f 100755
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: bayesm
-Version: 1.1-1
-Date: 2005-07-01
+Version: 1.1-2
+Date: 2005-07-05
Title:Bayesian Inference for Marketing/Micro-econometrics
Author: Peter Rossi <peter.rossi at ChicagoGsb.edu>,
Rob McCulloch <robert.mcculloch at ChicagoGsb.edu>.
@@ -27,4 +27,4 @@ Description: bayesm covers many important models used
Marketing by Allenby, McCulloch and Rossi.
License: GPL (version 2 or later)
URL: http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html
-Packaged: Fri Jul 1 11:33:45 2005; per
+Packaged: Tue Jul 5 16:42:19 2005; per
diff --git a/R/llmnp.R b/R/llmnp.R
index 57975e4..abc9c81 100755
--- a/R/llmnp.R
+++ b/R/llmnp.R
@@ -4,6 +4,7 @@ function(X,y,beta,Sigma,r)
#
# revision history:
# edited by rossi 2/8/05
+# adde 1.0e-50 before taking log to avoid -Inf 6/05
#
# purpose:
# function to evaluate MNP likelihood using GHK
diff --git a/src/bayesmc.c b/src/bayesmc.c
index 73c5833..c1e47de 100755
--- a/src/bayesmc.c
+++ b/src/bayesmc.c
@@ -27,8 +27,9 @@ double rtrun(double mu, double sigma,double trunpt, int above)
/* function to draw truncated normal
above=1 means from above b=trunpt, a=-inf
above=0 means from below a=trunpt, b= +inf
+ modified by rossi 6/05 to check arg to qnorm
*/
- double FA,FB,rnd,result ;
+ double FA,FB,rnd,result,arg ;
if (above) {
FA=0.0; FB=pnorm(((trunpt-mu)/(sigma)),0.0,1.0,1,0);
}
@@ -38,7 +39,10 @@ double rtrun(double mu, double sigma,double trunpt, int above)
GetRNGstate();
rnd=unif_rand();
- result = mu + sigma*qnorm((rnd*(FB-FA)+FA),0.0,1.0,1,0);
+ arg=rnd*(FB-FA)+FA;
+ if(arg > .999999999) arg=.999999999;
+ if(arg < .0000000001) arg=.0000000001;
+ result = mu + sigma*qnorm(arg,0.0,1.0,1,0);
PutRNGstate();
return result;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-bayesm.git
More information about the debian-science-commits
mailing list