- On 28 Jun 2006 at 16:46:31, Greg Tarpinian (sasprog474474.-a-.yahoo.com) sent the message

Back to the Top

The following message was posted to: PharmPK

All,

I have been trying to use the nls( ) function in Splus to fit a 2-

compartment

model to some oral dosing plasma PK data. The nls( ) function allows

for

simple nonlinear least squares and weighted least squares. I have

obtained

reasonable starting values using the "Method of Residuals" as

described in

Gibaldi & Perrier -- subject-specific plots appear to be very reasonable

approximations to the actual plasma concentrations.

When I use nls( ) to try to refine these initial estimates, the

estimated

gradient always turns out to be singular. The algorithm stops in an

ugly way.

My questions:

(1) What kind of algorithm should I be using to optimize a 2-

compartment

model? Nelder-Mead? Levenberg-Marquardt? Steepest Descent?

(2) If I want to obtain a weighted least squares estimate, what

kind of

weighting function would be typical to use? I have seen some

people

use ActualConc = EstimatedConc(1 + error) where error ~ N

(0,1).....

Any help would be greatly appreciated.

Kind regards,

Greg

[No experience with nls() but have you defined all the de equations

of the model. The algorithm and weighting shouldn't cause your

problem if you have good estimates. Nelder-Mead is mathematically

more robust on tough models - db] - On 30 Jun 2006 at 10:38:19, "Walt Woltosz" (walt.-a-.simulations-plus.com) sent the message

Back to the Top

The following message was posted to: PharmPK

Greg,

Fitting PK to oral doses is not generally straightforward.

The likelihood of different absorption rates in different regions of the

intestinal tract is high (Ka is NOT a constant, even when the

permeability

in all regions is nearly equal). Complications due to solubility,

dissolution, precipitation, first pass extraction, etc., can also

confound

the analysis. You can fit models that give pretty pictures, but in

doing so,

you may be covering up important phenomena to make the simulation go

through

the data points in an artificial way. The value of such an incorrect

model

is questionable.

There are, of course, those "easy" drugs where bioavailability is

complete,

permeability and solubility are high, ionization is not important,

and so

on, and for such drugs you can get away with simpler approaches. But

they

are the exception, not the rule.

Best regards,

Walt

Walt Woltosz

Chairman & CEO

Simulations Plus, Inc. (AMEX: SLP)

42505 10th Street West

Lancaster, CA 93534-7059

U.S.A.

http://www.simulations-plus.com

Phone: (661) 723-7723

FAX: (661) 723-5524

E-mail: walt.-a-.simulations-plus.com - On 1 Jul 2006 at 09:00:17, "Ma Guangli" (guanglima.-at-.gmail.com) sent the message

Back to the Top

Dear Greg,

Hi,

I am sorry that I have no nls() experience.

1) L-M algorithm is best choice in derivative methods such as

Gauss-Newton, steepest descent...Anyway, you should get more data

points for derivative methods. Otherwise, the program should alert

'singular'.

Nelder-Mead is robust. You can use N-M to estimate the initial

values. Then input the initial values into L-M algorithm for more

exact results.

2) If you want to obtain weighted least square estimates using

nls(), the choices are 1/C, 1/C*C, 1/(some function). They are

typical. Some weighted functions are changed during interations .

They are diffcult to implement for nls().

Best regards

Ma Guangli - On 2 Jul 2006 at 20:21:57, "Pravin Jadhav" (pravinj.at.gmail.com) sent the message

Back to the Top

Hello,

There are several things you might need to check, if you think you

have reasonable initial estimates and a model. Take a look at the

following posting by Douglas Bates on the very same issue.

http://www.biostat.wustl.edu/archives/html/s-news/1999-07/msg00201.html

Also, if you are using a self-starting function in Splus- make sure

the data setup is appropriate.

Hope it helps.

Pravin

Want to post a follow-up message on this topic? If this link does not work with your browser send a follow-up message to PharmPK@boomer.org with "Numerical optimization for 2-compartment model" as the subject

PharmPK Discussion List Archive Index page

Copyright 1995-2010 David W. A. Bourne (david@boomer.org)