Skip to content

Which are the default links for the 'Beta' family? #1841

@LucianoDeBenedictis

Description

@LucianoDeBenedictis

#1751 details the same confusion I was having, checking the documentation in brmsfamily and the output of my model. That issue mentions beta_binomial and zero_inflated_beta_binomial, but it seems the same applies also to Beta.

The documentation in brmsfamily tells that the default link for phi is 'log', but this is not shown when printing the model output. The mentioned issue seems to suggest that the link is instead 'identity' if there are no predictors, which led me to some test.

My point is this: even if there are no predictors for phi, it could still be useful to know which link is being used for defining priors. In particular, the default prior gamma(0.01, 0.01) when using the defaults for link seems makes sense with 'identity' more than with log, and in the same way, one would think that changing this prior would be with the log-link described in the documentation.

Currently, print doesn't show the link for phi, which is a consequence of the mentioned issue. My confusion is increased when checking family inside the fit object. Despite the above, it says 'log' for link_phi there, not 'identity'. This can be checked with this toy example:

library(brms)

data <- data.frame(y = 0.5,
                   x = 0)

model <- brm(y ~ x,
           data = data,
           family = Beta,
           prior = prior(normal(0, 1), class = "b"),
           sample_prior = "only",
           chains = 1,
           iter = 10)

I have also checked the above with beta_binomial and appropriate data. If you add an argument phi ~ x inside the brm call, the print method of the fit still doesn't show the link function for phi (anyway it's log inside the fit object).
Finally, forcing the identity link with Beta(link_phi = "identity") for family shows the expected link inside the fit object (with no apparent change in the print).

I think the current, implicit link function is unsatisfactory for people that don't go digging deep into the documentation and then decide to provide every argument. It seems to me that defaults are widely used with brms, and I am not sure if the default `gamma(0.01, 0.01) is supposed to be used with log or identity link (I checked that this is the default intercept prior whether there are predictors or not).
I hope I have provided enough information to improve this great package in a small way.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions