Skip to content

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

@alexeid

Description

@alexeid

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions