Closed EvanTarbell closed 5 years ago
You need to link the resposne to the compartment number in the model.
d/dt(CPL_Exo1H) = ...
d/dt(CPL_Exo1TL1AH ) = ...
d/dt(CPL_Exo1MTL1AH)=...
Plasma_Exo1H_total_nM= (CPL_Exo1H + CPL_Exo1TL1AH + CPL_Exo1MTL1AH)*(1e+09);
CPmAbT=Plasma_Exo1H_total_nM;
CPmAbT ~ prop(prop.err);
Would become:
Plasma_Exo1H_total_nM= (CPL_Exo1H + CPL_Exo1TL1AH + CPL_Exo1MTL1AH)*(1e+09);
CPmAbT=Plasma_Exo1H_total_nM;
CPmAbT ~ prop(prop.err) | CPL_Exo1H
Depending on what "CMT" number you use for the response.
If I understand correctly, you're saying that the CMT value in the fitting data should correspond to the CPL_Exo1H value (or either of the other two)? What if the CMT value corresponds to the CPmAbT concentration? Or am I misunderstanding? Thanks
The CMT value corresponds to the CMT
in the model.
For differential equation models, these CMT
s relate to the compartment defined by the differential equations. You could define an additional non-PBPK "compartment" or indicator, but that isn't supported by the stable release, just the github release.
Therefore because your differental equations are defined in terms of:
d/dt(CPL_Exo1H) = ...
d/dt(CPL_Exo1TL1AH ) = ...
d/dt(CPL_Exo1MTL1AH)=...
Your conditions should be defined in terms of these compartments CPL_Exo1H
, CPL_Exo1TL1AH
, and CPL_Exo1MTL1AH
. I believe this is similar to how NONMEM handles compartments. The compartment number is defined by the order of differential equations in the model:
d/dt(mod1)=...# CMT=1
d/dt(mod2)=...# CMT=2
...
d/dt(modN)=... # CMT=n
Therefore the derived concentration Plasma_Exo1H_total_nM
would relate to some compartment in your model.
I think this is a bit confusing, so on the next release I aim to have the following way to specify compartments:
CPmAbT ~ prop(prop.err) | CPmAbT
In this release you would specify CMT
as CPmAbT
and not worry too much about the renumbering of CMTs like you need to in NONMEM.
So it sounds like, in the stable release, it is not possible to fit observations that are a composite (e.g., sum) of the solutions for multiple differential equations. Am I interpreting that correctly?
@mattfidler, could you please clarify what you mean by:
You could define an additional non-PBPK "compartment" or indicator, but that isn't supported by the stable release, just the github release.
I am wondering if there is some workaround that would be possible in the github release to fit observations that are a composite of the solutions from multiple ODEs.
Hi @sarahfcook,
You can fit observations that are a composite solution from multiple ODEs with the stable release.
The ODE state CPL_Exo1H
is related to the amounts in that compartment and defines how events and amounts in that compartment behave.
In a similar manner, it makes sense that observations related to CPL_Exo1H
would be related to the amount in that compartment. However, when nlmixr reads CPL_Exo1H
it translates it to the compartment number defined by RxODE
. Observations in this compartment number do not have to be related to the amounts in CPL_Exo1H
. This compartment number becomes simply an indicator of where the responses may be found, not how they are created.
Therefore in the data, when the compartment number corresponds to CPL_Exo1H
with EVID=0
you could actually model the sum of the response instead of the amount in CPL_Exo1H
. It all comes down to the model definition.
Plasma_Exo1H_total_nM= (CPL_Exo1H + CPL_Exo1TL1AH + CPL_Exo1MTL1AH)*(1e+09);
CPmAbT=Plasma_Exo1H_total_nM; # What I want to model
CPmAbT ~ prop(prop.err) | CPL_Exo1H # Model assuming proportional error w/CMT=CPL_Exo1H
# Note that CPL_Exo1H is just an indicator of where the response is found.
Right now, the only thing you can condition on are names defined in your ODE block. I believe this design causes confusion. In the next release, I will allow conditioning on any name. I also changed nlmixr/RxODE to take named compartments so CMT="CPmAbT" would be completely acceptable and help the legibility of the model.
With that new design, you would simply have to use:
CPmAbT ~ prop(prop.err) | CPmAbT
With CMT=CPmAbT
being the compartment indicator. This is what I meant in my comment.
Hopefully this clarifies the situation with the stable release and the plans for the next release.
Ah, I see now. Thanks so much for the clarification @mattfidler. This helps a lot.
Trying to run my model and during the syntax check i got the following error:
I looked at the last issue that raised this problem and saw how to address it, but i have a problem. My concentrations are based on several ODEs
d/dt(CPL_Exo1H) = ... d/dt(CPL_Exo1TL1AH ) = ... d/dt(CPL_Exo1MTL1AH)=...
Plasma mAb
How should i then specify the error?