dda.resdist | R Documentation |
dda.resdist
evaluates patterns of asymmetry of error
distributions of causally competing models (y ~ x
vs. x ~ y
).
print
returns DDA test statistics associated with dda.resdist
objects.
dda.resdist(
formula,
pred = NULL,
data = list(),
B = 200,
boot.type = "perc",
prob.trans = FALSE,
conf.level = 0.95
)
## S3 method for class 'dda.resdist'
print(x, ...)
formula |
Symbolic formula of the target model to be tested or a |
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 |
B |
Number of bootstrap samples. |
boot.type |
A vector of character strings representing the type of
bootstrap confidence intervals required. Must be one of
the two values |
prob.trans |
A logical value indicating whether a probability integral transformation should be performed prior computation of skewness and kurtosis difference tests. |
conf.level |
Confidence level for bootstrap confidence intervals. |
x |
An object of class |
... |
Additional arguments to be passed to the method. |
An object of class ddaresdist
containing the results of DDA
tests of asymmetry patterns of error distributions obtained from
the causally competing models.
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) - 4
e <- rchisq(n, df = 3) - 3
y <- 0.5 * x + e
d <- data.frame(x, y)
result <- dda.resdist(y ~ x, pred = "x", data = d,
B = 50, conf.level = 0.90, prob.trans = TRUE)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.