-
Notifications
You must be signed in to change notification settings - Fork 11
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 with Dirichlet distribution #62
Comments
The error log did not include any errors: Version: 0.3.0 Errors (0): System properties |
I think this is a challenge with drichlet distributions in PSAs. This error means youre getting three values either greater than 1 or less than 1. I'm not sure how it's being written here, I'll leave that to the other Zach. When I use them, I sample two of the three parameters, and then set the If the three node model has probabilities p0=0.75, p1=0.15, and p2=0.1, my first node ends up having probabilities 0.75(p0) and 0.25(1-p0). the p0 arm gets extended by one length, and then the 1-p0 arm has a node with probabilities 0.6(p1/p1+p2) and 0.4(p2/p1+p2). |
This might be a finite-precision rounding issue, with the 3 sampled probabilities not summing close enough to 1.0 (slightly above or below). Have you tried using 'C' as one of the branch probabilities? ('C' stands for ‘complementary’ probability and will ensure that all branches sum to 1.0, as long as the other two sum to <=1.0) |
See this FAQ as well: https://github.com/zward/Amua/wiki/FAQ#Why-does-it-say-my-probabilities-do-not-sum-to-1 |
Thank you for your responses! It is not a problem with precision rounding issues, since the sum of probabilities is sometimes quite different from 1 (e.g. >2 or <0.8). Using the C does not work. I think that the problem is that the uncertainty around the three probabilities allow the sum of probabilities to exceed 1. However, in theory this should be prevented with the dirichlet distribution, but this does not work. I have also tried the nested two-branch -> two-branch node as suggested by RiversPharmD, but this does only work if you have discrete values for the probabilities without uncertainty. I have also tried the nested two-branch node together with the Dirichlet distribution to see if that would work and solve rounding issues, but it does not too. It just seems to be a problem with sampling of the dirichlet distribution in PSA. |
Although I got the error message about the sum of probabilities that were related to the ditrichlet distribution, that was not the problem at all. The problem lies in the constraints. Even though it is weird that the constraints in question have nothing to do with the probabilities of the ditrichlet distribution. Perhaps a good thing to know for other people that face errors when using the ditrichlet distribution! |
Using the dirichlet distribution in a three-arm node keeps giving the error that the sum of probabilities does not equal 1. I included the dirichlet distribution as Dir([7, 2,1], ~) as a parameter. Then I included the probabilities as a subset of the parameter for all three arms i.e. parameter[0], parameter[1], parameter[2].
Initially this works, however, when performing a PSA it keeps giving the abovementioned error. Can I fix this error or is this a problem with the software?
The text was updated successfully, but these errors were encountered: