Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a draft PR to close #1551. I'm opening the PR as a draft to get feedback on the overall design and implementation before I work on polishing.
This PR adds the argument
z_mix = FALSE
topp_mixture
with the following effects:z_mix = FALSE
) should be unchanged.z_mix = TRUE
:zero_one_inflated_beta
) the middle component is the one-inflated state.TODO (I'll take care of these, but could use feedback from @paul-buerkner where tagged):
P(K = 2 & z = 1 | Y)
, wherez = 1
means a structural zero,z = 2
means no inflation, andz = 3
means a structural 1.A final design note: if preferred, it is possible to construct an implementation that is easier (for me) to grasp, but that supports only garden-variety zi/hu families and not mixture families that include zi/hu families as components of the mixture. It would be possible to insert this simpler implementation inside of
pp_mixture()
via the samez_mix
argument. A functioning example of how this branch of the control flow inside ofpp_mixture
might look internally is available at #1551.Here's a snippet to play with: