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

Unit testing for postprob() in Mixture scenario #120

Open
4 tasks
audreyyeoCH opened this issue Sep 6, 2024 · 0 comments
Open
4 tasks

Unit testing for postprob() in Mixture scenario #120

audreyyeoCH opened this issue Sep 6, 2024 · 0 comments

Comments

@audreyyeoCH
Copy link
Collaborator

the following did not apply and can benefit from troubleshooting and unit testing:

a = postprob(x = 16,
n = 23,
p = 0.60,
parE = c(0.6, 0.4), weights = 1)
b = postprob(x = 16,
n = 23,
p = 0.60,
parE = c(2, 4), weights = 1)

does 0.5*(a + b ) = postprob(x = 16,
n = 23,
p = 0.60,
par = rbind(c(0.6, 0.4),
c(2, 4)),
weights = c(0.5, 0.5))

Currently this is not the case.

  • unit test for the above
  • trouble shoot line 165 in pbetaMix() to make sure matrix multiplication is correct
  • For the above unit testing, can do weights (1,0) = for case a, and weights (0,1) = for case b.
  • There should be a check or assert for weights not equalling to 1, and a way to calculate that and print comment to user that the function has calculate the weights as user input was not summing to 1.
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

1 participant