```
# NOT RUN {
# Generate some hypothetical data for a referent group and three focal groups:
set.seed(10)
refDat <- MASS::mvrnorm(n = 1000, mu = c(.5, .2),
Sigma = matrix(c(1, .5, .5, 1), 2, 2), empirical = TRUE)
foc1Dat <- MASS::mvrnorm(n = 1000, mu = c(-.5, -.2),
Sigma = matrix(c(1, .5, .5, 1), 2, 2), empirical = TRUE)
foc2Dat <- MASS::mvrnorm(n = 1000, mu = c(0, 0),
Sigma = matrix(c(1, .3, .3, 1), 2, 2), empirical = TRUE)
foc3Dat <- MASS::mvrnorm(n = 1000, mu = c(-.5, -.2),
Sigma = matrix(c(1, .3, .3, 1), 2, 2), empirical = TRUE)
colnames(refDat) <- colnames(foc1Dat) <- colnames(foc2Dat) <- colnames(foc3Dat) <- c("X", "Y")
dat <- rbind(cbind(G = 1, refDat), cbind(G = 2, foc1Dat),
cbind(G = 3, foc2Dat), cbind(G = 4, foc3Dat))
# Compute point estimates of parametric d_mod effect sizes:
compute_dmod(data = dat, group = "G", predictors = "X", criterion = "Y",
referent_id = 1, focal_id_vec = 2:4,
conf_level = .95, rescale_cdf = TRUE, parametric = TRUE,
bootstrap = FALSE)
# Compute point estimates of non-parametric d_mod effect sizes:
compute_dmod(data = dat, group = "G", predictors = "X", criterion = "Y",
referent_id = 1, focal_id_vec = 2:4,
conf_level = .95, rescale_cdf = TRUE, parametric = FALSE,
bootstrap = FALSE)
# Compute unstratified bootstrapped estimates of parametric d_mod effect sizes:
compute_dmod(data = dat, group = "G", predictors = "X", criterion = "Y",
referent_id = 1, focal_id_vec = 2:4,
conf_level = .95, rescale_cdf = TRUE, parametric = TRUE,
boot_iter = 10, bootstrap = TRUE, stratify = FALSE, empirical_ci = FALSE)
# Compute unstratified bootstrapped estimates of non-parametric d_mod effect sizes:
compute_dmod(data = dat, group = "G", predictors = "X", criterion = "Y",
referent_id = 1, focal_id_vec = 2:4,
conf_level = .95, rescale_cdf = TRUE, parametric = FALSE,
boot_iter = 10, bootstrap = TRUE, stratify = FALSE, empirical_ci = FALSE)
# }
```

Run the code above in your browser using DataLab