MATLAB Answers

0

nlme fitting error for covariate in popPK model

Asked by Jim Bosley on 14 Nov 2018
Latest activity Commented on by Jim Bosley on 18 Nov 2018
I select a column (WT) in my dataset as a covariate.
When I set up the covariate in the nlme fitting page (interactively, not programming*) I scale by the mean WT (I would prefer to scale by a user-set model parameter such as WT_baseline, but the program doesn't allow this) and use the checkbox to do a log transform.
This gives me tWT = log(WT/mean(WT)) which should be the same as tWT = log(WT) - log(mean(WT))
I specify clearance, CL, as [ ln(Phi_CL) ] = exp(theta1 + theta5 * tWT + eta1), using the drop down menu to specify the form.
I also specify other parameters such as intercompartmental clearance, Q, and two volumes in the same way. For example, [ ln(Phi_Q) ] = exp(theta2 + theta6 * tWT + eta2)
This yields a value for the estimate of CL, Phi_CL = exp(theta1) * exp(eta1) * exp(ln(WT/WT_baseline))^theta5, or more clearly
[ Phi_CL ] = exp(theta1) * exp(eta1) * (WT/WT_baseline)^theta5
Also [ Phi_Q ] = exp(theta2) * exp(eta2) * (WT/WT_baseline)^theta6
Similar equations for V2 and V3 follow (with theta3 and theta7, and theta3 and theta8). These equations are identical to ones that have been used successfully in a NONMEM model.
If I run the nlme fit, I get Message:
'CL = exp(theta1 + theta5 * log((WT/mean(WT))) + eta1)' is not a valid parameter covariate relationship. Type 'help CovariateModel' for more information.
Additional Messages For This Source: Message:
FixedEffectValues should be a structure with exactly one field for each fixed effect.
So the drop-down menu let me astray I guess. But the weird thing is, if I untick the "log" tick box for the covariate, the model at least runs. So, three questions.
1) What am I doing wrong in setting up the problem?
2) I guess I could create a derived value column that is ln(WT/75), and used this column, untransformed, as my covariate. In fact, I just tried this and it works fine. Is this how others are doing this?
3) I'd like to fit a smaller set of estimated values. To do so, it is common to assume that a common "flux exponent" will work to scale the clearances, and a "volume exponent" will suffice for the volumes (see “Mechanism-Based Concepts of Size and Maturity in Pharmacokinetics”, Anderson and Holford, Annu. Rev. Pharmacol. Toxicol. 2008). But
Phi_CL = exp(theta1 + eta1 + theta5 * tWt)
Phi_Q = exp(theta2 + eta2 + theta5 * tWt) % note that CL and Q both have theta5 as the flux exponent
Phi_V2 = exp(theta3 + eta3 + theta6 * tWt)
Phi_V3 = exp(theta4 + eta4 + theta6 * tWt) % note that V2 and V3 both have theta6 as the flux exponent
which eliminates theta 7 and 8, throws an error even in setup, before I can kick off a fit. Is this doable?
Thanks

  0 Comments

Sign in to comment.

Products

Communities

More Answers in the  SimBiology Community

1 Answer

Answer by Arthur Goldsipe on 15 Nov 2018
 Accepted Answer

Hi Jim,
Here are the answers to your question:
1) SimBiology's covariate model expressions are quite constrained. The problem is that you can't use log in your expression. If you remove that, you should see that your expression is valid. That's one reason why the SimBiology Desktop allows you to create transformed versions of your variables. You should be able to replace log((WT/mean(WT))) with tWT.
2) Yes, that's the most straightforward way I know to do this.
3) I can't think of a straightforward workaround for this. I believe this is supported by the underlying function nlmefit from Statistics Toolbox, so SimBiology just needs to recognize that this is a valid covariate model. I'm guessing we (the SimBiology development team) didn't know that this was something our user's might want to do, and we incorrectly thought such a situtation was a modeling error.
-Arthur

  1 Comment

Having been in software management, I'd say it's like art: you create something you think is nice, and people go ahead and use it in ways the coder (or artist) never contemplated. Which I think is a good thing.
As always, your replies are useful, frank, and encouraging. Have a great Thanksgiving!

Sign in to comment.