A set of functions to estimate the controlled direct effect of treatment fixing a potential mediator to a specific value. Implements the sequential g-estimation estimator described in Vansteelandt (2009) <doi:10.1097/EDE.0b013e3181b6f4c9> and Acharya, Blackwell, and Sen (2016) <doi:10.1017/S0003055416000216> and the telescope matching estimator described in Blackwell and Strezhnev (2020) <doi:10.1111/rssa.12759>.

An extensible framework
 for automatically placing direct labels onto multicolor 'lattice' or
 'ggplot2' plots.
 Label positions are described using Positioning Methods
 which can be re-used across several different plots.
 There are heuristics for examining "trellis" and "ggplot" objects
 and inferring an appropriate Positioning Method.

Direction analysis is a set of tools designed to identify
    combinatorial effects of multiple treatments/conditions on pathways
    and kinases profiled by microarray, RNA-seq, proteomics, or phosphoproteomics
    data. See Yang P et al (2014) <doi:10.1093/bioinformatics/btt616>; and Yang P et al. (2016) <doi:10.1002/pmic.201600068>.

Calculate adjusted means and proportions of a variable by groups defined by another variable by direct standardisation, standardised to the structure of the dataset.

Perform nonparametric Bayesian analysis using Dirichlet 
    processes without the need to program the inference algorithms. 
    Utilise included pre-built models or specify custom 
    models and allow the 'dirichletprocess' package to handle the 
    Markov chain Monte Carlo sampling. 
    Our Dirichlet process objects can act as building blocks for a variety 
    of statistical models including and not limited to: density estimation, 
    clustering and prior distributions in hierarchical models.
    See Teh, Y. W. (2011) 
    <https://www.stats.ox.ac.uk/~teh/research/npbayes/Teh2010a.pdf>, 
    among many other sources.

Implementation of the Dirichlet Random Forest algorithm
    for compositional response data. Trees are grown using a Dirichlet
    log-likelihood splitting criterion, with maximum likelihood ('MLE') and
    method-of-moments ('MOM') parameter estimation. Provides averaging-based
    predictions (average of responses within terminal nodes), parameter-based
    predictions (expected value derived from the estimated Dirichlet
    parameters within terminal nodes), and distributional predictions
    represented as a weighted distribution over the training responses.
    Out-of-bag estimation and impurity- and permutation-based variable
    importance are also supported. For more details see Masoumifard, van der
    Westhuizen, and Gardner-Lubbe (2026, ISBN:9781032903910).