Martí,
Congratulations on this very simple to use package, it seems great so far.
One design suggestion though.
Instead of throwing an Exception when the effect is not identifiable, I believe you should still return a probability object, but with exactly the information you now provide in the Exception message: that the effect is not ID and the hedge.
The reason being that the effect not being identifiable is not an error in itself, it is the correct behavior of the algorithm.
So it is better to return the formal result of the algorithm (non-identifiability and the reason for non-identifiability) in a way that can be stored in an object for further manipulations.
An exception should be used for real errors and exceptions only.
Martí,
Congratulations on this very simple to use package, it seems great so far.
One design suggestion though.
Instead of throwing an Exception when the effect is not identifiable, I believe you should still return a probability object, but with exactly the information you now provide in the Exception message: that the effect is not ID and the hedge.
The reason being that the effect not being identifiable is not an error in itself, it is the correct behavior of the algorithm.
So it is better to return the formal result of the algorithm (non-identifiability and the reason for non-identifiability) in a way that can be stored in an object for further manipulations.
An exception should be used for real errors and exceptions only.