ALGEBRAIC EQUATIONS and diff forms thereof
#1
Posted 27 January 2017 - 02:42 PM
dissolution. Also in WinNonlin you could write the same equation in
the differential form and use it.
I am wondering whether pml works with exclusively DIFF equations or you can use the algebraic equation in pml. Writing diff equations requires one first to take the first derivative of the algebraic equation.
Angus WEIBULL.phxproj 241.26KB 1415 downloads
- Jefferymed, Naitoeste, ceamesext and 1 other like this
#2
Posted 28 January 2017 - 08:22 PM
Angus, with PML you can write the model in terms of closed form equations or write them in terms of DEs, just like classic WNL. For PK library models, there is a box you can check to specify fitting the PK model in closed form or the corresponding DE representation. There is no advantage to fitting the DE specification of the PK library model, but this can help if you need the DE representation in order to convert the model to text and then edit it. Note that if one fits a system of DEs that are first order, PHX (by default - but you can turn this off in the Run Options tab) will use a matrix exponentiation solution for the system and then fit that to improve the speed of the optimization process.
Dan
One can write and use algebraic equations in classic WinNonlin e.g. the attached example describes the use of the Weibull equation to fit a
dissolution. Also in WinNonlin you could write the same equation in
the differential form and use it.
I am wondering whether pml works with exclusively DIFF equations or you can use the algebraic equation in pml. Writing diff equations requires one first to take the first derivative of the algebraic equation.
AngusWEIBULL.phxproj
#3
Posted 04 February 2017 - 06:02 PM
Hi Angus, to expand on Dan's answer, here is an example of Weibull annotated in PML.
(remember everything preceded with a hash is a remark and just intended to help explain what is going on)
test(){
deriv(T = 1) # take explicit control of time
# original ascii
## if t<= tlag then
## F=0
## else
## expon= -((t-tlag)/Td)**beta
## F= 100*(1-dexp(expon))
# ?:, is a conditional expression
# condition ? evaluated-when-true : evaluated-when-false
F = ((T-tlag)<=0? 0 : 100*(1-exp( -((T-tlag)/Td)**beta)))
error(FEps = 1)
observe(FObs(T) = F + FEps)
fixef(Td = c(, 8, ))
fixef(beta = c(, 10, ))
fixef(tlag = c(, 0.1, ))
}
#4
Posted 05 February 2017 - 02:27 AM
Thanks Simon; I do follow for the most part. some things I find puzzling e.g the first two lines shown below. The first line seems to be standard for all pml code.<br /><br />test(){<br />deriv(T = 1) # take explicit control of time<br /><br /><br /><br />also I found the large space between the 0 and colon: confusing, but in fact you do not need it<br /><br />F = ((T-tlag)<=0? 0 large space : 100*(1-exp( -((T-tlag)/Td)**beta)))<br /><br />Angus
#5
Posted 05 February 2017 - 01:23 PM
Thanks Simon; I do follow for the most part. some things I find puzzling e.g the first two lines shown below. The first line seems to be standard for all pml code.<br /><br />test(){<br />deriv(T = 1) # take explicit control of time<br /><br /><br /><br />also I found the large space between the 0 and colon: confusing, but in fact you do not need it<br /><br />F = ((T-tlag)<=0? 0 large space : 100*(1-exp( -((T-tlag)/Td)**beta)))<br /><br />Angus
Angus,
The first line "test" is just a default name. You can choose any name you like. In a future release, you will be able to create large libraries of PML models, each with its own unique name. The use of "t" as time is best reserved for use by the differential equations for library pk and pd models. If you need time in your user model we suggest you use your own time variable as Simon suggested "deriv(time=1)". Note that for this example you could have read in the time column as a covariate, but it would not have been a continuous variable if defined that way. Lastly, as you noted, the spacing that was used before and after the colon ( was just to make the expression easier to read.
Best,
Dan Weiner
#6
Posted 06 February 2017 - 06:54 PM
Thank you Dan: In order to learn pml then one has to study examples,for example the<br />syntax of the conditional statement provided by Simon is unique to pml. The example I provided is the use of an engineering type equation (Weibull) applied to dissolution release. I do<br />have another example of a Hill type equation and in this case I do have the first derivative of<br />the expression. I must look it out<br /><br />Angus
#7
Posted 06 February 2017 - 07:43 PM
Thank you Dan: In order to learn pml then one has to study examples,for example the<br />syntax of the conditional statement provided by Simon is unique to pml. The example I provided is the use of an engineering type equation (Weibull) applied to dissolution release. I do<br />have another example of a Hill type equation and in this case I do have the first derivative of<br />the expression. I must look it out<br /><br />Angus
Angus,
PML also supports the use of IF-Then-Else statements, but I used the more compact single statement way to accomplish the same task. Note that if you purchase the 5th edition of the book I co-authored with Johan Gabrielsson, it contains 105 various PK, PD and PK/PD examples all using Phoenix. Some use the built-in library models, but many use PML.
Dan
#9
Posted 08 February 2017 - 02:24 PM
Angus
Edited by Angus McLean, 09 February 2017 - 04:27 PM.
#10
Posted 08 February 2017 - 03:07 PM
Angus, I don't have the benefit of having seen you prior model for simulation, but here are some thoughts. This sounds a bit like an absorption transit approach. In a classical transit model the Kout (1/tau) parameter is fixed for all transit compartments. In your absorption model, Ka changes with time ( or location). While one could always simulate such a model using PML, I believe it would be difficult to fit such a model unless you had measurements of absorption that were site specific. If you ignore site of absorption (location) and instead want to fit Ka as some time dependent function such as
Ka(t) = Ka,inf * (1-exp(-(k*t)*gamma)) where Ka,inf k and gamma are parameters to be estimated, then if you have enough time points during the absorption phase you may be able to fit such a model.
Dan
#11
Posted 08 February 2017 - 03:53 PM
Dan,
the initial thinking I did was in fact simplified to think first in terms of 100% permeability (in mg) being the same in;
(1) the upper small intestine,
(2) distal parts of the small intestine and the distal small intestine and
(3) proximal colon.
For a highly soluble highly permeable drug like methylphenidate formulated as modified release formulation{ Concerta} there are three such releases;
(1)drug released from the over coat on the osmotic tablet
(2) release by osmosis from within the tablet
(3) drug release within the tablet on account of the effect of the influence of water on a swellable polymer causing the drug to release.
So the amounts in mg of each of the three releases are known in this formulation are known and one can approximate the absorption time for each of the 3 releases at the different parts of the intestine.
What is not known is the ka(absorption coefficient) for each of the 3 releases. So when simulating I made various assumptions for each of the 3 ka values to see what emerged.
I compared with the observed PK profile then I iterated the assumptions on a number of occasions to get a result reasonably close to what you observe.
This is a very adhoc approach and I thought in terms of a more general simulation approach. Simulations plus I think uses transit compartments (Amidon) and the founder of the company is an aerospace mechanical engineer. I guess then I am thinking in terms of developing pml to be able to do what that program does.
Edited by Simon Davis, 08 February 2017 - 09:56 PM.
Edited formatting to make reading easier
#12
Posted 08 February 2017 - 04:19 PM
<br />Dan: the initial thinking I did was in fact simplified to think first in terms of 100% permeability (in mg) being the same in (1) the upper small intestine, (2) distal parts of the small intestine and the distal small intestine and (3) proximal colon. For a highly soluble highly permeable drug like methylphenidate formulated as modified release formulation{ Concerta} there are three such releases (1)drug released from the over coat on the osmotic tablet (2) release by osmosis from within the tablet (3) drug release within the tablet on account of the effect of the influence of water on a swellable polymer causing he drug to release. So the amounts in mg of each of the three releases are known in this formulation are known and one can approximate the absorption time for each of the 3 releases at the different parts of the intestine. What is not known is the ka(absorption coefficient) for each of the 3 releases. So when simulating I made various assumptions for each of the 3 ka values to see what emerged. I compared with the observed PK profile then I iterated the assumptions on a number of occasions to get a result reasonably close to what you observe. This is a very adhoc approach and I thought in terms of a more general simulation approach. Simulations plus I think uses transit compartments (Amidon) and the founder of the company is an aerospace mechanical engineer. I guess then I am thinking in terms of developing pml to be able to do what that program does.
Angus, you may want to consider using a quasi-empirical approach to mimic what is happening mechanistically. You could certainly build a PK model, and add multiple absorption components (compartments) each having its own tlag and Ka. The different tlags would account for the differing sites of absorption. It is very easy to do this with the graphical model builder.
Dan
2 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users
-
Bing (2)