Skip to content

Commit

Permalink
changes in diagnostics due to changes in bayesTFR
Browse files Browse the repository at this point in the history
  • Loading branch information
hanase committed Sep 10, 2021
1 parent 6c95188 commit 25c03b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: bayesLife
Type: Package
Title: Bayesian Projection of Life Expectancy
Version: 5.0-1
Date: 2021-03-04
Version: 5.0-1.9001
Date: 2021-09-09
Author: Hana Sevcikova, Adrian Raftery, Jennifer Chunn
Maintainer: Hana Sevcikova <[email protected]>
Description: Making probabilistic projections of life expectancy for all countries of the world, using a Bayesian hierarchical model <doi:10.1007/s13524-012-0193-x>. Subnational projections are also supported.
Expand Down
6 changes: 3 additions & 3 deletions R/diagnostics.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
e0.raftery.diag <- function(mcmc = NULL,
sim.dir = file.path(getwd(), 'bayesLife.output'),
burnin = 0, country = NULL,
par.names = NULL, par.names.cs = NULL,
par.names = NA, par.names.cs = NA,
country.sampling.prop = 1,
verbose = TRUE, ...) {
mcmc.set <- if (is.null(mcmc)) get.e0.mcmc(sim.dir = sim.dir, low.memory = TRUE) else mcmc
if(is.null(par.names))
if(bayesTFR:::is.missing(par.names))
par.names <- e0.parameter.names(mcmc.set$meta$mcmc.options)
if(is.null(par.names.cs))
if(bayesTFR:::is.missing(par.names.cs))
par.names.cs <- e0.parameter.names.cs(mcmc.set$meta$mcmc.options)

return(bayesTFR::tfr.raftery.diag(mcmc = mcmc.set, sim.dir = sim.dir, burnin = burnin,
Expand Down
6 changes: 3 additions & 3 deletions man/e0.raftery.diag.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Raftery Diagnostics for Parameters of the Life Expectancy
The function computes the Raftery diagnostics for each parameter in the same way as \code{\link[bayesTFR]{tfr.raftery.diag}} of the \pkg{bayesTFR} package.}
\usage{
e0.raftery.diag(mcmc = NULL, sim.dir = file.path(getwd(), "bayesLife.output"),
burnin = 0, country = NULL, par.names = NULL, par.names.cs = NULL,
burnin = 0, country = NULL, par.names = NA, par.names.cs = NA,
country.sampling.prop = 1, verbose = TRUE, \dots)
}

Expand All @@ -25,9 +25,9 @@ Burnin.
\item{country}{Name or code of a country. If it is given, only country-specific parameters parameters of that country are considered.}
\item{par.names}{
Names of country-independent parameters for which the Raftery diagnostics should be computed. By default all parameters are used.
}
If it is \code{NULL}, no country-independent parameters are used.}
\item{par.names.cs}{
Names of country-specific parameters for which the Raftery diagnostics should be computed. By default all parameters are used.
Names of country-specific parameters for which the Raftery diagnostics should be computed. By default all parameters are used. If it is \code{NULL}, no country-specific parameters are used.
}
\item{country.sampling.prop}{Proportion of countries that are included in the diagnostics. It should be between 0 and 1. If it is smaller than 1, the countries are randomly sampled. It is only relevant if \code{par.names.cs} is not \code{NULL}. }
\item{verbose}{Logical switching log messages on and off.}
Expand Down

0 comments on commit 25c03b5

Please sign in to comment.