Skip to content

Conversation

@roninsightrx
Copy link
Contributor

@roninsightrx roninsightrx commented Jul 7, 2025

Lagtime was previously handled by just adding the lagtime for a given compartment to each dose given into that compartment. So on the level of the event table created that was used as input for the simulation. However, this introduced the problem that the lagtime could not be estimated by PKPDmap (because it is essentially fixed).
To solve this, I moved the functionality that adapted the event table from happening before the core simulation into the core simulation function itself, right before the actual simulation. Now, this core function requires an additional lagtime parameter, which is then used to adapt the event table.

Related PR in PKPDmap

Copy link
Contributor Author

@roninsightrx roninsightrx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few comments

@roninsightrx roninsightrx requested a review from jasmineirx July 8, 2025 08:34
Copy link
Contributor

@jasmineirx jasmineirx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general looks good! a couple minor comments

roninsightrx and others added 5 commits July 9, 2025 02:22
Co-authored-by: Jasmine Hughes <43552465+jasmineirx@users.noreply.github.com>
Co-authored-by: Jasmine Hughes <43552465+jasmineirx@users.noreply.github.com>
@roninsightrx roninsightrx requested a review from jasmineirx July 9, 2025 12:26
lagtime_ode <- attr(ode, "lagtime")
# override from ode if not specified by user and defined in ode
if(is.null(lagtime) && !is.null(lagtime_ode) && !lagtime_ode %in% c("NULL", "undefined")) {
if(is.null(lagtime) && !is.null(lagtime_ode) && lagtime_ode[1] != "NULL" && lagtime_ode[1] != "undefined") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a !any(lagtime_ode %in% c("NULL", "undefined"))

@roninsightrx roninsightrx merged commit 8c3bbda into master Jul 11, 2025
4 checks passed
@roninsightrx roninsightrx deleted the RXR-2394-lagtime branch July 11, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants