Function estimate_effect_3
pub fn estimate_effect_3(
a: f64,
b: f64,
c: f64,
alpha12: f64,
alpha13: f64,
alpha23: f64,
alpha123: f64,
h1: f64,
h2: f64,
h3: f64,
) -> f64Expand description
Computes the effect metric for the three-site Greco response-surface model.
This is the three-drug extension published by Snyder et al. (PMID 10722511).
With positive M, the canonical residual is
r(M) = 1 - a/M^h1 - b/M^h2 - c/M^h3
- (alpha12*a*b)/M^((h1+h2)/2)
- (alpha13*a*c)/M^((h1+h3)/2)
- (alpha23*b*c)/M^((h2+h3)/2)
- (alpha123*a*b*c)/M^((h1+h2+h3)/3)The function brackets positive roots across characteristic concentration
scales and uses multi-start Nelder-Mead for any remaining least-squares
minima, then returns M / (1 + M).
Each normalized exposure below 1e-5 is treated as zero. Consequently, the
model reduces exactly to estimate_effect_2 when one site is absent and to the
corresponding closed-form single-site equation when two sites are absent.
Finite negative interaction parameters are valid and represent antagonism.
The exponent arguments are H_i = 1 / m_i, where m_i are the conventional
Hill coefficients used in the source publication. Pairwise and three-way
interaction exponents are therefore the arithmetic means of these reciprocal
Hill coefficients.
§Arguments
a,b,c- Nonnegative finite normalized drug exposures.alpha12,alpha13,alpha23- Finite pairwise interaction coefficients.alpha123- Finite three-way interaction coefficient.h1,h2,h3- Positive finite reciprocal Hill exponentsH1,H2, andH3.
§Returns
The effect M / (1 + M). Malformed inputs and search failures without a
meaningful finite scalar return NaN. If no exact positive root exists, the
best finite least-squares candidate found by the bounded log-space search is
returned.
§Example
use pharmsol::estimate_effect_3;
// With all exponents equal to one, M is the sum of all seven coefficients.
let effect = estimate_effect_3(1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0);
assert!((effect - 0.8).abs() < 1e-6);