Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rstanarm does not support all link functions supported by glm{er} #605

Open
bgoodri opened this issue Oct 28, 2023 · 0 comments
Open

rstanarm does not support all link functions supported by glm{er} #605

bgoodri opened this issue Oct 28, 2023 · 0 comments

Comments

@bgoodri
Copy link
Contributor

bgoodri commented Oct 28, 2023

Summary:

Some link functions that are valid for glm, glmer, etc. are not supported by their stan_ counterparts

Description:

?family says for its link argument that

a specification for the model link function. This can be a
name/expression, a literal character string, a length-
character vector, or an object of class ‘"link-glm"’ (such as
generated by ‘make.link’) provided it is not specified via
one of the standard names given next ...

The rstanarm package only implements "standard" link functions for a particular family, such as "identity", "log", and "inverse" for gaussian. But gaussian(link = "cloglog") is valid with glm, glmer, etc. because gaussian calls make.link("cloglog") which is among its valid inputs:

‘"logit"’, ‘"probit"’, ‘"cauchit"’, ‘"cloglog"’, ‘"identity"’, ‘"log"’, ‘"sqrt"’, ‘"1/mu^2"’, ‘"inverse"’

Reproducible Steps:

rstanarm::stan_glm(..., family = gaussian(link = "cloglog")) # Terry Therneau pointed this out to me

RStanARM Version:

All of them have this issue, but I am using 2.26.x

R Version:

R 4.4 at least but probably all of them

Operating System:

Does not matter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant