DHARMa

Diagnostics for HierArchical Regression Models

View the Project on GitHub florianhartig/DHARMa

DHARMa support for phylolm

Model classes: phylolm, phyloglm.

Support: partial: supported for gaussian phylolm() and binary phyloglm(), with the limits below.

Checked on 2026-11-09 with DHARMa 0.5.2 (master), phylolm 2.6.5 and R 4.6.2. Evidence: sections of checks.R (run source("Code/DHARMaPackageSupport/phylolm/checks.R") from the repository root) and the package tests testModelTypes.R.

Support

Feature Status Evidence
phylolm() (models lambda, BM); phyloglm() (methods logistic_MPLE, logistic_IG10) supported checks.R, Model classes; testModelTypes.R, phylolm::pylolm/phyloglm
phyloglm(method = "poisson_GEE") not supported, simulateResiduals() stops (#478) checks.R, poisson_GEE
Simulations parametric bootstrap of phylolm (update(boot = nsim, save = TRUE)), i.e. one model fit per simulation; phylolm warnings from these fits are passed on checks.R, Model classes, Simulations
simulateREs no effect; the phylogenetic structure is always re-simulated checks.R, Simulations
Residual correlation residuals stay correlated (simulations re-simulate the phylogeny), so the uniformity test rejects too often for correct models. rotation = m$sigma2 * vcv(tree) (model = "BM", tip order) fixes this; rotation = "estimated" runs, but with the default n = 250 it is strongly anti-conservative (#489) checks.R, Residual correlation; #489
refit = TRUE supported; refit reproduces the fit when the response is given in tree tip order, as returned by getObservedResponse() checks.R, Model classes, Refit
Order of residuals order of the tree tips, not of the data (see Known problems) checks.R, Order of residuals
Pearson residuals not available: testDispersion(type = "PearsonChisq") stops; the default testDispersion() is supported checks.R, Pearson residuals and dispersion tests

Known problems

Not checked

Former scripts

archive/: phylolm.R (phyloglm() and phylolm() examples, rotation; now in Model classes and Residual correlation).