-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
When the speciation completion rate (SCR) is set to infinity, the PBD model falls back to a BD model. The current version of PBD::pbd_sim does not provide for this. A high value for the SCR is allowed, but setting it to Inf results in an error (see code below).
Allowing Inf would result in manuscripts in which authors need not specify an arbitrary high value for SCR.
Works today
set.seed(42)
pbd_parameters <- c(
1.0, # speciation_initiation_rate
1000000000, # speciation_completion_rate, suggest to allow Inf
1.0, # speciation_initiation_rate
0.1, # extinction_rate
0.1# extinction_rate
)
PBD::pbd_sim(
pbd_parameters,
age = 1,
soc = 2 # crown
)
Suggestion
set.seed(42)
pbd_parameters <- c(
1.0, # speciation_initiation_rate
Inf, # speciation_completion_rate
1.0, # speciation_initiation_rate
0.1, # extinction_rate
0.1# extinction_rate
)
PBD::pbd_sim(
pbd_parameters,
age = 1,
soc = 2 # crown
)
Error message:
Error in while (t <= age) { : missing value where TRUE/FALSE needed
Metadata
Metadata
Assignees
Labels
No labels