Skip to content
Permalink
Browse files

Update variable_creation_functions.R

Tidy up prob check
  • Loading branch information...
nfultz committed Apr 25, 2018
1 parent 2a9c017 commit ec326d4affd2b1394a0cca74dbe6a5ad73947bca
Showing with 1 addition and 1 deletion.
  1. +1 −1 R/variable_creation_functions.R
@@ -214,7 +214,7 @@ draw_categorical <- function(prob = link(latent), N = NULL,
)
}
}
if (!all(apply(prob, 1, min) > 0)) {
if (any(prob < 0)) {
stop(
"For a categorical (multinomial) distribution, the elements of `prob` ",
"should be positive and sum to a positive number."

0 comments on commit ec326d4

Please sign in to comment.
You can’t perform that action at this time.