NCAPopulation

Trait NCAPopulation 

Source
pub trait NCAPopulation {
    // Required method
    fn nca_grouped(&self, options: &NCAOptions) -> Vec<SubjectNCAResult>;
}
Expand description

Extension trait for structured population-level NCA

Returns results grouped by subject, making it easy to associate NCA results back to their source subjects.

Required Methods§

Source

fn nca_grouped(&self, options: &NCAOptions) -> Vec<SubjectNCAResult>

Perform NCA and return results grouped by subject

Unlike NCA::nca_all which returns a flat Vec, this returns a Vec<SubjectNCAResult> where each entry groups all occasion results for a single subject.

§Example
use pharmsol::prelude::*;
use pharmsol::nca::{NCAOptions, NCAPopulation};

let population_results = data.nca_grouped(&NCAOptions::default());
for subject_result in &population_results {
    println!("Subject {}: {} occasions", subject_result.subject_id, subject_result.occasions.len());
}

Implementors§