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

Correcting origin when it is younger than initial tree height in SABirthDeathModel #18

Open
alexeid opened this issue Oct 19, 2020 · 0 comments

Comments

@alexeid
Copy link
Member

alexeid commented Oct 19, 2020

It would be nice if an incorrect initial origin value could be automatically corrected (when possible, and with a warning) instead of an exception being thrown. Sometimes when a tree initialiser is being used it is not possible ahead of time to know what value of origin is large enough.

I suggest replacing the current exception with these two lines:

  originInput.get().setValue(rootHeight + 1.0);  
  System.err.println("WARNING: Initial value of origin was changed to " + origin() + " so that it is greater than initial root height (" + rootHeight + ")");

@rbouckaert is working on a solution that would allow a check on the RealParameter to make sure it is being estimated. Then if it is, the above solution can be employed, else throw exception.

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