Skip to content

[WIP] errors-in-variables model#35

Open
roninsightrx wants to merge 4 commits intomainfrom
RXR-1093
Open

[WIP] errors-in-variables model#35
roninsightrx wants to merge 4 commits intomainfrom
RXR-1093

Conversation

@roninsightrx
Copy link
Contributor

@roninsightrx roninsightrx commented Apr 1, 2025

Description

Implements errors-in-variables approach to modeling individual PK data, i.e. it now also includes a probabilistic description for the observed times as input to the PK equations, instead of using their true values.

This is really more of an experimental feature, something to play around with. I don't think this will be that useful in a production-setting.

Why?

Potentially, EiV modeling in the context of MIPD could be useful because:

  • a better description of the underlying "data-generating" process would mean a better model, and hence potentially better predictions. The question is whether it really matters though, and whether it's worth the hassle.
  • As a diagnostic: with this technique, suspected errors in recorded sample or dose times could be detected using a probabilistic framework.

Implementation

The implementation is actually very simple:

  • To use EiV, the user is expected to supply error magnitudes for the times of observation and non-observation events (i.e. doses or other events). If only interested in the observation times, then just set the SD for doses to a very low value.
  • The functions then just add a few lines of code to the Stan model to describe the model for the observations
  • It then also adds a new variable in the input dataset with the standard deviation for each observation.

To-do

  • write a vignette
  • add tests

Potential future enhancements

  • allowing to set SD for each observation manually
  • apply this concept to covariates
  • apply this concept to dose amounts

@roninsightrx roninsightrx changed the title [WIP] RXR-1093 [WIP] errors-in-variables model Apr 1, 2025
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.

1 participant