Skip to content

Commit

Permalink
fix issue #909
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed May 25, 2020
1 parent a4731a2 commit f9fc249
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 91 deletions.
2 changes: 1 addition & 1 deletion R/conditional_effects.R
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ get_int_vars.mvbrmsterms <- function(x, ...) {

#' @export
get_int_vars.brmsterms <- function(x, ...) {
advars <- ulapply(rmNULL(x$adforms[c("trials", "thres")]), all_vars)
advars <- ulapply(rmNULL(x$adforms[c("trials", "thres", "vint")]), all_vars)
unique(c(advars, get_sp_vars(x, "mo")))
}

Expand Down
5 changes: 4 additions & 1 deletion doc/brms_customfamilies.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ For the purpose of the present vignette, we will go with the latter approach
expose_functions(fit2, vectorize = TRUE)
```

and define the required `log_lik` functions with a few lines of code.
and define the required `log_lik` functions with a few lines of code[^phi].

```{r log_lik}
log_lik_beta_binomial2 <- function(i, prep) {
Expand All @@ -249,6 +249,9 @@ log_lik_beta_binomial2 <- function(i, prep) {
}
```

[^phi]: The presented post-processing functions need to be adjusted if you
predict `phi` in your model as well by writing `phi <- prep$dpars$phi[, i]`.

With that being done, all of the post-processing methods requiring `log_lik`
will work as well. For instance, model comparison can simply be performed via

Expand Down
Loading

0 comments on commit f9fc249

Please sign in to comment.