Skip to content

Commit

Permalink
Merge branch 'main' into unexport-funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam authored Mar 22, 2024
2 parents 0265dee + 07f6087 commit 5afe8aa
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ updates:
day: "monday"
time: "06:00"
labels:
- "package_infrastructure"
- "pkg_infrastructure"
8 changes: 6 additions & 2 deletions R/borel.r
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ dborel <- function(x, mu, log = FALSE) {
##' Random numbers are generated by simulating from a Poisson branching process
##' @param n Number of random variates to generate.
##' @inheritParams dborel
##' @param infinite Any number to treat as infinite; simulations will be
##' stopped if this number is reached
##' @param infinite A threshold above which the random number is set to
##' `Inf` as a form of truncation. This is important because `rborel()` uses
##' `simulate_summary()` internally with `offspring_dist = rpois`, so
##' when `mu >= 1`, the simulation could grow out of proportion and chain
##' summaries (the random numbers generated here) need to be truncated using
##' `infinite`.
##' @return Vector of random numbers
##' @author Sebastian Funk
##' @export
Expand Down
11 changes: 8 additions & 3 deletions R/likelihood.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
#' @inheritParams .offspring_ll
#' @inheritParams simulate_summary
#' @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 nsim_obs Number of simulations to be used to approximate the
#' log-likelihood/likelihood if `obs_prob < 1` (imperfect observation). If
#' `obs_prob == 1`, this argument is ignored.
#' @param obs_prob Observation probability. A number (probability) between 0
#' and 1. A value greater than 0 but less 1 implies imperfect observation and
#' simulations will be used to approximate the (log)likelihood. This will
#' also require specifying `nsim_obs`. In the simulation, the observation
#' process is assumed to be constant.
#' @param log Logical; Should the log-likelihoods be transformed to
#' likelihoods? (Defaults to TRUE).
#' @param exclude A vector of indices of the sizes/lengths to exclude from the
Expand Down
11 changes: 8 additions & 3 deletions man/likelihood.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions man/rborel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions man/rgborel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5afe8aa

Please sign in to comment.