dda.vardist: Direction Dependence Analysis: Variable Distributions
Description
dda.vardist evaluates patterns of asymmetry of variable
distributions for causally competing models
(y ~ x vs. x ~ y).
print returns DDA test statistics associated with dda.vardist objects.
Usage
dda.vardist(
formula,
pred = NULL,
data = list(),
B = 200,
boot.type = "perc",
conf.level = 0.95
)
# S3 method for dda.vardist
print(x, ...)
Value
An object of class dda.vardist containing the results of
direction dependence tests of variable distributions.
An object of class dda.vardist.
Arguments
formula
Symbolic formula of the model to be tested or a lmobject.
pred
Variable name of the predictor which serves as the outcome in the alternative model.
data
An optional data frame containing the variables in the
model (by default variables are taken from the environment
which dda.vardist is called from).
B
Number of bootstrap samples.
boot.type
A character indicating the type of bootstrap confidence intervals. Must be one of the two specifications c("perc", "bca"). boot.type = "perc" is the default.
conf.level
Confidence level for bootstrap confidence intervals.
x
An object of class dda.vardist when using print.
...
Additional arguments to be passed to the function.
References
Wiedermann, W., & von Eye, A. (2025). Direction Dependence Analysis: Foundations and Statistical Methods. Cambridge, UK: Cambridge University Press.
set.seed(123)
n <- 500
x <- rchisq(n, df = 4) - 4e <- rchisq(n, df = 3) - 3y <- 0.5 * x + e
d <- data.frame(x, y)
result <- dda.vardist(y ~ x, pred = "x", data = d, B = 50)
print(result)