diff options
author | Ken Kellner <ken@kenkellner.com> | 2017-12-08 11:03:10 -0500 |
---|---|---|
committer | Ken Kellner <ken@kenkellner.com> | 2017-12-08 11:03:10 -0500 |
commit | 1d8724ff88e6f843f690511b156e970334ed300e (patch) | |
tree | f5288f4b4109bcc57228de5878061635918435dd | |
parent | e413547666840a8f8256a9babe1c6133376b9b1f (diff) |
Fix DIC problem introduced in last version
-rw-r--r-- | DESCRIPTION | 5 | ||||
-rw-r--r-- | NEWS | 10 | ||||
-rw-r--r-- | R/autojags.R | 4 | ||||
-rw-r--r-- | R/jags.R | 4 | ||||
-rw-r--r-- | R/print.R | 4 | ||||
-rw-r--r-- | R/summary.R | 4 | ||||
-rw-r--r-- | R/update.R | 6 |
7 files changed, 23 insertions, 14 deletions
diff --git a/DESCRIPTION b/DESCRIPTION index ccae05c..00c3759 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: jagsUI -Version: 1.4.8 -Date: 2017-11-17 +Version: 1.4.9 +Date: 2017-12-08 Title: A Wrapper Around 'rjags' to Streamline 'JAGS' Analyses Author: Ken Kellner <contact@kenkellner.com> Maintainer: Ken Kellner <contact@kenkellner.com> @@ -20,3 +20,4 @@ Description: A set of wrappers around 'rjags' functions to run Bayesian analyses License: GPL-2 URL: https://github.com/kenkellner/jagsUI NeedsCompilation: no +RoxygenNote: 6.0.1 @@ -1,3 +1,11 @@ +# Changes from Version 1.4.8 to 1.4.9 [8 December 2017] # + +Fix bug with DIC output introduced in 1.4.7. + +# Changes from Version 1.4.7 to 1.4.8 [17-November 2017] # + +Minor changes to prep for CRAN submission. + # Changes from Version 1.4.5 to 1.4.7 [17-August-2017] # Fix more issues with random seeds and problems with DIC. @@ -104,4 +112,4 @@ Simplify output object so that indexed parameters are contained in their own arr # Changes from Version 0.01-1 to 0.01-2 [8-Apr-2014] # -Fix problem where some components of output object were vectors instead of lists (and change print function accordingly). Add option for simplejags() to save input data and initial values in model output object for future use (store.data).
\ No newline at end of file +Fix problem where some components of output object were vectors instead of lists (and change print function accordingly). Add option for simplejags() to save input data and initial values in model output object for future use (store.data). diff --git a/R/autojags.R b/R/autojags.R index d208c76..1247c95 100644 --- a/R/autojags.R +++ b/R/autojags.R @@ -152,7 +152,7 @@ autojags <- function(data,inits=NULL,parameters.to.save,model.file,n.chains,n.ad output$random.seed <- seed output$parallel <- parallel output$bugs.format <- bugs.format - output$DIC <- DIC + output$calc.DIC <- DIC #Classify final output object class(output) <- 'jagsUI' @@ -167,4 +167,4 @@ autojags <- function(data,inits=NULL,parameters.to.save,model.file,n.chains,n.ad } -
\ No newline at end of file + @@ -87,11 +87,11 @@ jagsUI <- jags <- function(data,inits=NULL,parameters.to.save,model.file,n.chain output$random.seed <- seed output$parallel <- parallel output$bugs.format <- bugs.format - output$DIC <- DIC + output$calc.DIC <- DIC #Classify final output object class(output) <- 'jagsUI' return(output) -}
\ No newline at end of file +} @@ -63,7 +63,7 @@ print.jagsUI <- function(x,digits=3,...){ } #Print DIC info - if(x$DIC){ + if(x$calc.DIC){ if(!x$bugs.format){ cat('\nDIC info: (pD = var(deviance)/2)','\npD =',round(x$pD,1),'and DIC =',round(x$DIC,digits),'\n') cat('DIC is an estimate of expected predictive error (lower is better).\n') @@ -74,4 +74,4 @@ print.jagsUI <- function(x,digits=3,...){ } -}
\ No newline at end of file +} diff --git a/R/summary.R b/R/summary.R index 02d21bd..dec9df3 100644 --- a/R/summary.R +++ b/R/summary.R @@ -19,8 +19,8 @@ summary.jagsUI <- function(object,digits=3,...){ }else{cat('Successful convergence based on Rhat values (all < 1.1).','\n')} } - if(object$DIC){ + if(object$calc.DIC){ cat('\nDIC info: (pD = var(deviance)/2)','\npD =',round(object$pD,1),'and DIC =',round(object$DIC,digits),'\n') } -}
\ No newline at end of file +} @@ -11,7 +11,7 @@ update.jagsUI <- function(object, parameters.to.save=NULL, n.adapt=NULL, n.iter, #Set up DIC monitoring if(is.null(DIC)){ - DIC <- object$DIC + DIC <- object$calc.DIC } if(DIC&!'deviance'%in%parameters){parameters <- c(parameters,'deviance') @@ -80,7 +80,7 @@ update.jagsUI <- function(object, parameters.to.save=NULL, n.adapt=NULL, n.iter, output$random.seed <- object$random.seed output$parallel <- object$parallel output$bugs.format <- object$bugs.format - output$DIC <- DIC + output$calc.DIC <- DIC #Keep a record of how many times model has been updated if(is.null(object$update.count)){output$update.count <- 1 @@ -91,4 +91,4 @@ update.jagsUI <- function(object, parameters.to.save=NULL, n.adapt=NULL, n.iter, return(output) -}
\ No newline at end of file +} |