[r-cran-mcmcpack] 73/90: Imported Upstream version 1.3-3

Andreas Tille tille at debian.org
Fri Dec 16 09:07:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-mcmcpack.

commit 1fa7c22fe681a0c586519ab76e2998a6848a211a
Author: Andreas Tille <tille at debian.org>
Date:   Fri Dec 16 08:07:25 2016 +0100

    Imported Upstream version 1.3-3
---
 DESCRIPTION              |  8 ++++----
 HISTORY                  |  7 +++++--
 MD5                      | 12 ++++++------
 R/MCMCpoissonChange.R    | 30 +++++++++++++++---------------
 man/MCMCoprobitChange.Rd |  2 --
 man/MCMCpoissonChange.Rd |  8 +++-----
 src/MCMCpoissonChange.cc |  3 ++-
 7 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index c36d366..1d94975 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: MCMCpack
-Version: 1.3-2
-Date: 2013-4-19
+Version: 1.3-3
+Date: 2013-5-1
 Title: Markov chain Monte Carlo (MCMC) Package
 Author: Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park
 Maintainer: Jong Hee Park <jongheepark at snu.ac.kr>
@@ -18,7 +18,7 @@ Description: This package contains functions to perform Bayesian
 License: GPL-3
 SystemRequirements: gcc (>= 4.0)
 URL: http://mcmcpack.wustl.edu
-Packaged: 2013-04-19 15:12:42 UTC; jongheepark
+Packaged: 2013-05-01 00:37:02 UTC; parkjonghee
 NeedsCompilation: yes
 Repository: CRAN
-Date/Publication: 2013-04-19 19:53:47
+Date/Publication: 2013-05-01 07:02:08
diff --git a/HISTORY b/HISTORY
index 35de0b8..056bb9c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,9 +1,12 @@
 //
 // Changes and Bug Fixes
 //
-
+1.3-2 to 1.3-3
+  * fixed an error in MCMCpoissonChange: is.na(lambda.mu) and dropped offset argument
+  (thanks to Brian Ripley)	
+		
 1.3-1 to 1.3-2
-  * fixed two misktakes in marginal likelihood computation in MCMCregress 
+  * fixed two mistakes in marginal likelihood computation in MCMCregress 
     (thanks to Sid Chib). In computing log_sigma2, 
       - exp(digamma) -> digamma
       - averaging over tot_iter -> averaging over nstore
diff --git a/MD5 b/MD5
index 15851e5..d334de5 100644
--- a/MD5
+++ b/MD5
@@ -1,5 +1,5 @@
-27f74cbcc96af526b73ea978bdce8cb2 *DESCRIPTION
-c726ff27322432e935244da14dcd1c1c *HISTORY
+6470104b1e1bf32d945b869f9811a91e *DESCRIPTION
+19a6a667aa62fb26c81531564e05298c *HISTORY
 b1382cb26ee38f7a860c379826362e50 *NAMESPACE
 1eaf24e8d468ac0b624a9aa90cded306 *R/BayesFactors.R
 9c52f72ee21a71bfbfd312cb56233125 *R/HMMpanelFE.R
@@ -29,7 +29,7 @@ a6508dd38804705e750995ca27070cde *R/MCMCmnl.R
 6b63259803b2890eae6d5778592ed7dd *R/MCMCoprobitChange.R
 be0928d3cd74e5485b1e26a9f0a15c59 *R/MCMCordfactanal.R
 d438fc9dabd9993da5d4a45a3df68c39 *R/MCMCpoisson.R
-017cf7ca0c8f9fb15b62d6b371070df6 *R/MCMCpoissonChange.R
+cbf40bf99270db5f9dd8f4dea8f5274d *R/MCMCpoissonChange.R
 b98bdefca76d3316c664bcb2ba2bcc38 *R/MCMCprobit.R
 31fdcb514ab53ba258a581536fcbda60 *R/MCMCprobitChange.R
 e27dcf535f23c25018bb778b61640f22 *R/MCMCquantreg.R
@@ -86,10 +86,10 @@ b894aa07a0e68f9ffdeb3b09bab0aee2 *man/MCMChpoisson.Rd
 751e56edabc12da2d8246f7c34cd7613 *man/MCMCmixfactanal.Rd
 b7dfcf274126008379b0ee903f134b25 *man/MCMCmnl.Rd
 cf07e2c9f307215c8fe841f5381b62f8 *man/MCMCoprobit.Rd
-0ac0dc970781b60cecc8a7a99ce8e6ad *man/MCMCoprobitChange.Rd
+1556620313c5a4ca175fbe0b68f84161 *man/MCMCoprobitChange.Rd
 a491294e97dd0b7aa5d0de525542ea8f *man/MCMCordfactanal.Rd
 03f2e93e6876a4f0e87b3469bfe38d2f *man/MCMCpoisson.Rd
-7da98cdb1e3ec5ed459db403783309f1 *man/MCMCpoissonChange.Rd
+d754c71781dbdbcdfc4fecd6ea807056 *man/MCMCpoissonChange.Rd
 1917e296040b80c92525e5cb8ad02e71 *man/MCMCprobit.Rd
 c3631c612ccc2d8975a7e164c8506331 *man/MCMCprobitChange.Rd
 2f9caf8983e405f912eb5b25f29784eb *man/MCMCquantreg.Rd
@@ -162,7 +162,7 @@ eaab5804f229b660e958f6aa2cf728ba *src/MCMCmnl.h
 bdd18ead0856bbff8587b11639945699 *src/MCMCoprobitChange.cc
 6addbe81efb51cb4b8401e9a6931f782 *src/MCMCordfactanal.cc
 6bfed80bb7c109537461e6381837b6c4 *src/MCMCpoisson.cc
-b93e764e46e07581bd576b75597beecc *src/MCMCpoissonChange.cc
+a90346688ef620947dd846967e181603 *src/MCMCpoissonChange.cc
 84b94f6e67b026a915a23fb85bdaf00b *src/MCMCprobit.cc
 e2239f7d7503dc4eca812034f4bc1da8 *src/MCMCprobitChange.cc
 a6a01c3906a8b92b9f1a12cfa92a1a63 *src/MCMCprobitres.cc
diff --git a/R/MCMCpoissonChange.R b/R/MCMCpoissonChange.R
index bee8f43..703c471 100644
--- a/R/MCMCpoissonChange.R
+++ b/R/MCMCpoissonChange.R
@@ -9,7 +9,7 @@
            b0 = 0, B0 = 1, a = NULL, b = NULL, c0 = NA, d0 = NA,
            lambda.mu = NA, lambda.var = NA, 
            burnin = 1000, mcmc = 1000, thin = 1, verbose = 0, 
-           seed = NA, beta.start = NA, P.start = NA, offset = NA,   
+           seed = NA, beta.start = NA, P.start = NA, ## offset = NA,   
            marginal.likelihood = c("none", "Chib95"), ...) {
     
     ## form response and model matrices
@@ -38,7 +38,7 @@
     if(!is.na(seed)) set.seed(seed)
         
     if (k==1){
-      if (lambda.mu != NA && lambda.var != NA) {
+      if (!is.na(lambda.mu) && !is.na(lambda.var)) {
         c0 <- lambda.mu^2/lambda.var
         d0 <- lambda.mu/lambda.var
       }
@@ -92,18 +92,18 @@
       }
       taustart <- tau.initial(y, tot.comp)
       componentstart  <-  round(runif(tot.comp, 1, 5))
-      if(is.na(offset)){
-        logoffset <- rep(0, length(y))
-      }
-      else{
-        if(length(offset) == length(y)){
-          logoffset <- log(offset)
-        }
-        else{
-          stop("\n The length of offset is not matched with y.")
-        }
-      }
-      print(offset)
+      ## if(is.na(offset)){
+      ##   logoffset <- rep(0, length(y))
+      ## }
+      ## else{
+      ##    if(length(offset) == length(y)){
+      ##      logoffset <- log(offset)
+      ##   }
+      ##   else{
+      ##     stop("\n The length of offset is not matched with y.")
+      ##   }
+      ##  }
+      ##  print(offset)
       
       ## normal mixture weights
       wr  <-  c(0.2294, 0.2590, 0.2480, 0.1525, 0.0472)
@@ -122,7 +122,7 @@
                       Xdata = as.double(X),
                       Xrow = as.integer(nrow(X)),
                       Xcol = as.integer(ncol(X)),
-                      logoffset = as.double(logoffset), 
+                      ## logoffset = as.double(logoffset), 
                       m = as.integer(m), 
                       burnin = as.integer(burnin),           
                       mcmc = as.integer(mcmc), 
diff --git a/man/MCMCoprobitChange.Rd b/man/MCMCoprobitChange.Rd
index 8800b28..55bc1ae 100644
--- a/man/MCMCoprobitChange.Rd
+++ b/man/MCMCoprobitChange.Rd
@@ -153,7 +153,6 @@
 }
 
 \examples{
-\dontrun{
 set.seed(1909)
 N <- 200
 x1 <- rnorm(N, 1, .5);
@@ -190,7 +189,6 @@ BayesFactor(out1, out2, out3)
 plotState(out1)
 plotChangepoint(out1)
 }
-}
 
 \keyword{models}
 
diff --git a/man/MCMCpoissonChange.Rd b/man/MCMCpoissonChange.Rd
index 3fab155..bf4bfd9 100644
--- a/man/MCMCpoissonChange.Rd
+++ b/man/MCMCpoissonChange.Rd
@@ -17,7 +17,7 @@
            	b0 = 0, B0 = 1, a = NULL, b = NULL, c0 = NA, d0 = NA, 
             lambda.mu = NA, lambda.var = NA, 
            	burnin = 1000, mcmc = 1000, thin = 1, verbose = 0, 
-           	seed = NA, beta.start = NA, P.start = NA, offset = NA,     
+           	seed = NA, beta.start = NA, P.start = NA,     
            	marginal.likelihood = c("none", "Chib95"), ...)}
 
 \arguments{
@@ -54,12 +54,12 @@
     \item{d0}{\eqn{d_0}{d0} is the scale parameter for Gamma prior on \eqn{\lambda}{lambda}
     (the mean). When there is no covariate, this should be provided by users. No default value is provided.}
 
-  \item{lambda.mu}{The mean of the
+    \item{lambda.mu}{The mean of the
     Gamma prior on \eqn{\lambda}{lambda}. 
     \eqn{sigma.mu}{sigma.mu} and \eqn{sigma.var}{sigma.var} allow users to choose the Gamma prior
     by choosing its mean and variance. }
   
-  \item{lambda.var}{The variacne of the
+    \item{lambda.var}{The variacne of the
     Gamma prior on \eqn{\lambda}{lambda}.
     \eqn{sigma.mu}{sigma.mu} and \eqn{sigma.var}{sigma.var} allow users to choose the Gamma prior
     by choosing its mean and variance. }
@@ -81,8 +81,6 @@
 	
     \item{P.start}{The starting values for the transition matrix. A user should provide a square matrix with dimension equal to the number of states. By default, draws from the \code{Beta(0.9, 0.1)} are used to construct a proper transition matrix for each raw except the last raw.}	
 
-    \item{offset}{offset or exposure. Insert raw data. Do not take logarithm.}
-
     \item{marginal.likelihood}{How should the marginal likelihood be
     calculated? Options are: \code{none} in which case the marginal
     likelihood will not be calculated, and
diff --git a/src/MCMCpoissonChange.cc b/src/MCMCpoissonChange.cc
index 8c76d5e..aec463e 100644
--- a/src/MCMCpoissonChange.cc
+++ b/src/MCMCpoissonChange.cc
@@ -897,7 +897,8 @@ extern "C" {
 			  const int *Ycol, 
 			  const double *Xdata,
 			  const int *Xrow, 
-			  const int *Xcol, 
+			  const int *Xcol,
+			  // const double *logoffset
 			  const int *m, 
 			  const int *burnin, 
 			  const int *mcmc, 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-mcmcpack.git



More information about the debian-science-commits mailing list