Skip to content
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

Error when computing the ELIR of normal mixture priors with zero weight on one component #18

Closed
TristanFauvel opened this issue Sep 9, 2024 · 2 comments

Comments

@TristanFauvel
Copy link

Hello,

Thanks for the great package. I noticed that computing the ESS of a mixture prior using the ELIR method leads to the following error when the weight of one component is set to 0:

Error in if (all(dmix(mix_comp_identity, support(mix_comp_identity)) ==  : 
  missing value where TRUE/FALSE needed

Minimal example to reproduce the issue :

w <- 1

component_1 = c(
  w,
  0.2,
  0.1
)

component_2 = c(
  1 - w,
  0,
  1.5
)

prior <- RBesT::mixnorm(
  component_1 =  component_1,
  component_2 = component_2
)

ess(prior, method = "elir", sigma = 0.1)

The error does not occur when using the moments method.
Moreover, the following works:

w <- 1

component_1 = c(
  w,
  0.2,
  0.1
)
 
prior <- RBesT::mixnorm(
  component_1 =  component_1
)

ess(prior, method = "elir", sigma = 0.1)

Version :
RBesT_1.7-3

R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Thanks.

@weberse2
Copy link
Collaborator

Many thanks for reporting. This error should not occur, obviously. Much appreciated that a minimal example is provided.

@weberse2
Copy link
Collaborator

Sorry for the long delay on this. The issue is now resolved with the just released 1.7-4 version on CRAN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants