From 1b81c0b3a7f74b3ba44da7488b3268efbca957c8 Mon Sep 17 00:00:00 2001 From: Maximilian Scholz Date: Mon, 16 Dec 2024 15:45:35 +0100 Subject: [PATCH] Build documentation and fix some check() problems. --- R/mcmc-traces.R | 4 ++-- man/MCMC-traces.Rd | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/R/mcmc-traces.R b/R/mcmc-traces.R index 01f79e1f..2e5f32e1 100644 --- a/R/mcmc-traces.R +++ b/R/mcmc-traces.R @@ -311,7 +311,7 @@ mcmc_rank_overlay <- function(x, group_by(.data$chain) %>% mutate( chain = ifelse( - iteration <= midpoint, + .data$iteration <= midpoint, paste0(.data$chain, "_1"), paste0(.data$chain, "_2") ) @@ -523,7 +523,7 @@ mcmc_rank_ecdf <- group_by(.data$chain) %>% mutate( chain = ifelse( - iteration <= midpoint, + .data$iteration <= midpoint, paste0(.data$chain, "_1"), paste0(.data$chain, "_2") ) diff --git a/man/MCMC-traces.Rd b/man/MCMC-traces.Rd index 1054591b..4f631067 100644 --- a/man/MCMC-traces.Rd +++ b/man/MCMC-traces.Rd @@ -51,7 +51,8 @@ mcmc_rank_overlay( facet_args = list(), ..., n_bins = 20, - ref_line = FALSE + ref_line = FALSE, + split_chains = FALSE ) mcmc_rank_hist( @@ -75,7 +76,8 @@ mcmc_rank_ecdf( facet_args = list(), prob = 0.99, plot_diff = FALSE, - interpolate_adj = NULL + interpolate_adj = NULL, + split_chains = FALSE ) mcmc_trace_data( @@ -193,6 +195,10 @@ of rank-normalized MCMC samples. Defaults to \code{20}.} \item{ref_line}{For the rank plots, whether to draw a horizontal line at the average number of ranks per bin. Defaults to \code{FALSE}.} +\item{split_chains}{Logical indicating whether to split each chain into two parts. +If TRUE, each chain is split into first and second half with "_1" and "_2" suffixes. +Defaults to \code{FALSE}.} + \item{K}{An optional integer defining the number of equally spaced evaluation points for the PIT-ECDF. Reducing K when using \code{interpolate_adj = FALSE} makes computing the confidence bands faster. For \code{ppc_pit_ecdf} and