.. _pop_pkpd_index:

Population Models in |popy|
###############################

.. comment
    Will expand this to Pop PK/PD when we add the PD stuff back in
    
Estimating model parameters for a single subject requires many observations to differentiate between one model and another. However, because the observation process is usually intrusive (|eg| taking a blood sample to measure drug concentration) it is often practical to take only a few samples from one individual.

To overcome this limitation we can take a few samples from many individuals and pool the data, known as *Population PK*. Early attempts at doing this relied on the residual error model "taking up the slack" but it quickly became clear that the estimates of population parameters was biased - when dealing with a population of subjects, a single set of model parameters cannot capture the variation in concentration time courses in a sensible way. 

A significant advance in the field came with the development of *mixed effect models* that predict a time course that is personalized to every individual so that the residual error model described earlier remains sensible. This personalization is done by introducing new parameters to capture variability:

#. A stochastic statistical model that uses :term:`random effects` to capture *unpredictable*, random variability between subjects from the same population, and possibly between occasions for the same subject
#. A deterministic covariate model that uses additional :term:`fixed effects` to capture *predictable* variability as a result of relationships between subject characteristics and structural model parameters (|eg| between weight and the volume of distribution)

The distributional assumptions we choose for the newly introduced :term:`random effects` constrain the problem mathematically, making it practical to find a "best" local fit even with sparse observations.
   
.. toctree::
    :maxdepth: 1

    inter_subject_variation
    inter_occasional_variation    
    re_correlation
    covariates

.. comment
    super_subject_variation
    sparse_individual_data
   
