Controls
Presets
Parameters
Quality
Camera
Model checks
The science
Why the effect lags the blood level. Most drugs act at a site (a receptor in the brain, say) that is not in the blood itself. The drug has to diffuse there, so the effect-site concentration Ce follows plasma concentration Cp with a delay. The classic effect-compartment model writes this as dCe/dt = ke0(Cp − Ce), and the effect depends on Ce through a sigmoid Emax law E = Emax Ceγ/(EC50γ + Ceγ). The delay is described by the half-time ln 2 / ke0.
Plasma side. A one-compartment body with first-order absorption has Cp(t) = A(e−kt − e−kat), A = D ka/(V(ka − k)), k = CL/V. Feeding this into the effect compartment gives a closed form for Ce, a sum of three exponentials. The effect-site peak happens exactly when Cp falls to Ce (then dCe/dt = 0), which is later than the plasma peak. If you plot E against Cp, the points do not lie on one curve: the effect is lower at the same plasma level on the way up and higher on the way down, which draws a counter-clockwise hysteresis loop. Plotted against Ce, the same data fall on the single Emax curve; when ke0 is large the loop collapses.
Numerical checks. (1) The closed form of Ce equals an RK4 integration; (2) the peak of Ce is found by root-finding and by a scan, and Cp = Ce there; (3) the half-time to equilibrate to a constant plasma level is ln 2/ke0; (4) the loop is traversed counter-clockwise and its area falls roughly as 1/ke0; (5) the area under the plasma curve equals Dose/CL.
Simplifications. One body compartment, complete absorption, a hypothetical effect compartment holding negligible drug, no protein binding or tolerance, and arbitrary drug units. Real drug effects also depend on the patient, interactions and formulation. This is an educational pharmacology model and gives no dosing advice.