Skip to content

Commit

Permalink
All families now use identity link as default
Browse files Browse the repository at this point in the history
  • Loading branch information
beckyfisher committed Aug 20, 2021
1 parent b1991a8 commit 6640867
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
Binary file modified R/sysdata.rda
Binary file not shown.
4 changes: 1 addition & 3 deletions R/validate_family.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ validate_family <- function(family) {
} else if (is.character(family)) {
if (family == "beta_binomial2") {
family <- get(family)
} else if (family == "Gamma") {
family <- get(family)(link = "log")
} else {
family <- get(family)() # i.e (link = "identity")
family <- get(family)(link = "identity")
}
}
if (!inherits(family, "family")) {
Expand Down
2 changes: 1 addition & 1 deletion data-raw/beta_binomial2.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library(usethis)
library(brms)
beta_binomial2 <- brms::custom_family(
"beta_binomial2", dpars = c("mu", "phi"),
links = c("logit", "log"), lb = c(NA, 0),
links = c("identity", "log"), lb = c(NA, 0),
type = "int", vars = "trials[n]"
)

Expand Down
Binary file modified data/beta_binomial2.rda
Binary file not shown.

0 comments on commit 6640867

Please sign in to comment.