aldex.effect: ALDEx3 Effect Diagnostics

View source: R/aldex-summary.R

aldex.effectR Documentation

ALDEx3 Effect Diagnostics

Description

ALDEx2-inspired effect diagnostics for an ALDEx3 binary contrast

Usage

aldex.effect(object, contrast)

Arguments

object

An object returned by aldex.

contrast

The exact model coefficient or unambiguous binary data column to summarize.

Details

aldex.effect is a helper for effect-size diagnostics that Greg Gloor and ALDEx2 users commonly inspect when evaluating pairwise effects. It is not a replacement for summary.aldex, which reports model estimates, standard errors and adjusted p-values. This function summarizes a single binary ALDEx3 model contrast using Cohen's-d-based Monte Carlo diagnostics.

For a selected contrast row k, feature d, Monte Carlo draw s, and binary group indicators x = object$X[k, ], let B[d, s] be the fitted ALDEx3 coefficient stored in object$estimate[k, d, s]. Let logW[d, i, s] = object$logComp[d, i, s] + object$logScale[i, s] be the reconstructed log abundance for sample i. aldex.effect requires logComp and logScale, so it is unavailable when aldex streams large jobs and omits those arrays. For each feature and Monte Carlo draw, the pooled within-group variance is ((n0 - 1) * var(logW[d, x == 0, s]) + (n1 - 1) * var(logW[d, x == 1, s])) / (n0 + n1 - 2), where n0 and n1 are the group sizes.

The returned columns are calculated as follows:

  • estimate: the mean of B[d, s] over Monte Carlo draws.

  • pooled.SD: the mean of the pooled within-group standard deviation, ⁠sqrt(pooled variance)⁠, over Monte Carlo draws.

  • cohens.d: the mean of B[d, s] / pooled.SD[d, s] over Monte Carlo draws. This is Cohen's-d-based and is not the same as the historical robust ALDEx2 effect statistic based on between/within dispersion.

  • overlap: an ALDEx2-style directional uncertainty diagnostic. It counts the Monte Carlo Cohen's d draws below and above zero, smooths those two counts with a 0.5 pseudocount, converts them with the ALDEx/Aitchison mean, and returns the smaller smoothed sign probability. Values near 0 indicate that nearly all Monte Carlo effect draws have the same sign. Values near 0.5 indicate uncertainty about direction. overlap is not a p-value, a confidence interval probability, or a literal area of overlap between two density curves.

Value

A data.frame with columns parameter, entity, estimate, pooled.SD, cohens.d, and overlap.

Author(s)

Greg Gloor, Justin Silverman


ALDEx3 documentation built on Oct. 20, 2026, 1:07 a.m.