From 7172ffd0df64fe5839cf8e787d4fa383fb2648c3 Mon Sep 17 00:00:00 2001 From: jamesaazam Date: Fri, 8 Mar 2024 10:37:34 +0000 Subject: [PATCH] Move obs_prob next to nsim_obs for logical flow --- R/likelihood.R | 4 ++-- man/likelihood.Rd | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R/likelihood.R b/R/likelihood.R index 2d1668a4..ad768b0e 100644 --- a/R/likelihood.R +++ b/R/likelihood.R @@ -5,9 +5,9 @@ #' @param chains Vector of chain summaries (sizes/lengths) #' @param nsim_obs Number of simulations if the log-likelihood/likelihood is to #' be approximated for imperfect observations. +#' @param obs_prob Observation probability (assumed constant) #' @param log Logical; Should the log-likelihoods be transformed to #' likelihoods? (Defaults to TRUE). -#' @param obs_prob Observation probability (assumed constant) #' @param exclude A vector of indices of the sizes/lengths to exclude from the #' log-likelihood calculation. #' @param individual If TRUE, a vector of individual log-likelihood/likelihood @@ -42,7 +42,7 @@ #' ) #' @export likelihood <- function(chains, statistic = c("size", "length"), offspring_dist, - nsim_obs, log = TRUE, obs_prob = 1, stat_max = Inf, + nsim_obs, obs_prob = 1, log = TRUE, stat_max = Inf, exclude = NULL, individual = FALSE, ...) { statistic <- match.arg(statistic) diff --git a/man/likelihood.Rd b/man/likelihood.Rd index 989880db..ecf4ce49 100644 --- a/man/likelihood.Rd +++ b/man/likelihood.Rd @@ -9,8 +9,8 @@ likelihood( statistic = c("size", "length"), offspring_dist, nsim_obs, - log = TRUE, obs_prob = 1, + log = TRUE, stat_max = Inf, exclude = NULL, individual = FALSE, @@ -42,11 +42,11 @@ binomial offspring, or custom functions.} \item{nsim_obs}{Number of simulations if the log-likelihood/likelihood is to be approximated for imperfect observations.} +\item{obs_prob}{Observation probability (assumed constant)} + \item{log}{Logical; Should the log-likelihoods be transformed to likelihoods? (Defaults to TRUE).} -\item{obs_prob}{Observation probability (assumed constant)} - \item{stat_max}{A cut off for the chain statistic (size/length) being computed. Results above the specified value, are set to \code{Inf}.}