Skip to content

Commit

Permalink
Merge pull request #34 from tece-lab/develop
Browse files Browse the repository at this point in the history
Restrict values passed from initial optimisation to relaxed-rate model
  • Loading branch information
joshwlambert committed Oct 20, 2023
2 parents 99fc626 + 016bba0 commit 9670906
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: DAISIEutils
Title: Utility Functions for the DAISIE Package
Date: 2023-05-03
Date: 2023-10-08
Version: 1.6.1
Authors@R: c(
person(given = "Pedro",
Expand Down
7 changes: 6 additions & 1 deletion R/run_daisie_ml.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ run_daisie_ml <- function(daisie_data,
initparsopt[1:5] <- unlist(lik_res)[1:5]

# prevent infinite parameter estimates given as initial parameters
initparsopt[is.infinite(initparsopt)] <- 1e5
initparsopt[initparsopt > 1e3] <- 1e3

# 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
}

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

0 comments on commit 9670906

Please sign in to comment.