Package-free solution [PK / PD]

posted by ElMaestro  – Denmark, 2013-07-18 01:21 (4711 d 01:01 ago) – Posting: # 11012
Views: 25,159

And here's for those who prefer a minimum of typing:

Conc=function(D, K01, K10, V, t, tlag)
{
 C = ((D*K01)/(V*(K01-K10))) * (exp(-K10*(t-tlag)) - exp(-K01*(t-tlag)))
 return(C)
}

Cx=Conc(100, 1.67, 0.213, 10, 6, 0.5)

Objective.Func=function(K01)
{
  return(abs (Cx-Conc(100, K01, 0.213,10,6,0.5)))
}

optim(c(0.1), Objective.Func, method="Brent", lower=0.001, upper=100.0)

Pass or fail!
ElMaestro

Complete thread:

UA Flag
Activity
 Admin contact
23,653 posts in 4,991 threads, 1,570 registered users;
116 visitors (0 registered, 116 guests [including 23 identified bots]).
Forum time: 02:22 CEST (Europe/Vienna)

There are no dangerous thoughts;
thinking itself is dangerous.    Hannah Arendt

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5