rstanarm does not support all link functions supported by glm{er}
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 401
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the rstanarm::stan_glm entry point and inspect how family links are validated, comparing the accepted links with R's make.link behavior. Reproduce the gaussian(link = "cloglog") example first, then check the other valid glm link functions. Done means the supported stan_ counterparts accept the valid links documented for the corresponding family.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100