Deconstructs a bivariate association between x and a difference score y1-y2 with SEM. A difference score correlation is indicative that slopes for y1 as function of x and y2 as function of x are non-parallel. Deconstructing the bivariate association to these slopes allows for understanding the pattern and magnitude of this non-parallelism.
ddsc_sem(
data,
x,
y1,
y2,
center_yvars = FALSE,
covariates = NULL,
estimator = "ML",
level = 0.95,
sampling.weights = NULL,
q_sesoi = 0,
min_cross_over_point_location = 0,
boot_ci = FALSE,
boot_n = 5000,
boot_ci_type = "perc"
)Means, standard deviations, and intercorrelations.
Parameter estimates from the structural equation model.
Variances and covariances of component scores.
Data frame with original and scaled variables used in SEM.
Summary of key results.
A data frame.
Character string. Variable name of independent variable.
Character string. Variable name of first component score of difference score.
Character string. Variable name of second component score of difference score.
Logical. Should y1 and y2 be centered around their grand mean? (Default FALSE)
Character string or vector. Variable names of covariates (Default NULL).
Character string. Estimator used in SEM (Default "ML").
Numeric. The confidence level required for the result output (Default .95)
Character string. Name of sampling weights variable.
Numeric. The smallest effect size of interest for Cohen's q estimates (Default 0; See Lakens et al. 2018).
Numeric. Z-score for the minimal slope cross-over point of interest (Default 0).
Logical. Calculate confidence intervals based on bootstrap (Default FALSE).
Numeric. How many bootstrap redraws (Default 5000).
If bootstrapping was used, the type of interval required. The value should be one of "norm", "basic", "perc" (default), or "bca.simple".
Edwards, J. R. (1995). Alternatives to Difference Scores as Dependent Variables in the Study of Congruence in Organizational Research. Organizational Behavior and Human Decision Processes, 64(3), 307–324.
Lakens, D., Scheel, A. M., & Isager, P. M. (2018). Equivalence Testing for Psychological Research: A Tutorial. Advances in Methods and Practices in Psychological Science, 1(2), 259–269. https://doi.org/10.1177/2515245918770963
if (FALSE) {
set.seed(342356)
d <- data.frame(
y1 = rnorm(50),
y2 = rnorm(50),
x = rnorm(50)
)
ddsc_sem(
data = d, y1 = "y1", y2 = "y2",
x = "x",
q_sesoi = 0.20,
min_cross_over_point_location = 1
)$results
}
Run the code above in your browser using DataLab