Skip to content

Commit fa094d8

Browse files
committed
Further smaller changes related to the CRAN submission, additionally: Paper published!
1 parent 548bb2c commit fa094d8

10 files changed

Lines changed: 51 additions & 708 deletions

File tree

DESCRIPTION

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: baytaAAR
22
Type: Package
33
Title: Bayesian Transition Analysis with Markov Chain Monte Carlo
4-
Version: 1.0.2
4+
Version: 1.0.3
55
Authors@R: c(person(given = "Nils", family = "Müller-Scheeßel",
66
email = "nils.mueller-scheessel@ufg.uni-kiel.de",
77
role = c("aut", "cre", "cph"),
@@ -16,8 +16,9 @@ Description: Provides Bayesian age estimation for bioarchaeological skeletal
1616
The package is designed to handle multiple ordinal traits of adult individuals
1717
and incorporates a Gompertz prior on age to reflect population-level mortality.
1818
It accounts for estimation uncertainties and supports full customization of
19-
model parameters and Markov Chain Monte Carlo settings.
20-
License: GPL-3 | file LICENSE
19+
model parameters and Markov Chain Monte Carlo settings. For more details
20+
see Müller-Scheeßel et al. (2026) <doi:10.1002/ajpa.70289>.
21+
License: GPL-3
2122
Encoding: UTF-8
2223
LazyData: true
2324
Imports:

LICENSE

Lines changed: 0 additions & 674 deletions
This file was deleted.

R/bay_ta.R

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@
6666
#' saved. Default: \code{1} (no thinning).
6767
#' @param numSavedSteps integer. Number of saved steps. Default: \code{10000}.
6868
#' The total number of steps equals \code{thinSteps × numSavedSteps}.
69-
#' @param silent.jags TRUE/FALSE Silent mode to run JAGS. Default: \code{FALSE}.
69+
#' @param silent.jags TRUE/FALSE. Silent mode to run JAGS. Default: \code{FALSE}.
7070
#' Ignored when \code{framework} is set to \code{NIMBLE}.
7171
#' @param silent.runjags TRUE/FALSE Silent mode to run runjags. Default:
7272
#' \code{FALSE}. Ignored when \code{framework} is set to \code{NIMBLE}.
73+
#' @param verbose TRUE/FALSE. If TRUE, the current time stamp is displayed in
74+
#' the console, and after completion the elapsed time. Default: \code{TRUE}.
7375
#'
7476
#'
7577
#' @return A list of MCMC chains of class \code{coda::mcmc.list}.
@@ -121,8 +123,9 @@ bay.ta <- function(
121123
burnInSteps = 3000,
122124
thinSteps = 1,
123125
numSavedSteps = 10000,
124-
silent.jags = F,
125-
silent.runjags = F) {
126+
silent.jags = FALSE,
127+
silent.runjags = FALSE,
128+
verbose = TRUE) {
126129

127130
checkmate::assertChoice(framework, c("JAGS", "NIMBLE"))
128131
checkmate::assertChoice(algorithm, c("norm", "mnorm"))
@@ -154,22 +157,22 @@ bay.ta <- function(
154157
stop(message("Framework is set to JAGS. However, JAGS currently does not
155158
support multinormal ordinal regression.\n"))
156159
}
157-
if(multicore == TRUE & nChains > available_cores - 1) {
160+
if(multicore & nChains > available_cores - 1) {
158161
stop(message(paste0("
159162
Your machine has only ", available_cores, " physical cores. To maintain usability,
160163
it is advisable to reduce the number of concurring chains or to set multicore to FALSE.\n")))
161164
}
162165
if(algorithm == "mnorm" & ncol(method) < 2) {
163166
stop(message("With multinormal ordinal regression, there need to be two traits or more.\n"))
164167
}
165-
if(multicore == TRUE) {
168+
if(multicore) {
166169
runjagsMethod <- "parallel"
167170
} else {
168171
runjagsMethod <- "rjags"
169172
}
170173

171174
start_time <- Sys.time()
172-
cat("Starting Time:", format(start_time, "%d %b %Y %X"), "\n")
175+
if (verbose) cat("Starting Time:", format(start_time, "%d %b %Y %X"), "\n")
173176

174177
# single core or multi core
175178
if(framework == "JAGS") { # simple ordinal probit regression with JAGS,
@@ -262,15 +265,17 @@ bay.ta <- function(
262265
time_diff <- difftime(Sys.time(), start_time, units = "secs")
263266
time_secs <- as.numeric(time_diff)
264267

265-
# Convert to readable format
266-
if (time_secs < 60) {
267-
cat("Execution Time:", round(time_secs, 2), "seconds\n")
268-
} else if (time_secs < 3600) {
269-
cat("Execution Time:", round(time_secs / 60, 2), "minutes\n")
270-
} else if (time_secs < 86400) {
271-
cat("Execution Time:", round(time_secs / 3600, 2), "hours\n")
272-
} else {
273-
cat("Execution Time:", round(time_secs / 86400, 2), "days\n")
268+
if (verbose) {
269+
# Convert to readable format
270+
if (time_secs < 60) {
271+
cat("Execution Time:", round(time_secs, 2), "seconds\n")
272+
} else if (time_secs < 3600) {
273+
cat("Execution Time:", round(time_secs / 60, 2), "minutes\n")
274+
} else if (time_secs < 86400) {
275+
cat("Execution Time:", round(time_secs / 3600, 2), "hours\n")
276+
} else {
277+
cat("Execution Time:", round(time_secs / 86400, 2), "days\n")
278+
}
274279
}
275280

276281
results <- coda::as.mcmc.list(lapply(results, function(chain) {

R/bay_ta_jags.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ bay.ta.jags <- function(
3333
nChains = 3,
3434
thinSteps = 1,
3535
numSavedSteps = 10000,
36-
silent.jags = F,
37-
silent.runjags = F,
36+
silent.jags = FALSE,
37+
silent.runjags = FALSE,
3838
seed = seed) {
3939

4040
checkmate::assertMatrix(method)

cran-comments.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
0 errors | 0 warnings | 1 note
44

5-
* This is a resubmission. In this version we have:
5+
* This is a resubmission. In this version we have as requested:
66

7-
- reduced the time to generate the vignettes substantially by providing
8-
pre-computed results and reducing the number of iterations. win-devel now
9-
reports 6 minutes for checking the package.
7+
- deleted the LICENCE file and the reference to it in DESCRIPTION
8+
- added a reference to the method in DESCRIPTION
9+
- wrote TRUE and FALSE instead of T and F
10+
- introduced an additional variable "verbose" to give the user the opportunity
11+
to suppress printing to the console.
1012

1113

1214
## Comments

inst/CITATION

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ bibentry(
33
title = "A Fully Bayesian Approach to Adult Skeletal Age Estimation: Multivariate Latent Trait Modeling with Markov Chain Monte Carlo sampling",
44
author = "Nils Müller-Scheeßel, Katharina Fuchs, Christoph Rinne",
55
journal = "American Journal of Biological Anthropology",
6+
volume = 190,
7+
number = 2,
8+
doi = "10.1002/ajpa.70289",
9+
pages = "e70289",
610
year = 2026
711
)

inst/REFERENCES.bib

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,10 @@ @Article{ref_299013
220220
author = {Müller-Scheeßel, Nils and Rinne, Christoph and Fuchs, Katharina},
221221
title = {{A Fully Bayesian Approach to Adult Skeletal Age Estimation: Multivariate Latent Trait Modeling with Markov Chain Monte Carlo Sampling}},
222222
journal = {{American Journal of Biological Anthropology}},
223-
volume = {},
224-
number = {},
225-
pages = {},
223+
volume = {190},
224+
number = {2},
225+
doi = {10.1002/ajpa.70289},
226+
pages = {e70289},
226227
year = {2026},
227228
abstract = {},
228229
location = {},

man/bay.ta.Rd

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/bay.ta.jags.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/baytaAAR-package.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)