Skip to contents

For each claim X || Y in basis_set(), dsep() refits node Y with X added as a fixed-effect predictor to every modelled distributional component, and compares it to the base node fit by a likelihood-ratio test. A small p-value means X carries information about some component of Y beyond Y's parents, i.e. a missing arrow.

Usage

dsep(object, ...)

# S3 method for class 'drm_sem'
dsep(object, ...)

Arguments

object

A drm_sem object.

...

Unused.

Value

A data frame of claims with df, LR, and p.value, carrying a fisher_c attribute (see fisher_c()).

Details

This is the local-likelihood d-separation test of Shipley (2000, 2009), extended in drmSEM from a mean-only test to an any-component test (the claim that X is irrelevant to every modelled distributional parameter of Y). This any-component extension is a drmSEM construction; it has been calibrated against the family-grid data-generating processes in inst/calibration/.

Requires nodes fitted so that refits converge (the declarative drm_sem() requests standard errors automatically).

References

Shipley B (2000). “A New Inferential Test for Path Models Based on Directed Acyclic Graphs.” Structural Equation Modeling, 7(2), 206–218. doi:10.1207/S15328007SEM0702_4 .

Shipley B (2009). “Confirmatory Path Analysis in a Generalized Multilevel Context.” Ecology, 90(2), 363–368. doi:10.1890/08-1034.1 .

Lefcheck JS (2016). “piecewiseSEM: Piecewise Structural Equation Modelling in R for Ecology, Evolution, and Systematics.” Methods in Ecology and Evolution, 7(5), 573–579. doi:10.1111/2041-210X.12512 .

Pearl J (2009). Causality: Models, Reasoning, and Inference, 2nd edition. Cambridge University Press, Cambridge.

Examples

if (FALSE) { # \dontrun{
sem <- drm_sem(
  size = drm_node(drmTMB::bf(size ~ temp + habitat, sigma ~ temp),
                  family = stats::gaussian()),
  abundance = drm_node(drmTMB::bf(abundance ~ size + temp, zi ~ habitat),
                       family = drmTMB::nbinom2()),
  data = dat)
dsep(sem)
} # }