I have a hard time finding out how to use pbd_ML. I wish the error message would be more hulpful, to point a user into the right direction.
Say, I want to do a maximum likelihood optimization for the speciation completion rate. This is one of the many ways I've tried:
# Goal: optimize the SCR
branching_times <- c(1, 2, 3, 4)
erg <- 0.1 # Extinction Rate of Good species
eri <- 0.2 # Extinction Rate of Incipient species
scr <- 0.3 # Speciation Completion Rate
# ML assumes these are the same
sirg <- siri <- 0.4 # Speciation Initiation Rate of Good/Incipient Species
out <- PBD::pbd_ML(
brts = branching_times,
idparsopt = 3, # SCR
initparsopt = scr,
idparsfix = c(1, 2, 4),
parsfix = c(sirg, erg, eri),
exteq = TRUE,
verbose = TRUE
)
The error message is:
The arguments should be coherent.
I wish the error message would be more detailed. Sure, I can look into the code (and I will in a sec), but it may be preferable to be more helpful to the user.
I have a hard time finding out how to use
pbd_ML. I wish the error message would be more hulpful, to point a user into the right direction.Say, I want to do a maximum likelihood optimization for the speciation completion rate. This is one of the many ways I've tried:
The error message is:
I wish the error message would be more detailed. Sure, I can look into the code (and I will in a sec), but it may be preferable to be more helpful to the user.