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
Feature request: skew-normal family #1027
Comments
This seems like a good idea. The easiest way to proceed would probably be for you to make a fork of this repository, post your implementation publicly, then make a pull request. Were there any surprises/challenges in implementing the SN, or did the vignette give you the information you needed? |
I appreciate the quick reply. For the record, I've submitted this under PR #1029. The vignette had the bulk of the information I needed. A few things:
|
Poking around a little bit, this is the R code from weight = xi/(xi + 1/xi)
z = runif(n, -weight, 1 - weight)
Xi = xi^sign(z)
Random = -abs(rnorm(n))/Xi * sign(z)
m1 = 2/sqrt(2 * pi)
mu = m1 * (xi - 1/xi)
sigma = sqrt((1 - m1^2) * (xi^2 + 1/xi^2) + 2 * m1^2 - 1)
Random = (Random - mu)/sigma
Random As we expand to more cases I definitely think we need to be more thoughtful about starting values ... |
The current application I am working on requires use of a skew-normal likelihood. The skew-normal family is useful for modeling unimodal responses that lie on the real line but for which the normal distribution is inappropriate due to the presence of skewness. I have added the distribution to my local glmmTMB version following the instructions given in the Hacking glmmTMB vignette.
Would there be any interest in working together to add the skew-normal family to the official glmmTMB release? While the brms R package has implemented the skew-normal, I am not aware of any R packages that allow for its use in a frequentist setting. Such an addition should attract users who need to model their data with a skew-normal likelihood but prefer to use frequentist methods or require a faster runtime than brms can provide.
The text was updated successfully, but these errors were encountered: