Skip to content

Commit

Permalink
breaking rename
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Nov 20, 2024
1 parent 68d1c7c commit a7eab23
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
6 changes: 3 additions & 3 deletions R/latent_lognormal.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @param ... Additional arguments
#' @autoglobal
#' @keywords internal
posterior_predict_latent_lognormal <- function(i, prep, ...) { # nolint: object_length_linter
posterior_predict_latent <- function(i, prep, ...) { # nolint: object_length_linter
mu <- brms::get_dpar(prep, "mu", i = i)
sigma <- brms::get_dpar(prep, "sigma", i = i)

Expand Down Expand Up @@ -42,7 +42,7 @@ posterior_predict_latent_lognormal <- function(i, prep, ...) { # nolint: object_
#' @param prep The result of a call to [`brms::prepare_predictions`]
#' @autoglobal
#' @keywords internal
posterior_epred_latent_lognormal <- function(prep) { # nolint: object_length_linter
posterior_epred_latent <- function(prep) { # nolint: object_length_linter
mu <- brms::get_dpar(prep, "mu")
sigma <- brms::get_dpar(prep, "sigma")
exp(mu + sigma^2 / 2)
Expand All @@ -56,7 +56,7 @@ posterior_epred_latent_lognormal <- function(prep) { # nolint: object_length_lin
#' @param prep The result of a call to [brms::prepare_predictions()]
#' @autoglobal
#' @keywords internal
log_lik_latent_lognormal <- function(i, prep) {
log_lik_latent <- function(i, prep) {
mu <- brms::get_dpar(prep, "mu", i = i)
sigma <- brms::get_dpar(prep, "sigma", i = i)
y <- prep$data$Y[i]
Expand Down
5 changes: 4 additions & 1 deletion R/latent_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ epidist_family_model.epidist_latent_model <- function(
ub = c(NA, as.numeric(lapply(family$other_bounds, "[[", "ub"))),
type = family$type,
vars = c("pwindow", "swindow", "vreal1"),
loop = FALSE
loop = FALSE,
log_lik = log_lik_latent,
posterior_predict = posterior_predict_latent,
posterior_epred = posterior_epred_latent
)
custom_family$reparm <- family$reparm
return(custom_family)
Expand Down
6 changes: 3 additions & 3 deletions man/log_lik_latent_lognormal.Rd → man/log_lik_latent.Rd

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

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

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

0 comments on commit a7eab23

Please sign in to comment.