[r-cran-bayesm] 38/44: Import Upstream version 2.2-5

Andreas Tille tille at debian.org
Thu Sep 7 11:16:23 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 301845808482d01b110b8fcd3a82adf06268e131
Author: Andreas Tille <tille at debian.org>
Date:   Thu Sep 7 13:10:19 2017 +0200

    Import Upstream version 2.2-5
---
 DESCRIPTION                |  14 ++---
 MD5                        | 141 +++++++++++++++++++++++++++++++++++++++++++++
 R/plot.bayesm.hcoef.R      |   7 ++-
 R/plot.bayesm.nmix.R       |   6 +-
 R/rhierNegbinRw.R          |   2 +-
 R/rivDP.R                  |   3 +-
 R/rnegbinRw.R              |   2 +-
 R/summary.bayesm.mat.R     |   2 +-
 data/Scotch.rda            | Bin 5884 -> 5884 bytes
 data/bank.rda              | Bin 19808 -> 19548 bytes
 data/cheese.rda            | Bin 63768 -> 63660 bytes
 data/customerSat.rda       | Bin 9240 -> 8992 bytes
 data/datalist              |   8 +++
 data/detailing.rda         | Bin 33336 -> 35584 bytes
 data/margarine.rda         | Bin 23316 -> 23576 bytes
 data/orangeJuice.rda       | Bin 589012 -> 595416 bytes
 data/tuna.rda              | Bin 40120 -> 40076 bytes
 inst/doc/bayesm-manual.pdf | Bin 510514 -> 359770 bytes
 man/condMom.Rd             |   2 +-
 man/createX.Rd             |   4 +-
 man/eMixMargDen.Rd         |   2 +-
 man/plot.bayesm.hcoef.Rd   |   3 +-
 man/rhierMnlRwMixture.Rd   |   2 +-
 man/summary.bayesm.mat.Rd  |   3 +
 src/bayesmcpp.cpp          |   3 +-
 25 files changed, 182 insertions(+), 22 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 04d5969..2f265fe 100755
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,12 +1,12 @@
 Package: bayesm
-Version: 2.2-4
-Date: 2011-02-25
+Version: 2.2-5
+Date: 2012-05-15
 Title: Bayesian Inference for Marketing/Micro-econometrics
 Author: Peter Rossi <perossichi at gmail.com>.
 Maintainer: Peter Rossi <perossichi at gmail.com>
-Depends: R (>= 2.12.1)
+Depends: R (>= 2.10)
 Description: bayesm covers many important models used in marketing and
-        micro-econometrics applications. The package includes: Bayes
+        micro-econometrics applications.  The package includes: Bayes
         Regression (univariate or multivariate dep var), Bayes
         Seemingly Unrelated Regression (SUR), Binary and Ordinal
         Probit, Multinomial Logit (MNL) and Multinomial Probit (MNP),
@@ -22,11 +22,11 @@ Description: bayesm covers many important models used in marketing and
         choice-based conjoint data, Bayesian treatment of linear
         instrumental variables models, and Analysis of Multivariate
         Ordinal survey data with scale usage heterogeneity (as in Rossi
-        et al, JASA (01)). For further reference, consult our book,
+        et al, JASA (01)).  For further reference, consult our book,
         Bayesian Statistics and Marketing by Rossi, Allenby and
         McCulloch.
 License: GPL (>= 2)
 URL: http://www.perossi.org/home/bsm-1
-Packaged: 2011-02-26 20:38:56 UTC; perossichi
+Packaged: 2012-05-15 22:08:17 UTC; perossichi
 Repository: CRAN
-Date/Publication: 2011-02-27 18:04:44
+Date/Publication: 2012-05-16 07:49:34
diff --git a/MD5 b/MD5
new file mode 100644
index 0000000..4028f75
--- /dev/null
+++ b/MD5
@@ -0,0 +1,141 @@
+25ab0816dcfccb2b5c1148c87e1f715a *DESCRIPTION
+104c849c818b9997da00644d0a85a400 *NAMESPACE
+401e4f6588cb831c2f8b4f35ba2bc1af *R/breg.R
+33cab325b0b50726929a8392e9c909e0 *R/cgetC.R
+027f3ae5fd398edd39b46aa12531609f *R/clusterMix.R
+0207b70adcd95129ba38b6177b235d51 *R/condMom.R
+5791169a4fdf78dc93bfaebfa1bcfd46 *R/createX.R
+f0ab1f89e4c7b93a3abf2969c94b4b19 *R/eMixMargDen.R
+a6774f78661955079a5fae59bb3be712 *R/fsh.R
+0a73563b2dd400bf166539d86416eeec *R/ghkvec.R
+dc005ba67612e70f9786831cd706c71c *R/llmnl.R
+e37549412e0e9dbac1d400e99c28f82a *R/llmnp.R
+17028c8350c0ce277541b05f9b5cf492 *R/llnhlogit.R
+8b896bc1e1c112477addd5383ba74434 *R/lndIChisq.R
+12a19ef6193035d0ebf589a2caeba448 *R/lndIWishart.R
+d1e675e3b8c4e0906bb8f7b5224f52ac *R/lndMvn.R
+d8e8c68d2b6b453d40d13c09a99e3296 *R/lndMvst.R
+a6170041c44b4b577f7d54a606d47b66 *R/logMargDenNR.R
+527cad4b4579e5b54a81980efd32d5b9 *R/mixDen.R
+0d7e8a1405b2ea906f5e253f419e285a *R/mixDenBi.R
+b707216d4a165cafcfd77ff74ca32d4e *R/mnlHess.R
+24101c4b685854e3969f56bacfb6542b *R/mnpProb.R
+e8c68b7db1d51d1ce270e09648db3112 *R/momMix.R
+dd4a04551d37b77645a4cb38b3feb114 *R/nmat.R
+72dbf320a442a6ee65a3de8bc4e6f238 *R/numEff.R
+883e66377d96e886e35ec88cfe5862e6 *R/plot.bayesm.hcoef.R
+101314f685d135205cf41fc7843dba0e *R/plot.bayesm.mat.R
+d14eae20edc467e1557775af62c45eb0 *R/plot.bayesm.nmix.R
+8f1b246d9e942b936c1464bf5cc7b3e4 *R/rDPGibbs.R
+21b7c833644b73a172b135e212503c4a *R/rbiNormGibbs.R
+082e9caa253807a6b80ffcd6f79cae49 *R/rbprobitGibbs.R
+493df9bf9d99695645b005e20440609a *R/rdirichlet.R
+6b0c22ba7a9f46c474549a251a18d029 *R/rhierBinLogit.R
+26e849dced2247c6f5406c9534236b06 *R/rhierLinearMixture.R
+b4933e7df564ab1c246e7eb80b7e586b *R/rhierLinearModel.R
+abc7ef17f7f5ae2892dcbcaeef013e98 *R/rhierMnlDP.R
+475c9f82dff4c4e6405e1e5fcaa330c4 *R/rhierMnlRwMixture.R
+c0aa928d08b44fb6f5d027e1b46e0a7e *R/rhierNegbinRw.R
+fa9ea7d874426ebdb28ba2a318e6c147 *R/rivDP.R
+3b085ca153175acb96adb1cfb8ae7807 *R/rivGibbs.R
+c6307313b5535c2af034e1ce36482fd6 *R/rmixGibbs.R
+189f7b8890f155199e12d1557d563fb9 *R/rmixture.R
+06a026131b0906cb0e9765cd64c7b882 *R/rmnlIndepMetrop.R
+d0909f46470a76783ddf64c9b588a9a3 *R/rmnpGibbs.R
+179c70281b377291e0242ea44448abc4 *R/rmultireg.R
+0c3a511cd31ead4bbdb4a9b709ec528e *R/rmvpGibbs.R
+bbb32ab3df56506fa65b3b0577610310 *R/rmvst.R
+9fcb24261a1209b72fde7279c113c166 *R/rnegbinRw.R
+2b182fc7f36ae5802a4cdcef71b68e19 *R/rnmixGibbs.R
+670579428617e58ecd80b4b64b32545f *R/rordprobitGibbs.R
+a5935a0e04f10658a8a343161bb745a7 *R/rscaleUsage.R
+a537b2d1d2c8b70a1413f003953f82ef *R/rsurGibbs.R
+9ef931fbb05babb186e1c33616414071 *R/rtrun.R
+e247e2a2f2e07a38a191ddb3e16d4cc7 *R/runireg.R
+4bfb71f2356dc55d821074022181596f *R/runiregGibbs.R
+70abbbde4483632234b2972dc93814a4 *R/rwishart.R
+3b56c8bdb18a20a539f27572d68da109 *R/simnhlogit.R
+f6bbbc1dd104aa996c7ba62f17c1460b *R/summary.bayesm.mat.R
+14b1a1bf0cd8784439a7c16d2408ddde *R/summary.bayesm.nmix.R
+b32525a1cb91d95c80dc004797961065 *R/summary.bayesm.var.R
+b8aa164aa098ca3a09cf1caec14213fc *data/Scotch.rda
+aa29da9571ca351139d229453e99a3f4 *data/bank.rda
+ac9a5b4c9362e863a57a20dbe903c654 *data/cheese.rda
+cf5a6146480288dbdc12667884707c0b *data/customerSat.rda
+878b1056a05daf4bf6c5b6517a8dbad2 *data/datalist
+c7f757303437e1793e1ea493bbe71b44 *data/detailing.rda
+514fe7d568a94ae1bdfe060ecbbb893a *data/margarine.rda
+dfb9e017e59a1a4a05132e9268d12ddd *data/orangeJuice.rda
+c276ad0aace069b133741379be312f53 *data/tuna.rda
+545ea1221834d4224e011f6ea0c5ef72 *inst/doc/Some_Useful_R_Pointers.pdf
+e86b96859b1ae776c3f375fea5c9e5b5 *inst/doc/Tips_On_Using_bayesm.pdf
+11bc880c72a246a1b2d7b637b7a33666 *inst/doc/bayesm-manual.pdf
+a3bb8beb9f2ab9a2a1da59db8ba50596 *man/Scotch.Rd
+d68d3fa7019a5b1cfad55a258408a180 *man/bank.Rd
+1fe66a704a13b451b99229f35ba1f1a8 *man/breg.Rd
+f07a713b4091c4f2ed98263371d37b2c *man/cgetC.Rd
+b8cab7715f713e1f7d1a14b939d963f9 *man/cheese.Rd
+1198306509a1cf7ef3dd798053349c31 *man/clusterMix.Rd
+4d1652da474399178b1df1e1bfb8887e *man/condMom.Rd
+14e31bbafc5799a43fa859a8f55acd1a *man/createX.Rd
+62681ec3b2bf9d998ac53196b4df5529 *man/customerSat.Rd
+17c6e1a9547ca791481353f3568baf02 *man/detailing.Rd
+5c61f699c189babdf28fdef19eae8ce0 *man/eMixMargDen.Rd
+407c7daf8cd13173b31845dab494a747 *man/fsh.Rd
+b362664b1788e3b90bd18b718104e24e *man/ghkvec.Rd
+38e2c94c6ab0693b2322095fd0a2e7f2 *man/llmnl.Rd
+a54ed9dafaf397dc86ad9070a4b24aab *man/llmnp.Rd
+88d14f235d05d54a93c04522be66421b *man/llnhlogit.Rd
+c9e1ff340b37cf06ca4e8ec727c4a55a *man/lndIChisq.Rd
+faab40a3b3840e9a1322afa53a9de958 *man/lndIWishart.Rd
+4d7412ecb025dc439875696490c2434c *man/lndMvn.Rd
+c3b2c13159fb068e92a4071438a29a5d *man/lndMvst.Rd
+05ee3818fbde059250c9ee32ae945034 *man/logMargDenNR.Rd
+242b4f28697e70c21abf043b2b91b72b *man/margarine.Rd
+affbc038f38d8a1e1d2fd6bd0ab4f5e0 *man/mixDen.Rd
+9cd5aa24ea62d764ab005706efe0e5b9 *man/mixDenBi.Rd
+957a5b9d6f0f2eca48e5046ebe6451a1 *man/mnlHess.Rd
+7dc6205db53ce866c0eb8aa6d8d884c7 *man/mnpProb.Rd
+c12fd2f67a955f37461cd7a66bf39b2f *man/momMix.Rd
+b5efa10853ed50a4da769df0065a0e44 *man/nmat.Rd
+bdcdc98e07fd54e282f9c1aab1053a5a *man/numEff.Rd
+34829b72b32a6e25aee9409af90b50f8 *man/orangeJuice.Rd
+987d158c20b58a3edd18dfde6fe57d9b *man/plot.bayesm.hcoef.Rd
+eb4fe541950cdaaa6eb8aa6267024127 *man/plot.bayesm.mat.Rd
+6cbfec0e72b35c340894665538d27047 *man/plot.bayesm.nmix.Rd
+56464607c7f96a36b7430eae79acbe85 *man/rDPGibbs.Rd
+4ea31f59406ff8b724813e3c8601257e *man/rbiNormGibbs.Rd
+18723eb9100eca82315d5b97b0853bb0 *man/rbprobitGibbs.Rd
+80e8d4e72e35691a571406a0d7294985 *man/rdirichlet.Rd
+95aa69a6614375b5f1bd17a708f7d02b *man/rhierBinLogit.Rd
+062430837353cb9f0c3a22c50f7f6d10 *man/rhierLinearMixture.Rd
+edf286793a792a8294250ac37b6020fa *man/rhierLinearModel.Rd
+e4bc42345f8801febeb9364d4e63c43e *man/rhierMnlDP.Rd
+bba3de792daa1d00f4d8f4d8e88fa8b9 *man/rhierMnlRwMixture.Rd
+7426ccb6ab1afefb658b6cc6dc2d46fa *man/rhierNegbinRw.Rd
+9fa7552e6c1f56ad9254d522f3333c51 *man/rivDP.Rd
+cc7ba89ad2a557b079599f8c27c7f383 *man/rivGibbs.Rd
+d350269f33b2d2ec71f1efac19142591 *man/rmixGibbs.Rd
+15771bcb72a8ade5d4450dcfc45efb32 *man/rmixture.Rd
+ce4f682014cbdf284d7a4c2caa5dfd6b *man/rmnlIndepMetrop.Rd
+94c1da07f825f873629a216e3d35f4f5 *man/rmnpGibbs.Rd
+0e8d71b14062ffb6ea8302dda67cca61 *man/rmultireg.Rd
+62c0b370cbb80ab572a84b89df4e0ea6 *man/rmvpGibbs.Rd
+73189b4e83339b6f2c08c0d42193ed1c *man/rmvst.Rd
+aa0fbf64304df8faafc0f3c3b56491cd *man/rnegbinRw.Rd
+89e693c58aba4f33ca7bc10081355532 *man/rnmixGibbs.Rd
+627cc5ce56e3a0447472d278e9fda82a *man/rordprobitGibbs.Rd
+6b0e0e5bb98ca051cafd77283645db1c *man/rscaleUsage.Rd
+2786573e1f0b349e9f0ab98515635f9c *man/rsurGibbs.Rd
+239d4e36330f6192286cfa5357551cfb *man/rtrun.Rd
+68c3de2eeb01d352010bb25ec17805cf *man/runireg.Rd
+ccebdab5cd015f22f3dc6826f6774cf0 *man/runiregGibbs.Rd
+d75ecd347f67dce2c096c7f87f0be264 *man/rwishart.Rd
+da878a797b7a6f8266734fa9b6b6703f *man/simnhlogit.Rd
+c2ec8e3bb180f526cd4cf804717ad201 *man/summary.bayesm.mat.Rd
+30de937fd9d54e6baf0d3fbe9c0cd629 *man/summary.bayesm.nmix.Rd
+33da73c40f373ab99ca9a4b3ea462961 *man/summary.bayesm.var.Rd
+2a34a7a3f3b2737c22529384cc4cff81 *man/tuna.Rd
+3bca185c577e354d7af15e8779148d57 *src/bayesmc.c
+f1200fa8922a2fc8e400d76d51c53474 *src/bayesmcpp.cpp
+8769203cb0949b0efb56d26dad9a829f *src/thetadraw.c
diff --git a/R/plot.bayesm.hcoef.R b/R/plot.bayesm.hcoef.R
index a7e6d7d..cd92bec 100755
--- a/R/plot.bayesm.hcoef.R
+++ b/R/plot.bayesm.hcoef.R
@@ -1,4 +1,4 @@
-plot.bayesm.hcoef=function(x,burnin=trunc(.1*R),...){
+plot.bayesm.hcoef=function(x,names,burnin=trunc(.1*R),...){
 #
 # S3 method to plot arrays of draws of coefs in hier models
 #   3 dimensional arrays:  unit x var x draw
@@ -18,6 +18,7 @@ plot.bayesm.hcoef=function(x,burnin=trunc(.1*R),...){
   #
   #  plot posterior distributions of nvar coef for 30 rand units
   #
+  if(missing(names)) {names=as.character(1:nvar)}
   rsam=sort(sample(c(1:nunits),30))  # randomly sample 30 cross-sectional units
   par(mfrow=c(1,1))
   par(las=3)  # horizontal labeling
@@ -26,7 +27,7 @@ plot.bayesm.hcoef=function(x,burnin=trunc(.1*R),...){
        colnames(ext)=as.character(rsam)
        out=boxplot(ext,plot=FALSE,...)
        out$stats=apply(ext,2,quantile,probs=c(0,.05,.95,1))
-       bxp(out,xlab="Cross-sectional Unit",main=paste("Coefficients on Var ",var,sep=""),boxfill="magenta",...)
+       bxp(out,xlab="Cross-sectional Unit",main=paste("Coefficients on Var ",names[var],sep=""),boxfill="magenta",...)
        if(var==1) par(ask=dev.interactive())
   }
   #
@@ -37,7 +38,7 @@ plot.bayesm.hcoef=function(x,burnin=trunc(.1*R),...){
   for(i in 1:nunits) pmeans[i,]=apply(X[i,,(burnin+1):R],1,mean)
   names=as.character(1:nvar)
   attributes(pmeans)$class="bayesm.mat"
-  for(i in 1:nvar) names[i]=paste("Posterior Means of Coef ",i,sep="")
+  for(i in 1:nvar) names[i]=paste("Posterior Means of Coef ",names[var],sep="")
   plot(pmeans,names,TRACEPLOT=FALSE,INT=FALSE,DEN=FALSE,CHECK_NDRAWS=FALSE,...)
 invisible()
 }
diff --git a/R/plot.bayesm.nmix.R b/R/plot.bayesm.nmix.R
index be4cb72..66b4a31 100755
--- a/R/plot.bayesm.nmix.R
+++ b/R/plot.bayesm.nmix.R
@@ -26,14 +26,16 @@ plot.bayesm.nmix=function(x,names,burnin=trunc(.1*nrow(probdraw)),Grid,bi.sel,ns
   if(!missing(Data)){
      if(!is.matrix(Data)) stop("Data argument must be a matrix \n")
      if(ncol(Data)!= datad) stop("Data matrix is of wrong dimension \n")      
-     }
+  }
+  if(mode(bi.sel) != "list") stop("bi.sel must be as list, e.g. bi.sel=list(c(1,2),c(3,4)) \n")
 
   if(missing(Grid)){
      Grid=matrix(0,nrow=ngrid,ncol=datad)
      if(!missing(Data))
 	{for(i in 1:datad) Grid[,i]=c(seq(from=range(Data[,i])[1],to=range(Data[,i])[2],length=ngrid))}
      else
-        {out=momMix(probdraw[ind,,drop=FALSE],compdraw[ind])
+        {
+	     out=momMix(probdraw[ind,,drop=FALSE],compdraw[ind])
          mu=out$mu
          sd=out$sd
          for(i in 1:datad ) Grid[,i]=c(seq(from=(mu[i]-nstd*sd[i]),
diff --git a/R/rhierNegbinRw.R b/R/rhierNegbinRw.R
index f9c5e6a..c58aafc 100755
--- a/R/rhierNegbinRw.R
+++ b/R/rhierNegbinRw.R
@@ -55,7 +55,7 @@ function(par,X,y, nvar) {
     mean=exp(X%*%beta)
     prob=alpha/(alpha+mean)
     prob=ifelse(prob<1.0e-100,1.0e-100,prob)
-     out=.Internal(dnbinom(y,alpha,prob,TRUE))
+     out=dnbinom(y,size=alpha,prob=prob,log=TRUE)
      return(sum(out))
 }
 
diff --git a/R/rivDP.R b/R/rivDP.R
index f222266..96c0dbe 100755
--- a/R/rivDP.R
+++ b/R/rivDP.R
@@ -8,6 +8,7 @@ function(Data,Prior,Mcmc)
 #   added automatic scaling 2/06
 #   removed reqfun  7/07 -- now functions are in rthetaDP
 #   fixed initialization of theta 3/09
+#   fixed error in assigning user defined prior parms
 #
 # purpose: 
 #   draw from posterior for linear I.V. model with DP process for errors
@@ -108,7 +109,7 @@ if(missing(Prior))
 else  
    { 
     if(is.null(Prior$md)) md=c(rep(0,dimd)) else md=Prior$md
-    if(is.null(Prior$Ad)) Ad=diag(0.01,dimd) else md=Prior$Ad
+    if(is.null(Prior$Ad)) Ad=diag(0.01,dimd) else Ad=Prior$Ad
     if(isgamma) dimbg=1+dimg else dimbg=1
     if(is.null(Prior$mbg)) mbg=c(rep(0,dimbg)) else md=Prior$mbg
     if(is.null(Prior$Abg)) Abg=diag(0.01,dimbg) else md=Prior$Abg
diff --git a/R/rnegbinRw.R b/R/rnegbinRw.R
index 1ebe6c4..340b0b8 100755
--- a/R/rnegbinRw.R
+++ b/R/rnegbinRw.R
@@ -44,7 +44,7 @@ function(par,X,y, nvar) {
     mean=exp(X%*%beta)
     prob=alpha/(alpha+mean)
     prob=ifelse(prob<1.0e-100,1.0e-100,prob)
-     out=.Internal(dnbinom(y,alpha,prob,TRUE))
+     out=dnbinom(y,size=alpha,prob=prob,log=TRUE)
      return(sum(out))
 }
 
diff --git a/R/summary.bayesm.mat.R b/R/summary.bayesm.mat.R
index 3bef1b6..3fe7f85 100755
--- a/R/summary.bayesm.mat.R
+++ b/R/summary.bayesm.mat.R
@@ -43,6 +43,6 @@ summary.bayesm.mat=function(object,names,burnin=trunc(.1*nrow(X)),tvalues,QUANTI
      cat("\nQuantiles \n")
      print(t(qmat),digits=2)}
   if(TRAILER) cat(paste("   based on ",nrow(X)," valid draws (burn-in=",burnin,") \n",sep=""))
-  invisible()
+  invisible(t(mat))
 }
 
diff --git a/data/Scotch.rda b/data/Scotch.rda
old mode 100755
new mode 100644
index d914c1a..72bc0bd
Binary files a/data/Scotch.rda and b/data/Scotch.rda differ
diff --git a/data/bank.rda b/data/bank.rda
old mode 100755
new mode 100644
index 195d5dc..6ea1677
Binary files a/data/bank.rda and b/data/bank.rda differ
diff --git a/data/cheese.rda b/data/cheese.rda
old mode 100755
new mode 100644
index 9f3ede2..771a103
Binary files a/data/cheese.rda and b/data/cheese.rda differ
diff --git a/data/customerSat.rda b/data/customerSat.rda
old mode 100755
new mode 100644
index 1204287..505b276
Binary files a/data/customerSat.rda and b/data/customerSat.rda differ
diff --git a/data/datalist b/data/datalist
new file mode 100644
index 0000000..d03112d
--- /dev/null
+++ b/data/datalist
@@ -0,0 +1,8 @@
+Scotch
+bank
+cheese
+customerSat
+detailing
+margarine
+orangeJuice
+tuna
diff --git a/data/detailing.rda b/data/detailing.rda
old mode 100755
new mode 100644
index b640f1f..a0efcd2
Binary files a/data/detailing.rda and b/data/detailing.rda differ
diff --git a/data/margarine.rda b/data/margarine.rda
old mode 100755
new mode 100644
index ff7eaf9..27c8b1d
Binary files a/data/margarine.rda and b/data/margarine.rda differ
diff --git a/data/orangeJuice.rda b/data/orangeJuice.rda
old mode 100755
new mode 100644
index 2abc091..286bec2
Binary files a/data/orangeJuice.rda and b/data/orangeJuice.rda differ
diff --git a/data/tuna.rda b/data/tuna.rda
old mode 100755
new mode 100644
index 78442af..08dc626
Binary files a/data/tuna.rda and b/data/tuna.rda differ
diff --git a/inst/doc/bayesm-manual.pdf b/inst/doc/bayesm-manual.pdf
index c9d4ea7..3180960 100644
Binary files a/inst/doc/bayesm-manual.pdf and b/inst/doc/bayesm-manual.pdf differ
diff --git a/man/condMom.Rd b/man/condMom.Rd
index b65f0c8..2b6a4ec 100755
--- a/man/condMom.Rd
+++ b/man/condMom.Rd
@@ -14,7 +14,7 @@ condMom(x, mu, sigi, i)
 \arguments{
   \item{x}{ vector of values to condition on - ith element not used }
   \item{mu}{ length(x) mean vector }
-  \item{sigi}{ length(x)-dim covariance matrix }
+  \item{sigi}{ length(x) dim inverse of covariance matrix }
   \item{i}{ conditional distribution of ith element }
 }
 \details{
diff --git a/man/createX.Rd b/man/createX.Rd
index 1bdba13..18616db 100755
--- a/man/createX.Rd
+++ b/man/createX.Rd
@@ -36,7 +36,9 @@ createX(p, na, nd, Xa, Xd, INT = TRUE, DIFF = FALSE, base = p)
   by Rossi, Allenby and McCulloch. \cr
   \url{http://www.perossi.org/home/bsm-1}
 }
-
+\note{
+  \code{\link{rmnpGibbs}} assumes that the base alternative is the default.
+}
 \author{ Peter Rossi, Anderson School, UCLA,
   \email{perossichi at gmail.com}.
 }
diff --git a/man/eMixMargDen.Rd b/man/eMixMargDen.Rd
index 9ca12e0..fa4ff3d 100755
--- a/man/eMixMargDen.Rd
+++ b/man/eMixMargDen.Rd
@@ -17,7 +17,7 @@ eMixMargDen(grid, probdraw, compdraw)
 }
 
 \arguments{
-  \item{grid}{  array of grid points, grid[,i] are ordinates for ith component }
+  \item{grid}{  array of grid points, grid[,i] are ordinates for ith dimension of the density }
   \item{probdraw}{ array - each row of which contains a draw of probabilities of mixture comp }
   \item{compdraw}{ list of lists of draws of mixture comp moments }
 }
diff --git a/man/plot.bayesm.hcoef.Rd b/man/plot.bayesm.hcoef.Rd
index eb62eeb..cf9b202 100755
--- a/man/plot.bayesm.hcoef.Rd
+++ b/man/plot.bayesm.hcoef.Rd
@@ -10,10 +10,11 @@
    Arrays are of class bayesm.hcoef with dimensions: cross-sectional unit x coef x MCMC draw. 
 }
 \usage{
-\method{plot}{bayesm.hcoef}(x,burnin,...)
+\method{plot}{bayesm.hcoef}(x,names,burnin,...)
 }
 \arguments{
   \item{x}{ An object of S3 class, bayesm.hcoef }
+  \item{names}{ a list of names for the variables in the hierarchical model}
   \item{burnin}{ no draws to burnin, def: .1*R }
   \item{...}{ standard graphics parameters }
 }
diff --git a/man/rhierMnlRwMixture.Rd b/man/rhierMnlRwMixture.Rd
index b9a00fe..c4124e7 100755
--- a/man/rhierMnlRwMixture.Rd
+++ b/man/rhierMnlRwMixture.Rd
@@ -43,7 +43,7 @@ rhierMnlRwMixture(Data, Prior, Mcmc)
     \item{\code{p}}{ p is number of choice alternatives}
     \item{\code{lgtdata}}{list of lists with each cross-section unit MNL data}
     \item{\code{lgtdata[[i]]$y}}{ \eqn{n_i} vector of multinomial outcomes (1,\ldots,m)}
-    \item{\code{lgtdata[[i]]$X}}{ \eqn{n_i} by nvar design matrix for ith unit}
+    \item{\code{lgtdata[[i]]$X}}{ \eqn{n_i}*p by nvar design matrix for ith unit}
     \item{\code{a}}{vector of length ncomp of Dirichlet prior parms (def: rep(5,ncomp))}
     \item{\code{deltabar}}{nz*nvar vector of prior means (def: 0)}
     \item{\code{Ad}}{ prior prec matrix for vec(D) (def: .01I)}
diff --git a/man/summary.bayesm.mat.Rd b/man/summary.bayesm.mat.Rd
index d21683b..56d9464 100755
--- a/man/summary.bayesm.mat.Rd
+++ b/man/summary.bayesm.mat.Rd
@@ -25,6 +25,9 @@
   \cr
   \code{summary.bayesm.mat} is also exported for direct use as a standard function, as in 
         \code{summary.bayesm.mat(matrix)}.
+   \cr
+   \code{summary.bayesm.mat(matrix)} returns (invisibly) the array of the various summary statistics for further use.  To 
+   assess this array use\code{stats=summary(Drawmat)}.
 }
 \author{ Peter Rossi, Anderson School, UCLA,
   \email{perossichi at gmail.com}.
diff --git a/src/bayesmcpp.cpp b/src/bayesmcpp.cpp
index 37d769a..b15c6e8 100755
--- a/src/bayesmcpp.cpp
+++ b/src/bayesmcpp.cpp
@@ -1,4 +1,5 @@
 // R.McCulloch, 12/04  code for scale usage R function (rScaleUsage)
+//  changed to R error function, P. Rossi 05/12
 #include <iostream>
 #include <algorithm>
 
@@ -30,7 +31,7 @@ void getC(double *ep,int *kp, double *m1p, double *m2p, double *c)
 
    //get a and b
    double det = bq*bq - 4*aq*cq;
-   if(det<0) std::cout << "error: no solution for c's given e and m1, m2" << std::endl;
+   if(det<0) error("no solution for c's given e and m1, m2 \n");
    double b=(-bq+sqrt(det))/(2.0*aq);
    double a=(m1-b*s1-e*s2)/s0;
 

-- 
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