R/get_treedepth_threshold.R

#' @title get treedepth threshold
#' @description From \code{rstan:::get_treedepth_threshold}.
#'
#' @inheritParams DrawCurves
#'
#' @return A non-negative integer
#' @author Some Stan developer. Not the author of this package!
#' @export
#'
# @examples
get_treedepth_threshold <- function (StanS4class)
{
  object <-  methods::as(StanS4class,"stanfit")
  # stopifnot(rstan:::is.stanfit(object))
  max_depth <- object@stan_args[[1]]$control$max_treedepth
  if (is.null(max_depth)) {
    max_depth <- 10
  }
  return(max_depth)
}

Try the BayesianFROC package in your browser

Any scripts or data that you put into this service are public.

BayesianFROC documentation built on Jan. 13, 2021, 5:22 a.m.