Struct NCAOptions
pub struct NCAOptions {
pub auc_method: AUCMethod,
pub blq_rule: BLQRule,
pub lambda_z: LambdaZOptions,
pub tau: Option<f64>,
pub auc_interval: Option<(f64, f64)>,
pub c0_methods: Vec<C0Method>,
pub max_auc_extrap_pct: f64,
pub concentration_threshold: Option<f64>,
pub route_override: Option<Route>,
pub outeq: usize,
pub dose_times: Option<Vec<f64>>,
}Expand description
Complete NCA configuration
Dose and route information are automatically detected from the data. Use these options to control calculation methods and quality thresholds.
Fields§
§auc_method: AUCMethodAUC calculation method (default: LinUpLogDown)
blq_rule: BLQRuleBLQ handling rule (default: Exclude)
When an observation is censored (Censor::BLOQ or Censor::ALOQ),
its value represents the quantification limit (lower or upper).
This rule determines how such observations are handled in the analysis.
Note: ALOQ (Above LOQ) values are currently kept unchanged in the analysis. This follows PKNCA behavior which also does not explicitly handle ALOQ.
lambda_z: LambdaZOptionsTerminal phase (λz) estimation options
tau: Option<f64>Dosing interval for steady-state analysis (None = single-dose)
auc_interval: Option<(f64, f64)>Time interval for partial AUC calculation (start, end)
If specified, auc_partial in the result will contain the AUC
over this interval. Useful for regulatory submissions requiring
AUC over specific time windows (e.g., AUC0-4h).
c0_methods: Vec<C0Method>C0 estimation methods for IV bolus (tried in order)
Default: [Observed, LogSlope, FirstConc]
max_auc_extrap_pct: f64Maximum acceptable AUC extrapolation percentage (default: 20.0)
concentration_threshold: Option<f64>Target concentration for time-above-concentration calculation (None = skip)
When specified, the result will contain time_above_mic — the total time
the concentration profile is above this threshold. Uses linear interpolation
at crossing points. Commonly set to MIC for antibiotics.
route_override: Option<Route>Override the auto-detected route
By default, the administration route is inferred from dose events (compartment number). Set this to override the heuristic when the auto-detection gives wrong results (e.g., models where compartment 1 is a depot, not central).
outeq: usizeOutput equation index to analyze (default: 0)
For multi-output models, select which output equation to run NCA on.
dose_times: Option<Vec<f64>>Dose times for multi-dose NCA (None = single-dose)
When set, AUC/Cmax/Tmax will be computed for each dosing interval
and stored in [NCAResult::multi_dose].
Implementations§
§impl NCAOptions
impl NCAOptions
pub fn bioequivalence() -> NCAOptions
pub fn bioequivalence() -> NCAOptions
FDA Bioequivalence study defaults
pub fn sparse() -> NCAOptions
pub fn sparse() -> NCAOptions
Lenient settings for sparse/exploratory data
pub fn with_auc_method(self, method: AUCMethod) -> NCAOptions
pub fn with_auc_method(self, method: AUCMethod) -> NCAOptions
Set AUC calculation method
pub fn with_blq_rule(self, rule: BLQRule) -> NCAOptions
pub fn with_blq_rule(self, rule: BLQRule) -> NCAOptions
Set BLQ handling rule
Censoring is determined by Censor markings on observations (BLOQ/ALOQ),
not by a numeric threshold. This method sets how censored observations
are handled in the analysis.
pub fn with_tau(self, tau: f64) -> NCAOptions
pub fn with_tau(self, tau: f64) -> NCAOptions
Set dosing interval for steady-state analysis
pub fn with_auc_interval(self, start: f64, end: f64) -> NCAOptions
pub fn with_auc_interval(self, start: f64, end: f64) -> NCAOptions
Set time interval for partial AUC calculation
pub fn with_lambda_z(self, options: LambdaZOptions) -> NCAOptions
pub fn with_lambda_z(self, options: LambdaZOptions) -> NCAOptions
Set lambda-z options
pub fn with_min_r_squared(self, min_r_squared: f64) -> NCAOptions
pub fn with_min_r_squared(self, min_r_squared: f64) -> NCAOptions
Set minimum R² for lambda-z
pub fn with_c0_methods(self, methods: Vec<C0Method>) -> NCAOptions
pub fn with_c0_methods(self, methods: Vec<C0Method>) -> NCAOptions
Set C0 estimation methods (tried in order)
pub fn with_concentration_threshold(self, threshold: f64) -> NCAOptions
pub fn with_concentration_threshold(self, threshold: f64) -> NCAOptions
Set a target concentration threshold for time-above-concentration
When set, the result will include time_above_mic — the total time
the profile is above this concentration.
pub fn with_route(self, route: Route) -> NCAOptions
pub fn with_route(self, route: Route) -> NCAOptions
Override the auto-detected route
Use this when the auto-detection from compartment numbers gives wrong results. For example, if your model uses compartment 1 as a depot (not central), the auto-detection would incorrectly classify it as IV.
pub fn with_outeq(self, outeq: usize) -> NCAOptions
pub fn with_outeq(self, outeq: usize) -> NCAOptions
Set output equation index (default: 0)
pub fn with_dose_times(self, times: Vec<f64>) -> NCAOptions
pub fn with_dose_times(self, times: Vec<f64>) -> NCAOptions
Set dose times for multi-dose NCA (interval-based AUC, Cmax, Tmax)
When set, analyze will compute AUC, Cmax, and Tmax for each dosing
interval and store them in [NCAResult::multi_dose].
Trait Implementations§
§impl Clone for NCAOptions
impl Clone for NCAOptions
§fn clone(&self) -> NCAOptions
fn clone(&self) -> NCAOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for NCAOptions
impl Debug for NCAOptions
§impl Default for NCAOptions
impl Default for NCAOptions
§fn default() -> NCAOptions
fn default() -> NCAOptions
§impl<'de> Deserialize<'de> for NCAOptions
impl<'de> Deserialize<'de> for NCAOptions
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NCAOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NCAOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for NCAOptions
impl Serialize for NCAOptions
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for NCAOptions
impl RefUnwindSafe for NCAOptions
impl Send for NCAOptions
impl Sync for NCAOptions
impl Unpin for NCAOptions
impl UnwindSafe for NCAOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Context for T
impl<T> Context for T
fn vector_from_element<V>(&self, len: usize, value: <V as VectorCommon>::T) -> Vwhere
V: Vector<C = Self>,
fn vector_from_vec<V>(&self, vec: Vec<<V as VectorCommon>::T>) -> Vwhere
V: Vector<C = Self>,
fn vector_zeros<V>(&self, len: usize) -> Vwhere
V: Vector<C = Self>,
fn dense_mat_zeros<V>(
&self,
rows: usize,
cols: usize,
) -> <V as DefaultDenseMatrix>::Mwhere
V: Vector<C = Self> + DefaultDenseMatrix,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.