[r-cran-bayesm] 15/44: Import Upstream version 2.0-3

Andreas Tille tille at debian.org
Thu Sep 7 11:16:21 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 d6102e29777b378069c791f559cd45dab5679a23
Author: Andreas Tille <tille at debian.org>
Date:   Thu Sep 7 13:08:49 2017 +0200

    Import Upstream version 2.0-3
---
 DESCRIPTION                |   6 ++---
 R/WS_FTP.LOG               |  53 +++++++++++++++++++++++++++++++++++++++++++++
 R/rhierLinearModel.R       |   3 ++-
 R/rhierMnlRwMixture.R      |  12 +++++-----
 R/rmnlIndepMetrop.R        |  14 +++++++-----
 inst/doc/bayesm-manual.pdf | Bin 374023 -> 398345 bytes
 man/rhierMnlRwMixture.Rd   |  19 +++++++++++-----
 man/rmnlIndepMetrop.Rd     |   1 +
 8 files changed, 87 insertions(+), 21 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 78c4d49..6e8f3be 100755
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: bayesm
-Version: 2.0-1
-Date: 2005-10-05
+Version: 2.0-3
+Date: 2005-11-29
 Title:Bayesian Inference for Marketing/Micro-econometrics 
 Author: Peter Rossi <peter.rossi at ChicagoGsb.edu>, 
         Rob McCulloch <robert.mcculloch at ChicagoGsb.edu>.
@@ -28,4 +28,4 @@ Description: bayesm covers many important models used
   Marketing by Rossi, Allenby and McCulloch. 
 License: GPL (version 2 or later)
 URL: http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html
-Packaged: Thu Sep 29 11:05:02 2005; per
+Packaged: Tue Nov 29 14:26:39 2005; per
diff --git a/R/WS_FTP.LOG b/R/WS_FTP.LOG
new file mode 100755
index 0000000..d7c7d5d
--- /dev/null
+++ b/R/WS_FTP.LOG
@@ -0,0 +1,53 @@
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\breg.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code breg.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\cgetC.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code cgetC.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\clusterMix.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code clusterMix.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\condMom.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code condMom.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\createX.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code createX.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\eMixMargDen.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code eMixMargDen.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\fsh.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code fsh.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\ghkvec.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code ghkvec.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\init.rmultiregfp.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code init.rmultiregfp.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\llmnl.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code llmnl.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\llmnp.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code llmnp.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\llnhlogit.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code llnhlogit.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\lndIChisq.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code lndIChisq.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\lndIWishart.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code lndIWishart.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\lndMvn.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code lndMvn.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\lndMvst.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code lndMvst.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\logMargDenNR.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code logMargDenNR.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\mixDen.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code mixDen.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\mixDenBi.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code mixDenBi.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\mnlHess.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code mnlHess.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\mnpProb.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code mnpProb.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\momMix.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code momMix.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\nmat.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code nmat.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\numEff.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code numEff.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rbiNormGibbs.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rbiNormGibbs.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rbprobitGibbs.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rbprobitGibbs.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rdirichlet.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rdirichlet.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rhierBinLogit.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rhierBinLogit.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rhierLinearModel.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rhierLinearModel.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rhierMnlRwMixture.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rhierMnlRwMixture.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rhierNegbinRw.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rhierNegbinRw.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rivGibbs.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rivGibbs.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rmixGibbs.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rmixGibbs.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rmixture.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rmixture.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rmnlIndepMetrop.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rmnlIndepMetrop.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rmnpGibbs.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rmnpGibbs.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rmultireg.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rmultireg.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rmultiregfp.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rmultiregfp.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rmvpGibbs.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rmvpGibbs.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rmvst.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rmvst.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rnegbinRw.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rnegbinRw.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rnmixGibbs.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rnmixGibbs.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rscaleUsage.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rscaleUsage.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rsurGibbs.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rsurGibbs.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rtrun.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rtrun.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\runireg.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code runireg.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\runiregGibbs.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code runiregGibbs.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\rwishart.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code rwishart.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\simmnl.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code simmnl.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\simmnlwX.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code simmnlwX.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\simmnp.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code simmnp.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\simmvp.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code simmvp.R
+2005.09.30 11:28 B C:\userdata\per\res\R_package\bayesm\v201\bayesm\R\simnhlogit.R --> gsbwww.chicagogsb.edu /opt/ns-home/docs/fac/peter.rossi/research/bayes book/bayesm/function code simnhlogit.R
diff --git a/R/rhierLinearModel.R b/R/rhierLinearModel.R
index 44a4bcd..70e3375 100755
--- a/R/rhierLinearModel.R
+++ b/R/rhierLinearModel.R
@@ -4,6 +4,7 @@ function(Data,Prior,Mcmc)
 #
 # Revision History
 #     1/17/05  P. Rossi
+#     10/05  fixed error in setting prior if Prior argument is missing Rossi
 #
 # Purpose:
 #   run hiearchical regression model
@@ -123,7 +124,7 @@ for (i in 1:nreg)
 # check for Prior
 #
 if(missing(Prior))
-   { Deltabar=matrix(rep(0,nz*nvar),ncol=nvar); A=01*diag(nz);
+   { Deltabar=matrix(rep(0,nz*nvar),ncol=nvar); A=0.01*diag(nz);
      nu.e=3; ssq=sapply(regdata,getvar) ; nu=nvar+3 ; V= nu*diag(nvar)}
 else
    {
diff --git a/R/rhierMnlRwMixture.R b/R/rhierMnlRwMixture.R
index b2e9794..a00760e 100755
--- a/R/rhierMnlRwMixture.R
+++ b/R/rhierMnlRwMixture.R
@@ -187,7 +187,7 @@ compdraw=NULL
 llmnlFract=
 function(beta,y,X,betapooled,rootH,w){
 z=as.vector(rootH%*%(beta-betapooled))
-llmnl(beta,y,X)+w*(-.5*(z%*%z))
+return(llmnl(beta,y,X)+w*(-.5*(z%*%z)))
 }
 
 mnlRwMetropOnce=
@@ -212,7 +212,7 @@ function(y,X,oldbeta,oldll,s,inc.root,betabar,rootpi){
              {betadraw=betac; oldll=cll}
            else
              {betadraw=oldbeta; stay=1}
-list(betadraw=betadraw,stay=stay,oldll=oldll)             
+return(list(betadraw=betadraw,stay=stay,oldll=oldll))
 }
 drawDelta=
 function(x,y,z,comps,deltabar,Ad){
@@ -244,7 +244,7 @@ xty = matrix(xty,ncol=1)
 
 # then vec(t(D)) ~ N(V^{-1}(xty + Ad*deltabar),V^{-1}) V = (xtx+Ad)
 cov=chol2inv(chol(xtx+Ad))
-cov%*%(xty+Ad%*%deltabar) + t(chol(cov))%*%rnorm(length(deltabar))
+return(cov%*%(xty+Ad%*%deltabar) + t(chol(cov))%*%rnorm(length(deltabar)))
 }
 #-------------------------------------------------------------------------------------------------------
 #
@@ -370,8 +370,8 @@ for(rep in 1:R)
 }
 ctime=proc.time()[3]
 cat(" Total Time Elapsed: ",round((ctime-itime)/60,2),fill=TRUE)
-return(if(drawdelta) 
-   {list(Deltadraw=Deltadraw,betadraw=betadraw,probdraw=probdraw,compdraw=compdraw,loglike=loglike)} 
+if(drawdelta) 
+   {return(list(Deltadraw=Deltadraw,betadraw=betadraw,probdraw=probdraw,compdraw=compdraw,loglike=loglike))} 
 else 
-   {list(betadraw=betadraw,probdraw=probdraw,compdraw=compdraw,loglike=loglike)})
+   {return(list(betadraw=betadraw,probdraw=probdraw,compdraw=compdraw,loglike=loglike))}
 }
diff --git a/R/rmnlIndepMetrop.R b/R/rmnlIndepMetrop.R
index effe9e2..0682bc4 100755
--- a/R/rmnlIndepMetrop.R
+++ b/R/rmnlIndepMetrop.R
@@ -6,6 +6,7 @@ function(Data,Prior,Mcmc)
 #   p. rossi 1/05
 #   2/9/05 fixed error in Metrop eval
 #   changed to reflect new argument order in llmnl,mnlHess 9/05
+#   added return for log-like  11/05
 #
 # purpose: 
 #   draw from posterior for MNL using Independence Metropolis
@@ -98,6 +99,7 @@ cat("R= ",R," keep= ",keep," nu (df for st candidates) = ",nu,fill=TRUE)
 cat(" ",fill=TRUE)
 
 betadraw=matrix(double(floor(R/keep)*nvar),ncol=nvar)
+loglike=double(floor(R/keep))
 #
 # compute required quantities for indep candidates
 #
@@ -119,8 +121,8 @@ rootpi=backsolve(rootp,diag(nvar))
 itime=proc.time()[3]
 cat("MCMC Iteration (est time to end - min) ",fill=TRUE)
 fsh()
-
-oldlpost=llmnl(beta,y,X)+lndMvn(beta,betabar,rootpi)
+oldloglike=llmnl(beta,y,X)
+oldlpost=oldloglike+lndMvn(beta,betabar,rootpi)
 oldlimp=lndMvst(beta,nu,betastar,rooti)
 #       note: we don't need the determinants as they cancel in
 #       computation of acceptance prob
@@ -129,13 +131,15 @@ naccept=0
 for (rep in 1:R) 
 {
    betac=rmvst(nu,betastar,root)
-   clpost=llmnl(betac,y,X)+lndMvn(betac,betabar,rootpi)
+   cloglike=llmnl(betac,y,X)
+   clpost=cloglike+lndMvn(betac,betabar,rootpi)
    climp=lndMvst(betac,nu,betastar,rooti)
    ldiff=clpost+oldlimp-oldlpost-climp
    alpha=min(1,exp(ldiff))
    if(alpha < 1) {unif=runif(1)} else {unif=0}
    if (unif <= alpha)
       { beta=betac
+        oldloglike=cloglike
         oldlpost=clpost
         oldlimp=climp
         naccept=naccept+1}
@@ -149,9 +153,9 @@ for (rep in 1:R)
     fsh()}
 
   if(rep%%keep == 0) 
-    {mkeep=rep/keep; betadraw[mkeep,]=beta}
+    {mkeep=rep/keep; betadraw[mkeep,]=beta; loglike[mkeep]=oldloglike}
 }
 ctime = proc.time()[3]
 cat('  Total Time Elapsed: ',round((ctime-itime)/60,2),'\n')
-return(list(betadraw=betadraw,acceptr=naccept/R))
+return(list(betadraw=betadraw,loglike=loglike,acceptr=naccept/R))
 }
diff --git a/inst/doc/bayesm-manual.pdf b/inst/doc/bayesm-manual.pdf
index 15557ff..3c65d96 100755
Binary files a/inst/doc/bayesm-manual.pdf and b/inst/doc/bayesm-manual.pdf differ
diff --git a/man/rhierMnlRwMixture.Rd b/man/rhierMnlRwMixture.Rd
index a0f1dac..520687b 100755
--- a/man/rhierMnlRwMixture.Rd
+++ b/man/rhierMnlRwMixture.Rd
@@ -20,7 +20,7 @@ rhierMnlRwMixture(Data, Prior, Mcmc)
 \arguments{
   \item{Data}{ list(p,lgtdata,Z) ( Z is optional) }
   \item{Prior}{ list(deltabar,Ad,mubar,Amu,nu,V,ncomp) (all but ncomp are optional)}
-  \item{Mcmc}{ list(s,c,R,keep) (R required)}
+  \item{Mcmc}{ list(s,w,R,keep) (R required)}
 }
 \details{
   Model: \cr
@@ -52,7 +52,7 @@ rhierMnlRwMixture(Data, Prior, Mcmc)
     \item{\code{V}}{ pds location parm for IW prior on norm comp Sigma (def: nuI)}
     \item{\code{ncomp}}{ number of components used in normal mixture }
     \item{\code{s}}{ scaling parm for RW Metropolis (def: 2.93/sqrt(nvar))}
-    \item{\code{c}}{ fraction likelihood weighting parm (def: 2)}
+    \item{\code{w}}{ fractional likelihood weighting parm (def: .1)}
     \item{\code{R}}{ number of MCMC draws}
     \item{\code{keep}}{ MCMC thinning parm: keep every keepth draw (def: 1)}
   }
@@ -77,9 +77,16 @@ rhierMnlRwMixture(Data, Prior, Mcmc)
   Note: Z does \strong{not} include an intercept and is centered for ease of interpretation.\cr
   
   Be careful in assessing prior parameter, Amu.  .01 is too small for many applications. See 
-  Allenby et al, chapter 5 for full discussion.\cr
+  Rossi et al, chapter 5 for full discussion.\cr
+
+  Note: as of version 2.0-2 of \code{bayesm}, the fractional weight parameter has been changed
+  to a weight between 0 and 1.  w is the fractional weight on the normalized pooled likelihood.
+  This differs from what is in Rossi et al chapter 5, i.e.
+
+  \eqn{like_i^(1-w) x like_pooled^(n_i/N)*w}
+
  
-  Large R values may be requires (>20,000).
+  Large R values may be required (>20,000).
 
 } 
 \references{ For further discussion, see \emph{Bayesian Statistics and Marketing}
@@ -145,11 +152,11 @@ a=rep(5,ncoef)
 
 R=10000
 keep=5
-c=2
+w=.1
 s=2.93/sqrt(ncoef)
 Data1=list(p=p,lgtdata=simlgtdata,Z=Z)
 Prior1=list(ncomp=ncomp,nu=nu,V=V,Amu=Amu,mubar=mubar,a=a,Ad=Ad,deltabar=deltabar)
-Mcmc1=list(s=s,c=c,R=R,keep=keep)
+Mcmc1=list(s=s,w=w,R=R,keep=keep)
 out=rhierMnlRwMixture(Data=Data1,Prior=Prior1,Mcmc=Mcmc1)
 
 if(R < 1000) {begin=1} else {begin=1000/keep}
diff --git a/man/rmnlIndepMetrop.Rd b/man/rmnlIndepMetrop.Rd
index 6e0e423..de5d5f6 100755
--- a/man/rmnlIndepMetrop.Rd
+++ b/man/rmnlIndepMetrop.Rd
@@ -36,6 +36,7 @@ rmnlIndepMetrop(Data, Prior, Mcmc)
 \value{
   a list containing: 
   \item{betadraw}{R/keep x nvar array of beta draws}
+  \item{loglike}{R/keep vector of loglike values for each draw}
   \item{acceptr}{acceptance rate of Metropolis draws}
 }
 \references{ For further discussion, see \emph{Bayesian Statistics and Marketing}

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