Skip to content

Commit

Permalink
fix issue #1627
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed Mar 19, 2024
1 parent 6b8941f commit c74feeb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/distributions.R
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,13 @@ pskew_normal <- function(q, mu = 0, sigma = 1, alpha = 0,
delta[is_alpha_inf] <- sign(alpha[is_alpha_inf])
out <- numeric(nz)
for (k in seq_len(nz)) {
if (is_alpha_inf[k]) {
if (is.infinite(z[k])) {
if (z[k] > 0) {
out[k] <- 1
} else {
out[k] <- 0
}
} else if (is_alpha_inf[k]) {
if (alpha[k] > 0) {
out[k] <- 2 * (pnorm(pmax(z[k], 0)) - 0.5)
} else {
Expand Down

0 comments on commit c74feeb

Please sign in to comment.