Skip to content

Commit

Permalink
ensure correct parameter is changed for relaxed rate model
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Oct 20, 2023
1 parent ddf3861 commit 441ceef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/run_daisie_ml.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ run_daisie_ml <- function(daisie_data,
# prevent initial parameters being greater than upper parameter limit
pick <- which(c("cladogenesis", "extinction", "carrying_capacity",
"immigration", "anagenesis") == cs_version$relaxed_par)
initparsopt[initparsopt[pick] > par_upper_bound] <- par_upper_bound / 2
if (initparsopt[pick] > par_upper_bound) {
initparsopt[pick] <- par_upper_bound / 2
}

}

##### ML Optimization ####
Expand Down

0 comments on commit 441ceef

Please sign in to comment.