From 96af4bb4665621ec517ab385e989d91047d0e7f4 Mon Sep 17 00:00:00 2001 From: maltelueken Date: Wed, 20 Sep 2023 15:44:07 +0200 Subject: [PATCH] Add automated integration tests for all error-free hard-coded models --- tests/generate-tests.R | 153 + .../conceptual-path-plot-continuous-1.svg | 61 + .../conceptual-path-plot-continuous-10.svg | 76 + .../conceptual-path-plot-continuous-11.svg | 74 + .../conceptual-path-plot-continuous-12.svg | 76 + .../conceptual-path-plot-continuous-13.svg | 74 + .../conceptual-path-plot-continuous-14.svg | 69 + .../conceptual-path-plot-continuous-15.svg | 69 + .../conceptual-path-plot-continuous-16.svg | 76 + .../conceptual-path-plot-continuous-17.svg | 76 + .../conceptual-path-plot-continuous-18.svg | 74 + .../conceptual-path-plot-continuous-2.svg | 68 + .../conceptual-path-plot-continuous-21.svg | 76 + .../conceptual-path-plot-continuous-22.svg | 76 + .../conceptual-path-plot-continuous-28.svg | 76 + .../conceptual-path-plot-continuous-29.svg | 76 + .../conceptual-path-plot-continuous-3.svg | 66 + .../conceptual-path-plot-continuous-4.svg | 62 + .../conceptual-path-plot-continuous-5.svg | 69 + .../conceptual-path-plot-continuous-58.svg | 69 + .../conceptual-path-plot-continuous-59.svg | 69 + .../conceptual-path-plot-continuous-60.svg | 76 + .../conceptual-path-plot-continuous-61.svg | 76 + .../conceptual-path-plot-continuous-62.svg | 76 + .../conceptual-path-plot-continuous-63.svg | 76 + .../conceptual-path-plot-continuous-64.svg | 76 + .../conceptual-path-plot-continuous-65.svg | 76 + .../conceptual-path-plot-continuous-66.svg | 76 + .../conceptual-path-plot-continuous-67.svg | 76 + .../conceptual-path-plot-continuous-68.svg | 74 + .../conceptual-path-plot-continuous-7.svg | 69 + .../conceptual-path-plot-continuous-70.svg | 74 + .../conceptual-path-plot-continuous-72.svg | 74 + .../conceptual-path-plot-continuous-75.svg | 76 + .../conceptual-path-plot-continuous-76.svg | 76 + .../conceptual-path-plot-continuous-8.svg | 69 + .../conceptual-path-plot-continuous-82.svg | 90 + .../conceptual-path-plot-continuous-83.svg | 79 + .../conceptual-path-plot-continuous-84.svg | 79 + .../conceptual-path-plot-continuous-85.svg | 79 + .../conceptual-path-plot-continuous-86.svg | 79 + .../conceptual-path-plot-continuous-87.svg | 79 + .../conceptual-path-plot-continuous-88.svg | 79 + .../conceptual-path-plot-continuous-89.svg | 79 + .../conceptual-path-plot-continuous-9.svg | 76 + .../conceptual-path-plot-continuous-90.svg | 79 + .../conceptual-path-plot-continuous-91.svg | 79 + .../conceptual-path-plot-continuous-92.svg | 79 + .../conceptual-path-plot-factor-1.svg | 61 + .../conceptual-path-plot-factor-10.svg | 76 + .../conceptual-path-plot-factor-14.svg | 69 + .../conceptual-path-plot-factor-15.svg | 69 + .../conceptual-path-plot-factor-16.svg | 76 + .../conceptual-path-plot-factor-17.svg | 76 + .../conceptual-path-plot-factor-2.svg | 68 + .../conceptual-path-plot-factor-21.svg | 76 + .../conceptual-path-plot-factor-22.svg | 76 + .../conceptual-path-plot-factor-28.svg | 76 + .../conceptual-path-plot-factor-29.svg | 76 + .../conceptual-path-plot-factor-4.svg | 62 + .../conceptual-path-plot-factor-5.svg | 69 + .../conceptual-path-plot-factor-58.svg | 69 + .../conceptual-path-plot-factor-59.svg | 69 + .../conceptual-path-plot-factor-60.svg | 76 + .../conceptual-path-plot-factor-61.svg | 76 + .../conceptual-path-plot-factor-62.svg | 76 + .../conceptual-path-plot-factor-63.svg | 76 + .../conceptual-path-plot-factor-64.svg | 76 + .../conceptual-path-plot-factor-65.svg | 76 + .../conceptual-path-plot-factor-66.svg | 76 + .../conceptual-path-plot-factor-67.svg | 76 + .../conceptual-path-plot-factor-7.svg | 69 + .../conceptual-path-plot-factor-75.svg | 76 + .../conceptual-path-plot-factor-76.svg | 76 + .../conceptual-path-plot-factor-8.svg | 69 + .../conceptual-path-plot-factor-82.svg | 90 + .../conceptual-path-plot-factor-9.svg | 76 + .../statistical-path-plot-continuous-1.svg | 69 + .../statistical-path-plot-continuous-10.svg | 105 + .../statistical-path-plot-continuous-11.svg | 107 + .../statistical-path-plot-continuous-12.svg | 125 + .../statistical-path-plot-continuous-13.svg | 113 + .../statistical-path-plot-continuous-14.svg | 79 + .../statistical-path-plot-continuous-15.svg | 86 + .../statistical-path-plot-continuous-16.svg | 93 + .../statistical-path-plot-continuous-17.svg | 107 + .../statistical-path-plot-continuous-18.svg | 107 + .../statistical-path-plot-continuous-2.svg | 83 + .../statistical-path-plot-continuous-21.svg | 93 + .../statistical-path-plot-continuous-22.svg | 99 + .../statistical-path-plot-continuous-28.svg | 100 + .../statistical-path-plot-continuous-29.svg | 106 + .../statistical-path-plot-continuous-3.svg | 97 + .../statistical-path-plot-continuous-4.svg | 65 + .../statistical-path-plot-continuous-5.svg | 79 + .../statistical-path-plot-continuous-58.svg | 89 + .../statistical-path-plot-continuous-59.svg | 92 + .../statistical-path-plot-continuous-60.svg | 103 + .../statistical-path-plot-continuous-61.svg | 106 + .../statistical-path-plot-continuous-62.svg | 109 + .../statistical-path-plot-continuous-63.svg | 112 + .../statistical-path-plot-continuous-64.svg | 103 + .../statistical-path-plot-continuous-65.svg | 106 + .../statistical-path-plot-continuous-66.svg | 110 + .../statistical-path-plot-continuous-67.svg | 113 + .../statistical-path-plot-continuous-68.svg | 117 + .../statistical-path-plot-continuous-7.svg | 79 + .../statistical-path-plot-continuous-70.svg | 117 + .../statistical-path-plot-continuous-72.svg | 137 + .../statistical-path-plot-continuous-75.svg | 113 + .../statistical-path-plot-continuous-76.svg | 119 + .../statistical-path-plot-continuous-8.svg | 85 + .../statistical-path-plot-continuous-9.svg | 93 + .../statistical-path-plot-factor-1.svg | 69 + .../statistical-path-plot-factor-10.svg | 105 + .../statistical-path-plot-factor-14.svg | 79 + .../statistical-path-plot-factor-15.svg | 86 + .../statistical-path-plot-factor-16.svg | 93 + .../statistical-path-plot-factor-17.svg | 107 + .../statistical-path-plot-factor-2.svg | 83 + .../statistical-path-plot-factor-21.svg | 93 + .../statistical-path-plot-factor-22.svg | 99 + .../statistical-path-plot-factor-28.svg | 100 + .../statistical-path-plot-factor-29.svg | 106 + .../statistical-path-plot-factor-4.svg | 65 + .../statistical-path-plot-factor-5.svg | 79 + .../statistical-path-plot-factor-58.svg | 89 + .../statistical-path-plot-factor-59.svg | 92 + .../statistical-path-plot-factor-60.svg | 103 + .../statistical-path-plot-factor-61.svg | 106 + .../statistical-path-plot-factor-62.svg | 109 + .../statistical-path-plot-factor-63.svg | 112 + .../statistical-path-plot-factor-64.svg | 103 + .../statistical-path-plot-factor-65.svg | 106 + .../statistical-path-plot-factor-66.svg | 110 + .../statistical-path-plot-factor-67.svg | 113 + .../statistical-path-plot-factor-7.svg | 79 + .../statistical-path-plot-factor-75.svg | 113 + .../statistical-path-plot-factor-76.svg | 119 + .../statistical-path-plot-factor-8.svg | 85 + .../statistical-path-plot-factor-9.svg | 93 + .../test-classic-process-all-model-numbers.R | 16243 ++++++++++++++++ 142 files changed, 28348 insertions(+) create mode 100644 tests/generate-tests.R create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-1.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-10.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-11.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-12.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-13.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-14.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-15.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-16.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-17.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-18.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-2.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-21.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-22.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-28.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-29.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-3.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-4.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-5.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-58.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-59.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-60.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-61.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-62.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-63.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-64.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-65.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-66.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-67.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-68.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-7.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-70.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-72.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-75.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-76.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-8.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-82.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-83.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-84.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-85.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-86.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-87.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-88.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-89.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-9.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-90.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-91.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-92.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-1.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-10.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-14.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-15.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-16.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-17.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-2.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-21.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-22.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-28.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-29.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-4.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-5.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-58.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-59.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-60.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-61.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-62.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-63.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-64.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-65.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-66.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-67.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-7.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-75.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-76.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-8.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-82.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-9.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-1.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-10.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-11.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-12.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-13.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-14.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-15.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-16.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-17.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-18.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-2.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-21.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-22.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-28.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-29.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-3.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-4.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-5.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-58.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-59.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-60.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-61.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-62.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-63.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-64.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-65.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-66.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-67.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-68.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-7.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-70.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-72.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-75.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-76.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-8.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-9.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-1.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-10.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-14.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-15.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-16.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-17.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-2.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-21.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-22.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-28.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-29.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-4.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-5.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-58.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-59.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-60.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-61.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-62.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-63.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-64.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-65.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-66.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-67.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-7.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-75.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-76.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-8.svg create mode 100644 tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-9.svg create mode 100644 tests/testthat/test-classic-process-all-model-numbers.R diff --git a/tests/generate-tests.R b/tests/generate-tests.R new file mode 100644 index 0000000..78d892e --- /dev/null +++ b/tests/generate-tests.R @@ -0,0 +1,153 @@ +# Script for generating integration tests for all hard-coded models + +getOptionsOneModel <- function() { + options <- jaspTools::analysisOptions("ClassicProcess") + options[["dependent"]] <- "contNormal" + options[["covariates"]] <- list("contGamma", "contcor1", "contcor2", "debCollin1") + options[["factors"]] <- list("facGender", "facExperim") + + options[["moderationProbes"]] <- list( + list( + "probePercentile" = 16.0, + "value" = "16" + ), + list( + "probePercentile" = 50.0, + "value" = "50" + ), + list( + "probePercentile" = 84.0, + "value" = "84" + ) + ) + + options[["emulation"]] = "lavaan" + options[["errorCalculationMethod"]] = "standard" + options[["estimator"]] = "default" + options[["naAction"]] = "fiml" + + options[["pathPlotsLegend"]] = TRUE + options[["pathPlotsColor"]] = TRUE + options[["pathPlotsColorPalette"]] = "colorblind" + + options[["processModels"]] <- list( + list( + "conceptualPathPlot" = TRUE, + "independentCovariances" = TRUE, + "inputType" = "inputVariables", + "mediationEffects" = TRUE, + "mediatorCovariances" = TRUE, + "modelNumber" = 1, + "modelNumberCovariates" = list(), + "modelNumberIndependent" = "", + "modelNumberMediators" = list(), + "modelNumberModeratorW" = "", + "modelNumberModeratorZ" = "", + "name" = "Model 1", + "pathCoefficients" = TRUE, + "processRelationships" = list(), + "residualCovariances" = TRUE, + "statisticalPathPlot" = TRUE, + "totalEffects" = TRUE, + "localTests" = FALSE, + "localTestType" = "cis", + "localTestBootstrap" = FALSE, + "localTestBootstrapSamples" = 1000 + ) + ) + return(options) +} + + +replaceVariablesContinuous <- function(v) { + return(switch(v, + "JaspProcess_Dependent_Encoded" = "contNormal", + "JaspProcess_Independent_Encoded" = "contGamma", + "JaspProcess_Mediator_Encoded" = "debCollin1", + "JaspProcess_ModeratorW_Encoded" = "contcor1", + "JaspProcess_ModeratorZ_Encoded" = "contcor2", + v + )) +} + +replaceVariablesFactors <- function(v) { + return(switch(v, + "JaspProcess_Dependent_Encoded" = "contNormal", + "JaspProcess_Independent_Encoded" = "facGender", + "JaspProcess_Mediator_Encoded" = "debCollin1", + "JaspProcess_ModeratorW_Encoded" = "facExperim", + "JaspProcess_ModeratorZ_Encoded" = "contcor2", + v + )) +} + + +addProcessRelationshipsFromModelNumber <- function(k, options, replaceFun) { + + processRelationships <- jaspProcess:::.procGetHardCodedModel(k, 2) + processRelationships <- lapply(processRelationships, function(row) { + row <- lapply(row, replaceFun) + return(row) + }) + + options$processModels[[1]][["processRelationships"]] <- processRelationships + + return(options) +} + +polishCapturedCode <- function(out) { + out <- gsub("Now rendering a plot with name: conceptPathPlot", "", out) + out <- gsub("Now rendering a plot with name: statPathPlot", "", out) + out <- gsub("could not find an old plot", "", out) + out <- gsub("Did not store jaspResults", "", out) + out <- gsub("Created Write Seal for jaspResults at: ''", "", out) + out <- gsub(" analysisOptions", " jaspTools::analysisOptions", out) + out <- gsub(" runAnalysis", " jaspTools::runAnalysis", out) + out <- gsub("[\n]{4,}", "", out) + return(out) +} + +modelNumbers <- c( + 1,2,4,5,7,8,9,10,14,15,16,17, + 21,22,28,29,58,59,60,61,62,63,64,65,66,67, + 75,76,82,83,84,85,86,87,88,89,90,91,92 +) + +errorContinuous <- c() +errorFactor <- c() + +fileContext <- file("tests/testthat/test-classic-process-all-model-numbers.R") +header <- "# This code is automatically generated by 'generate-tests.R'" +testCode <- "context('Integration tests for variable input across all hard-coded model number settings')" +for (k in jaspProcess:::.procHardCodedModelNumbers()) { + if (k %in% c(6, 80, 81)) next + context <- paste0("\n\ncontext('Model number ", k, " - continuous')") + opts <- getOptionsOneModel() + opts <- addProcessRelationshipsFromModelNumber(k, opts, replaceVariablesContinuous) + out <- try(paste(capture.output(jaspTools::runAnalysis("ClassicProcess", "debug", opts, makeTests = TRUE)), collapse = "\n")) + if (!inherits(out, "try-error")) { + out <- polishCapturedCode(out) + out <- gsub("conceptual-path-plot", paste0("conceptual-path-plot-continuous-", k), out) + out <- gsub("statistical-path-plot", paste0("statistical-path-plot-continuous-", k), out) + testCode <- paste(testCode, context, out, sep = "\n") + } else { + cat("Continuous", k) + errorContinuous <- append(errorContinuous, k) + } + context <- paste0("\n\ncontext('Model number ", k, " - factors')") + opts <- getOptionsOneModel() + opts <- addProcessRelationshipsFromModelNumber(k, opts, replaceVariablesFactors) + out <- try(paste(capture.output(jaspTools::runAnalysis("ClassicProcess", "debug", opts, makeTests = TRUE)), collapse = "\n")) + if (!inherits(out, "try-error")) { + out <- polishCapturedCode(out) + out <- gsub("conceptual-path-plot", paste0("conceptual-path-plot-factor-", k), out) + out <- gsub("statistical-path-plot", paste0("statistical-path-plot-factor-", k), out) + testCode <- paste(testCode, context, out, sep = "\n") + } else { + cat("Factor", k) + errorFactor <- append(errorFactor, k) + } +} +writeLines(paste(header, testCode, sep = "\n\n"), fileContext) +close(fileContext) + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-1.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-1.svg new file mode 100644 index 0000000..47c9a3c --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-1.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +cn1 + + + +cn1 +cnG +cnN +contcor1 +contGamma +contNormal +conceptual-path-plot-continuous-1 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-10.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-10.svg new file mode 100644 index 0000000..4652cf9 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-10.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-10 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-11.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-11.svg new file mode 100644 index 0000000..7a528db --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-11.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-11 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-12.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-12.svg new file mode 100644 index 0000000..9c0dc36 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-12.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-12 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-13.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-13.svg new file mode 100644 index 0000000..9253781 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-13.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-13 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-14.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-14.svg new file mode 100644 index 0000000..d18d725 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-14.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 + + + +cn1 +cnG +cnN +dC1 +contcor1 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-14 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-15.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-15.svg new file mode 100644 index 0000000..f083052 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-15.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 + + + +cn1 +cnG +cnN +dC1 +contcor1 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-15 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-16.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-16.svg new file mode 100644 index 0000000..51a5fca --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-16.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-16 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-17.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-17.svg new file mode 100644 index 0000000..a64b5d9 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-17.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-17 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-18.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-18.svg new file mode 100644 index 0000000..10a882b --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-18.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-18 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-2.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-2.svg new file mode 100644 index 0000000..6652b0c --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-2.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +contcor1 +contcor2 +contGamma +contNormal +conceptual-path-plot-continuous-2 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-21.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-21.svg new file mode 100644 index 0000000..7953d8d --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-21.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn2 +cn1 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-21 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-22.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-22.svg new file mode 100644 index 0000000..30fab61 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-22.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-22 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-28.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-28.svg new file mode 100644 index 0000000..33bbd8f --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-28.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn2 +cn1 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-28 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-29.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-29.svg new file mode 100644 index 0000000..b9f8981 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-29.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-29 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-3.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-3.svg new file mode 100644 index 0000000..0cff3a4 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-3.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +contcor1 +contcor2 +contGamma +contNormal +conceptual-path-plot-continuous-3 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-4.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-4.svg new file mode 100644 index 0000000..5cfff6d --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-4.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 + + + +cnG +cnN +dC1 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-4 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-5.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-5.svg new file mode 100644 index 0000000..2df147d --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-5.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 + + + +cn1 +cnG +cnN +dC1 +contcor1 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-5 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-58.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-58.svg new file mode 100644 index 0000000..aa441ce --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-58.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 + + + +cn1 +cnG +cnN +dC1 +contcor1 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-58 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-59.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-59.svg new file mode 100644 index 0000000..6ba6d32 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-59.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 + + + +cn1 +cnG +cnN +dC1 +contcor1 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-59 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-60.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-60.svg new file mode 100644 index 0000000..b2beb0a --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-60.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-60 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-61.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-61.svg new file mode 100644 index 0000000..7ccacec --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-61.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-61 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-62.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-62.svg new file mode 100644 index 0000000..43e8435 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-62.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-62 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-63.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-63.svg new file mode 100644 index 0000000..d1da31b --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-63.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-63 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-64.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-64.svg new file mode 100644 index 0000000..d73779a --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-64.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-64 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-65.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-65.svg new file mode 100644 index 0000000..618afa4 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-65.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-65 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-66.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-66.svg new file mode 100644 index 0000000..9902afb --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-66.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-66 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-67.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-67.svg new file mode 100644 index 0000000..50ec76b --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-67.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-67 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-68.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-68.svg new file mode 100644 index 0000000..c803249 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-68.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-68 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-7.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-7.svg new file mode 100644 index 0000000..e045477 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-7.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 + + + +cn1 +cnG +cnN +dC1 +contcor1 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-7 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-70.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-70.svg new file mode 100644 index 0000000..6b76748 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-70.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-70 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-72.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-72.svg new file mode 100644 index 0000000..7a3d5c2 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-72.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-72 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-75.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-75.svg new file mode 100644 index 0000000..d8636ca --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-75.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-75 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-76.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-76.svg new file mode 100644 index 0000000..e888dd2 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-76.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-76 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-8.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-8.svg new file mode 100644 index 0000000..25ede45 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-8.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 + + + +cn1 +cnG +cnN +dC1 +contcor1 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-8 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-82.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-82.svg new file mode 100644 index 0000000..a3abae7 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-82.svg @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +M3 +M4 + + + +cnG +cnN +M1 +M2 +M3 +M4 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +JaspProcess_Mediator_Encoded3 +JaspProcess_Mediator_Encoded4 +conceptual-path-plot-continuous-82 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-83.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-83.svg new file mode 100644 index 0000000..26aa421 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-83.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +cn1 + + + +cn1 +cnG +cnN +M1 +M2 +contcor1 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +conceptual-path-plot-continuous-83 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-84.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-84.svg new file mode 100644 index 0000000..8fc5a59 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-84.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +cn1 + + + +cn1 +cnG +cnN +M1 +M2 +contcor1 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +conceptual-path-plot-continuous-84 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-85.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-85.svg new file mode 100644 index 0000000..51cedbc --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-85.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +cn1 + + + +cn1 +cnG +cnN +M1 +M2 +contcor1 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +conceptual-path-plot-continuous-85 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-86.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-86.svg new file mode 100644 index 0000000..82ea29d --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-86.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +cn1 + + + +cn1 +cnG +cnN +M1 +M2 +contcor1 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +conceptual-path-plot-continuous-86 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-87.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-87.svg new file mode 100644 index 0000000..8b28f0d --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-87.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +cn1 + + + +cn1 +cnG +cnN +M1 +M2 +contcor1 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +conceptual-path-plot-continuous-87 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-88.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-88.svg new file mode 100644 index 0000000..4dd625a --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-88.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +cn1 + + + +cn1 +cnG +cnN +M1 +M2 +contcor1 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +conceptual-path-plot-continuous-88 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-89.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-89.svg new file mode 100644 index 0000000..bc9b296 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-89.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +cn1 + + + +cn1 +cnG +cnN +M1 +M2 +contcor1 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +conceptual-path-plot-continuous-89 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-9.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-9.svg new file mode 100644 index 0000000..a6d5ab2 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-9.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +dC1 +cn1 +cn2 + + + +cn1 +cn2 +cnG +cnN +dC1 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +conceptual-path-plot-continuous-9 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-90.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-90.svg new file mode 100644 index 0000000..c860e37 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-90.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +cn1 + + + +cn1 +cnG +cnN +M1 +M2 +contcor1 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +conceptual-path-plot-continuous-90 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-91.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-91.svg new file mode 100644 index 0000000..0c21088 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-91.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +cn1 + + + +cn1 +cnG +cnN +M1 +M2 +contcor1 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +conceptual-path-plot-continuous-91 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-92.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-92.svg new file mode 100644 index 0000000..41252e5 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-continuous-92.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cnG +cnN +M1 +M2 +cn1 + + + +cn1 +cnG +cnN +M1 +M2 +contcor1 +contGamma +contNormal +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +conceptual-path-plot-continuous-92 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-1.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-1.svg new file mode 100644 index 0000000..78d0f87 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-1.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +fcE + + + +cnN +fcE +fcG +contNormal +facExperim +facGender +conceptual-path-plot-factor-1 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-10.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-10.svg new file mode 100644 index 0000000..81e6990 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-10.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-10 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-14.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-14.svg new file mode 100644 index 0000000..61069f4 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-14.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE + + + +cnN +dC1 +fcE +fcG +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-14 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-15.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-15.svg new file mode 100644 index 0000000..4c66f2f --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-15.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE + + + +cnN +dC1 +fcE +fcG +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-15 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-16.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-16.svg new file mode 100644 index 0000000..d85005e --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-16.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-16 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-17.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-17.svg new file mode 100644 index 0000000..7ee530c --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-17.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-17 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-2.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-2.svg new file mode 100644 index 0000000..48fb1c2 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-2.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +fcE +cn2 + + + +cn2 +cnN +fcE +fcG +contcor2 +contNormal +facExperim +facGender +conceptual-path-plot-factor-2 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-21.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-21.svg new file mode 100644 index 0000000..7ff7cea --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-21.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +cn2 +fcE + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-21 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-22.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-22.svg new file mode 100644 index 0000000..fd0e86f --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-22.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-22 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-28.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-28.svg new file mode 100644 index 0000000..e93af90 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-28.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +cn2 +fcE + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-28 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-29.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-29.svg new file mode 100644 index 0000000..216bb13 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-29.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-29 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-4.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-4.svg new file mode 100644 index 0000000..e7eecad --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-4.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 + + + +cnN +dC1 +fcG +contNormal +debCollin1 +facGender +conceptual-path-plot-factor-4 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-5.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-5.svg new file mode 100644 index 0000000..a491a2b --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-5.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE + + + +cnN +dC1 +fcE +fcG +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-5 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-58.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-58.svg new file mode 100644 index 0000000..470e88a --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-58.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE + + + +cnN +dC1 +fcE +fcG +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-58 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-59.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-59.svg new file mode 100644 index 0000000..77dbb5b --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-59.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE + + + +cnN +dC1 +fcE +fcG +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-59 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-60.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-60.svg new file mode 100644 index 0000000..84193c3 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-60.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-60 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-61.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-61.svg new file mode 100644 index 0000000..ac01e76 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-61.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-61 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-62.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-62.svg new file mode 100644 index 0000000..c25121b --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-62.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-62 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-63.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-63.svg new file mode 100644 index 0000000..c671eb5 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-63.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-63 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-64.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-64.svg new file mode 100644 index 0000000..ee58c40 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-64.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-64 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-65.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-65.svg new file mode 100644 index 0000000..0c95306 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-65.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-65 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-66.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-66.svg new file mode 100644 index 0000000..8597fc7 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-66.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-66 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-67.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-67.svg new file mode 100644 index 0000000..faf2b04 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-67.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-67 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-7.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-7.svg new file mode 100644 index 0000000..524e809 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-7.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE + + + +cnN +dC1 +fcE +fcG +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-7 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-75.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-75.svg new file mode 100644 index 0000000..e30e7b9 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-75.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-75 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-76.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-76.svg new file mode 100644 index 0000000..427768a --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-76.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-76 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-8.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-8.svg new file mode 100644 index 0000000..fd7b5f3 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-8.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE + + + +cnN +dC1 +fcE +fcG +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-8 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-82.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-82.svg new file mode 100644 index 0000000..c229911 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-82.svg @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +M1 +M2 +M3 +M4 + + + +cnN +fcG +M1 +M2 +M3 +M4 +contNormal +facGender +JaspProcess_Mediator_Encoded1 +JaspProcess_Mediator_Encoded2 +JaspProcess_Mediator_Encoded3 +JaspProcess_Mediator_Encoded4 +conceptual-path-plot-factor-82 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-9.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-9.svg new file mode 100644 index 0000000..f24c516 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/conceptual-path-plot-factor-9.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fcG +cnN +dC1 +fcE +cn2 + + + +cn2 +cnN +dC1 +fcE +fcG +contcor2 +contNormal +debCollin1 +facExperim +facGender +conceptual-path-plot-factor-9 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-1.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-1.svg new file mode 100644 index 0000000..d7ee0b0 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-1.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +c12 +c13 +cnG +cnN +cn1 +cG: + + + +cn1 +cnG +cG: +cnN +contcor1 +contGamma +contGamma:contcor1 +contNormal +statistical-path-plot-continuous-1 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-10.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-10.svg new file mode 100644 index 0000000..494a495 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-10.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a14 +a15 +b11 +a11 +c12 +c13 +c14 +c15 +a12 +a13 +cnG +cnN +dC1 +cn1 +cn2 +cG:1 +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dC1 +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +statistical-path-plot-continuous-10 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-11.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-11.svg new file mode 100644 index 0000000..c16301b --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-11.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +a12 +a13 +a14 +a15 +a16 +a17 +cnG +cnN +dC1 +cn1 +cn2 +cG:1: +cnG:1 +cG:2 +c1: + + + +cn1 +c1: +cn2 +cnG +cnG:1 +cG:1: +cG:2 +cnN +dC1 +contcor1 +contcor1:contcor2 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor1:contcor2 +contGamma:contcor2 +contNormal +debCollin1 +statistical-path-plot-continuous-11 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-12.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-12.svg new file mode 100644 index 0000000..c8eada7 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-12.svg @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a12 +a13 +a14 +a15 +a16 +a17 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +c17 +cnG +cnN +dC1 +cn1 +cn2 +cG:1: +cnG:1 +cG:2 +c1: + + + +cn1 +c1: +cn2 +cnG +cnG:1 +cG:1: +cG:2 +cnN +dC1 +contcor1 +contcor1:contcor2 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor1:contcor2 +contGamma:contcor2 +contNormal +debCollin1 +statistical-path-plot-continuous-12 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-13.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-13.svg new file mode 100644 index 0000000..9df0631 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-13.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a16 +a17 +b11 +a11 +c12 +c13 +a12 +a13 +a14 +a15 +cnG +cnN +dC1 +cn1 +cnG:1 +cn2 +cG:1: +cG:2 +c1: + + + +cn1 +c1: +cn2 +cnG +cnG:1 +cG:1: +cG:2 +cnN +dC1 +contcor1 +contcor1:contcor2 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor1:contcor2 +contGamma:contcor2 +contNormal +debCollin1 +statistical-path-plot-continuous-13 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-14.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-14.svg new file mode 100644 index 0000000..09abaf0 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-14.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +cnG +cnN +dbC1 +cn1 +dC1: + + + +cn1 +cnG +cnN +dbC1 +dC1: +contcor1 +contGamma +contNormal +debCollin1 +debCollin1:contcor1 +statistical-path-plot-continuous-14 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-15.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-15.svg new file mode 100644 index 0000000..53e0bed --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-15.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +cnG +cnN +dbC1 +cn1 +dC1: +cG: + + + +cn1 +cnG +cG: +cnN +dbC1 +dC1: +contcor1 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +debCollin1:contcor1 +statistical-path-plot-continuous-15 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-16.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-16.svg new file mode 100644 index 0000000..bf39227 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-16.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +c15 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1 +dC1:2 + + + +cn1 +cn2 +cnG +cnN +dbC1 +dC1:1 +dC1:2 +contcor1 +contcor2 +contGamma +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor2 +statistical-path-plot-continuous-16 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-17.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-17.svg new file mode 100644 index 0000000..e64dd4d --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-17.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +c17 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1 +cG:1 +dC1:2 +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1:1 +dC1:2 +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor2 +statistical-path-plot-continuous-17 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-18.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-18.svg new file mode 100644 index 0000000..dcb2915 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-18.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +c17 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1: +dbC1:1 +dC1:2 +c1: + + + +cn1 +c1: +cn2 +cnG +cnN +dbC1 +dbC1:1 +dC1:1: +dC1:2 +contcor1 +contcor1:contcor2 +contcor2 +contGamma +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor1:contcor2 +debCollin1:contcor2 +statistical-path-plot-continuous-18 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-2.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-2.svg new file mode 100644 index 0000000..cc3f12d --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-2.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +c12 +c13 +c14 +c15 +cnG +cnN +cn1 +cn2 +cG:1 +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +statistical-path-plot-continuous-2 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-21.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-21.svg new file mode 100644 index 0000000..e6bb2b7 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-21.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +a12 +a13 +cnG +cnN +dbC1 +cn2 +dC1: +cn1 +cG: + + + +cn1 +cn2 +cnG +cG: +cnN +dbC1 +dC1: +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +debCollin1:contcor2 +statistical-path-plot-continuous-21 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-22.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-22.svg new file mode 100644 index 0000000..0c4ff3d --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-22.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +c15 +a12 +a13 +cnG +cnN +dbC1 +cn1 +cn2 +cG: +dC1: + + + +cn1 +cn2 +cnG +cG: +cnN +dbC1 +dC1: +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +debCollin1:contcor2 +statistical-path-plot-continuous-22 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-28.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-28.svg new file mode 100644 index 0000000..e15d565 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-28.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +a12 +a13 +cnG +cnN +dbC1 +cn2 +dC1: +cG:2 +cn1 +cG:1 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1: +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +statistical-path-plot-continuous-28 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-29.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-29.svg new file mode 100644 index 0000000..4dc7f08 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-29.svg @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a13 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +a12 +cnG +cnN +dbC1 +cn1 +cn2 +cG:1 +dC1: +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1: +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +statistical-path-plot-continuous-29 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-3.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-3.svg new file mode 100644 index 0000000..017c31b --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-3.svg @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +c12 +c13 +c14 +c15 +c16 +c17 +cnG +cnN +cn1 +cn2 +cG:1: +cnG:1 +cG:2 +c1: + + + +cn1 +c1: +cn2 +cnG +cnG:1 +cG:1: +cG:2 +cnN +contcor1 +contcor1:contcor2 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor1:contcor2 +contGamma:contcor2 +contNormal +statistical-path-plot-continuous-3 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-4.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-4.svg new file mode 100644 index 0000000..20508d7 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-4.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +cnG +cnN +dC1 + + + +cnG +cnN +dC1 +contGamma +contNormal +debCollin1 +statistical-path-plot-continuous-4 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-5.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-5.svg new file mode 100644 index 0000000..98f91c0 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-5.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +cnG +cnN +dC1 +cn1 +cG: + + + +cn1 +cnG +cG: +cnN +dC1 +contcor1 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +statistical-path-plot-continuous-5 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-58.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-58.svg new file mode 100644 index 0000000..367b05c --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-58.svg @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +a12 +a13 +cnG +cnN +dbC1 +cn1 +dC1: +cG: + + + +cn1 +cnG +cG: +cnN +dbC1 +dC1: +contcor1 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +debCollin1:contcor1 +statistical-path-plot-continuous-58 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-59.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-59.svg new file mode 100644 index 0000000..a2380fb --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-59.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +a12 +a13 +cnG +cnN +dbC1 +cn1 +dC1: +cG: + + + +cn1 +cnG +cG: +cnN +dbC1 +dC1: +contcor1 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +debCollin1:contcor1 +statistical-path-plot-continuous-59 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-60.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-60.svg new file mode 100644 index 0000000..a50d355 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-60.svg @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +a12 +a13 +a14 +a15 +cnG +cnN +dbC1 +cn1 +dC1: +cn2 +cG:1 +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1: +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +statistical-path-plot-continuous-60 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-61.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-61.svg new file mode 100644 index 0000000..5b142e2 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-61.svg @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a15 +b11 +a11 +c12 +c13 +c14 +a12 +a13 +a14 +cnG +cnN +dbC1 +cn1 +dC1: +cG:1 +cn2 +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1: +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +statistical-path-plot-continuous-61 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-62.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-62.svg new file mode 100644 index 0000000..d5db9aa --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-62.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a14 +a15 +b11 +a11 +c12 +c13 +c14 +c15 +a12 +a13 +cnG +cnN +dbC1 +cn1 +cn2 +dC1: +cG:2 +cG:1 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1: +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +statistical-path-plot-continuous-62 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-63.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-63.svg new file mode 100644 index 0000000..3d1f539 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-63.svg @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a13 +a14 +a15 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +a12 +cnG +cnN +dbC1 +cn1 +cn2 +dC1: +cG:1 +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1: +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +statistical-path-plot-continuous-63 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-64.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-64.svg new file mode 100644 index 0000000..30c47f7 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-64.svg @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +c15 +a12 +a13 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1 +dC1:2 +cG: + + + +cn1 +cn2 +cnG +cG: +cnN +dbC1 +dC1:1 +dC1:2 +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor2 +statistical-path-plot-continuous-64 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-65.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-65.svg new file mode 100644 index 0000000..6cbfed4 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-65.svg @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a13 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +a12 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1 +cG: +dC1:2 + + + +cn1 +cn2 +cnG +cG: +cnN +dbC1 +dC1:1 +dC1:2 +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor2 +statistical-path-plot-continuous-65 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-66.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-66.svg new file mode 100644 index 0000000..71bdbf3 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-66.svg @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a13 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +a12 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1 +dC1:2 +cG:2 +cG:1 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1:1 +dC1:2 +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor2 +statistical-path-plot-continuous-66 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-67.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-67.svg new file mode 100644 index 0000000..87d59d9 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-67.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a12 +a13 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +c17 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1 +cG:1 +dC1:2 +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1:1 +dC1:2 +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor2 +statistical-path-plot-continuous-67 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-68.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-68.svg new file mode 100644 index 0000000..1b61e7d --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-68.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a16 +a17 +b11 +a11 +c12 +c13 +a12 +a13 +a14 +a15 +cnG +cnN +dbC1 +cn1 +dC1: +cn2 +cG:1: +cnG:1 +cG:2 +c1: + + + +cn1 +c1: +cn2 +cnG +cnG:1 +cG:1: +cG:2 +cnN +dbC1 +dC1: +contcor1 +contcor1:contcor2 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor1:contcor2 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +statistical-path-plot-continuous-68 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-7.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-7.svg new file mode 100644 index 0000000..fccb340 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-7.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +a12 +a13 +cnG +cnN +dC1 +cn1 +cG: + + + +cn1 +cnG +cG: +cnN +dC1 +contcor1 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +statistical-path-plot-continuous-7 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-70.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-70.svg new file mode 100644 index 0000000..71aa527 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-70.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a12 +a13 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +c17 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1: +dbC1:1 +dC1:2 +c1: +cG: + + + +cn1 +c1: +cn2 +cnG +cG: +cnN +dbC1 +dbC1:1 +dC1:1: +dC1:2 +contcor1 +contcor1:contcor2 +contcor2 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor1:contcor2 +debCollin1:contcor2 +statistical-path-plot-continuous-70 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-72.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-72.svg new file mode 100644 index 0000000..520e8a8 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-72.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a12 +a13 +a14 +a15 +a16 +a17 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +c17 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1: +dbC1:1 +dC1:2 +c1: +cG:1: +cnG:1 +cG:2 + + + +cn1 +c1: +cn2 +cnG +cnG:1 +cG:1: +cG:2 +cnN +dbC1 +dbC1:1 +dC1:1: +dC1:2 +contcor1 +contcor1:contcor2 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor1:contcor2 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor1:contcor2 +debCollin1:contcor2 +statistical-path-plot-continuous-72 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-75.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-75.svg new file mode 100644 index 0000000..02db07a --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-75.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a14 +a15 +b11 +a11 +c12 +c13 +c14 +c15 +a12 +a13 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1 +dC1:2 +cG:1 +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1:1 +dC1:2 +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor2 +statistical-path-plot-continuous-75 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-76.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-76.svg new file mode 100644 index 0000000..3ab6769 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-76.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a12 +a13 +a14 +a15 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +c17 +cnG +cnN +dbC1 +cn1 +cn2 +dC1:1 +cG:1 +dC1:2 +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dbC1 +dC1:1 +dC1:2 +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +debCollin1:contcor1 +debCollin1:contcor2 +statistical-path-plot-continuous-76 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-8.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-8.svg new file mode 100644 index 0000000..4d9b2e9 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-8.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +a12 +a13 +cnG +cnN +dC1 +cn1 +cG: + + + +cn1 +cnG +cG: +cnN +dC1 +contcor1 +contGamma +contGamma:contcor1 +contNormal +debCollin1 +statistical-path-plot-continuous-8 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-9.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-9.svg new file mode 100644 index 0000000..e12ef4a --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-continuous-9.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +a12 +a13 +a14 +a15 +cnG +cnN +dC1 +cn1 +cn2 +cG:1 +cG:2 + + + +cn1 +cn2 +cnG +cG:1 +cG:2 +cnN +dC1 +contcor1 +contcor2 +contGamma +contGamma:contcor1 +contGamma:contcor2 +contNormal +debCollin1 +statistical-path-plot-continuous-9 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-1.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-1.svg new file mode 100644 index 0000000..859e289 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-1.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +c12 +c13 +fcG +cnN +fcE +fG: + + + +cnN +fcE +fcG +fG: +contNormal +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-1 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-10.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-10.svg new file mode 100644 index 0000000..31c78f0 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-10.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a14 +a15 +b11 +a11 +c12 +c13 +c14 +c15 +a12 +a13 +fcG +cnN +dC1 +fcE +cn2 +fG:E +fG:2 + + + +cn2 +cnN +dC1 +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-10 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-14.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-14.svg new file mode 100644 index 0000000..2f33ecf --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-14.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +fcG +cnN +dbC1 +fcE +dC1: + + + +cnN +dbC1 +dC1: +fcE +fcG +contNormal +debCollin1 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +statistical-path-plot-factor-14 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-15.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-15.svg new file mode 100644 index 0000000..7935f3a --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-15.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +fcG +cnN +dbC1 +fcE +dC1: +fG: + + + +cnN +dbC1 +dC1: +fcE +fcG +fG: +contNormal +debCollin1 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-15 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-16.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-16.svg new file mode 100644 index 0000000..eb9aa70 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-16.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +c15 +fcG +cnN +dbC1 +fcE +cn2 +dC1:E +dC1:2 + + + +cn2 +cnN +dbC1 +dC1:2 +dC1:E +fcE +fcG +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +statistical-path-plot-factor-16 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-17.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-17.svg new file mode 100644 index 0000000..3e3979a --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-17.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +c17 +fcG +cnN +dbC1 +fcE +cn2 +dC1:E +fG:E +dC1:2 +fG:2 + + + +cn2 +cnN +dbC1 +dC1:2 +dC1:E +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-17 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-2.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-2.svg new file mode 100644 index 0000000..6af9f91 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-2.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +c12 +c13 +c14 +c15 +fcG +cnN +fcE +cn2 +fG:E +fG:2 + + + +cn2 +cnN +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-2 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-21.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-21.svg new file mode 100644 index 0000000..9e2caae --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-21.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +a12 +a13 +fcG +cnN +dbC1 +cn2 +dC1: +fcE +fG: + + + +cn2 +cnN +dbC1 +dC1: +fcE +fcG +fG: +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-21 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-22.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-22.svg new file mode 100644 index 0000000..ff638a0 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-22.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +c15 +a12 +a13 +fcG +cnN +dbC1 +fcE +cn2 +fG: +dC1: + + + +cn2 +cnN +dbC1 +dC1: +fcE +fcG +fG: +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-22 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-28.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-28.svg new file mode 100644 index 0000000..5765a92 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-28.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +a12 +a13 +fcG +cnN +dbC1 +cn2 +dC1: +fG:2 +fcE +fG:E + + + +cn2 +cnN +dbC1 +dC1: +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-28 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-29.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-29.svg new file mode 100644 index 0000000..a0c3200 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-29.svg @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a13 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +a12 +fcG +cnN +dbC1 +fcE +cn2 +fG:E +dC1: +fG:2 + + + +cn2 +cnN +dbC1 +dC1: +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-29 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-4.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-4.svg new file mode 100644 index 0000000..62af497 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-4.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +fcG +cnN +dC1 + + + +cnN +dC1 +fcG +contNormal +debCollin1 +facGenderm +statistical-path-plot-factor-4 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-5.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-5.svg new file mode 100644 index 0000000..5564076 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-5.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +fcG +cnN +dC1 +fcE +fG: + + + +cnN +dC1 +fcE +fcG +fG: +contNormal +debCollin1 +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-5 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-58.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-58.svg new file mode 100644 index 0000000..a87a6a5 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-58.svg @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +a12 +a13 +fcG +cnN +dbC1 +fcE +dC1: +fG: + + + +cnN +dbC1 +dC1: +fcE +fcG +fG: +contNormal +debCollin1 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-58 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-59.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-59.svg new file mode 100644 index 0000000..fc345a9 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-59.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +a12 +a13 +fcG +cnN +dbC1 +fcE +dC1: +fG: + + + +cnN +dbC1 +dC1: +fcE +fcG +fG: +contNormal +debCollin1 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-59 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-60.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-60.svg new file mode 100644 index 0000000..ea573d3 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-60.svg @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +a12 +a13 +a14 +a15 +fcG +cnN +dbC1 +fcE +dC1: +cn2 +fG:E +fG:2 + + + +cn2 +cnN +dbC1 +dC1: +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-60 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-61.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-61.svg new file mode 100644 index 0000000..3756aa2 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-61.svg @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a15 +b11 +a11 +c12 +c13 +c14 +a12 +a13 +a14 +fcG +cnN +dbC1 +fcE +dC1: +fG:E +cn2 +fG:2 + + + +cn2 +cnN +dbC1 +dC1: +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-61 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-62.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-62.svg new file mode 100644 index 0000000..c2d75bc --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-62.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a14 +a15 +b11 +a11 +c12 +c13 +c14 +c15 +a12 +a13 +fcG +cnN +dbC1 +fcE +cn2 +dC1: +fG:2 +fG:E + + + +cn2 +cnN +dbC1 +dC1: +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-62 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-63.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-63.svg new file mode 100644 index 0000000..76203d7 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-63.svg @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a13 +a14 +a15 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +a12 +fcG +cnN +dbC1 +fcE +cn2 +dC1: +fG:E +fG:2 + + + +cn2 +cnN +dbC1 +dC1: +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-63 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-64.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-64.svg new file mode 100644 index 0000000..883f359 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-64.svg @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +c14 +c15 +a12 +a13 +fcG +cnN +dbC1 +fcE +cn2 +dC1:E +dC1:2 +fG: + + + +cn2 +cnN +dbC1 +dC1:2 +dC1:E +fcE +fcG +fG: +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-64 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-65.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-65.svg new file mode 100644 index 0000000..7feea28 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-65.svg @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a13 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +a12 +fcG +cnN +dbC1 +fcE +cn2 +dC1:E +fG: +dC1:2 + + + +cn2 +cnN +dbC1 +dC1:2 +dC1:E +fcE +fcG +fG: +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-65 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-66.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-66.svg new file mode 100644 index 0000000..75b0d70 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-66.svg @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a13 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +a12 +fcG +cnN +dbC1 +fcE +cn2 +dC1:E +dC1:2 +fG:2 +fG:E + + + +cn2 +cnN +dbC1 +dC1:2 +dC1:E +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-66 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-67.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-67.svg new file mode 100644 index 0000000..15633dc --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-67.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a12 +a13 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +c17 +fcG +cnN +dbC1 +fcE +cn2 +dC1:E +fG:E +dC1:2 +fG:2 + + + +cn2 +cnN +dbC1 +dC1:2 +dC1:E +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-67 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-7.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-7.svg new file mode 100644 index 0000000..c6abf49 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-7.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +a12 +a13 +fcG +cnN +dC1 +fcE +fG: + + + +cnN +dC1 +fcE +fcG +fG: +contNormal +debCollin1 +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-7 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-75.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-75.svg new file mode 100644 index 0000000..8beb109 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-75.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a14 +a15 +b11 +a11 +c12 +c13 +c14 +c15 +a12 +a13 +fcG +cnN +dbC1 +fcE +cn2 +dC1:E +dC1:2 +fG:E +fG:2 + + + +cn2 +cnN +dbC1 +dC1:2 +dC1:E +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-75 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-76.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-76.svg new file mode 100644 index 0000000..dd01c4a --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-76.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +a12 +a13 +a14 +a15 +b11 +a11 +c12 +c13 +c14 +c15 +c16 +c17 +fcG +cnN +dbC1 +fcE +cn2 +dC1:E +fG:E +dC1:2 +fG:2 + + + +cn2 +cnN +dbC1 +dC1:2 +dC1:E +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +debCollin1:contcor2 +debCollin1:facExperimexperimental +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-76 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-8.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-8.svg new file mode 100644 index 0000000..21d30e7 --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-8.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +c12 +c13 +a12 +a13 +fcG +cnN +dC1 +fcE +fG: + + + +cnN +dC1 +fcE +fcG +fG: +contNormal +debCollin1 +facExperimexperimental +facGenderm +facGenderm:facExperimexperimental +statistical-path-plot-factor-8 + + diff --git a/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-9.svg b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-9.svg new file mode 100644 index 0000000..16d3d9d --- /dev/null +++ b/tests/testthat/_snaps/classic-process-all-model-numbers/statistical-path-plot-factor-9.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +c11 +b11 +a11 +a12 +a13 +a14 +a15 +fcG +cnN +dC1 +fcE +cn2 +fG:E +fG:2 + + + +cn2 +cnN +dC1 +fcE +fcG +fG:2 +fG:E +contcor2 +contNormal +debCollin1 +facExperimexperimental +facGenderm +facGenderm:contcor2 +facGenderm:facExperimexperimental +statistical-path-plot-factor-9 + + diff --git a/tests/testthat/test-classic-process-all-model-numbers.R b/tests/testthat/test-classic-process-all-model-numbers.R new file mode 100644 index 0000000..a572439 --- /dev/null +++ b/tests/testthat/test-classic-process-all-model-numbers.R @@ -0,0 +1,16243 @@ +# This code is automatically generated by 'generate-tests.R' + +context('Integration tests for variable input across all hard-coded model number settings') + + +context('Model number 1 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(961.745418062142, 987.797119922023, 107.886787715035, 2, 1, 100, + 3.73836509074249e-24, 0, 107.886787715035, 2)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 1)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.54484792362443, 0.0642084782767115, -0.240319722673859, "contcor1", + "", 0.121932249919597, "contGamma", 0.155374386138037, + -1.5467138995507, 0.776405648736058, 1.37186546692035, 1.07413555782821, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.151905806147768, 7.07106321389276, 1.68041031229754, 2.9691891103701, + 2.32479971133382, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776142887901, 7.07107179649127, 0.732634493670788, + 1.29452360598141, 1.0135790498261, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341693200163, 7.07106932531297 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.165693533068991, 0.204085555134478, 16, 0.0191960110327434, + "contGamma", "contNormal", "", 0.838750721297818, 0.0943331334453693, + 0.203491714222133, -0.161246883046722, 0.108820994790583, 50, + -0.0262129441280693, "contGamma", "contNormal", "", + 0.703596211676051, 0.0688961327778383, -0.38047047158068, -0.278342394194264, + 0.126800299480701, 84, -0.0757710473567818, "contGamma", "contNormal", + "", 0.463486994706556, 0.103354627143835, -0.733117127415435 + )) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.161055062185777, 0.108968526788129, -0.0260432676988236, "contGamma", + "", 0.705378827076048, "contNormal", 0.0688848343907893, + -0.37806968586261, -0.0878923534301604, 0.604699744009697, 0.258403695289768, + "contcor1", "", 0.143601109094322, "contNormal", 0.176684904136743, + 1.46251144970359, -0.182863767969134, 0.0896349606913041, -0.046614403638915, + "contGamma:contcor1", "", 0.502504713496435, "contNormal", + 0.0695162591787078, -0.670553970965006)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.165693533068991, 0.204085555134478, 16, 0.0191960110327434, + "Total", 0.838750721297818, 0.0943331334453693, 0.203491714222133, + -0.161246883046722, 0.108820994790583, 50, -0.0262129441280693, + "Total", 0.703596211676051, 0.0688961327778383, -0.38047047158068, + -0.278342394194264, 0.126800299480701, 84, -0.0757710473567818, + "Total", 0.463486994706556, 0.103354627143835, -0.733117127415435, + -0.165693533068991, 0.204085555134478, 0.0191960110327434, "Total indirect", + 0.838750721297818, 0.0943331334453693, 0.203491714222133)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-1") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-1") +}) + + +context('Model number 1 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(58206.011431205, 58278.1148349248, 12181.574393179, 2, 1, 10000, + 0, 0, 12181.574393179, 2)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 1)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0350377597659761, 0.0449622243059265, 0.0399999920359513, "facExperimexperimental", + "", 0, "facGenderm", 0.00253179768052712, 15.7990475872556, + 1.07829654366037, 1.13977728009632, 1.10903691187834, "contNormal", + "", 0, "contNormal", 0.01568414953563, 70.7106821035414, + 0.243070477318132, 0.256929515143872, 0.249999996231002, "facGenderm", + "", 0, "facGenderm", 0.00353553379936032, 70.7106791840695, + 0.243070477307879, 0.256929515132263, 0.249999996220071, "facExperimexperimental", + "", 0, "facExperimexperimental", 0.00353553379901435, + 70.7106791878972)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.0591421961534589, 0.0591421961534589, -4.02832658386797e-18, + 0, "facGenderm", "contNormal", "", 1, 0.0301751443495722, + -1.33498171117285e-16, -0.0591421961534589, 0.0591421961534589, + 2.63342916954856e-18, 1, "facGenderm", "contNormal", "", + 1, 0.0301751443495722, 8.72714688301365e-17)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.0591421961534589, 0.0591421961534589, -4.02832658386797e-18, + "facGenderm", "", 1, "contNormal", 0.0301751443495722, + -1.33498171117285e-16, -0.0591421961534589, 0.0591421961534588, + -4.02833646848981e-18, "facExperimexperimental", "", + 1, "contNormal", 0.0301751443495722, -1.3349849869225e-16, -0.0836396959087514, + 0.0836396959087514, 6.66175575341654e-18, "facGenderm:facExperimexperimental", + "", 1, "contNormal", 0.0426740983857309, 1.56107709486934e-16 + )) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.0591421961534589, 0.0591421961534589, -4.02832658386797e-18, + 0, "Total", 1, 0.0301751443495722, -1.33498171117285e-16, -0.0591421961534589, + 0.0591421961534589, 2.63342916954856e-18, 1, "Total", 1, 0.0301751443495722, + 8.72714688301365e-17, -0.0591421961534589, 0.0591421961534589, + -4.02832658386797e-18, "Total indirect", 1, 0.0301751443495722, + -1.33498171117285e-16)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-1") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-1") +}) + + +context('Model number 2 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1199.86016488966, 1241.54288786547, 244.453837423182, 6, 1, 100, + 6.27962117952901e-50, 0, 244.453837423182, 6)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 2)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.54484431149037, 0.0642085876590358, -0.240317861915667, "contcor1", + "", 0.121932993106349, "contGamma", 0.1553734925625, + -1.54671081889336, -0.403928557352242, 0.194628985843986, -0.104649785754128, + "contcor2", "", 0.493124974141756, "contGamma", 0.152696056641238, + -0.685347009320647, 0.424978703556838, 0.896762224399434, 0.660870463978136, + "contcor2", "", 3.99658104388578e-08, "contcor1", 0.120355150544593, + 5.49100276130914, 0.770363443670044, 1.3611913943676, 1.06577741901882, + "contNormal", "", 1.53765888910584e-12, "contNormal", + 0.150724185586554, 7.07104447021074, 1.68040392467857, 2.96916683092646, + 2.32478537780252, "contGamma", "", 1.53699275529107e-12, + "contGamma", 0.328772088776501, 7.07111539320147, 0.732634788609472, + 1.29452463471209, 1.01357971166078, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341880395439, 7.0710647081272, + 0.721541481583474, 1.27492246177219, 0.998231971677833, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.14117121144922, + 7.07107321266352)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.175155541698245, 0.198982259112436, 16, 16, 0.0119133587070959, + "contGamma", "contNormal", "", 0.900666841304414, 0.0954450703589027, + 0.124819004923963, -0.250370426886057, 0.256903958338455, 50, + 16, 0.00326676572619913, "contGamma", "contNormal", "", + 0.979860574294906, 0.129409108847363, 0.0252437077675285, -0.477668971310095, + 0.465329188192431, 84, 16, -0.00616989155883216, "contGamma", + "contNormal", "", 0.979538511519671, 0.240565175416685, + -0.0256474842966994, -0.285591921815073, 0.255942756838111, + 16, 50, -0.0148245824884814, "contGamma", "contNormal", "", + 0.914544210016784, 0.138149140220111, -0.107308539632325, -0.15831444383224, + 0.111372092893483, 50, 50, -0.0234711754693781, "contGamma", + "contNormal", "", 0.732985762668106, 0.0687988500944344, + -0.341156508243397, -0.322691824457525, 0.256876158948706, 84, + 50, -0.0329078327544094, "contGamma", "contNormal", "", + 0.823867651782179, 0.147851692168272, -0.222573257511024, -0.537924942464148, + 0.445593835242154, 16, 84, -0.0461655536109969, "contGamma", + "contNormal", "", 0.854014898878001, 0.250902257761922, + -0.18399815937409, -0.350927107570362, 0.241302814386574, 50, + 84, -0.0548121465918937, "contGamma", "contNormal", "", + 0.716755993838613, 0.151081837887933, -0.362797721805259, -0.277364318862069, + 0.148866711108219, 84, 84, -0.064248803876925, "contGamma", + "contNormal", "", 0.554601940046319, 0.108734403624848, + -0.590878339652223)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.157307912983144, 0.112106557793724, -0.0226006775947101, "contGamma", + "", 0.742280068010411, "contNormal", 0.0687294442402958, + -0.328835448104197, -0.21942393738682, 0.758267105205984, 0.269421583909582, + "contcor1", "", 0.28004796543329, "contNormal", 0.249415563322772, + 1.08021159674354, -0.586001961066535, 0.45218492118797, -0.0669085199392824, + "contcor2", "", 0.800554571999602, "contNormal", 0.26484845906445, + -0.252629447706171, -0.250030918855495, 0.232278659465887, -0.00887612969480439, + "contGamma:contcor1", "", 0.942490533225791, "contNormal", + 0.123040418631612, -0.0721399503798818, -0.259029893489586, + 0.202963755524442, -0.0280330689825721, "contGamma:contcor2", + "", 0.81199337104416, "contNormal", 0.117857688370341, + -0.23785524194641)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.175155541698245, 0.198982259112436, 16, 16, 0.0119133587070959, + "Total", 0.900666841304414, 0.0954450703589027, 0.124819004923963, + -0.250370426886057, 0.256903958338455, 50, 16, 0.00326676572619913, + "Total", 0.979860574294906, 0.129409108847363, 0.0252437077675285, + -0.477668971310095, 0.465329188192431, 84, 16, -0.00616989155883216, + "Total", 0.979538511519671, 0.240565175416685, -0.0256474842966994, + -0.285591921815073, 0.255942756838111, 16, 50, -0.0148245824884814, + "Total", 0.914544210016784, 0.138149140220111, -0.107308539632325, + -0.15831444383224, 0.111372092893483, 50, 50, -0.0234711754693781, + "Total", 0.732985762668106, 0.0687988500944344, -0.341156508243397, + -0.322691824457525, 0.256876158948706, 84, 50, -0.0329078327544094, + "Total", 0.823867651782179, 0.147851692168272, -0.222573257511024, + -0.537924942464148, 0.445593835242154, 16, 84, -0.0461655536109969, + "Total", 0.854014898878001, 0.250902257761922, -0.18399815937409, + -0.350927107570362, 0.241302814386574, 50, 84, -0.0548121465918937, + "Total", 0.716755993838613, 0.151081837887933, -0.362797721805259, + -0.277364318862069, 0.148866711108219, 84, 84, -0.064248803876925, + "Total", 0.554601940046319, 0.108734403624848, -0.590878339652223, + -0.175155541698245, 0.198982259112436, 0.0119133587070959, "Total indirect", + 0.900666841304414, 0.0954450703589027, 0.124819004923963)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-2") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-2") +}) + + +context('Model number 2 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(888.390142602032, 930.072865577841, 182.597210283541, 6, 1, 100, + 9.5264444148918e-37, 0, 182.597210283541, 6)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 2)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.00962229682226295, 0.089622326280029, 0.040000014728883, "facExperimexperimental", + "", 0.114128392686459, "facGenderm", 0.0253179711171024, + 1.57990600999868, -0.16325064195217, 0.0341991514907402, -0.0645257452307151, + "contcor2", "", 0.200188172787736, "facGenderm", 0.0503707708407832, + -1.28101563969855, -0.170527113850196, 0.0272978257537414, -0.0716146440482273, + "contcor2", "", 0.15588331119909, "facExperimexperimental", + 0.0504664731506179, -1.4190538703684, 0.7563497496941, 1.33642868993984, + 1.04638921981697, "contNormal", "", 1.53765888910584e-12, + "contNormal", 0.147982040695984, 7.07105548008142, 0.180704798124628, + 0.319295154043818, 0.249999976084223, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553322949741, 7.07106848829593, + 0.180704787168929, 0.319295115830114, 0.249999951499522, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353553253412737, 7.07106918367606, 0.721541601009922, 1.27492287831283, + 0.998232239661375, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.141171287245048, 7.07107131444244)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.161045462061525, 1.33100173768096, 16, 0.584978137809715, 0, + "facGenderm", "contNormal", "", 0.124326857214754, + 0.38063127983768, 1.53686301887532, -0.358857897058408, 1.00791040124087, + 16, 0.324526252091232, 1, "facGenderm", "contNormal", "", + 0.351982922333844, 0.348671789145151, 0.930749955099272, 0.0267546155874003, + 1.18685946482967, 50, 0.606807040208535, 0, "facGenderm", "contNormal", + "", 0.0403286990795053, 0.295950552763477, 2.05036630120267, + -0.238340396933129, 0.931050705913233, 50, 0.346355154490052, + 1, "facGenderm", "contNormal", "", 0.245633488240162, + 0.298319538540088, 1.1610206833419, -0.0593562261183266, 1.32414395485136, + 84, 0.632393864366514, 0, "facGenderm", "contNormal", "", + 0.0731670042581685, 0.352940204994213, 1.79178754762973, -0.399560989069397, + 1.14344494636546, 84, 0.371941978648031, 1, "facGenderm", "contNormal", + "", 0.344710111356913, 0.393631196186739, 0.944899647820549 + )) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0242384729134231, 1.18800700993241, 0.606122741422915, "facGenderm", + "", 0.0411905734469633, "contNormal", 0.296885184166301, + 2.04160656627241, -0.42774608013557, 0.721264023688016, 0.146758971776223, + "facExperimexperimental", "", 0.616597440842453, "contNormal", + 0.293120208556594, 0.500678450315335, -0.226804152114755, 0.320137855800288, + 0.0466668518427661, "contcor2", "", 0.73803181641119, + "contNormal", 0.139528586297823, 0.334460866271203, -1.08932962558318, + 0.568425854146213, -0.260451885718483, "facGenderm:facExperimexperimental", + "", 0.537984000246894, "contNormal", 0.422904577024261, + -0.615864428687755, -0.392694403277948, 0.438466897299378, 0.0228862470107149, + "facGenderm:contcor2", "", 0.914046256174222, "contNormal", + 0.212034840214775, 0.107936257020464)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.161045462061525, 1.33100173768096, 16, 0.584978137809715, 0, + "Total", 0.124326857214754, 0.38063127983768, 1.53686301887532, + -0.358857897058408, 1.00791040124087, 16, 0.324526252091232, + 1, "Total", 0.351982922333844, 0.348671789145151, 0.930749955099272, + 0.0267546155874003, 1.18685946482967, 50, 0.606807040208535, + 0, "Total", 0.0403286990795053, 0.295950552763477, 2.05036630120267, + -0.238340396933129, 0.931050705913233, 50, 0.346355154490052, + 1, "Total", 0.245633488240162, 0.298319538540088, 1.1610206833419, + -0.0593562261183266, 1.32414395485136, 84, 0.632393864366514, + 0, "Total", 0.0731670042581685, 0.352940204994213, 1.79178754762973, + -0.399560989069397, 1.14344494636546, 84, 0.371941978648031, + 1, "Total", 0.344710111356913, 0.393631196186739, 0.944899647820549, + -0.161045462061525, 1.33100173768096, 0.584978137809715, "Total indirect", + 0.124326857214754, 0.38063127983768, 1.53686301887532)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-2") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-2") +}) + + +context('Model number 3 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1687.57806168848, 1747.4969759662, 388.059054881364, 12, 1, 100, + 1.2749197529274e-75, 0, 388.059054881364, 12)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 3)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544845384263799, 0.0642125653798221, -0.240316409441988, "contcor1", + "", 0.121938342529313, "contGamma", 0.155374780977557, + -1.54668864490114, -0.40393500433164, 0.19462810998698, -0.10465344717233, + "contcor2", "", 0.49311387113008, "contGamma", 0.152697477872045, + -0.685364608707065, 1.37709031137981, 3.45911397182221, 2.41810214160101, + "contGamma__contcor1__contcor2", "", 5.29669609194983e-06, + "contGamma", 0.531138244596618, 4.5526793941142, 0.424980186337519, + 0.896765495906142, 0.66087284112183, "contcor2", "", + 3.9966052023388e-08, "contcor1", 0.120355606860638, 5.49100169373139, + -0.374363299912906, 0.853239173976971, 0.239437937032033, "contGamma__contcor1__contcor2", + "", 0.444531791154638, "contcor1", 0.313169650966306, + 0.764563029314083, -0.164892034246703, 1.06248754260387, 0.448797754178585, + "contGamma__contcor1__contcor2", "", 0.151760084849359, + "contcor2", 0.313112788431826, 1.43334213982864, 0.760958996315664, + 1.34458030541897, 1.05276965086732, "contNormal", "", + 1.53832502292062e-12, "contNormal", 0.148885722826246, 7.07099130046158, + 1.68041194889496, 2.96919481877371, 2.32480338383433, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.328777181633058, + 7.07106062618725, 0.732635261352448, 1.29452628362542, 1.01358077248893, + "contcor1", "", 1.53765888910584e-12, "contcor1", 0.143342180444411, + 7.07105730739187, 0.721542049228929, 1.27492444168192, 0.998233245455425, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171571727338, + 7.07106418977493, 6.95316327488551, 12.2858617776654, 9.61951252627548, + "contGamma__contcor1__contcor2", "", 1.53765888910584e-12, + "contGamma__contcor1__contcor2", 1.36040726892014, 7.07105346027094 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.197085919409619, 0.196142754880005, 16, 16, -0.000471582264807115, + "contGamma", "contNormal", "", 0.996249157456629, 0.100315280635604, + -0.0047010013012887, -0.253415390363438, 0.257760510078195, + 50, 16, 0.00217255985737879, "contGamma", "contNormal", "", + 0.986707721315396, 0.130404411630449, 0.0166601714636432, -0.464510186019833, + 0.474626795863734, 84, 16, 0.00505830492195056, "contGamma", + "contNormal", "", 0.983155351755895, 0.2395801630263, + 0.0211132042739084, -0.336591019140446, 0.280052194191752, 16, + 50, -0.028269412474347, "contGamma", "contNormal", "", + 0.857383923496945, 0.157309832781674, -0.179705311323936, -0.212804663796158, + 0.161554123091835, 50, 50, -0.0256252703521611, "contGamma", + "contNormal", "", 0.788450413401985, 0.0955014453941214, + -0.268323377163656, -0.331915707154512, 0.286436656579334, 84, + 50, -0.0227395252875893, "contGamma", "contNormal", "", + 0.885379713939534, 0.157745848549088, -0.144152923812211, -0.611497834909856, + 0.489792362499921, 16, 84, -0.0608527362049673, "contGamma", + "contNormal", "", 0.828520874199026, 0.280946539348839, + -0.216598988355607, -0.434460047270603, 0.318042859105041, 50, + 84, -0.0582085940827814, "contGamma", "contNormal", "", + 0.761722649063633, 0.191968554603883, -0.303219421550012, -0.357340991183595, + 0.246695293147176, 84, 84, -0.0553228490182096, "contGamma", + "contNormal", "", 0.719579537521545, 0.154093720368163, + -0.359020788686466)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.20996698089246, 0.160439508774374, -0.0247637360590428, "contGamma", + "", 0.793268239363295, "contNormal", 0.0944931877801208, + -0.26206900879105, -0.264254608890685, 0.718897752585206, 0.227321571847261, + "contcor1", "", 0.364748451767544, "contNormal", 0.250808782516126, + 0.906354113945929, -0.628290247399505, 0.464201417169815, -0.0820444151148451, + "contcor2", "", 0.768467197285343, "contNormal", 0.278701974420641, + -0.294380458858955, -0.168392329343906, 0.137059069589987, -0.0156666298769593, + "contGamma:contcor1:contcor2", "", 0.840656772342237, + "contNormal", 0.0779227070862667, -0.201053460060301, -0.238538781205711, + 0.243967450847007, 0.00271433482064786, "contGamma:contcor1", + "", 0.982406856587178, "contNormal", 0.123090586321653, + 0.0220515223930684, -0.276771876105892, 0.218483282670078, -0.0291442967179072, + "contGamma:contcor2", "", 0.817566418227577, "contNormal", + 0.126342923309428, -0.230676130918149, -0.234139989436476, 0.527687151164548, + 0.146773580864036, "contcor1:contcor2", "", 0.450121107489454, + "contNormal", 0.194347229492536, 0.755213137060297)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.197085919409619, 0.196142754880005, 16, 16, -0.000471582264807115, + "Total", 0.996249157456629, 0.100315280635604, -0.0047010013012887, + -0.253415390363438, 0.257760510078195, 50, 16, 0.00217255985737879, + "Total", 0.986707721315396, 0.130404411630449, 0.0166601714636432, + -0.464510186019833, 0.474626795863734, 84, 16, 0.00505830492195056, + "Total", 0.983155351755895, 0.2395801630263, 0.0211132042739084, + -0.336591019140446, 0.280052194191752, 16, 50, -0.028269412474347, + "Total", 0.857383923496945, 0.157309832781674, -0.179705311323936, + -0.212804663796158, 0.161554123091835, 50, 50, -0.0256252703521611, + "Total", 0.788450413401985, 0.0955014453941214, -0.268323377163656, + -0.331915707154512, 0.286436656579334, 84, 50, -0.0227395252875893, + "Total", 0.885379713939534, 0.157745848549088, -0.144152923812211, + -0.611497834909856, 0.489792362499921, 16, 84, -0.0608527362049673, + "Total", 0.828520874199026, 0.280946539348839, -0.216598988355607, + -0.434460047270603, 0.318042859105041, 50, 84, -0.0582085940827814, + "Total", 0.761722649063633, 0.191968554603883, -0.303219421550012, + -0.357340991183595, 0.246695293147176, 84, 84, -0.0553228490182096, + "Total", 0.719579537521545, 0.154093720368163, -0.359020788686466, + -0.197085919409619, 0.196142754880005, -0.000471582264807115, + "Total indirect", 0.996249157456629, 0.100315280635604, -0.0047010013012887 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-3") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-3") +}) + + +context('Model number 4 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(87.5581910272132, 105.79438232913, 0, 0, 1, 100, 1, "", 0, 0 + )) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 4)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.79850843380401, 1.41091929867733, 1.10471386624067, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.156230132212618, + 7.07106785736594, 0.00468047961135101, 0.00827014313821862, + 0.00647531137478482, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915747318619735, 7.07106779689485)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.180371889383135, 0.0938555017481799, -0.0432581938174775, "contGamma", + "contNormal", "", "", "", 0.536343456056361, 0.0699572526062686, + -0.618351810654171, -0.0211526167692923, 0.025891359629206, + 0.00236937142995685, "contGamma", "debCollin1", "contNormal", + "", "", 0.843493166119684, 0.0120012349128798, + 0.197427302036562)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.180371889383135, 0.0938555017481799, -0.0432581938174775, "contGamma", + "", 0.536343456056361, "contNormal", 0.0699572526062686, + -0.618351810654171, -2.81958302850924, 2.30044880647361, -0.259567111017814, + "debCollin1", "", 0.842476942202698, "contNormal", + 1.30615457104544, -0.198726182009268, -0.0194720939204735, 0.00121576382791222, + -0.00912816504628063, "contGamma", "", 0.083701500657676, + "debCollin1", 0.00527761170908468, -1.7296014844305)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.176023197855433, 0.0942455530803918, -0.0408888223875206, "Total", + 0.55315176221281, 0.0689473768568378, -0.59304391626707, -0.0211526167692923, + 0.025891359629206, 0.00236937142995685, "Total indirect", 0.843493166119684, + 0.0120012349128798, 0.197427302036562)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-4") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-4") +}) + + +context('Model number 4 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(3594.39323415703, 3640.01358649694, 0, 0, 1, 5000, 1, "", 0, 0 + )) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 4)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1.01359115646644, 1.09629726280339, 1.05494420963491, "contNormal", + "", 0, "contNormal", 0.0210988842114766, 49.9999999554992, + 0.00638916548917944, 0.00691050291727951, 0.00664983420322947, + "debCollin1", "", 0, "debCollin1", 0.000132996685707573, + 49.9999993823217)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.408379793175041, 0.522421441301983, 0.465400617238512, "facGenderm", + "contNormal", "", "", "", 0, 0.029092791762116, 15.9971109353811, + -0.00333264643587066, 0.00279079262846361, -0.000270926903703527, + "facGenderm", "debCollin1", "contNormal", "", "", + 0.862310120052711, 0.00156213050664073, -0.173434231360182 + )) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.408379793175041, 0.522421441301983, 0.465400617238512, "facGenderm", + "", 0, "contNormal", 0.029092791762116, 15.9971109353811, + -0.318192962000251, 0.380043340627914, 0.0309251893138317, "debCollin1", + "", 0.862167796406089, "contNormal", 0.178124778857103, + 0.173615313446317, -0.013281344438887, -0.004240094214512, -0.00876071932669951, + "facGenderm", "", 0.000145691400599723, "debCollin1", + 0.0023064837659496, -3.79830088380989)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.408190781528593, 0.522068599141024, 0.465129690334808, "Total", + 0, 0.0290509974955368, 16.0107992989318, -0.00333264643587066, + 0.00279079262846361, -0.000270926903703527, "Total indirect", + 0.862310120052711, 0.00156213050664073, -0.173434231360182 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-4") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-4") +}) + + +context('Model number 5 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(749.49332058502, 785.965703188854, 108.439406339967, 4, 1, 100, + 1.56594379632356e-22, 0, 108.439406339967, 4)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 5)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848591062218, 0.0642090921273468, -0.240319749467436, "contcor1", + "", 0.121932993288434, "contGamma", 0.155374713003334, + -1.54671081813859, 0.775909441707023, 1.37098888774255, 1.07344916472479, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.151808770653298, 7.07106157375019, 0.00468047928640254, 0.00827014200481705, + 0.00647531064560979, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915747112377911, 7.07106859315715, 1.68041136493484, + 2.96919278190833, 2.32480207342159, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776810987149, 7.07106461201262, + 0.732635005789157, 1.29452539221761, 1.01358019900338, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143342018236195, + 7.07106130829856)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.167905467353995, 0.202766285501747, 16, 0.0174304090738757, + "contGamma", "contNormal", "", "", "", 0.85375453009603, + 0.0945608582044246, 0.184330064308364, -0.16628396891815, 0.107776934737189, + 50, -0.0292535170904807, "contGamma", "contNormal", "", "", + "", 0.675642422823967, 0.0699147805309427, -0.418416776371539, + -0.285599697519393, 0.125193519269539, 84, -0.0802030891249269, + "contGamma", "contNormal", "", "", "", 0.444078021103006, + 0.10479611360954, -0.765325033175903, -0.0203639053576448, 0.0263252740606019, + "", 0.00298068435147858, "contGamma", "debCollin1", "contNormal", + "", "", 0.802392351008346, 0.0119107238159795, + 0.250252159107213)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.166081380421012, 0.107923227286386, -0.0290790765673133, "contGamma", + "", 0.67740474555722, "contNormal", 0.0699004190558376, + -0.416007185079741, -2.85704956097542, 2.20397559478752, -0.32653698309395, + "debCollin1", "", 0.800335077332198, "contNormal", + 1.29110157015222, -0.25291347376756, -0.0857129058202736, 0.607920445319483, + 0.261103769749605, "contcor1", "", 0.140058044655418, + "contNormal", 0.176950534961624, 1.47557491027779, -0.184505895881976, + 0.0886594545812257, -0.0479232206503751, "contGamma:contcor1", + "", 0.491642269979256, "contNormal", 0.0696863188859324, + -0.687699126837497, -0.0194720960210123, 0.00121576056255072, + -0.0091281677292308, "contGamma", "", 0.0837013923567891, + "debCollin1", 0.00527761141193058, -1.72960209017959)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.16469012731146, 0.205512314162169, 16, 0.0204110934253543, + "Total", 0.828890284938722, 0.0944411337131037, 0.216125036018307, + -0.1613066405143, 0.108760975036296, 50, -0.0262728327390021, + "Total", 0.702950901077031, 0.068896065866734, -0.381340101332081, + -0.280068574002161, 0.125623764455264, 84, -0.0772224047734483, + "Total", 0.455578407233756, 0.103494845226105, -0.746147352602353, + -0.0203639053576448, 0.0263252740606019, 0.00298068435147858, + "Total indirect", 0.802392351008346, 0.0119107238159795, 0.250252159107213 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-5") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-5") +}) + + +context('Model number 5 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(17968.8591879804, 18060.0998926602, 6154.93635767185, 4, 1, 5000, + 0, 0, 6154.93635767185, 4)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 5)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0329823094098565, 0.0470176221704393, 0.0399999657901479, "facExperimexperimental", + "", 0, "facGenderm", 0.00358050272129784, 11.1716060295714, + 1.00839635272715, 1.09067862382924, 1.04953748827819, "contNormal", + "", 0, "contNormal", 0.0209907609913052, 49.9999732602802, + 0.00638916511210995, 0.00691050247605712, 0.00664983379408353, + "debCollin1", "", 0, "debCollin1", 0.000132996669341736, + 50.0000024586837, 0.240200180686695, 0.259799820635903, 0.250000000661299, + "facGenderm", "", 0, "facGenderm", 0.0050000000264818, + 49.9999998674418, 0.240200187135109, 0.25979982818147, 0.250000007658289, + "facExperimexperimental", "", 0, "facExperimexperimental", + 0.00500000030637314, 49.9999984679265)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.533075392446552, 0.695843599551528, 0.61445949599904, 0, "facGenderm", + "contNormal", "", "", "", 0, 0.0415232648122289, 14.7979572121236, + 0.234163024728836, 0.39737147977148, 0.315767252250158, 1, "facGenderm", + "contNormal", "", "", "", 3.35287353436797e-14, 0.0416355750233196, + 7.58407328524466, -0.00278982265183855, 0.00335778059468457, + 0.000283978971423011, "", "facGenderm", "debCollin1", "contNormal", + "", "", 0.856308725850912, 0.00156829495210489, + 0.181074976388764)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.533075392446552, 0.695843599551528, 0.61445949599904, "facGenderm", + "", 0, "contNormal", 0.0415232648122289, 14.7979572121236, + -0.382878438013345, 0.318048286839546, -0.0324150755868996, + "debCollin1", "", 0.856146947300517, "contNormal", + 0.178811123669035, -0.181281091029311, 0.0662929973891283, 0.229040196407459, + 0.147666596898294, "facExperimexperimental", "", 0.000375547334750426, + "contNormal", 0.0415179055079737, 3.55669668523943, -0.414037590241538, + -0.183346897256226, -0.298692243748882, "facGenderm:facExperimexperimental", + "", 3.86641681338062e-07, "contNormal", 0.0588507479741898, + -5.07541966807082, -0.0132813317208714, -0.00424008177463062, + -0.00876070674775102, "facGenderm", "", 0.000145694536987984, + "debCollin1", 0.00230648369499568, -3.79829554692231)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.533235157305821, 0.696251792635105, 0.614743474970463, 0, "Total", + 0, 0.0415866405237898, 14.7822345644582, 0.234624156386463, + 0.397478306056699, 0.316051231221581, 1, "Total", 2.79776202205539e-14, + 0.0415451893388879, 7.60740861339016, -0.00278982265183855, + 0.00335778059468457, 0.000283978971423011, "Total indirect", + 0.856308725850912, 0.00156829495210489, 0.181074976388764)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-5") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-5") +}) + + +context('Model number 7 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(751.811728258389, 788.284110862222, 110.757814013336, 4, 1, 100, + 5.01606234010714e-23, 0, 110.757814013336, 4)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 7)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848097116418, 0.0642092613538832, -0.240319417881267, "contcor1", + "", 0.121933309191749, "contGamma", 0.155374630165265, + -1.54670950866078, 0.798508447727849, 1.41091934724291, 1.10471389748538, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.156230141049959, 7.07106765737424, 0.00465468531206688, 0.00822456532173968, + 0.00643962531690328, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910700410270689, 7.07106886554407, 1.68041142392812, + 2.96919298766713, 2.32480220579762, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776848428022, 7.07106420939668, + 0.732634763897713, 1.294524548512, 1.01357965620485, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341864709352, + 7.07106509504427)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.180372058361049, 0.0938553366480233, "", -0.0432583608565127, + "contGamma", "contNormal", "", "", "", 0.536341888210161, + 0.0699572535955106, -0.618354189640296, -0.0129247072670819, + 0.0157307417942717, 16, 0.00140301726359494, "contGamma", "debCollin1", + "contNormal", "", "", 0.847800146477327, 0.00731019786266078, + 0.191926031272191, -0.0215674194040812, 0.0263996880938611, + 50, 0.00241613434488993, "contGamma", "debCollin1", "contNormal", + "", "", 0.843475940070765, 0.0122367318676008, + 0.197449316617546, -0.0314505017113105, 0.0384941474618388, + 84, 0.00352182287526418, "contGamma", "debCollin1", "contNormal", + "", "", 0.843534462650621, 0.0178433506240073, + 0.197374526201696)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.180372058361049, 0.0938553366480233, -0.0432583608565127, "contGamma", + "", 0.536341888210161, "contNormal", 0.0699572535955106, + -0.618354189640296, -2.81958242857967, 2.3004494788905, -0.259566474844583, + "debCollin1", "", 0.842477325421466, "contNormal", + 1.30615458953744, -0.19872569213764, -0.0197475191845018, 0.00115999779189519, + -0.00929376069630332, "contGamma", "", 0.081424970530166, + "debCollin1", 0.00533364825611921, -1.74247724072182, -0.0185475970905628, + 0.0350787586280779, 0.00826558076875753, "contcor1", "", + 0.545717658676823, "debCollin1", 0.0136804441667394, 0.60418950349969, + -0.0145563078084181, 0.00654285548021728, -0.00400672616410041, + "contGamma:contcor1", "", 0.456638509031521, "debCollin1", + 0.00538253851985621, -0.744393402726164)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.17734975042309, 0.0936390632372542, 16, -0.0418553435929177, + "Total", 0.544880638470462, 0.0691310697027775, -0.60544909507217, + -0.175977969346907, 0.094293516323662, 50, -0.0408422265116227, + "Total", 0.553608136788108, 0.0689480745060717, -0.592362104441744, + -0.175382616882718, 0.0959095409202215, 84, -0.0397365379812485, + "Total", 0.565861376878958, 0.0692084548345934, -0.574157277116183, + -0.0129247072670819, 0.0157307417942717, 16, 0.00140301726359494, + "Total indirect", 0.847800146477327, 0.00731019786266078, 0.191926031272191, + -0.0215674194040812, 0.0263996880938611, 50, 0.00241613434488993, + "Total indirect", 0.843475940070765, 0.0122367318676008, 0.197449316617546, + -0.0314505017113105, 0.0384941474618388, 84, 0.00352182287526418, + "Total indirect", 0.843534462650621, 0.0178433506240073, 0.197374526201696 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-7") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-7") +}) + + +context('Model number 7 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(17994.5533769209, 18085.7940816007, 6090.78719659127, 4, 1, 5000, + 0, 0, 6090.78719659127, 4)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 7)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0329823634534203, 0.0470176786103949, 0.0400000210319076, "facExperimexperimental", + "", 0, "facGenderm", 0.0035805033326335, 11.1716195506198, + 1.01359101765119, 1.09629710037074, 1.05494405901097, "contNormal", + "", 0, "contNormal", 0.0210988781865194, 50.0000070944529, + 0.00638916586214834, 0.00691050335370367, 0.00664983460792601, + "debCollin1", "", 0, "debCollin1", 0.000132996701895435, + 49.9999963394148, 0.240200198333354, 0.259799841284943, 0.250000019809149, + "facGenderm", "", 0, "facGenderm", 0.00500000079240977, + 49.9999960377326, 0.240200193542507, 0.259799835679003, 0.250000014610755, + "facExperimexperimental", "", 0, "facExperimexperimental", + 0.005000000584474, 49.9999970774113)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.408379748506894, 0.522421388490592, 0.465400568498743, "", "facGenderm", + "contNormal", "", "", "", 0, 0.0290927896847199, 15.9971104023476, + -0.00333599348258755, 0.00279415889006394, -0.000270917296261807, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.86246423366764, 0.00156384311676269, -0.173238155002806, -0.00333599532897697, + 0.00279416043538214, -0.000270917446797415, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.862464233345097, + 0.00156384398201013, -0.173238155413166)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.408379748506894, 0.522421388490592, 0.465400568498743, "facGenderm", + "", 0, "contNormal", 0.0290927896847199, 15.9971104023476, + -0.318194031032517, 0.380042221743156, 0.03092409535532, "debCollin1", + "", 0.862172613599479, "contNormal", 0.178124766139396, + 0.173609184312526, -0.0152372856233618, -0.00228415150512637, + -0.0087607185642441, "facGenderm", "", 0.00802056609551793, + "debCollin1", 0.0033044316682368, -2.65120282209337, -0.00647656601448218, + 0.00647656810375127, 1.04463454678031e-09, "facExperimexperimental", + "", 0.999999747763652, "debCollin1", 0.00330443166823628, + 3.16131381024404e-07, -0.00915925384049824, 0.00915924410468499, + -4.86790662611817e-09, "facGenderm:facExperimexperimental", + "", 0.999999168866998, "debCollin1", 0.00467317208113956, + -1.0416707413289e-06)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.408190565843236, 0.522068736561726, 0.465129651202481, 0, "Total", + 0, 0.0290510875752683, 16.0107483066642, 0.408190565692703, + 0.522068736411189, 0.465129651051946, 1, "Total", 0, 0.0290510875752674, + 16.010748301483, -0.00333599348258755, 0.00279415889006394, + -0.000270917296261807, 0, "Total indirect", 0.86246423366764, + 0.00156384311676269, -0.173238155002806, -0.00333599532897697, + 0.00279416043538214, -0.000270917446797415, 1, "Total indirect", + 0.862464233345097, 0.00156384398201013, -0.173238155413166 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-7") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-7") +}) + + +context('Model number 8 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(752.940701960175, 794.623424935984, 107.886787715122, 2, 1, 100, + 3.73836509058033e-24, 0, 107.886787715122, 2)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 8)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544846888129221, 0.0642101549362615, -0.24031836659648, "contcor1", + "", 0.121934748256636, "contGamma", 0.155374549703374, + -1.54670354350357, 0.775908369156002, 1.37098514675007, 1.07344675795304, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.151808089915928, 7.07107742774131, 0.00465468605771612, 0.00822456792252137, + 0.00643962699011874, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.00091070088352746, 7.07106702826052, 1.68041135530212, + 2.96919274832493, 2.32480205181352, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776804877169, 7.0710646776985, + 0.732634651025151, 1.29452415482919, 1.01357940292717, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.14334179307277, + 7.07106686193477)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.167904805477218, 0.202766531834122, 16, 0.0174308631784524, + "contGamma", "contNormal", "", "", "", 0.853750600898812, + 0.0945607521962516, 0.184335073205386, -0.166283948782552, 0.107776647635535, + 50, -0.0292536505735086, "contGamma", "contNormal", "", "", + "", 0.675640684266213, 0.0699147021526524, -0.41841915466701, + -0.285600242008979, 0.125192514238689, 84, -0.0802038638851448, + "contGamma", "contNormal", "", "", "", 0.444073109090682, + 0.104795996122365, -0.765333284217223, -0.012689706688942, 0.016219840251452, + 16, 0.00176506678125502, "contGamma", "debCollin1", "contNormal", + "", "", 0.810849361994944, 0.00737501994129199, + 0.239330441857193, -0.0207613443715575, 0.026840578934891, 50, + 0.00303961728166678, "contGamma", "debCollin1", "contNormal", + "", "", 0.802350168015491, 0.0121435709232227, + 0.250306709688992, -0.0302834133736562, 0.0391446676970094, + 84, 0.00443062716167659, "contGamma", "debCollin1", "contNormal", + "", "", 0.802467954861319, 0.0177115706253547, + 0.250154390900489)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.166081358121395, 0.107922942411906, -0.0290792078547442, "contGamma", + "", 0.677403029924851, "contNormal", 0.0699003406936587, + -0.416009529655729, -2.85705800720923, 2.20396147494014, -0.326548266134547, + "debCollin1", "", 0.800328104933556, "contNormal", + 1.29110012277523, -0.252922496384424, -0.0857110506863021, 0.60792152280839, + 0.261105236061044, "contcor1", "", 0.140055374344702, + "contNormal", 0.176950336579135, 1.47558485114422, -0.184506345944138, + 0.0886586982713989, -0.0479238238363695, "contGamma:contcor1", + "", 0.491636332473373, "contNormal", 0.0696862407600925, + -0.687708553563047, -0.0197475000793639, 0.00116001961325163, + -0.00929374023305614, "contGamma", "", 0.0814256808940832, + "debCollin1", 0.00533364894904483, -1.74247317771457, -0.0185476172873002, + 0.0350787453982058, 0.00826556405545277, "contcor1", "", + 0.545718523002241, "debCollin1", 0.0136804459440336, 0.604188203313472, + -0.0145562965121758, 0.00654286951755278, -0.00400671349731153, + "contGamma:contcor1", "", 0.456639990812095, "debCollin1", + 0.00538253921912753, -0.744390952707445)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.165693431843319, 0.204085291762734, 16, 0.0191959299597074, + "Total", 0.838751236167988, 0.0943330404341152, 0.203491055428394, + -0.162920773257861, 0.107943605673354, 16, -0.0274885837922536, + "Total", 0.690768313475014, 0.0690993255661221, -0.397812620702779, + -0.282049623527113, 0.125172029319334, 50, -0.0784387971038898, + "Total", 0.450216439611268, 0.103884983616679, -0.755054237610685, + -0.164654966025472, 0.20559592694571, 16, 0.0204704804601192, + "Total", 0.828422276274985, 0.0944534940161334, 0.21672549727618, + -0.161247839068112, 0.108819772484429, 84, -0.0262140332918418, + "Total", 0.703584200400437, 0.0688960648468033, -0.380486655516989, + -0.279986060274642, 0.125657567067686, 16, -0.077164246603478, + "Total", 0.455863799468667, 0.103482418692893, -0.74567494245066, + -0.164189930542387, 0.207912911222645, 16, 0.021861490340129, + "Total", 0.817858278540101, 0.0949259386142124, 0.230300491723091, + -0.160340172450153, 0.110694125626489, 50, -0.024823023411832, + "Total", 0.719586392838797, 0.0691426730834151, -0.359011624874338, + -0.278344383821069, 0.126797910374133, 50, -0.0757732367234682, + "Total", 0.463473635198344, 0.10335452523386, -0.733139033361302, + -0.012689706688942, 0.016219840251452, 50, 0.00176506678125502, + "Total indirect", 0.810849361994944, 0.00737501994129199, 0.239330441857193, + -0.0207613443715575, 0.026840578934891, 84, 0.00303961728166678, + "Total indirect", 0.802350168015491, 0.0121435709232227, 0.250306709688992, + -0.0302834133736562, 0.0391446676970094, 50, 0.00443062716167659, + "Total indirect", 0.802467954861319, 0.0177115706253547, 0.250154390900489, + 16, 84, 50, 84, 84, 84, 16, 50, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-8") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-8") +}) + + +context('Model number 8 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(8871.52495585253, 8965.11413694118, 3494.16115383182, 2, 1, 2564, + 0, 0, 3494.16115383182, 2)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 8)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0678663593848658, 0.0881400403101802, 0.078003199847523, "facExperimexperimental", + "", 0, "facGenderm", 0.00517195241474602, 15.0819639455932, + 0.962214328366523, 1.07365808106101, 1.01793620471376, "contNormal", + "", 0, "contNormal", 0.0284300511574545, 35.8049374964582, + 0.0060783961178021, 0.00678239465416411, 0.00643039538598311, + "debCollin1", "", 0, "debCollin1", 0.000179594763453578, + 35.8050271752229, 0.236315080331614, 0.263685049508491, 0.250000064920052, + "facGenderm", "", 0, "facGenderm", 0.00698226329482766, + 35.8050182818583, 0.236315249140815, 0.263685259824343, 0.250000254482579, + "facExperimexperimental", "", 0, "facExperimexperimental", + 0.00698227388345398, 35.8049911326179)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.498411714533949, 0.73098550090056, 0.614698607717255, 0, "facGenderm", + "contNormal", "", "", "", 0, 0.0593311377660824, 10.3604722724306, + 0.198318039373126, 0.431486821237755, 0.314902430305441, 1, + "facGenderm", "contNormal", "", "", "", 1.19671361709095e-07, + 0.0594829251210315, 5.29399705318292, -0.00295840272419354, + 0.00214705346187551, -0.000405674631159016, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.75544053287451, + 0.00130243622493583, -0.31147370089388, -0.00726439325395931, + 0.0101478383058159, 0.00144172252592831, 1, "facGenderm", "debCollin1", + "contNormal", "", "", 0.745508254553208, 0.00444197742844275, + 0.324567728934576)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.498411714533949, 0.73098550090056, 0.614698607717255, "facGenderm", + "", 0, "contNormal", 0.0593311377660824, 10.3604722724306, + -0.567947967244018, 0.406055539824565, -0.0809462137097265, + "debCollin1", "", 0.744596665478854, "contNormal", + 0.248474848199099, -0.325772263456081, 0.0312297852225652, 0.263775181295694, + 0.14750248325913, "facExperimexperimental", "", 0.0129045580471645, + "contNormal", 0.0593238952111919, 2.48639241799655, -0.464589689315151, + -0.135002665508477, -0.299796177411814, "facGenderm:facExperimexperimental", + "", 0.00036300820360502, "contNormal", 0.0840798673869558, + -3.56561192029573, -0.00422880457669423, 0.0142521178996315, + 0.00501165666146865, "facGenderm", "", 0.28777919012548, + "debCollin1", 0.00471460767190135, 1.06300608878607, -0.0125864654156303, + 0.00589445706074388, -0.0033460041774432, "facExperimexperimental", + "", 0.477883994050773, "debCollin1", 0.0047146076719137, + -0.709709992917614, -0.0358905127186618, -0.00975454150739755, + -0.0228225271130297, "facGenderm:facExperimexperimental", "", + 0.00061940765020041, "debCollin1", 0.00666746211089117, -3.42297064961936 + )) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.498029249284953, 0.730556616887238, 0.614292933086096, 0, "Total", + 0, 0.0593192960269757, 10.3557016726352, 0.197703019261465, + 0.431290492087098, 0.314496755674282, 0, "Total", 1.30815324350664e-07, + 0.05958973600233, 5.27770010026533, 0.499346588060875, 0.732934072425491, + 0.616140330243183, 1, "Total", 0, 0.0595897389460022, 10.3397051428855, + 0.200080469023508, 0.43260783663923, 0.316344152831369, 0, "Total", + 9.66540416591499e-08, 0.0593192960304036, 5.33290470387966, + -0.00295840272419354, 0.00214705346187551, -0.000405674631159016, + 0, "Total indirect", 0.75544053287451, 0.00130243622493583, + -0.31147370089388, -0.00726439325395931, 0.0101478383058159, + 0.00144172252592831, 1, "Total indirect", 0.745508254553208, + 0.00444197742844275, 0.324567728934576, 1, 1, 0, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-8") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-8") +}) + + +context('Model number 9 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(990.094319977616, 1042.19772369738, 248.077941777454, 10, 1, 100, + 1.37625258781523e-47, 0, 248.077941777454, 10)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 9)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544847815190569, 0.0642088519924176, -0.240319481599076, "contcor1", + "", 0.121932786748028, "contGamma", 0.15537445381322, + -1.5467116742883, -0.40393387758459, 0.194628147756827, -0.104652864913881, + "contcor2", "", 0.493115490109741, "contGamma", 0.152697200066633, + -0.685362042448802, 0.424979047244449, 0.896762641355453, 0.660870844299951, + "contcor2", "", 3.99652884119917e-08, "contcor1", 0.120355169235857, + 5.49100506854725, 0.798508629087309, 1.41091997981481, 1.10471430445106, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.156230256157287, 7.07106505246252, 0.0046262123891568, 0.00817425585445192, + 0.00640023412180436, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000905129760873576, 7.07106803739085, 1.68041093250029, + 2.96919127359306, 2.32480110304668, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776536522739, 7.07106756350262, + 0.732634447040913, 1.29452344334551, 1.01357894519321, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341663606247, + 7.07107005523158, 0.721541695873702, 1.27492320919869, 0.998232452536196, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171347455869, + 7.07106980648639)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.180371695982171, 0.0938557495359599, "", "", -0.0432579732231055, + "contGamma", "contNormal", "", "", "", 0.536345615014265, + 0.0699572664807114, -0.618348534744888, -0.0112823487063645, + 0.0136973920266787, 16, 16, 0.0012075216601571, "contGamma", + "debCollin1", "contNormal", "", "", 0.849709204288441, + 0.00637249993624379, 0.189489473870259, -0.0217865027601595, + 0.0265800536815676, 50, 16, 0.00239677546070402, "contGamma", + "debCollin1", "contNormal", "", "", 0.845980399951667, + 0.0123386339808375, 0.194249660410247, -0.0339594110090173, + 0.0413488006765018, 84, 16, 0.00369469483374225, "contGamma", + "debCollin1", "contNormal", "", "", 0.847495064960471, + 0.0192116315094412, 0.192315516354067, -0.0125632766124077, + 0.0151466303543406, 16, 50, 0.00129167687096649, "contGamma", + "debCollin1", "contNormal", "", "", 0.855014151589085, + 0.0070689837122826, 0.182724550450181, -0.0221379605718433, + 0.0270998219148701, 50, 50, 0.00248093067151342, "contGamma", + "debCollin1", "contNormal", "", "", 0.843426627417055, + 0.0125608896069251, 0.197512337831997, -0.0339443919321181, + 0.0415020920212214, 84, 50, 0.00377885004455165, "contGamma", + "debCollin1", "contNormal", "", "", 0.844347609973334, + 0.0192469056953219, 0.196335457988456, -0.0155174496160121, + 0.0182980890062674, 16, 84, 0.00139031969512764, "contGamma", + "debCollin1", "contNormal", "", "", 0.871961774931554, + 0.00862657142912118, 0.161167122599167, -0.0235502441864084, + 0.0287093911777575, 50, 84, 0.00257957349567457, "contGamma", + "debCollin1", "contNormal", "", "", 0.84657485560711, + 0.0133317846083865, 0.1934904869414, -0.0346051050853927, 0.0423600908228183, + 84, 84, 0.0038774928687128, "contGamma", "debCollin1", "contNormal", + "", "", 0.843447804742787, 0.0196343393336058, + 0.197485273266931)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.180371695982171, 0.0938557495359599, -0.0432579732231055, "contGamma", + "", 0.536345615014265, "contNormal", 0.0699572664807114, + -0.618348534744888, -2.81957815455336, 2.30045469610267, -0.259561729225345, + "debCollin1", "", 0.842480196313536, "contNormal", + 1.3061548301505, -0.198722022254771, -0.0199697893034943, 0.000908051994687603, + -0.00953086865440337, "contGamma", "", 0.0735387852470728, + "debCollin1", 0.00532607779093486, -1.78947229622241, -0.0336994338500106, + 0.0420651617472331, 0.00418286394861124, "contcor1", "", + 0.828664990718408, "debCollin1", 0.0193280581160841, 0.216414081719385, + -0.031021381943277, 0.0494312414916858, 0.0092049297742044, + "contcor2", "", 0.653795434888065, "debCollin1", 0.0205240055607049, + 0.448495774715053, -0.023391309175736, 0.0139844962296344, -0.00470340647305082, + "contGamma:contcor1", "", 0.621809516564148, "debCollin1", + 0.00953481944060861, -0.493287419058939, -0.0182406525060974, + 0.017560802617066, -0.000339924944515688, "contGamma:contcor2", + "", 0.97031068017522, "debCollin1", 0.00913319209066104, + -0.0372186351870636)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.177695418112014, 0.0935945149861167, 16, 16, -0.0420504515629484, + "Total", 0.543455300356667, 0.0692078872974276, -0.607596232236256, + -0.176065483236174, 0.0943430877113708, 50, 16, -0.0408611977624015, + "Total", 0.553625067233885, 0.0689830458826012, -0.592336816091611, + -0.175632809929019, 0.0965062531502923, 84, 16, -0.0395632783893633, + "Total", 0.568762599499857, 0.0694245060689659, -0.569874827054028, + -0.17760083501259, 0.0936682423083118, 16, 50, -0.041966296352139, + "Total", 0.544231326841673, 0.0692025668483293, -0.60642687494694, + -0.175916473970776, 0.0943623888675915, 50, 50, -0.0407770425515921, + "Total", 0.554252068344475, 0.0689499564712139, -0.5914005553958, + -0.175425204273657, 0.0964669579165492, 84, 50, -0.0394791231785539, + "Total", 0.569234645111113, 0.0693615199908919, -0.569179037364493, + -0.177680654096175, 0.0939453470402188, 16, 84, -0.0418676535279779, + "Total", 0.545706382951943, 0.0692936205152096, -0.604206465424738, + -0.175933246623941, 0.0945764471690787, 50, 84, -0.040678399727431, + "Total", 0.555548392122845, 0.069008843000883, -0.589466479345414, + -0.175372150848709, 0.0966111901399235, 84, 84, -0.0393804803543927, + "Total", 0.57032932609013, 0.0693847803158636, -0.56756654953895, + -0.0112823487063645, 0.0136973920266787, 16, 16, 0.0012075216601571, + "Total indirect", 0.849709204288441, 0.00637249993624379, 0.189489473870259, + -0.0217865027601595, 0.0265800536815676, 50, 16, 0.00239677546070402, + "Total indirect", 0.845980399951667, 0.0123386339808375, 0.194249660410247, + -0.0339594110090173, 0.0413488006765018, 84, 16, 0.00369469483374225, + "Total indirect", 0.847495064960471, 0.0192116315094412, 0.192315516354067, + -0.0125632766124077, 0.0151466303543406, 16, 50, 0.00129167687096649, + "Total indirect", 0.855014151589085, 0.0070689837122826, 0.182724550450181, + -0.0221379605718433, 0.0270998219148701, 50, 50, 0.00248093067151342, + "Total indirect", 0.843426627417055, 0.0125608896069251, 0.197512337831997, + -0.0339443919321181, 0.0415020920212214, 84, 50, 0.00377885004455165, + "Total indirect", 0.844347609973334, 0.0192469056953219, 0.196335457988456, + -0.0155174496160121, 0.0182980890062674, 16, 84, 0.00139031969512764, + "Total indirect", 0.871961774931554, 0.00862657142912118, 0.161167122599167, + -0.0235502441864084, 0.0287093911777575, 50, 84, 0.00257957349567457, + "Total indirect", 0.84657485560711, 0.0133317846083865, 0.1934904869414, + -0.0346051050853927, 0.0423600908228183, 84, 84, 0.0038774928687128, + "Total indirect", 0.843447804742787, 0.0196343393336058, 0.197485273266931 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-9") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-9") +}) + + +context('Model number 9 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(678.245914484358, 730.34931820412, 183.41314509957, 10, 1, 100, + 4.58015252036102e-34, 0, 183.41314509957, 10)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 9)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.0096223928837154, 0.0896222282384709, 0.0399999176773778, "facExperimexperimental", + "", 0.114129263463217, "facGenderm", 0.0253179706119641, + 1.57990220821552, -0.163252195358467, 0.0341981512436824, -0.0645270220573923, + "contcor2", "", 0.200180530061094, "facGenderm", 0.0503709119554269, + -1.28103739941203, -0.170528030034474, 0.0272972989714336, -0.0716153655315203, + "contcor2", "", 0.155879957884138, "facExperimexperimental", + 0.0504665724896806, -1.41906537334518, 0.762531915894168, 1.34734730062211, + 1.05493960825814, "contNormal", "", 1.53721479989599e-12, + "contNormal", 0.149190339552383, 7.07109864769584, 0.0047383804578312, + 0.00837244907324938, 0.00655541476554029, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000927075355486952, 7.0710700341042, + 0.18070483694683, 0.319295289457812, 0.250000063202321, "facGenderm", + "", 1.53743684450092e-12, "facGenderm", 0.03535535693619, + 7.07106602412544, 0.180704759904736, 0.319295020738091, 0.249999890321413, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553080379377, 7.07107091396723, + 0.7215424193071, 1.2749257324967, 0.998234075901898, "contcor2", + "", 1.53765888910584e-12, "contcor2", 0.141171806613441, + 7.07105830723891)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0621991130180782, 0.868593581649535, "", 0.465396347333807, + "", "facGenderm", "contNormal", "", "", "", 0.0236778061935214, + 0.205716654742688, 2.26231730199934, -0.0234800844581882, 0.0240730180468851, + 16, 0.00029646679434841, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.980502805657634, 0.0121311164083029, + 0.0244385417112558, -0.0327158100038546, 0.0319087161403105, + 16, -0.000403546931772023, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.980471384324261, 0.0164861514430661, + -0.024477934293255, -0.0138820395133229, 0.0142318308249894, + 50, 0.000174895655833264, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.98054489892915, 0.00717203748642092, + 0.0243857698965461, -0.0425397746538304, 0.0414895385132561, + 50, -0.000525118070287169, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.980456566543604, 0.0214364431769918, + -0.02449651119598, -0.00306077368291276, 0.00312556492567609, + 84, 3.2395621381666e-05, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.983622776472919, 0.00157817660359729, + 0.0205272472724685, -0.0540860739653825, 0.0527508377559049, + 84, -0.000667618104738767, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.980457437996147, 0.0272548150282361, + -0.0244954186644493)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0621991130180782, 0.868593581649535, 0.465396347333807, "facGenderm", + "", 0.0236778061935214, "contNormal", 0.205716654742688, + 2.26231730199934, -2.43776080190494, 2.49950467529122, 0.0308719366931376, + "debCollin1", "", 0.980445259387638, "contNormal", + 1.2595296434375, 0.0245106868694905, -0.0402677635217018, 0.0518450549007682, + 0.00578864568953316, "facGenderm", "", 0.805419027634832, + "debCollin1", 0.0234985997572007, 0.246340026611983, -0.0489099081003642, + 0.0420347735004939, -0.00343756729993515, "facExperimexperimental", + "", 0.88221083943284, "debCollin1", 0.0232006001942429, + -0.148167171157415, -0.017410125562733, 0.0258805875429324, + 0.00423523099009971, "contcor2", "", 0.701352290662318, + "debCollin1", 0.0110437521931875, 0.383495655825406, -0.0882808158599742, + 0.0429312977472323, -0.022674759056371, "facGenderm:facExperimexperimental", + "", 0.49815057183398, "debCollin1", 0.0334730930369616, + -0.677402564242661, -0.0370220624683531, 0.0287647392148697, + -0.00412866162674167, "facGenderm:contcor2", "", 0.805676314114913, + "debCollin1", 0.0167826557534069, -0.246007645476703)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0605277390114554, 0.870857889244855, 16, 0.465692814128155, + 0, "Total", 0.0242740568156226, 0.206720673600428, 2.25276362551089, + 0.0622319222822356, 0.867753678521833, 16, 0.464992800402035, + 1, "Total", 0.0236477411890006, 0.205494019939512, 2.26280453581524, + 0.0613800417077621, 0.869762444271517, 50, 0.46557124298964, + 0, "Total", 0.023970483225485, 0.206223790064555, 2.25760201014587, + 0.0617372688616371, 0.868005189665402, 50, 0.464871229263519, + 1, "Total", 0.0238138441661178, 0.205684371540371, 2.26011935560343, + 0.0620807223225276, 0.868776763587849, 84, 0.465428742955188, + 0, "Total", 0.0237203357960942, 0.205793587950706, 2.26162898266136, + 0.0608569446580092, 0.868600513800126, 84, 0.464728729229068, + 1, "Total", 0.0241145766817257, 0.206060819360329, 2.25529885143482, + -0.0234800844581882, 0.0240730180468851, 16, 0.00029646679434841, + 0, "Total indirect", 0.980502805657634, 0.0121311164083029, + 0.0244385417112558, -0.0327158100038546, 0.0319087161403105, + 16, -0.000403546931772023, 1, "Total indirect", 0.980471384324261, + 0.0164861514430661, -0.024477934293255, -0.0138820395133229, + 0.0142318308249894, 50, 0.000174895655833264, 0, "Total indirect", + 0.98054489892915, 0.00717203748642092, 0.0243857698965461, -0.0425397746538304, + 0.0414895385132561, 50, -0.000525118070287169, 1, "Total indirect", + 0.980456566543604, 0.0214364431769918, -0.02449651119598, -0.00306077368291276, + 0.00312556492567609, 84, 3.2395621381666e-05, 0, "Total indirect", + 0.983622776472919, 0.00157817660359729, 0.0205272472724685, + -0.0540860739653825, 0.0527508377559049, 84, -0.000667618104738767, + 1, "Total indirect", 0.980457437996147, 0.0272548150282361, + -0.0244954186644493)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-9") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-9") +}) + + +context('Model number 10 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(994.470215603425, 1056.99430006714, 244.453837403263, 6, 1, 100, + 6.27962124105664e-50, 0, 244.453837403263, 6)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 10)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848193917121, 0.0642083958482943, -0.240319899034413, "contcor1", + "", 0.121932091186517, "contGamma", 0.155374434063477, + -1.54671455753289, -0.403934278916178, 0.194627607304035, -0.104653335806071, + "contcor2", "", 0.493113444113612, "contGamma", 0.152697164575878, + -0.685365285575208, 0.424979146089582, 0.896762963098359, 0.660871054593971, + "contcor2", "", 3.99654800364857e-08, "contcor1", 0.120355226098578, + 5.49100422155892, 0.770087815983164, 1.36070176398827, 1.06539478998572, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.150669592059802, 7.07106706416816, 0.00462621316243053, 0.00817425855158713, + 0.00640023585700883, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000905130251663583, 7.0710661203131, 1.68041046988982, + 2.96918966004872, 2.32480006496927, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776242911764, 7.07107072086468, + 0.732634551449156, 1.2945238075136, 1.01357917948138, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341729872731, + 7.07106842076835, 0.721541771729486, 1.27492347378545, 0.998232622757466, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.14117139560241, + 7.07106860067354)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.176625926276588, 0.198183916718893, 16, 16, 0.0107789952211524, + "contGamma", "contNormal", "", "", "", 0.910243407936761, + 0.0956165128420555, 0.1127315240931, -0.253642514407101, 0.255686319506014, + 50, 16, 0.00102190254945625, "contGamma", "contNormal", "", + "", "", 0.993724838743747, 0.129933212531107, 0.00786482939619152, + -0.482413374262315, 0.463159926247889, 84, 16, -0.00962672400721294, + "contGamma", "contNormal", "", "", "", 0.968166367370173, + 0.241222111214483, -0.0399081326282454, -0.287056213519426, + 0.254965881870727, 16, 50, -0.0160451658243498, "contGamma", + "contNormal", "", "", "", 0.907621351765394, 0.138273483509277, + -0.116039354886675, -0.162770779314646, 0.111166262322554, 50, + 50, -0.0258022584960459, "contGamma", "contNormal", "", "", + "", 0.711963857791484, 0.0698831824967145, -0.36921985482357, + -0.328512447276896, 0.255610677171465, 84, 50, -0.0364508850527151, + "contGamma", "contNormal", "", "", "", 0.806755124245045, + 0.149013739297214, -0.244614256541891, -0.539344846357858, 0.44437044666791, + 16, 84, -0.0474871998449741, "contGamma", "contNormal", "", + "", "", 0.849914182711156, 0.250952390142163, -0.189227924141599, + -0.354370807891826, 0.239882222858486, 50, 84, -0.0572442925166702, + "contGamma", "contNormal", "", "", "", 0.705723315078204, + 0.151597946553535, -0.377605988854573, -0.284292878612021, 0.148507040465342, + 84, 84, -0.0678929190733394, "contGamma", "contNormal", "", + "", "", 0.538610566068469, 0.110410171434586, -0.614915439322214, + -0.0111495491481729, 0.013414370728096, 16, 16, 0.00113241078996154, + "contGamma", "debCollin1", "contNormal", "", "", + 0.856594481607869, 0.00626642123784571, 0.18071092685605, -0.0215877489929519, + 0.0260831372280323, 50, 16, 0.00224769411754021, "contGamma", + "debCollin1", "contNormal", "", "", 0.853365846163642, + 0.0121611638267351, 0.18482557669348, -0.0336128251453198, 0.0405425933867961, + 84, 16, 0.00346488412073817, "contGamma", "debCollin1", "contNormal", + "", "", 0.854674703697871, 0.0189175462194827, + 0.183157164282214, -0.0123696445624934, 0.014792298599136, 16, + 50, 0.00121132701832128, "contGamma", "debCollin1", "contNormal", + "", "", 0.861225014124275, 0.00692919445864294, + 0.174814983985674, -0.0219770148790198, 0.0266302355708197, + 50, 50, 0.00232661034589996, "contGamma", "debCollin1", "contNormal", + "", "", 0.851167246535529, 0.0124000366418075, + 0.18762931216313, -0.0336748178264546, 0.0407624185246504, 84, + 50, 0.00354380034909792, "contGamma", "debCollin1", "contNormal", + "", "", 0.851958952580264, 0.0189894398413074, + 0.186619530576629, -0.0151129766864265, 0.017720634588253, 16, + 84, 0.00130382895091323, "contGamma", "debCollin1", "contNormal", + "", "", 0.876300172465472, 0.00837607515588725, + 0.155661085490239, -0.0233252614191961, 0.0281634859761799, + 50, 84, 0.0024191122784919, "contGamma", "debCollin1", "contNormal", + "", "", 0.853879129419992, 0.0131351259006575, + 0.18417122887043, -0.0343529802632769, 0.0416255848266566, 84, + 84, 0.00363630228168987, "contGamma", "debCollin1", "contNormal", + "", "", 0.851185436433217, 0.0193826431733549, + 0.187606109712046)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.161747386793745, 0.111897570292101, -0.0249249082508218, "contGamma", + "", 0.721057348347639, "contNormal", 0.0698086697623841, + -0.35704602788825, -2.77216362243407, 2.28533104647688, -0.243416287978595, + "debCollin1", "", 0.850355061921827, "contNormal", + 1.29020091920153, -0.18866541199586, -0.218444236269423, 0.759300171475004, + 0.27042796760279, "contcor1", "", 0.278281723248524, + "contNormal", 0.249429177132016, 1.08418738622411, -0.584165689479535, + 0.454878250031406, -0.0646437197240643, "contcor2", "", + 0.807326227284161, "contNormal", 0.265067100137244, -0.243876813420427, + -0.25142077864171, 0.231388560127542, -0.0100161092570843, "contGamma:contcor1", + "", 0.935186857236556, "contNormal", 0.123167910884483, + -0.0813207692259896, -0.259080419926924, 0.202833489657471, + -0.0281234651347266, "contGamma:contcor2", "", 0.811366576746487, + "contNormal", 0.117837346305318, -0.238663429010513, -0.0199697923111242, + 0.000908051817198446, -0.00953087024696287, "contGamma", "", + 0.073538776165851, "debCollin1", 0.00532607851292279, -1.78947235265832, + -0.0336993982303922, 0.0420652076354947, 0.00418290470255125, + "contcor1", "", 0.828663370149881, "debCollin1", 0.019328060735684, + 0.21641616092548, -0.031021432842734, 0.0494312014970133, 0.00920488432713965, + "contcor2", "", 0.653797076487209, "debCollin1", 0.0205240083425888, + 0.448493499587936, -0.0233913299626727, 0.0139844805086478, + -0.00470342472701248, "contGamma:contcor1", "", 0.621808211274356, + "debCollin1", 0.00953482073296656, -0.49328926665086, -0.0182406364079937, + 0.0175608235679091, -0.000339906420042289, "contGamma:contcor2", + "", 0.970312301393037, "debCollin1", 0.00913319332862751, + -0.0372166018841264)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.175157195520347, 0.198980007542575, 16, 16, 0.0119114060111139, + "Total", 0.900682880602059, 0.0954449178694275, 0.124798745464994, + -0.251726407135996, 0.256035033814832, 16, 16, 0.00215431333941778, + "Total", 0.986730722386863, 0.129533360040283, 0.0166313399015345, + -0.480544269330205, 0.463555642895702, 50, 16, -0.00849431321725141, + "Total", 0.971865549666039, 0.240846239949521, -0.0352686146108476, + -0.285655723343754, 0.255830213274978, 16, 16, -0.0149127550343883, + "Total", 0.914030199850346, 0.138136705799164, -0.107956498224808, + -0.160104483229455, 0.110764787817286, 84, 16, -0.0246698477060844, + "Total", 0.72108159009263, 0.0691005735777093, -0.357013645890235, + -0.326152809193228, 0.255515860667721, 16, 16, -0.0353184742627536, + "Total", 0.811869451323328, 0.14838759141726, -0.238015011399703, + -0.5380417833101, 0.445332205200075, 16, 50, -0.0463547890550126, + "Total", 0.853401923619069, 0.250865321063781, -0.184779581563716, + -0.352496294126082, 0.240272530672665, 16, 16, -0.0561118817267087, + "Total", 0.710590663665702, 0.151219315628867, -0.371062926011533, + -0.281448620912354, 0.147927604345598, 50, 50, -0.0667605082833779, + "Total", 0.542206075632838, 0.109536764105059, -0.609480377011561, + -0.174428212982225, 0.200481591659611, 16, 16, 0.0130266893386926, + "Total", 0.891661133051161, 0.0956420137306289, 0.136202583264104, + -0.250367190666448, 0.25690638400044, 84, 50, 0.00326959666699646, + "Total", 0.979843093215674, 0.12940890206866, 0.0252656240392313, + -0.478987288880947, 0.464229229101601, 16, 16, -0.00737902988967274, + "Total", 0.975535409382666, 0.240620880134155, -0.030666623302012, + -0.284772443267989, 0.257177499854369, 16, 84, -0.0137974717068096, + "Total", 0.920505318751101, 0.138255076980289, -0.0997972154670075, + -0.158460982896939, 0.111351854139928, 16, 16, -0.0235545643785057, + "Total", 0.732194129851635, 0.0688310701536141, -0.342208312698578, + -0.324287318138642, 0.255880936268292, 50, 84, -0.0342031909351749, + "Total", 0.817240916366877, 0.148004825339452, -0.23109510691107, + -0.537031648406089, 0.446552636951221, 16, 16, -0.0452395057274339, + "Total", 0.85692076122768, 0.250918969204459, -0.180295279670828, + -0.351102410784987, 0.241109213986727, 84, 84, -0.05499659839913, + "Total", 0.715835725220374, 0.151077170152871, -0.364029842122939, + -0.279263827007169, 0.147973377095571, 16, 16, -0.0656452249557992, + "Total", 0.54697510682905, 0.108991085416042, -0.602299029367565, + -0.174564110324852, 0.203051869008633, 16, 16, 0.0142438793418905, + "Total", 0.882451830491805, 0.0963323771028632, 0.147861806905076, + -0.249575657759332, 0.258549231099721, 50, 16, 0.00448678667019442, + "Total", 0.972388093879544, 0.129626078047116, 0.0346133026455029, + -0.477660166189842, 0.465336486416893, 50, 16, -0.00616183988647477, + "Total", 0.97956517515209, 0.24056479099743, -0.0256140554107131, + -0.284454917206319, 0.259294353799095, 50, 16, -0.0125802817036117, + "Total", 0.92773719712414, 0.138714097629966, -0.0906921640882588, + -0.157965959848438, 0.113291211097822, 84, 16, -0.0223373743753078, + "Total", 0.746849271169747, 0.0691995294520465, -0.322796622349679, + -0.32285560657008, 0.256883604706127, 50, 16, -0.032986000931977, + "Total", 0.823507443981896, 0.147895373550003, -0.223036056775802, + -0.53628605599744, 0.448241424548968, 16, 50, -0.0440223157242359, + "Total", 0.860862555184003, 0.251159584643451, -0.175276272202514, + -0.350173942317888, 0.242615125526024, 50, 16, -0.0537794083959321, + "Total", 0.722120414407063, 0.151224479765893, -0.355626340915087, + -0.277698264309462, 0.148842194404259, 50, 50, -0.0644280349526013, + "Total", 0.553785745262031, 0.108813340979278, -0.592096836406033, + -0.175116515775767, 0.199097160254715, 50, 16, 0.0119903222394737, + "Total", 0.900048643774704, 0.0954644266379974, 0.125599897906904, + -0.251638253858149, 0.256104712993704, 84, 50, 0.00223322956777753, + "Total", 0.986244192642269, 0.129528647173332, 0.0172412019774211, + -0.480438423769926, 0.463607629792142, 50, 16, -0.00841539698889166, + "Total", 0.972125235757261, 0.24083250024199, -0.0349429457421063, + -0.285600745455138, 0.255933067843081, 16, 84, -0.0148338388060285, + "Total", 0.914490920863644, 0.138148919462237, -0.107375713568888, + -0.160003287122804, 0.110821424167355, 50, 16, -0.0245909314777247, + "Total", 0.721892876074643, 0.0690892060839865, -0.355930149896806, + -0.326027870753414, 0.255548754684627, 50, 84, -0.0352395580343938, + "Total", 0.812252806340997, 0.148364110265659, -0.237520772181994, + -0.537974446583248, 0.445422700929942, 50, 16, -0.0462758728266528, + "Total", 0.853652085278967, 0.250871229081274, -0.184460661336581, + -0.352404539274629, 0.240338608277931, 84, 84, -0.0560329654983489, + "Total", 0.71096743125772, 0.151212765190596, -0.370557111548898, + -0.281303684140201, 0.147940500030165, 50, 16, -0.0666815920550181, + "Total", 0.542559446857566, 0.109503079535183, -0.608947185212208, + -0.174357961983853, 0.200569173117958, 16, 16, 0.0131056055670523, + "Total", 0.891013903371322, 0.0956464348475758, 0.137021370299245, + -0.250257227099303, 0.256954252890015, 84, 16, 0.00334851289535621, + "Total", 0.979354159074581, 0.12939306129861, 0.0258786125140713, + -0.478869693146367, 0.464269465823741, 50, 16, -0.00730011366131299, + "Total", 0.97579498461093, 0.240601145329575, -0.030341142604759, + -0.284697041084939, 0.257259930128039, 84, 16, -0.0137185554784499, + "Total", 0.920959524815107, 0.138256869893494, -0.0992251270336, + -0.158318701071366, 0.111367404771074, 84, 16, -0.023475648150146, + "Total", 0.732936414001902, 0.0687987401732096, -0.341222064401805, + -0.324143196324981, 0.255894646911351, 84, 16, -0.0341242747068152, + "Total", 0.817614889018243, 0.147971556572365, -0.230613744271365, + -0.536953066380098, 0.446631887381949, 16, 50, -0.0451605894990742, + "Total", 0.857167760335025, 0.250919139719005, -0.179980648545375, + -0.350991969402266, 0.241156605060725, 84, 16, -0.0549176821707703, + "Total", 0.716196914828235, 0.151061085594884, -0.363546190301112, + -0.279092666470116, 0.147960049015238, 50, 50, -0.0655663087274395, + "Total", 0.547284074036982, 0.108944021128422, -0.60183485103924, + -0.174461835373172, 0.203107426513673, 84, 16, 0.0143227955702503, + "Total", 0.881790825822209, 0.0963204591678885, 0.148699411256806, + -0.249441990493976, 0.258573396291084, 84, 50, 0.00456570289855417, + "Total", 0.971896584743119, 0.12959814333126, 0.0352296937378491, + -0.477529761824929, 0.465363914508699, 84, 16, -0.00608292365811502, + "Total", 0.979824630238938, 0.240538521057288, -0.0252887713426419, + -0.284357307184116, 0.259354576233612, 16, 84, -0.0125013654752519, + "Total", 0.9281843479529, 0.138704559804787, -0.0901294484683587, + -0.157779495350644, 0.113262579056748, 84, 16, -0.022258458146948, + "Total", 0.747519763447502, 0.0691446568777126, -0.32191147012724, + -0.32269061335498, 0.256876443947746, 50, 84, -0.0329070847036172, + "Total", 0.823871313069357, 0.147851455913037, -0.222568553690621, + -0.536195215000657, 0.448308416008905, 84, 16, -0.0439433994958762, + "Total", 0.8611061113123, 0.251153500466131, -0.174966303134612, + -0.350043169373274, 0.24264218503813, 84, 84, -0.0537004921675723, + "Total", 0.722464760990814, 0.151198021771428, -0.355166632065818, + -0.277498644180151, 0.148800406731668, 84, 16, -0.0643491187242415, + "Total", 0.554047157459774, 0.108751756224709, -0.591706478663937, + -0.175190846612322, 0.199356494956453, 16, 16, 0.0120828241720656, + "Total", 0.899370887970788, 0.0955495469618719, 0.126456111580384, + -0.25162489618052, 0.256276359181259, 16, 50, 0.00232573150036948, + "Total", 0.985678941579158, 0.129569027637253, 0.0179497488155943, + -0.480362752072917, 0.463716961960318, 50, 16, -0.00832289505629971, + "Total", 0.972432494703516, 0.240841087254668, -0.0345576211732469, + -0.285620647527888, 0.256137973781015, 16, 50, -0.0147413368734366, + "Total", 0.915057246387221, 0.138206269498375, -0.106661853524741, + -0.160053294936577, 0.111056435846312, 84, 16, -0.0244984295451327, + "Total", 0.723175148554137, 0.069161916474325, -0.354218488931365, + -0.32595997858294, 0.255665866379336, 16, 50, -0.0351470561018019, + "Total", 0.812752022886524, 0.148376666497463, -0.236877245806051, + -0.537941973907769, 0.445575232119647, 16, 50, -0.0461833708940609, + "Total", 0.853958959487421, 0.250901856816063, -0.184069466364763, + -0.352374061884154, 0.24049313475264, 16, 50, -0.055940463565757, + "Total", 0.711480866358453, 0.151244410946644, -0.369867972083225, + -0.281240222144802, 0.148062041899949, 50, 50, -0.0665890901224262, + "Total", 0.543174094576641, 0.109517896101927, -0.608020172889852, + -0.174397430708672, 0.20079364570796, 16, 50, 0.0131981074996443, + "Total", 0.890326230576684, 0.095713768052906, 0.137891421141721, + -0.250218403330798, 0.257100432986694, 84, 50, 0.00344101482794815, + "Total", 0.978788443465871, 0.12942044862027, 0.0265878759085773, + -0.478780294309262, 0.46436507085182, 16, 50, -0.00720761172872104, + "Total", 0.976101758517233, 0.240602728570651, -0.0299564837503686, + -0.284692946997726, 0.257440839906011, 16, 84, -0.0136260535458579, + "Total", 0.921516275207378, 0.138301976765905, -0.098523924708046, + -0.158321288530303, 0.111554996095195, 16, 50, -0.023383146217554, + "Total", 0.734129137215951, 0.0688472560603784, -0.339638027070349, + -0.324053023416942, 0.255989477868496, 50, 84, -0.0340317727742232, + "Total", 0.818102054750565, 0.147972744872033, -0.229986764141288, + -0.536907405210216, 0.446771230077251, 16, 50, -0.0450680875664822, + "Total", 0.857470616112857, 0.250943038506472, -0.179594890676036, + -0.350939668044432, 0.241289307568075, 84, 84, -0.0548251802381783, + "Total", 0.716691113233838, 0.151081596469102, -0.362884570453892, + -0.278999002914831, 0.148051389325136, 16, 50, -0.0654738067948475, + "Total", 0.547847284298997, 0.108943428452892, -0.600989042888062, + -0.174462936151992, 0.203293531157676, 16, 16, 0.0144152975028422, + "Total", 0.881091569781827, 0.0963682165308554, 0.14958560012602, + -0.249375239495304, 0.258691649157596, 50, 50, 0.00465820483114612, + "Total", 0.971330352635449, 0.129611281804275, 0.0359398099170136, + -0.477425360343096, 0.46544451689205, 50, 16, -0.00599042172552307, + "Total", 0.980130868164163, 0.240532449747134, -0.0249048381281638, + -0.284326916598806, 0.259509189513486, 50, 50, -0.01240886354266, + "Total", 0.928730555049941, 0.138736249849998, -0.0894421144875726, + -0.157729440699808, 0.113397528271096, 84, 16, -0.0221659562143561, + "Total", 0.748609575096903, 0.069166314052074, -0.320473289897561, + -0.322576032720478, 0.256946867178428, 50, 50, -0.0328145827710253, + "Total", 0.824345159105741, 0.14784019106221, -0.221959823883189, + -0.536135142083263, 0.448433346956694, 16, 50, -0.0438508975632843, + "Total", 0.861404562434077, 0.25117004618608, -0.174586493211046, + -0.349966965354573, 0.242750984884612, 50, 50, -0.0536079902349804, + "Total", 0.72293772386767, 0.151206337186415, -0.354535340465854, + -0.277371791288151, 0.148858557704852, 50, 50, -0.0642566167916496, + "Total", 0.554553161137889, 0.108734229902961, -0.590951136997015, + -0.0111495491481729, 0.013414370728096, 50, 50, 0.00113241078996154, + "Total indirect", 0.856594481607869, 0.00626642123784571, 0.18071092685605, + -0.0215877489929519, 0.0260831372280323, 84, 50, 0.00224769411754021, + "Total indirect", 0.853365846163642, 0.0121611638267351, 0.18482557669348, + -0.0336128251453198, 0.0405425933867961, 50, 50, 0.00346488412073817, + "Total indirect", 0.854674703697871, 0.0189175462194827, 0.183157164282214, + -0.0123696445624934, 0.014792298599136, 16, 84, 0.00121132701832128, + "Total indirect", 0.861225014124275, 0.00692919445864294, 0.174814983985674, + -0.0219770148790198, 0.0266302355708197, 50, 50, 0.00232661034589996, + "Total indirect", 0.851167246535529, 0.0124000366418075, 0.18762931216313, + -0.0336748178264546, 0.0407624185246504, 50, 84, 0.00354380034909792, + "Total indirect", 0.851958952580264, 0.0189894398413074, 0.186619530576629, + -0.0151129766864265, 0.017720634588253, 50, 50, 0.00130382895091323, + "Total indirect", 0.876300172465472, 0.00837607515588725, 0.155661085490239, + -0.0233252614191961, 0.0281634859761799, 84, 84, 0.0024191122784919, + "Total indirect", 0.853879129419992, 0.0131351259006575, 0.18417122887043, + -0.0343529802632769, 0.0416255848266566, 50, 50, 0.00363630228168987, + "Total indirect", 0.851185436433217, 0.0193826431733549, 0.187606109712046, + 16, 16, 84, 50, 50, 16, 84, 50, 84, 16, 84, 50, 16, 50, 84, + 50, 50, 50, 84, 50, 84, 50, 84, 50, 16, 84, 84, 50, 50, 84, + 84, 50, 84, 84, 84, 50, 16, 16, 16, 84, 50, 16, 16, 84, 84, + 16, 16, 84, 16, 50, 16, 84, 50, 50, 16, 84, 84, 50, 16, 84, + 16, 84, 16, 84, 50, 84, 16, 84, 84, 84, 16, 84, 16, 16, 50, + 84, 50, 16, 50, 84, 84, 16, 50, 84, 16, 50, 50, 84, 50, 50, + 50, 84, 84, 50, 50, 84, 16, 84, 50, 84, 50, 84, 50, 84, 84, + 84, 50, 84, 16, 16, 84, 84, 50, 16, 84, 84, 84, 16, 84, 84, + 16, 50, 84, 84, 50, 50, 84, 84, 84, 50, 84, 84, 16, 84, 84, + 84, 50, 84, 84, 84, 84, 84, 84, 84, 16, 16, 50, 16, 84, 16, + 16, 50, 50, 50, 84, 50, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-10") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-10") +}) + + +context('Model number 10 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(685.429979662054, 747.954064125768, 182.597210277266, 6, 1, 100, + 9.52644444413291e-37, 0, 182.597210277266, 6)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 10)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.00962228101785791, 0.0896223540118345, 0.0400000364969883, + "facExperimexperimental", "", 0.114128239247336, "facGenderm", + 0.0253179741598625, 1.57990667991129, -0.163250590470207, 0.0341991164564009, + -0.0645257370069032, "contcor2", "", 0.200188032982683, + "facGenderm", 0.0503707487698923, -1.28101603773402, -0.170526678956937, + 0.0272980394411549, -0.0716143197578911, "contcor2", "", + 0.155884721893343, "facExperimexperimental", 0.0504664167195184, + -1.41904903127774, 0.756337786278469, 1.33640664462726, 1.04637221545287, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.147979468736237, 7.07106346839201, 0.00473838138701095, 0.00837245231417406, + 0.00655541685059251, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000927075945228638, 7.07106778504084, 0.180704832060891, + 0.319295272413621, 0.250000052237256, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553538345382, 7.07106633431666, + 0.180704763859636, 0.319295034531949, 0.249999899195792, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353553105479222, 7.07107066297525, 0.721541269223268, 1.2749217210625, + 0.998231495142884, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.141171076663711, 7.07107658830719)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.160965044936565, 1.33182786417437, 16, 0.585431409618902, 0, + "facGenderm", "contNormal", "", "", "", 0.124223400384337, + 0.380821515315051, 1.53728554211171, -0.360277546022515, 1.00801196597346, + 16, 0.323867209975474, 1, "facGenderm", "contNormal", "", "", + "", 0.353497247214616, 0.349059860994608, 0.927827132723453, + 0.026857463088369, 1.18729214368568, 50, 0.607074803387027, + 0, "facGenderm", "contNormal", "", "", "", 0.0402973380689549, + 0.296034694961407, 2.0506880231257, -0.240695357112315, 0.931716564599512, + 50, 0.345510603743599, 1, "facGenderm", "contNormal", "", "", + "", 0.248006290314386, 0.299090169758134, 1.15520548208924, + -0.0593051699175675, 1.32419353582931, 84, 0.63244418295587, + 0, "facGenderm", "contNormal", "", "", "", 0.0731438547812677, + 0.352939828654949, 1.79193202809133, -0.402472944006082, 1.14423291063097, + 84, 0.370879983312442, 1, "facGenderm", "contNormal", "", "", + "", 0.347244318880453, 0.394575070469985, 0.939947835200741, + -0.0244283150989186, 0.0234846921824621, 16, -0.000471811458228212, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.969208888777844, 0.0122229305383447, -0.0386005186520604, + -0.0318354445667261, 0.0331198699024824, 16, 0.000642212667878124, + 1, "facGenderm", "debCollin1", "contNormal", "", "", + 0.969084689318117, 0.0165705377704814, 0.0387562960703758, -0.0144874983037292, + 0.0139308139424093, 50, -0.000278342180659924, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.969373864077578, + 0.00724970266553328, -0.0383935995034976, -0.0413456190842682, + 0.043016982975161, 50, 0.000835681945446412, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.969025801638701, + 0.0215214674159502, 0.0388301563873412, -0.00379201780609793, + 0.00368888482309922, 84, -5.15664914993589e-05, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.978443468359279, + 0.00190842859567971, -0.0270203934357801, -0.0525714252860962, + 0.0546963405553102, 84, 0.00106245763460698, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.969029270641057, + 0.0273647288132641, 0.0388258053590499)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0243402364643549, 1.18845240349555, 0.606396319979953, "facGenderm", + "", 0.0411589579856779, "contNormal", 0.296972846494519, + 2.04192513604487, -2.5253599855803, 2.4271006304478, -0.0491296775662513, + "debCollin1", "", 0.968980728949519, "contNormal", + 1.26340602559345, -0.0388866892914921, -0.427961665406313, 0.721165200344476, + 0.146601767469081, "facExperimexperimental", "", 0.617010779254138, + "contNormal", 0.293149995309852, 0.500091317805164, -0.226798820391643, + 0.320540798002547, 0.0468709888054523, "contcor2", "", + 0.737112276263644, "contNormal", 0.13963001940636, 0.335679884631723, + -1.09233484275545, 0.569206443468595, -0.261564199643428, "facGenderm:facExperimexperimental", + "", 0.537178416952965, "contNormal", 0.423870361733704, + -0.617085371512142, -0.393011255013363, 0.438394760503244, 0.0226917527449406, + "facGenderm:contcor2", "", 0.914798910542314, "contNormal", + 0.21209726864234, 0.106987482159451, -0.0402675099929813, 0.0518453230774713, + 0.005788906542245, "facGenderm", "", 0.805410465535825, + "debCollin1", 0.0234986034939996, 0.246351088213528, -0.048909695751774, + 0.042035000311755, -0.00343734772000949, "facExperimexperimental", + "", 0.882218327098489, "debCollin1", 0.0232006038837676, + -0.148157683189206, -0.0174100536952497, 0.0258806662950872, + 0.00423530629991873, "contcor2", "", 0.701347280669231, + "debCollin1", 0.0110437539495135, 0.383502414059606, -0.0882812440599911, + 0.0429308904125821, -0.0226751768237045, "facGenderm:facExperimexperimental", + "", 0.498142723655452, "debCollin1", 0.0334730983598571, + -0.677414937211128, -0.0370220818373693, 0.0287647303082602, + -0.00412867576455456, "facGenderm:contcor2", "", 0.805675692292359, + "debCollin1", 0.0167826584224372, -0.246008448758917)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.161063580577153, 1.3309827768985, 16, 0.584959598160674, 0, + "Total", 0.124338575325164, 0.380631064969746, 1.53681517877993, + -0.362292165920087, 1.00908296295458, 16, 0.323395398517246, + 0, "Total", 0.355282839208367, 0.349847022621818, 0.924390884031715, + 0.0264660696574803, 1.18673991420012, 16, 0.606602991928799, + 1, "Total", 0.0404251378904898, 0.295993664601679, 2.04937829579937, + -0.243361231648627, 0.933438816219368, 16, 0.34503879228537, + 0, "Total", 0.250421468702713, 0.300209610265914, 1.14932627233268, + -0.0601023819164979, 1.32404712491178, 50, 0.631972371497642, + 0, "Total", 0.0734935765426332, 0.353105852389706, 1.78975331963675, + -0.404959818410982, 1.14577616211941, 16, 0.370408171854214, + 0, "Total", 0.349112357261538, 0.395603182701927, 0.936312416205467, + -0.162058678454421, 1.33420592302798, 50, 0.586073622286781, + 1, "Total", 0.124685322390372, 0.381707167398164, 1.53540114607133, + -0.358874340731242, 1.00789318601795, 16, 0.324509422643352, + 0, "Total", 0.352007624549006, 0.348671592317532, 0.930702213181236, + 0.0258105235112702, 1.18962350859854, 84, 0.607717016054905, + 0, "Total", 0.0406680619576028, 0.296896523167588, 2.04689839264931, + -0.23862533081131, 0.930930963634264, 16, 0.346152816411477, + 0, "Total", 0.245976124972622, 0.298361680028532, 1.16017853357835, + -0.0595464279854846, 1.32571921923298, 84, 0.633086395623749, + 1, "Total", 0.0732189208442462, 0.353390587313151, 1.79146366188511, + -0.400269783880402, 1.14331417584104, 16, 0.37152219598032, + 0, "Total", 0.345435555479174, 0.393778654071462, 0.943479775094404, + -0.160931607550296, 1.33123774242678, 16, 0.585153067438243, + 0, "Total", 0.124245135978858, 0.380662441184409, 1.53719675000657, + -0.361366715203877, 1.00854445079351, 16, 0.323588867794814, + 1, "Total", 0.354481142652838, 0.349473555841604, 0.925932341334227, + 0.0267443639913132, 1.18684855842142, 16, 0.606796461206367, + 1, "Total", 0.0403320719555929, 0.295950385716488, 2.05033171265288, + -0.242152732018858, 0.932617255144735, 16, 0.345232261562939, + 1, "Total", 0.249338363030732, 0.299691728121034, 1.15195792599091, + -0.0596767282240156, 1.32400840977444, 50, 0.632165840775211, + 0, "Total", 0.0733090134959764, 0.352987388776729, 1.7909020573397, + -0.403852458161719, 1.14505574042528, 16, 0.370601641131782, + 1, "Total", 0.34829223981775, 0.395136903230006, 0.937906933273852, + -0.162658923698209, 1.33519310682691, 50, 0.586267091564349, + 1, "Total", 0.124960725352245, 0.382112131227916, 1.53428023779403, + -0.358749052686135, 1.00815483652798, 16, 0.324702891920921, + 1, "Total", 0.351768640470722, 0.348706379299843, 0.931164186249995, + 0.0251470420283764, 1.19067392863657, 84, 0.607910485332473, + 0, "Total", 0.0409003169239952, 0.297333750977498, 2.04453911920171, + -0.238348935665586, 0.931041507043676, 16, 0.346346285689045, + 1, "Total", 0.245645311615903, 0.298319370134672, 1.1609916095381, + -0.0599123033992006, 1.32647203320183, 84, 0.633279864901317, + 1, "Total", 0.0733631063616897, 0.353675972501704, 1.79056513345211, + -0.399869047944765, 1.14330037846054, 16, 0.371715665257889, + 1, "Total", 0.34505485423979, 0.393672903833344, 0.944224663771245, + -0.16094317423014, 1.33170286048495, 16, 0.585379843127403, + 0, "Total", 0.124219521971334, 0.38078404666843, 1.53730138709599, + -0.360462293155069, 1.00809358012302, 50, 0.323815643483975, + 0, "Total", 0.353667588937393, 0.349127811549876, 0.927498849336771, + 0.0268566844870338, 1.18718978930402, 16, 0.607023236895528, + 1, "Total", 0.0402968204684866, 0.296008782296396, 2.05069333479339, + -0.240945570199154, 0.931863644703353, 50, 0.345459037252099, + 0, "Total", 0.248237142070602, 0.299191521924249, 1.15464179944098, + -0.059357083570828, 1.32414231649957, 50, 0.632392616464371, + 0, "Total", 0.0731674087821967, 0.352940005781551, 1.79178502324779, + -0.402713501265494, 1.14437033490738, 50, 0.370828416820943, + 0, "Total", 0.347429174294932, 0.394671496103009, 0.939587531611751, + -0.163526879595704, 1.33651461410272, 50, 0.586493867253509, + 1, "Total", 0.125366204035899, 0.382670678015148, 1.5326334128749, + -0.358783682310309, 1.00864301753047, 50, 0.324929667610081, + 0, "Total", 0.351616567144655, 0.348839751808418, 0.931458258199117, + 0.0241584392447585, 1.19211608279851, 84, 0.608137261021634, + 0, "Total", 0.0412463416716053, 0.297953853429566, 2.0410451283705, + -0.238237143057557, 0.931383265813968, 50, 0.346573061378206, + 0, "Total", 0.245429125735986, 0.298378036049984, 1.16152336802749, + -0.0605193890329057, 1.32753267021386, 84, 0.633506640590477, + 1, "Total", 0.0736060833820995, 0.354101419769839, 1.78905422351102, + -0.39956009122938, 1.14344497312348, 50, 0.371942440947049, + 0, "Total", 0.344709239350367, 0.39363097396786, 0.944901355698239, + -0.0244283150989186, 0.0234846921824621, 16, -0.000471811458228212, + 0, "Total indirect", 0.969208888777844, 0.0122229305383447, + -0.0386005186520604, -0.0318354445667261, 0.0331198699024824, + 50, 0.000642212667878124, 1, "Total indirect", 0.969084689318117, + 0.0165705377704814, 0.0387562960703758, -0.0144874983037292, + 0.0139308139424093, 16, -0.000278342180659924, 1, "Total indirect", + 0.969373864077578, 0.00724970266553328, -0.0383935995034976, + -0.0413456190842682, 0.043016982975161, 50, 0.000835681945446412, + 1, "Total indirect", 0.969025801638701, 0.0215214674159502, + 0.0388301563873412, -0.00379201780609793, 0.00368888482309922, + 50, -5.15664914993589e-05, 0, "Total indirect", 0.978443468359279, + 0.00190842859567971, -0.0270203934357801, -0.0525714252860962, + 0.0546963405553102, 50, 0.00106245763460698, 1, "Total indirect", + 0.969029270641057, 0.0273647288132641, 0.0388258053590499, 50, + 1, 50, 1, 84, 0, 50, 1, 84, 1, 50, 1, 16, 0, 84, 0, 16, 1, 84, + 0, 50, 0, 84, 0, 50, 1, 84, 0, 84, 0, 84, 0, 84, 1, 84, 0, 16, + 0, 84, 1, 16, 1, 84, 1, 50, 0, 84, 1, 50, 1, 84, 1, 84, 0, 84, + 1, 84, 1, 84, 1, 16, 0, 16, 1, 50, 0, 50, 1, 84, 0, 84, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-10") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-10") +}) + + +context('Model number 11 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1478.25492199933, 1548.594517021, 392.934333115808, 18, 1, 100, + 2.71738116379073e-72, 0, 392.934333115808, 18)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 11)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544847255124211, 0.0642093136510237, -0.240318970736594, "contcor1", + "", 0.121933519655154, "contGamma", 0.15537442870874, + -1.54670863625241, -0.403935589821029, 0.194626071772259, -0.104654759024385, + "contcor2", "", 0.493107401820007, "contGamma", 0.152697107272038, + -0.685374863309863, 1.37708740170956, 3.45910121683836, 2.41809430927396, + "contGamma__contcor1__contcor2", "", 5.29652528347135e-06, + "contGamma", 0.531135732990878, 4.55268617620101, 0.424978747818096, + 0.896762100098777, 0.660870423958436, "contcor2", "", + 3.99654418448137e-08, "contcor1", 0.120355107543314, 5.49100439065786, + -0.374368207420911, 0.853228306196724, 0.239430049387906, "contGamma__contcor1__contcor2", + "", 0.444544582945861, "contcor1", 0.313168130460753, + 0.764541554837145, -0.164894281850679, 1.0624796676236, 0.448792692886461, + "contGamma__contcor1__contcor2", "", 0.151762824945007, + "contcor2", 0.313111352850269, 1.43333254703503, 0.798506706860731, + 1.41091327522396, 1.10470999104234, "contNormal", "", + 1.53721479989599e-12, "contNormal", 0.156229036143983, 7.07109266182905, + 0.00458999238610685, 0.00811026037339136, 0.00635012637974911, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000898044049546811, 7.07106336593805, 1.68041059163168, 2.96919008469576, + 2.32480033816372, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776320184914, 7.07106988987584, 0.732634567948486, + 1.29452386505783, 1.01357921650316, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341740343561, 7.07106816251717, + 0.721541494619167, 1.27492250723111, 0.99823200092514, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171219720604, + 7.07107300553734, 6.95315058063687, 12.2858175007182, 9.61948404067751, + "contGamma__contcor1__contcor2", "", 1.53743684450092e-12, + "contGamma__contcor1__contcor2", 1.36039921196121, 7.07107439941077 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.180373800131645, 0.0938531100222641, "", "", -0.0432603450546905, + "contGamma", "contNormal", "", "", "", 0.536322475492894, + 0.0699571299056963, -0.618383645998719, -0.00831432873154174, + 0.00998707644335044, 16, 16, 0.000836373855904348, "contGamma", + "debCollin1", "contNormal", "", "", 0.857827279110818, + 0.00466881160043025, 0.179140630953554, -0.0190242185399618, + 0.0231739466057699, 50, 16, 0.00207486403290405, "contGamma", + "debCollin1", "contNormal", "", "", 0.847161793408729, + 0.0107650358574406, 0.19274102384619, -0.0316635054788115, 0.0385165427849285, + 84, 16, 0.00342651865305848, "contGamma", "debCollin1", "contNormal", + "", "", 0.84822064720642, 0.0179034025158909, + 0.191389242911627, -0.00639456789666605, 0.0068605424054091, + 16, 50, 0.000232987254371526, "contGamma", "debCollin1", "contNormal", + "", "", 0.945068248382266, 0.00338146782456968, + 0.0689012187780246, -0.0135214204147147, 0.0164643752774572, + 50, 50, 0.00147147743137123, "contGamma", "debCollin1", "contNormal", + "", "", 0.847459755582252, 0.00764957823936971, + 0.19236059627419, -0.025704968945329, 0.0313512330483803, 84, + 50, 0.00282313205152566, "contGamma", "debCollin1", "contNormal", + "", "", 0.846209214998731, 0.0145554210291009, + 0.19395742973572, -0.0125215897806928, 0.0115730408662577, 16, + 84, -0.000474274457217585, "contGamma", "debCollin1", "contNormal", + "", "", 0.938496922137956, 0.00614670239785166, + -0.077159170319251, -0.00992879740906418, 0.0114572288486284, + 50, 84, 0.000764215719782117, "contGamma", "debCollin1", "contNormal", + "", "", 0.888599885198214, 0.00545571919340938, + 0.140076072959419, -0.0196190404487132, 0.0238507811285863, + 84, 84, 0.00211587033993654, "contGamma", "debCollin1", "contNormal", + "", "", 0.848681975655468, 0.0110894439694259, + 0.190800399530408)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.180373800131645, 0.0938531100222641, -0.0432603450546905, "contGamma", + "", 0.536322475492894, "contNormal", 0.0699571299056963, + -0.618383645998719, -2.81962328056246, 2.30039957449304, -0.259611853034711, + "debCollin1", "", 0.842449872634511, "contNormal", + 1.30615228020555, -0.198760785376309, -0.0201068058853375, 0.00866075845566146, + -0.00572302371483802, "contGamma", "", 0.435490310582154, + "debCollin1", 0.00733879922486174, -0.779831078557111, -0.0350283147727437, + 0.0413280655743207, 0.00314987540078852, "contcor1", "", + 0.871537381041936, "debCollin1", 0.0194790263875647, 0.161705997934239, + -0.0390764372118419, 0.0457717636911585, 0.00334766323965828, + "contcor2", "", 0.877089588737272, "debCollin1", 0.0216453469482787, + 0.154659717289701, -0.0169077322707675, 0.00681510471398433, + -0.00504631377839157, "contGamma:contcor1:contcor2", "", + 0.40436791750987, "debCollin1", 0.00605185533302513, -0.833845738323207, + -0.0236340738143865, 0.0138397001594559, -0.00489718682746533, + "contGamma:contcor1", "", 0.608463376198165, "debCollin1", + 0.00955981188160363, -0.512268116581792, -0.0167951927247579, + 0.0216687247329567, 0.0024367660040994, "contGamma:contcor2", + "", 0.803875014284377, "debCollin1", 0.00981240414648254, + 0.248335267047976, -0.0164773625911844, 0.0426898277686218, + 0.0131062325887187, "contcor1:contcor2", "", 0.385224421387731, + "debCollin1", 0.0150939483649979, 0.868310416319653)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.178432722148364, 0.0935847797507917, 16, 16, -0.0424239711987861, + "Total", 0.540965435161118, 0.0693934949939884, -0.611353718420744, + -0.176422460975959, 0.0940514989323866, 50, 16, -0.0411854810217864, + "Total", 0.550578560359569, 0.0689997270464688, -0.596893390520944, + -0.175672886778307, 0.0960052339750429, 84, 16, -0.039833826401632, + "Total", 0.565463547787799, 0.0693069165801801, -0.57474532654398, + -0.179909236134803, 0.0938545205341655, 16, 50, -0.043027357800319, + "Total", 0.537832637621918, 0.0698389763353772, -0.616093763942002, + -0.177238989807126, 0.0936612545604873, 50, 50, -0.0417888676233193, + "Total", 0.545388226573553, 0.0691084750802667, -0.604685135575386, + -0.175762274351777, 0.0948878483454473, 84, 50, -0.0404372130031648, + "Total", 0.55809902422622, 0.0690446673592163, -0.585667431675549, + -0.182168045332997, 0.0946988063091813, 16, 84, -0.0437346195119081, + "Total", 0.535783175586366, 0.0706305967421007, -0.619202180488434, + -0.178739443271857, 0.0937471846020401, 50, 84, -0.0424961293349084, + "Total", 0.540975023157223, 0.0695131721866414, -0.611339232524264, + -0.17641227383366, 0.0941233244041521, 84, 84, -0.0411444747147539, + "Total", 0.551066184200156, 0.0690154513990467, -0.596163234184428, + -0.00831432873154174, 0.00998707644335044, 16, 16, 0.000836373855904348, + "Total indirect", 0.857827279110818, 0.00466881160043025, 0.179140630953554, + -0.0190242185399618, 0.0231739466057699, 50, 16, 0.00207486403290405, + "Total indirect", 0.847161793408729, 0.0107650358574406, 0.19274102384619, + -0.0316635054788115, 0.0385165427849285, 84, 16, 0.00342651865305848, + "Total indirect", 0.84822064720642, 0.0179034025158909, 0.191389242911627, + -0.00639456789666605, 0.0068605424054091, 16, 50, 0.000232987254371526, + "Total indirect", 0.945068248382266, 0.00338146782456968, 0.0689012187780246, + -0.0135214204147147, 0.0164643752774572, 50, 50, 0.00147147743137123, + "Total indirect", 0.847459755582252, 0.00764957823936971, 0.19236059627419, + -0.025704968945329, 0.0313512330483803, 84, 50, 0.00282313205152566, + "Total indirect", 0.846209214998731, 0.0145554210291009, 0.19395742973572, + -0.0125215897806928, 0.0115730408662577, 16, 84, -0.000474274457217585, + "Total indirect", 0.938496922137956, 0.00614670239785166, -0.077159170319251, + -0.00992879740906418, 0.0114572288486284, 50, 84, 0.000764215719782117, + "Total indirect", 0.888599885198214, 0.00545571919340938, 0.140076072959419, + -0.0196190404487132, 0.0238507811285863, 84, 84, 0.00211587033993654, + "Total indirect", 0.848681975655468, 0.0110894439694259, 0.190800399530408 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-11") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-11") +}) + + +context('Model number 12 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1485.37964375886, 1571.35025989646, 388.059054875338, 12, 1, 100, + 1.27491975667028e-75, 0, 388.059054875338, 12)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 12)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544847803790458, 0.0642062476913288, -0.240320778049565, "contcor1", + "", 0.121929171343895, "contGamma", 0.155373786530244, + -1.54672666101746, -0.403928583292209, 0.194631489103117, -0.104648547094546, + "contcor2", "", 0.493131918761017, "contGamma", 0.152696701856945, + -0.685336001510934, 1.37709116642521, 3.45910533515417, 2.41809825078969, + "contGamma__contcor1__contcor2", "", 5.29635786428173e-06, + "contGamma", 0.531135823196656, 4.55269282391141, 0.424978253877462, + 0.89676070589515, 0.660869479886306, "contcor2", "", + 3.99648456550494e-08, "contcor1", 0.120354877880167, 5.49100702461191, + -0.374382045659182, 0.853213575999649, 0.239415765170233, "contGamma__contcor1__contcor2", + "", 0.444571422622987, "contcor1", 0.313167902916061, + 0.764496498334966, -0.164886629032605, 1.0624913731077, 0.448802372037546, + "contGamma__contcor1__contcor2", "", 0.151755346950988, + "contcor2", 0.313112386712639, 1.43335872703572, 0.760509995661945, + 1.34377363438096, 1.05214181502145, "contNormal", "", + 1.53699275529107e-12, "contNormal", 0.148794478704639, 7.07110790790818, + 0.00458999332336963, 0.00811026364251723, 0.00635012848294343, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000898044644420776, 7.07106102396407, 1.68040789189667, 2.96918066817823, + 2.32479428003745, "contGamma", "", 1.53721479989599e-12, + "contGamma", 0.3287746066885, 7.07108831625824, 0.732633665829833, + 1.29452071853936, 1.0135771921846, "contcor1", "", + 1.53721479989599e-12, "contcor1", 0.143341167782067, 7.071082284788, + 0.721541716398865, 1.27492328079512, 0.998232498596995, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171360484494, + 7.07106948017715, 6.95315901672264, 12.2858469236744, 9.61950297019854, + "contGamma__contcor1__contcor2", "", 1.53743684450092e-12, + "contGamma__contcor1__contcor2", 1.36040456585309, 7.07106048572124 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.198190545644114, 0.195256809378249, 16, 16, -0.00146686813293267, + "contGamma", "contNormal", "", "", "", 0.988339769583998, + 0.100371067561911, -0.0146144518392003, -0.256620051289067, + 0.255992085449117, 50, 16, -0.000313982919974812, "contGamma", + "contNormal", "", "", "", 0.998084267484882, 0.130770805173361, + -0.00240101695144088, -0.469663723436784, 0.471552212960861, + 84, 16, 0.00094424476203819, "contGamma", "contNormal", "", + "", "", 0.996862293327743, 0.240110518311009, 0.00393254226712024, + -0.336773277256506, 0.279702668401243, 16, 50, -0.0285353044276316, + "contGamma", "contNormal", "", "", "", 0.856018478399166, + 0.157267161672468, -0.181444772857671, -0.215051573246503, 0.160286734817156, + 50, 50, -0.0273824192146737, "contGamma", "contNormal", "", + "", "", 0.774897803438571, 0.0957513278367052, -0.285974302741491, + -0.336423362091139, 0.284174979025818, 84, 50, -0.0261241915326607, + "contGamma", "contNormal", "", "", "", 0.868936089797665, + 0.158318812491494, -0.165010027055782, -0.610763841113039, 0.49023650804416, + 16, 84, -0.0602636665344395, "contGamma", "contNormal", "", + "", "", 0.830111376512877, 0.280872597109373, -0.214558725751991, + -0.435323335311096, 0.317101772668133, 50, 84, -0.0591107813214816, + "contGamma", "contNormal", "", "", "", 0.758119677961337, + 0.191948707709494, -0.307950920987409, -0.360479960291797, 0.24477485301286, + 84, 84, -0.0578525536394686, "contGamma", "contNormal", "", + "", "", 0.707897276591084, 0.154404575308228, -0.374681602044378, + -0.00840734032248223, 0.010405099921381, 16, 16, 0.000998879799449378, + "contGamma", "debCollin1", "contNormal", "", "", + 0.835123160479849, 0.00479918008500497, 0.208135511015804, -0.0186037395231193, + 0.0235597402394947, 50, 16, 0.0024780003581877, "contGamma", + "debCollin1", "contNormal", "", "", 0.817797229845098, + 0.010756187382828, 0.23037906183596, -0.0310737709269166, 0.0392583158402712, + 84, 16, 0.00409227245667729, "contGamma", "debCollin1", "contNormal", + "", "", 0.819583264249124, 0.0179421885611058, + 0.228081008219271, -0.00748371163152029, 0.0080402302027024, + 16, 50, 0.000278259285591054, "contGamma", "debCollin1", "contNormal", + "", "", 0.943984452868259, 0.00396026201416801, + 0.0702628474064518, -0.0132358612684724, 0.0167506209571311, + 50, 50, 0.00175737984432938, "contGamma", "debCollin1", "contNormal", + "", "", 0.818301378426911, 0.00764975337866743, + 0.22973026153106, -0.0250555254084608, 0.0317988292940987, 84, + 50, 0.00337165194281897, "contGamma", "debCollin1", "contNormal", + "", "", 0.816177070952864, 0.0145039284270067, + 0.232464739452304, -0.0146041529398349, 0.013471315808577, 16, + 84, -0.000566418565628914, "contGamma", "debCollin1", "contNormal", + "", "", 0.936965820931157, 0.00716224098245366, + -0.0790839860061325, -0.010802281767157, 0.0126276857533759, + 50, 84, 0.000912701993109409, "contGamma", "debCollin1", "contNormal", + "", "", 0.878635869539672, 0.00597714236214173, + 0.152698720862049, -0.0192831326368116, 0.0243370808200096, + 84, 84, 0.002526974091599, "contGamma", "debCollin1", "contNormal", + "", "", 0.820356573708245, 0.011127809949798, + 0.2270863811477)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.2122483199933, 0.159171964193048, -0.026538177900126, "contGamma", + "", 0.779415400239793, "contNormal", 0.0947518135833271, + -0.280080949340222, -2.83291666493654, 2.21281533272432, -0.310050666106109, + "debCollin1", "", 0.809654213422061, "contNormal", + 1.28720018262095, -0.240872142726702, -0.263164610016208, 0.71982304248456, + 0.228329216234176, "contcor1", "", 0.362546106425621, + "contNormal", 0.250766764148334, 0.910524235576587, -0.627174414670111, + 0.465122051751839, -0.0810261814591362, "contcor2", "", + 0.771220402786989, "contNormal", 0.278652178059864, -0.290778927418716, + -0.170439113084801, 0.135980933088431, -0.0172290899981848, + "contGamma:contcor1:contcor2", "", 0.825555036341219, + "contNormal", 0.0781698155145283, -0.220405918637261, -0.240313923126456, + 0.242680903669207, 0.00118349027137563, "contGamma:contcor1", + "", 0.992336384917442, "contNormal", 0.12321523012807, + 0.00960506481337991, -0.276009624806565, 0.219250479713886, + -0.0283795725463398, "contGamma:contcor2", "", 0.822274032056943, + "contNormal", 0.126344185002122, -0.224621121627901, -0.231405433326397, + 0.533060211457018, 0.15082738906531, "contcor1:contcor2", "", + 0.439289736639964, "contNormal", 0.19502032966254, 0.773393160222318, + -0.0201068593103259, 0.00866070979483245, -0.00572307475774672, + "contGamma", "", 0.435486292173173, "debCollin1", 0.00733880044023085, + -0.779837904621738, -0.0350282621504654, 0.0413281308405081, + 0.00314993434502136, "contcor1", "", 0.871535019064797, + "debCollin1", 0.019479029613111, 0.161708997192611, -0.039076437873456, + 0.0457717770794401, 0.00334766960299203, "contcor2", "", + 0.877089377153362, "debCollin1", 0.0216453505325016, 0.15465998566137, + -0.0169077395886263, 0.00681510132491803, -0.00504631913185416, + "contGamma:contcor1:contcor2", "", 0.40436749679341, + "debCollin1", 0.00605185633528655, -0.83384648482658, -0.0236341091161224, + 0.0138396710630324, -0.004897219026545, "contGamma:contcor1", + "", 0.608461078608202, "debCollin1", 0.00955981346462057, + -0.512271399925205, -0.0167951801590699, 0.0216687436678262, + 0.00243678175437812, "contGamma:contcor2", "", 0.803873804271087, + "debCollin1", 0.00981240577130361, 0.248336831065883, -0.0164773411245836, + 0.0426898590341237, 0.0131062589547701, "contcor1:contcor2", + "", 0.385223544083813, "debCollin1", 0.0150939508647635, + 0.868312019311415)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.197080701693482, 0.196144725026516, 16, 16, -0.00046798833348329, + "Total", 0.996277711701266, 0.100314452158741, -0.00466521347036545, + -0.255153939181288, 0.256523732940237, 16, 16, 0.000684896879474565, + "Total", 0.995813559947943, 0.130532416962142, 0.00524694857732701, + -0.468183505275286, 0.472069754398261, 50, 16, 0.00194312456148757, + "Total", 0.993536478589115, 0.239864933001357, 0.00810091136363218, + -0.335858202526971, 0.280785353270607, 16, 16, -0.0275364246281822, + "Total", 0.861043726797439, 0.157309920146897, -0.175045697070271, + -0.213668717154641, 0.160901638324192, 84, 16, -0.0263835394152243, + "Total", 0.782465726607102, 0.0955554179651761, -0.27610720540032, + -0.334847898365986, 0.284597274899563, 16, 16, -0.0251253117332113, + "Total", 0.87367188864785, 0.158024631613554, -0.158996173423488, + -0.60991334914347, 0.49138377567349, 16, 50, -0.0592647867349901, + "Total", 0.832929783096472, 0.280948306577022, -0.210945520395022, + -0.434281595202547, 0.318057792158483, 16, 16, -0.0581119015220322, + "Total", 0.762056362744852, 0.191926839803024, -0.302781526448688, + -0.359074750068617, 0.245367402388579, 50, 50, -0.0568536738400192, + "Total", 0.712345817904289, 0.154197260058082, -0.368707419435363, + -0.196008857896566, 0.198031122347076, 16, 16, 0.00101113222525503, + "Total", 0.991974381939948, 0.100522250243315, 0.0100587901962757, + -0.253421821950733, 0.257749856827159, 84, 50, 0.00216401743821289, + "Total", 0.98675987188433, 0.130403334655624, 0.0165948013824014, + -0.46623026669176, 0.473074756932212, 16, 16, 0.00342224512022589, + "Total", 0.988605169944445, 0.23962303160494, 0.0142817870941056, + -0.334867569003774, 0.282752960864886, 16, 84, -0.0260573040694439, + "Total", 0.868644038521917, 0.157559152805963, -0.165381087708271, + -0.212220976078294, 0.162412138365322, 16, 16, -0.024904418856486, + "Total", 0.794413056798268, 0.0955714281993637, -0.260584353772918, + -0.33287694318572, 0.285584560836774, 50, 84, -0.023646191174473, + "Total", 0.88086393990935, 0.157773690971069, -0.149874107837213, + -0.608858022758195, 0.493286690405691, 16, 16, -0.0577856661762517, + "Total", 0.837163841268707, 0.281164532067289, -0.205522601842335, + -0.433037928585305, 0.319772366658717, 84, 84, -0.0566327809632939, + "Total", 0.768077714322896, 0.192046971572461, -0.294890257834271, + -0.357365609671741, 0.24661650310918, 16, 16, -0.0553745532812809, + "Total", 0.719304433640525, 0.154079900841305, -0.359388557358393, + -0.195857757053512, 0.201108565701001, 16, 16, 0.00262540432374462, + "Total", 0.979317071379012, 0.101268779907624, 0.0259251106425838, + -0.252320583262962, 0.259877162336367, 50, 16, 0.00377828953670248, + "Total", 0.976931720554793, 0.130665091205624, 0.0289158297892793, + -0.46452809565116, 0.474601130088591, 50, 16, 0.00503651721871548, + "Total", 0.983227757721642, 0.239578184381826, 0.0210224367118859, + -0.334437400979037, 0.285551337037128, 50, 16, -0.0244430319709543, + "Total", 0.877181602816987, 0.158163298638791, -0.15454300827891, + -0.211715315479528, 0.165135021963535, 84, 16, -0.0232901467579964, + "Total", 0.808578839840309, 0.0961370567050239, -0.242259827336479, + -0.331378233169057, 0.28731439501709, 50, 16, -0.0220319190759834, + "Total", 0.888983646027746, 0.157832652300327, -0.139590374709415, + -0.608071774660976, 0.495728986505451, 16, 50, -0.0561713940777622, + "Total", 0.841886122495947, 0.281587001055394, -0.199481488375638, + -0.432215997676522, 0.322178979946914, 50, 16, -0.0550185088648043, + "Total", 0.774967843954968, 0.192451234709925, -0.285882857274113, + -0.356168351519162, 0.248647789153579, 50, 50, -0.0537602811827913, + "Total", 0.727516851113484, 0.154292666968233, -0.348430565360956, + -0.197971859518241, 0.195594641823558, 50, 16, -0.00118860884734161, + "Total", 0.990554415528556, 0.100401462589671, -0.0118385610795265, + -0.256281196197056, 0.256209748928289, 84, 50, -3.57236343837586e-05, + "Total", 0.999781984394131, 0.130739888377493, -0.000273242044391316, + -0.469289260338215, 0.471734268433473, 50, 16, 0.00122250404762924, + "Total", 0.995936819698076, 0.24006143383102, 0.00509246332540765, + -0.336576105450318, 0.280062015166237, 16, 84, -0.0282570451420405, + "Total", 0.857444482298976, 0.157308533595647, -0.179628177163444, + -0.214761308755635, 0.160552988897469, 50, 16, -0.0271041599290827, + "Total", 0.777110645012441, 0.0957452026194194, -0.28308634989076, + -0.336041980815034, 0.284350116320894, 50, 84, -0.0258459322470697, + "Total", 0.870276950491881, 0.158266198264229, -0.16330671065921, + -0.610559254243989, 0.490588439746292, 50, 16, -0.0599854072488484, + "Total", 0.830906220084237, 0.280910185767696, -0.213539452422898, + -0.435080450453193, 0.317415406381411, 84, 84, -0.0588325220358905, + "Total", 0.759244953250238, 0.191966756218531, -0.306472449682468, + -0.360147400037855, 0.2449988113301, 50, 16, -0.0575742943538775, + "Total", 0.709188354598811, 0.154376870223451, -0.372946376426354, + -0.196413711691496, 0.196994735114289, 16, 16, 0.00029051171139671, + "Total", 0.99769039608994, 0.100361141814069, 0.00289466327450635, + -0.254175342168071, 0.25706213601678, 84, 16, 0.00144339692435457, + "Total", 0.991169762713014, 0.130420120527067, 0.0110672871526369, + -0.467132751000838, 0.472536000213573, 50, 16, 0.00270162460636757, + "Total", 0.991007940474514, 0.239715820960589, 0.0112701139021264, + -0.335275396629068, 0.281719547462464, 84, 16, -0.0267779245833022, + "Total", 0.864910213353316, 0.157399561664987, -0.170127059440591, + -0.212802886941483, 0.161552808200795, 84, 16, -0.0256250393703443, + "Total", 0.788450569337589, 0.0955006566689867, -0.26832317456374, + -0.333762597330656, 0.285028973953993, 84, 16, -0.0243668116883313, + "Total", 0.877326553904132, 0.15785789335049, -0.154359159185218, + -0.609330260576856, 0.492317687196636, 16, 50, -0.0585062866901101, + "Total", 0.83508887791092, 0.281037803873732, -0.208179418867066, + -0.433582436319061, 0.318875633364757, 84, 16, -0.0573534014771522, + "Total", 0.765106106394152, 0.191957116462116, -0.298782366260806, + -0.358121811384292, 0.245931463794013, 50, 50, -0.0560951737951392, + "Total", 0.715841136951683, 0.154098054847691, -0.364022594902856, + -0.195737156651908, 0.199546724271681, 84, 16, 0.0019047838098863, + "Total", 0.984929456715326, 0.100839577676309, 0.0188892481878552, + -0.252665907149883, 0.258781245195571, 84, 50, 0.00305766902284415, + "Total", 0.981303164572841, 0.130473609816222, 0.0234351531098972, + -0.465208203414405, 0.473839996824119, 84, 16, 0.00431589670485716, + "Total", 0.985625994325273, 0.239557514231286, 0.0180161190881714, + -0.334508954095807, 0.284181649126181, 16, 84, -0.0251636524848126, + "Total", 0.873327733235212, 0.157832135718345, -0.159433010079251, + -0.211742476106383, 0.163720941562673, 84, 16, -0.0240107672718547, + "Total", 0.802062948459763, 0.0957832441388371, -0.250678158666784, + -0.331926168007631, 0.286421088827947, 50, 84, -0.0227525395898417, + "Total", 0.885313627257665, 0.157744545744978, -0.144236616755201, + -0.608355009170375, 0.494570979987134, 84, 16, -0.0568920145916205, + "Total", 0.83975968971215, 0.281363840830048, -0.20220087422671, + -0.432483729007979, 0.321005470250653, 84, 84, -0.0557391293786626, + "Total", 0.771835016496273, 0.192220164554568, -0.289975453448534, + -0.356578946974024, 0.247617143580725, 84, 16, -0.0544809016966496, + "Total", 0.72374105541159, 0.15413448801115, -0.353463409776977, + -0.199447025452273, 0.19538045205515, 16, 16, -0.00203328669856158, + "Total", 0.983894288967411, 0.100723146093952, -0.0201868863058049, + -0.257932381712009, 0.256171578740802, 16, 50, -0.000880401485603727, + "Total", 0.994643949000472, 0.131151379440642, -0.00671286485402304, + -0.470765312860259, 0.471520965253077, 50, 16, 0.000377826196409275, + "Total", 0.998745914435609, 0.240383569684436, 0.00157176381441239, + -0.337693001131974, 0.279489555145453, 16, 50, -0.0291017229932605, + "Total", 0.853358810486584, 0.157447422795951, -0.184834546520179, + -0.216492151968191, 0.160594476407586, 84, 16, -0.0279488377803026, + "Total", 0.771405827939801, 0.0961973361118339, -0.290536504543232, + -0.337713958243831, 0.284332738047252, 16, 50, -0.0266906100982896, + "Total", 0.866429716310295, 0.158688297641617, -0.16819520087466, + -0.611470636163271, 0.489810465963134, 16, 50, -0.0608300851000684, + "Total", 0.828582318446285, 0.280944219080853, -0.216520152288886, + -0.436242467727636, 0.316888067953415, 16, 50, -0.0596771998871105, + "Total", 0.756096670540672, 0.192128667062673, -0.310610596531353, + -0.361684433993915, 0.24484648958372, 50, 50, -0.0584189722050975, + "Total", 0.705761958430194, 0.154730119625124, -0.377553978156505, + -0.197319818071865, 0.196211485792218, 16, 50, -0.000554166139823259, + "Total", 0.995595702523546, 0.10039248347628, -0.0055199963247666, + -0.255390639838998, 0.256588077985267, 84, 50, 0.000598719073134597, + "Total", 0.996342470713637, 0.130609215746485, 0.00458404921668561, + -0.46837120141178, 0.472085094922075, 16, 50, 0.0018569467551476, + "Total", 0.993824464183812, 0.239916729019526, 0.00773996362294713, + -0.336028597875803, 0.280783393006759, 16, 84, -0.0276226024345222, + "Total", 0.860650967817425, 0.157352889070385, -0.175545568929251, + -0.213938531193918, 0.160999096750789, 16, 50, -0.0264697172215643, + "Total", 0.781981504999742, 0.0956491116423992, -0.276737721522453, + -0.335074879583146, 0.284651900504043, 50, 84, -0.0252114895395513, + "Total", 0.873299363520932, 0.158096471408535, -0.159469021129527, + -0.610037935024689, 0.491336005942028, 16, 50, -0.05935096454133, + "Total", 0.832701930256684, 0.280967902893679, -0.211237525461365, + -0.434446425152197, 0.318050266495452, 84, 84, -0.0581980793283722, + "Total", 0.761762480613065, 0.191966969184956, -0.303167152013009, + -0.359289284613813, 0.245409581321094, 16, 50, -0.0569398516463592, + "Total", 0.712046082343161, 0.154262749393533, -0.369109534675168, + -0.196022718465779, 0.198142930383112, 16, 16, 0.00106010595866633, + "Total", 0.991588361395324, 0.100554309150071, 0.0105426208744987, + -0.253402525355676, 0.257828507698925, 50, 50, 0.00221299117162419, + "Total", 0.986461835700408, 0.130418476330975, 0.0169683869485492, + -0.466186299128343, 0.473128736835617, 50, 16, 0.00347121885363719, + "Total", 0.988442239760374, 0.239625585820239, 0.0144860109230623, + -0.33486625264369, 0.282849591971625, 50, 50, -0.0260083303360326, + "Total", 0.868908728548553, 0.157583468239156, -0.165044789448098, + -0.212224964711174, 0.162514074465024, 84, 16, -0.0248554451230747, + "Total", 0.794864999717576, 0.0955984503113558, -0.259998410456683, + -0.332843128655754, 0.285648693773631, 50, 50, -0.0235972174410617, + "Total", 0.881114631601213, 0.157781425400663, -0.149556371297445, + -0.608840726559292, 0.493367341673611, 16, 50, -0.0577366924428405, + "Total", 0.837309137578352, 0.281180694371677, -0.205336616626039, + -0.43302259004171, 0.319854975581945, 50, 50, -0.0565838072298826, + "Total", 0.768292645200638, 0.192064132698932, -0.294608922731971, + -0.357341227388588, 0.246690068292849, 50, 50, -0.0553255795478696, + "Total", 0.719564063300839, 0.154092447730152, -0.359041473886872, + -0.00840734032248223, 0.010405099921381, 50, 50, 0.000998879799449378, + "Total indirect", 0.835123160479849, 0.00479918008500497, 0.208135511015804, + -0.0186037395231193, 0.0235597402394947, 84, 50, 0.0024780003581877, + "Total indirect", 0.817797229845098, 0.010756187382828, 0.23037906183596, + -0.0310737709269166, 0.0392583158402712, 50, 50, 0.00409227245667729, + "Total indirect", 0.819583264249124, 0.0179421885611058, 0.228081008219271, + -0.00748371163152029, 0.0080402302027024, 16, 84, 0.000278259285591054, + "Total indirect", 0.943984452868259, 0.00396026201416801, 0.0702628474064518, + -0.0132358612684724, 0.0167506209571311, 50, 50, 0.00175737984432938, + "Total indirect", 0.818301378426911, 0.00764975337866743, 0.22973026153106, + -0.0250555254084608, 0.0317988292940987, 50, 84, 0.00337165194281897, + "Total indirect", 0.816177070952864, 0.0145039284270067, 0.232464739452304, + -0.0146041529398349, 0.013471315808577, 50, 50, -0.000566418565628914, + "Total indirect", 0.936965820931157, 0.00716224098245366, -0.0790839860061325, + -0.010802281767157, 0.0126276857533759, 84, 84, 0.000912701993109409, + "Total indirect", 0.878635869539672, 0.00597714236214173, 0.152698720862049, + -0.0192831326368116, 0.0243370808200096, 50, 50, 0.002526974091599, + "Total indirect", 0.820356573708245, 0.011127809949798, 0.2270863811477, + 16, 16, 84, 50, 50, 16, 84, 50, 84, 16, 84, 50, 16, 50, 84, + 50, 50, 50, 84, 50, 84, 50, 84, 50, 16, 84, 84, 50, 50, 84, + 84, 50, 84, 84, 84, 50, 16, 16, 16, 84, 50, 16, 16, 84, 84, + 16, 16, 84, 16, 50, 16, 84, 50, 50, 16, 84, 84, 50, 16, 84, + 16, 84, 16, 84, 50, 84, 16, 84, 84, 84, 16, 84, 16, 16, 50, + 84, 50, 16, 50, 84, 84, 16, 50, 84, 16, 50, 50, 84, 50, 50, + 50, 84, 84, 50, 50, 84, 16, 84, 50, 84, 50, 84, 50, 84, 84, + 84, 50, 84, 16, 16, 84, 84, 50, 16, 84, 84, 84, 16, 84, 84, + 16, 50, 84, 84, 50, 50, 84, 84, 84, 50, 84, 84, 16, 84, 84, + 84, 50, 84, 84, 84, 84, 84, 84, 84, 16, 16, 50, 16, 84, 16, + 16, 50, 50, 50, 84, 50, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-12") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-12") +}) + + +context('Model number 13 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1479.3838957062, 1554.93383109986, 390.063306822685, 16, 1, 100, + 4.3946409972079e-73, 0, 390.063306822685, 16)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 13)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544841839590069, 0.0642103397157712, -0.240315749937149, "contcor1", + "", 0.12193583132812, "contGamma", 0.155373308925563, + -1.54669905403302, -0.403926972474838, 0.194631531071185, -0.104647720701827, + "contcor2", "", 0.493134199852502, "contGamma", 0.152696301632932, + -0.685332385805848, 1.37708813326983, 3.45909211057496, 2.4180901219224, + "contGamma__contcor1__contcor2", "", 5.29618206424054e-06, + "contGamma", 0.531133223295865, 4.5526998046127, 0.424977740097662, + 0.896758534600531, 0.660868137349096, "contcor2", "", + 3.99630042391408e-08, "contcor1", 0.120354455036984, 5.49101516139153, + -0.374372755619309, 0.853216980428669, 0.23942211240468, "contGamma__contcor1__contcor2", + "", 0.444557165717401, "contcor1", 0.313166401457131, + 0.764520431600176, -0.164889434753696, 1.06248113925945, 0.448795852252878, + "contGamma__contcor1__contcor2", "", 0.151758816799897, + "contcor2", 0.313110491747422, 1.43334657918429, 0.775908168668414, + 1.37098444746878, 1.0734463080686, "contNormal", "", + 1.53721479989599e-12, "contNormal", 0.151807962670298, 7.07108039121735, + 0.00458999230466927, 0.00811026008934171, 0.00635012619700549, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000898043997859109, 7.07106356942852, 1.68040716331853, 2.96917812698949, + 2.32479264515401, "contGamma", "", 1.53721479989599e-12, + "contGamma", 0.32877414427934, 7.0710932888286, 0.732633024239628, + 1.29451848073177, 1.0135757524857, "contcor1", "", + 1.53721479989599e-12, "contcor1", 0.14334076057627, 7.07109232859402, + 0.721540890903574, 1.27492040153358, 0.998230646218579, "contcor2", + "", 1.53721479989599e-12, "contcor2", 0.141170836554905, + 7.07108260161324, 6.95314309519667, 12.2857913939108, 9.61946724455372, + "contGamma__contcor1__contcor2", "", 1.53721479989599e-12, + "contGamma__contcor1__contcor2", 1.36039446152515, 7.07108674477348 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.16790520060756, 0.202766059027102, 16, "", 0.017430429209771, + "contGamma", "contNormal", "", "", "", 0.853754170652898, + 0.0945607323804084, 0.184330522522289, -0.166283086961489, 0.107777452026824, + 50, "", -0.0292528174673326, "contGamma", "contNormal", "", + "", "", 0.675649330932038, 0.0699146875019304, -0.418407326307865, + -0.285597983027032, 0.125194687171426, 84, "", -0.0802016479278031, + "contGamma", "contNormal", "", "", "", 0.44408560202418, + 0.104795974170632, -0.765312299089048, -0.00850461528326875, + 0.0106088921395365, 16, 16, 0.00105213842813389, "contGamma", + "debCollin1", "contNormal", "", "", 0.829159474490914, + 0.00487598434807226, 0.215779697600927, -0.0186277940000448, + 0.0238480272602331, 50, 16, 0.00261011663009415, "contGamma", + "debCollin1", "contNormal", "", "", 0.809650069457321, + 0.0108358678004601, 0.240877489293782, -0.0311488424503432, + 0.0397697460975684, 84, 16, 0.0043104518236126, "contGamma", + "debCollin1", "contNormal", "", "", 0.811683842329929, + 0.0180918091116236, 0.238254328078403, -0.00785027926235882, + 0.00843648470244218, 16, 50, 0.000293102720041681, "contGamma", + "debCollin1", "contNormal", "", "", 0.943760286312073, + 0.0041548630722985, 0.0705444956768539, -0.0132572259135728, + 0.0169593877575767, 50, 50, 0.00185108092200195, "contGamma", + "debCollin1", "contNormal", "", "", 0.810224643463798, + 0.00770846145885696, 0.240136236249203, -0.0250620716584985, + 0.0321649038895393, 84, 50, 0.00355141611552039, "contGamma", + "debCollin1", "contNormal", "", "", 0.807800452351671, + 0.0145989865118535, 0.243264565840708, -0.0153083449394716, + 0.0141151376690348, 16, 84, -0.000596603635218419, "contGamma", + "debCollin1", "contNormal", "", "", 0.936649085192054, + 0.00750612838822425, -0.0794822049879111, -0.0111449701011966, + 0.0130677192346803, 50, 84, 0.000961374566741849, "contGamma", + "debCollin1", "contNormal", "", "", 0.876314967768529, + 0.00617681996375022, 0.155642316334918, -0.019339072654949, + 0.0246624921754696, 84, 84, 0.00266170976026029, "contGamma", + "debCollin1", "contNormal", "", "", 0.812562648312165, + 0.0112250952511111, 0.237121351820764)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.166080501040776, 0.107923742074461, -0.0290783794831572, "contGamma", + "", 0.677411637884719, "contNormal", 0.0699003260459243, + -0.415997766076982, -2.8570925612822, 2.20392586016974, -0.32658335055623, + "debCollin1", "", 0.800307064797733, "contNormal", + 1.29109985218418, -0.252949723449927, -0.0857154495070445, 0.607916978681742, + 0.261100764587348, "contcor1", "", 0.140062079308548, + "contNormal", 0.176950299510621, 1.47555989059898, -0.1845050166226, + 0.0886599703723616, -0.0479225231251192, "contGamma:contcor1", + "", 0.491647998250285, "contNormal", 0.0696862261627388, + -0.687690032363144, -0.020106834912268, 0.00866072901484062, + -0.00572305294871367, "contGamma", "", 0.435487958962299, + "debCollin1", 0.00733879911927553, -0.779835073245422, -0.0350283644896086, + 0.0413280147586438, 0.00314982513451758, "contcor1", "", + 0.871539411432677, "debCollin1", 0.0194790261072504, 0.161703419728216, + -0.0390763520899919, 0.0457718475929757, 0.0033477477514919, + "contcor2", "", 0.877086508769853, "debCollin1", 0.0216453466370401, + 0.154663623901644, -0.0169077178444939, 0.0068151187990229, + -0.0050462995227355, "contGamma:contcor1:contcor2", "", + 0.404369238318696, "debCollin1", 0.00605185524597378, -0.833843394733001, + -0.02363406550966, 0.0138397079249048, -0.00489717879237759, + "contGamma:contcor1", "", 0.608463959202829, "debCollin1", + 0.0095598117440303, -0.512267283446839, -0.0167952091582651, + 0.0216687077462095, 0.00243674929397219, "contGamma:contcor2", + "", 0.803876329027952, "debCollin1", 0.00981240400534729, + 0.248333567660308, -0.0164773426947278, 0.0426898468140205, + 0.0131062520596463, "contcor1:contcor2", "", 0.385223708555579, + "debCollin1", 0.0150939481478873, 0.8683117187918)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.166497457447767, 0.203462592723577, 16, 16, 0.0184825676379049, + "Total", 0.844740991335893, 0.0943792980609701, 0.195832857603634, + -0.164158643789537, 0.10775728571114, 16, 16, -0.0282006790391987, + "Total", 0.684346065797251, 0.0693675831917106, -0.40653973717465, + -0.283402226908319, 0.125103207908981, 50, 16, -0.0791495094996692, + "Total", 0.447552784673139, 0.104212485035322, -0.759501219770762, + -0.165019143528767, 0.205100235208497, 16, 16, 0.0200405458398652, + "Total", 0.831912721688351, 0.0944199438501723, 0.212249076017944, + -0.161829913922435, 0.108544512247959, 84, 16, -0.0266427008372384, + "Total", 0.699296884379832, 0.0689743353202082, -0.386269772859016, + -0.280692327031734, 0.125509264436316, 16, 16, -0.0775915312977089, + "Total", 0.453993398629581, 0.103624759095605, -0.748774057232042, + -0.164519657289247, 0.208001419356014, 16, 16, 0.0217408810333836, + "Total", 0.819045513069369, 0.0950326331462364, 0.228772794287713, + -0.160814468538509, 0.110929737251069, 50, 16, -0.02494236564372, + "Total", 0.719000249424052, 0.0693237753175727, -0.359795258256765, + -0.278749632229582, 0.126967240021201, 50, 16, -0.0758911961041905, + "Total", 0.463411787931811, 0.103501103961865, -0.733240450576764, + -0.167623392911076, 0.203070456770701, 50, 50, 0.0177235319298127, + "Total", 0.851332342611694, 0.0945664952534238, 0.187418724594967, + -0.165841485804611, 0.107922056310029, 84, 50, -0.0289597147472909, + "Total", 0.678387594491048, 0.0698389216011242, -0.414664403220464, + -0.285086559084914, 0.125269468669391, 50, 50, -0.0799085452077614, + "Total", 0.44526854063095, 0.104684583745196, -0.763326770274597, + -0.165610865198812, 0.204173885462358, 16, 50, 0.019281510131773, + "Total", 0.83804488628579, 0.0943345779764282, 0.204394937099215, + -0.162789559518336, 0.107986086427675, 84, 50, -0.0274017365453306, + "Total", 0.691599227987008, 0.0690766891845602, -0.396685725225166, + -0.281896647774855, 0.125195513763253, 50, 50, -0.0783505670058011, + "Total", 0.450582157747432, 0.103851949512644, -0.754444835879196, + -0.164531625902785, 0.206495316553368, 84, 50, 0.0209818453252914, + "Total", 0.824567050701804, 0.0946514694613691, 0.221674797493291, + -0.160977660973973, 0.109574858270349, 84, 50, -0.0257014013518122, + "Total", 0.709611882793384, 0.0690197680616599, -0.372377393804793, + -0.27942295414093, 0.126122490516364, 84, 50, -0.0766502318122827, + "Total", 0.458761899105173, 0.103457371629322, -0.740887097798243, + -0.169424572031995, 0.2030922231811, 16, 84, 0.0168338255745526, + "Total", 0.859398932270089, 0.0950315409240833, 0.177139351954742, + -0.168454998418988, 0.108756156213886, 16, 84, -0.029849421102551, + "Total", 0.672960579030293, 0.0707184307516566, -0.422088284274489, + -0.28749011381265, 0.125893610686607, 50, 84, -0.0807982515630215, + "Total", 0.443573547344561, 0.105456969556577, -0.766172704400286, + -0.166789406312577, 0.203573013865603, 16, 84, 0.0183918037765129, + "Total", 0.845659556646196, 0.094481945357045, 0.194659452734707, + -0.16457398546747, 0.107991099666288, 84, 84, -0.0282914429005907, + "Total", 0.684098452894586, 0.0695331871615285, -0.406876831848201, + -0.283746257434334, 0.125265710712212, 16, 84, -0.0792402733610612, + "Total", 0.447595073695141, 0.104341705095803, -0.759430500855872, + -0.165027115080622, 0.205211393020685, 16, 84, 0.0200921389700313, + "Total", 0.831539883885447, 0.0944503345524973, 0.212727028074885, + -0.16183065560262, 0.108648440188475, 50, 84, -0.0265911077070723, + "Total", 0.699961395156516, 0.0690010372447146, -0.385372579440596, + -0.280654358001322, 0.125574481666236, 50, 84, -0.0775399381675428, + "Total", 0.454323861947414, 0.103631710294638, -0.748225981671894, + -0.00850461528326875, 0.0106088921395365, 50, 16, 0.00105213842813389, + "Total indirect", 0.829159474490914, 0.00487598434807226, 0.215779697600927, + -0.0186277940000448, 0.0238480272602331, 84, 16, 0.00261011663009415, + "Total indirect", 0.809650069457321, 0.0108358678004601, 0.240877489293782, + -0.0311488424503432, 0.0397697460975684, 50, 16, 0.0043104518236126, + "Total indirect", 0.811683842329929, 0.0180918091116236, 0.238254328078403, + -0.00785027926235882, 0.00843648470244218, 16, 50, 0.000293102720041681, + "Total indirect", 0.943760286312073, 0.0041548630722985, 0.0705444956768539, + -0.0132572259135728, 0.0169593877575767, 84, 50, 0.00185108092200195, + "Total indirect", 0.810224643463798, 0.00770846145885696, 0.240136236249203, + -0.0250620716584985, 0.0321649038895393, 50, 50, 0.00355141611552039, + "Total indirect", 0.807800452351671, 0.0145989865118535, 0.243264565840708, + -0.0153083449394716, 0.0141151376690348, 84, 84, -0.000596603635218419, + "Total indirect", 0.936649085192054, 0.00750612838822425, -0.0794822049879111, + -0.0111449701011966, 0.0130677192346803, 84, 84, 0.000961374566741849, + "Total indirect", 0.876314967768529, 0.00617681996375022, 0.155642316334918, + -0.019339072654949, 0.0246624921754696, 84, 84, 0.00266170976026029, + "Total indirect", 0.812562648312165, 0.0112250952511111, 0.237121351820764, + 16, 16, 50, 16, 84, 16, 16, 50, 50, 50, 84, 50, 16, 84, 50, + 84, 84, 84, 16, 50, 84, 16, 50, 84, 16, 50, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-13") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-13") +}) + + +context('Model number 14 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(955.148946916057, 996.831669891867, 420.632098277383, 4, 1, 100, + 9.67905339551539e-90, 0, 420.632098277383, 4)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 14)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544850992870072, 0.0642056257480021, -0.240322683561035, "contcor1", + "", 0.12192778552759, "contGamma", 0.155374441423984, + -1.54673240565509, 0.761633216782535, 1.34576413253301, 1.05369867465777, + "contNormal", "", 1.53765888910584e-12, "contNormal", + 0.149015726910807, 7.07105683743341, 0.00468048027424967, 0.00827014545037192, + 0.00647531286231079, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915747739355691, 7.07106617251028, 0.323891813323708, + 0.572298570816815, 0.448095192070262, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702352320011, + 7.07106720418137, 1.68041109623431, 2.96919184474601, 2.32480147049016, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776640458047, 7.07106644575259, 0.732634043890801, 1.29452203664436, + 1.01357804026758, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341407593624, 7.07107637132389)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.154212137838194, 0.117652649834565, "", -0.0182797440018144, + "contGamma", "contNormal", "", "", "", 0.792111624517871, + 0.0693545365673029, -0.263569550119846, -0.0186972140331948, + 0.0556664412489178, 16, 0.0184846136078615, "contGamma", "debCollin1", + "contNormal", "", "", 0.329868593979749, 0.01897066881552, + 0.974378594008197, -0.0215733092853902, 0.0242491391027334, + 50, 0.00133791490867159, "contGamma", "debCollin1", "contNormal", + "", "", 0.908878470505166, 0.011689614898428, + 0.11445329211414, -0.0566792527860646, 0.0219281979214447, 84, + -0.0173755274323099, "contGamma", "debCollin1", "contNormal", + "", "", 0.386233739308302, 0.0200532895827563, + -0.866467686541116)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.154212137838194, 0.117652649834565, -0.0182797440018144, "contGamma", + "", 0.792111624517871, "contNormal", 0.0693545365673029, + -0.263569550119846, -2.6575312522695, 2.35035319163935, -0.153589030315077, + "debCollin1", "", 0.904307282453845, "contNormal", + 1.27754501700297, -0.120222010395678, -2.7431518182387, 0.527114642951229, + -1.10801858764374, "contcor1", "", 0.184133744546358, + "contNormal", 0.834266978114235, -1.32813429838526, -0.533831457482717, + 4.39044152108749, 1.92830503180239, "debCollin1:contcor1", "", + 0.124780944594474, "contNormal", 1.25621516961848, 1.53501173878359, + -0.0194720934564407, 0.00121576666817796, -0.00912816339413135, + "contGamma", "", 0.0837015921460502, "debCollin1", + 0.00527761231527768, -1.72960097271773)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.138530988310243, 0.138940727522337, 16, 0.00020486960604707, + "Total", 0.997690721275571, 0.0707849016668779, 0.00289425571305037, + -0.150858236186541, 0.116974578000255, 50, -0.0169418290931428, + "Total", 0.804168461030527, 0.0683259530020518, -0.247955986689774, + -0.171505496518694, 0.100194953650445, 84, -0.0356552714341244, + "Total", 0.60696365277996, 0.0693126129643904, -0.514412455528728, + -0.0186972140331948, 0.0556664412489178, 16, 0.0184846136078615, + "Total indirect", 0.329868593979749, 0.01897066881552, 0.974378594008197, + -0.0215733092853902, 0.0242491391027334, 50, 0.00133791490867159, + "Total indirect", 0.908878470505166, 0.011689614898428, 0.11445329211414, + -0.0566792527860646, 0.0219281979214447, 84, -0.0173755274323099, + "Total indirect", 0.386233739308302, 0.0200532895827563, -0.866467686541116 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-14") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-14") +}) + + +context('Model number 14 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(21159.294383731, 21263.5694747937, 21068.1377517346, 4, 1, 5000, + 0, 0, 21068.1377517346, 4)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 14)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0329823767337021, 0.0470176870965707, 0.0400000319151364, "facExperimexperimental", + "", 0, "facGenderm", 0.00358050210962482, 11.1716264061433, + 1.01344457515027, 1.09613875847256, 1.05479166681141, "contNormal", + "", 0, "contNormal", 0.0210958425702127, 49.9999781142081, + 0.00638917225741288, 0.00691051083703077, 0.00664984154722182, + "debCollin1", "", 0, "debCollin1", 0.000132996979467516, + 49.9999441629879, 0.105866782329825, 0.114505189887998, 0.110185986108911, + "debCollin1:facExperimexperimental", "", 0, "debCollin1:facExperimexperimental", + 0.00220371589128977, 50.0000869188372, 0.240200174417852, 0.259799813300568, + 0.24999999385921, "facGenderm", "", 0, "facGenderm", + 0.00499999975441287, 50.0000012277133, 0.240200133534739, 0.259799765461781, + 0.24999994949826, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.0049999979799735, 50.0000100999212 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.409416404637292, 0.525143292474744, 0.467279848556018, "", "facGenderm", + "contNormal", "", "", "", 0, 0.029522707751339, 15.8278113407407, + -0.00329401471868185, 0.00537585952110455, 0.00104092240121135, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.637901856349501, 0.00221174325349171, 0.470634373844266, -0.0061030036704538, + 0.00284070294702599, -0.0016311503617139, 1, "facGenderm", "debCollin1", + "contNormal", "", "", 0.474661435832041, 0.00228159973551213, + -0.71491521335918)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.409416404637292, 0.525143292474744, 0.467279848556018, "facGenderm", + "", 0, "contNormal", 0.029522707751339, 15.8278113407407, + -0.609821481190504, 0.372186538999835, -0.118817471095335, "debCollin1", + "", 0.635293597667001, "contNormal", 0.250516853354524, + -0.474289332251781, -0.671873198533738, 0.266117508783964, -0.202877844874887, + "facExperimexperimental", "", 0.396526787907336, "contNormal", + 0.239287740671883, -0.847840530004743, -0.397290272316454, 1.00730486687995, + 0.305007297281749, "debCollin1:facExperimexperimental", "", + 0.394652231567447, "contNormal", 0.358321670774482, 0.85121085928881, + -0.0132813123092385, -0.00424005709233972, -0.0087606847007891, + "facGenderm", "", 0.000145701455938951, "debCollin1", + 0.00230648503957599, -3.79828377399735)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.410203492108665, 0.526438049805793, 0.468320770957229, 0, "Total", + 0, 0.02965221774838, 15.7937856429918, 0.407951707862852, 0.523345688525756, + 0.465648698194304, 1, "Total", 0, 0.0294377808911584, 15.8180638654784, + -0.00329401471868185, 0.00537585952110455, 0.00104092240121135, + 0, "Total indirect", 0.637901856349501, 0.00221174325349171, + 0.470634373844266, -0.0061030036704538, 0.00284070294702599, + -0.0016311503617139, 1, "Total indirect", 0.474661435832041, + 0.00228159973551213, -0.71491521335918)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-14") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-14") +}) + + +context('Model number 15 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(957.131264838758, 1001.41915800056, 543.946577284688, 8, 1, 100, + 2.59255662239402e-112, 0, 543.946577284688, 8)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 15)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848823603302, 0.0642080022517989, -0.240320410675752, "contcor1", + "", 0.121931441426344, "contGamma", 0.155374494291544, + -1.54671725093319, 0.761496154623849, 1.34551781847984, 1.05350698655185, + "contNormal", "", 1.53721479989599e-12, "contNormal", + 0.148987856017428, 7.07109300524877, 0.00468048051097151, 0.00827014627604472, + 0.00647531339350811, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915747889601044, 7.07106559244068, 0.323891750756865, + 0.572298352504506, 0.448095051630685, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633701955002846, + 7.07106942140762, 1.68041102377135, 2.96919159193832, 2.32480130785484, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776594450894, 7.07106694056978, 0.732634442280703, 1.29452342635616, + 1.01357893431843, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341660486511, 7.07107013326258)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.197084315569235, 0.178065900846087, 16, -0.00950920736157366, + "contGamma", "contNormal", "", "", "", 0.920851420001434, + 0.0957033443916468, -0.0993612858779431, -0.155656917875457, + 0.11737062015366, 50, -0.0191431488608986, "contGamma", "contNormal", + "", "", "", 0.783436700125237, 0.0696511620067315, + -0.274843208775877, -0.245504980671257, 0.186190237541188, 84, + -0.0296573715650348, "contGamma", "contNormal", "", "", + "", 0.787700190358719, 0.110128354811007, -0.269298234918067, + -0.019406020389845, 0.0555057239404262, 16, 0.0180498517752906, + "contGamma", "debCollin1", "contNormal", "", "", + 0.344914363498197, 0.0191104900195018, 0.94449968351786, -0.0215451826804467, + 0.0245414429654694, 50, 0.00149813014251134, "contGamma", "debCollin1", + "contNormal", "", "", 0.898604477318586, 0.0117570082943976, + 0.127424435281314, -0.0572061998369782, 0.0240742591367435, + 84, -0.0165659703501173, "contGamma", "debCollin1", "contNormal", + "", "", 0.42433090662124, 0.0207351919767025, + -0.798930165138108)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.155572513218103, 0.117358212431157, -0.0191071503934734, "contGamma", + "", 0.783759049731239, "contNormal", 0.0696264645172316, + -0.274423676772281, -2.68758498665873, 2.34579084653381, -0.17089707006246, + "debCollin1", "", 0.894120284381055, "contNormal", + 1.28404804192709, -0.133092426826943, -2.93401123792765, 0.846759990790917, + -1.04362562356837, "contcor1", "", 0.279235745147881, + "contNormal", 0.964500179222885, -1.08203777049501, -0.790607162191484, + 4.51339250007083, 1.86139266893968, "debCollin1:contcor1", "", + 0.168925460869779, "contNormal", 1.35308600160503, 1.37566471512653, + -0.155645022631885, 0.135865644925755, -0.00988968885306519, + "contGamma:contcor1", "", 0.894204370317073, "contNormal", + 0.0743663327124985, -0.132986103957807, -0.0194721021330253, + 0.00121575884015158, -0.00912817164643688, "contGamma", "", + 0.0837013252685839, "debCollin1", 0.00527761253175062, -1.72960246541802 + )) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.176713619447011, 0.193794908274445, 16, 0.00854064441371697, + "Total", 0.928002084921674, 0.0945192183744139, 0.0903588133778823, + -0.141055836904416, 0.1388692427332, 16, -0.00109329708560795, + "Total", 0.987784884935634, 0.0714107712809087, -0.0153099744758006, + -0.234157881654751, 0.210942842075262, 50, -0.0116075197897442, + "Total", 0.918577692267326, 0.113548189466978, -0.102225494252552, + -0.195780688664577, 0.179758534226453, 16, -0.00801107721906232, + "Total", 0.933358023266271, 0.0958025825610153, -0.0836206812479212, + -0.151951276201913, 0.116661238765139, 84, -0.0176450187183872, + "Total", 0.796794310156914, 0.0685248599172824, -0.257498063326023, + -0.240903714813393, 0.184585231968346, 16, -0.0281592414225235, + "Total", 0.795307835744901, 0.108545093210371, -0.259424360785689, + -0.221916184636262, 0.16976582921288, 16, -0.026075177711691, + "Total", 0.794124377714955, 0.0999207171505905, -0.260958672588319, + -0.171419593955874, 0.100001355533843, 50, -0.0357091192110159, + "Total", 0.606050078962449, 0.0692413104604602, -0.515719863959065, + -0.252800184646136, 0.160353500815832, 50, -0.0462233419151522, + "Total", 0.660981279628315, 0.105398285050356, -0.438558766806007, + -0.019406020389845, 0.0555057239404262, 50, 0.0180498517752906, + "Total indirect", 0.344914363498197, 0.0191104900195018, 0.94449968351786, + -0.0215451826804467, 0.0245414429654694, 84, 0.00149813014251134, + "Total indirect", 0.898604477318586, 0.0117570082943976, 0.127424435281314, + -0.0572061998369782, 0.0240742591367435, 50, -0.0165659703501173, + "Total indirect", 0.42433090662124, 0.0207351919767025, -0.798930165138108, + 16, 84, 50, 84, 84, 84, 16, 50, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-15") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-15") +}) + + +context('Model number 15 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(21135.9050394166, 21246.6973236707, 27191.2334916726, 8, 1, 5000, + 0, 0, 27191.2334916726, 8)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 15)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0329823898618306, 0.04701769489124, 0.0400000423765353, "facExperimexperimental", + "", 0, "facGenderm", 0.00358050074902347, 11.1716335731656, + 1.00830903039234, 1.09058395103298, 1.04944649071266, "contNormal", + "", 0, "contNormal", 0.0209888858391302, 50.0001047581168, + 0.00638916506814799, 0.00691050242461566, 0.00664983374638182, + "debCollin1", "", 0, "debCollin1", 0.000132996667433668, + 50.0000028173521, 0.105867006488123, 0.114505452183541, 0.110186229335832, + "debCollin1:facExperimexperimental", "", 0, "debCollin1:facExperimexperimental", + 0.00220372562035761, 49.9999765478753, 0.240200077414607, 0.259799699793607, + 0.249999888604107, "facGenderm", "", 0, "facGenderm", + 0.00499999554420374, 50.0000222788039, 0.240200137658553, 0.259799770286981, + 0.249999953972767, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.00499999815890192, 50.0000092055376 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.53362890460323, 0.696426209384277, 0.615027556993754, 0, "facGenderm", + "contNormal", "", "", "", 0, 0.0415306878251773, 14.8089903924226, + 0.236032040785587, 0.399733141127924, 0.317882590956755, 1, + "facGenderm", "contNormal", "", "", "", 2.70894418008538e-14, + 0.0417612521540169, 7.61190277016585, -0.00306588946329208, + 0.0056177411576634, 0.00127592584718566, 0, "facGenderm", "debCollin1", + "contNormal", "", "", 0.564633382152213, 0.00221525259888724, + 0.575973073150475, -0.00516703495444916, 0.00365546800025908, + -0.000755783477095042, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.737019955088537, 0.00225067986562483, + -0.335802300735126)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.53362890460323, 0.696426209384277, 0.615027556993754, "facGenderm", + "", 0, "contNormal", 0.0415306878251773, 14.8089903924226, + -0.635510828379016, 0.344227461259022, -0.145641683559997, "debCollin1", + "", 0.560087433734293, "contNormal", 0.249937829818836, + -0.582711643393735, -0.480756991655322, 0.467177046618872, -0.00678997251822483, + "facExperimexperimental", "", 0.977599847002546, "contNormal", + 0.241824351302212, -0.0280781173676727, -0.469179846665797, + 0.933002359777297, 0.23191125655575, "debCollin1:facExperimexperimental", + "", 0.51677216581894, "contNormal", 0.357706115393785, + 0.648329023674778, -0.412580026470396, -0.181709905603601, -0.297144966036998, + "facGenderm:facExperimexperimental", "", 4.53037680703261e-07, + "contNormal", 0.0588965212340301, -5.04520402582469, -0.0132813438390084, + -0.00424009392520203, -0.00876071888210519, "facGenderm", "", + 0.000145691437203777, "debCollin1", 0.00230648368672143, -3.79830082152378 + )) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.534659964844901, 0.697947000836977, 0.616303482840939, 0, "Total", + 0, 0.0416556215522486, 14.7952055418957, 0.237192890326142, + 0.40112414328174, 0.319158516803941, 0, "Total", 2.30926389122033e-14, + 0.0418199656342327, 7.63172594629505, 0.532753678892358, 0.695789868140959, + 0.614271773516659, 1, "Total", 0, 0.0415916288601755, 14.7691203819342, + 0.235637737230722, 0.398615877728599, 0.31712680747966, 0, "Total", + 2.39808173319034e-14, 0.0415768202332869, 7.6274906474393, -0.00306588946329208, + 0.0056177411576634, 0.00127592584718566, 0, "Total indirect", + 0.564633382152213, 0.00221525259888724, 0.575973073150475, -0.00516703495444916, + 0.00365546800025908, -0.000755783477095042, 1, "Total indirect", + 0.737019955088537, 0.00225067986562483, -0.335802300735126, + 1, 1, 0, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-15") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-15") +}) + + +context('Model number 16 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1397.64854784946, 1460.17263231318, 888.487262002029, 11, 1, 100, + 1.85051541279796e-183, 0, 888.487262002029, 11)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 16)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848661650669, 0.0642107952896616, -0.240318933180504, "contcor1", + "", 0.121935347385229, "contGamma", 0.155375165499089, + -1.54670106003467, -0.403935353209782, 0.19462972842562, -0.104652812392081, + "contcor2", "", 0.493117914833134, "contGamma", 0.152697979747793, + -0.685358199007825, 0.424980944739366, 0.896769084608219, 0.660875014673793, + "contcor2", "", 3.99694202180001e-08, "contcor1", 0.12035632888927, + 5.49098681201725, 0.744754046387328, 1.31593737122274, 1.03034570880503, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.145712709350996, 7.07107645856145, 0.00468047800960517, 0.00827013755142434, + 0.00647530778051475, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915746302007063, 7.07107172185426, 0.32389217685769, + 0.572299838558899, 0.448096007708294, "debCollin1:contcor1", + "", 1.53765888910584e-12, "debCollin1:contcor1", 0.0633704659015717, + 7.07105433632579, 0.31853322544644, 0.562830841047245, 0.440682033246842, + "debCollin1:contcor2", "", 1.53765888910584e-12, "debCollin1:contcor2", + 0.0623219654870684, 7.07105480070718, 1.68041175804154, 2.96919415303095, + 2.32480295553625, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328777060485591, 7.0710619290245, 0.732636257406045, + 1.29452975745624, 1.01358300743114, "contcor1", "", + 1.53765888910584e-12, "contcor1", 0.143342812542051, 7.07104171779662, + 0.721543625513877, 1.27492994037623, 0.998236782945051, "contcor2", + "", 1.53788093371077e-12, "contcor2", 0.141172572360357, + 7.07103912789059)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.146733539424786, 0.122659597751126, "", "", -0.0120369708368302, + "contGamma", "contNormal", "", "", "", 0.860962206680478, + 0.0687240018951497, -0.175149445679759, -0.0235238534386434, + 0.0469040377956555, 16, 16, 0.011690092178506, "contGamma", + "debCollin1", "contNormal", "", "", 0.515268670397089, + 0.0179666289252826, 0.650655847967994, -0.0586000212155136, + 0.0261196855254092, 50, 16, -0.0162401678450522, "contGamma", + "debCollin1", "contNormal", "", "", 0.452398466237878, + 0.0216125672229646, -0.75142243295355, -0.127746492224632, 0.0343014985920434, + 84, 16, -0.0467224968162945, "contGamma", "debCollin1", "contNormal", + "", "", 0.258386285114519, 0.0413395327911353, + -1.13021347029624, -0.018812155666817, 0.0717935718787289, 16, + 50, 0.0264907081059559, "contGamma", "debCollin1", "contNormal", + "", "", 0.251760885897641, 0.0231141307340932, + 1.14608281880496, -0.0244471258693981, 0.0215680220341935, 50, + 50, -0.00143955191760233, "contGamma", "debCollin1", "contNormal", + "", "", 0.902398337693607, 0.0117387738413954, + -0.122632221819108, -0.0869921147146882, 0.023148352936999, + 84, 50, -0.0319218808888446, "contGamma", "debCollin1", "contNormal", + "", "", 0.255911339579487, 0.0280975743739327, + -1.13610806626995, -0.0308375411316295, 0.118516144608983, 16, + 84, 0.0438393017386766, "contGamma", "debCollin1", "contNormal", + "", "", 0.249895305698, 0.0381011301530781, + 1.15060371077037, -0.0243236931296222, 0.0561417765598589, 50, + 84, 0.0159090417151183, "contGamma", "debCollin1", "contNormal", + "", "", 0.438328214218187, 0.0205272827266681, + 0.775019369438998, -0.052843499759278, 0.0236969252470301, 84, + 84, -0.014573287256124, "contGamma", "debCollin1", "contNormal", + "", "", 0.45545372573426, 0.0195259774184754, + -0.74635379032728)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.146733539424786, 0.122659597751126, -0.0120369708368302, "contGamma", + "", 0.860962206680478, "contNormal", 0.0687240018951497, + -0.175149445679759, -2.33168026431275, 2.72588222848954, 0.197100982088395, + "debCollin1", "", 0.878583113434375, "contNormal", + 1.29021822153256, 0.152765616543744, -3.92783229339201, 0.322235694834281, + -1.80279829927887, "contcor1", "", 0.0963606547890423, + "contNormal", 1.08422094021887, -1.66275915950759, -1.07378429247706, + 3.00631502885552, 0.96626536818923, "contcor2", "", + 0.353234886761452, "contNormal", 1.04086078966651, 0.928332950748213, + -0.0857421483228884, 6.36780648852443, 3.14103217010077, "debCollin1:contcor1", + "", 0.0564062574038573, "contNormal", 1.64634367971863, + 1.90788363863224, -4.80096183748719, 1.40102187099383, -1.69996998324668, + "debCollin1:contcor2", "", 0.282618262983423, "contNormal", + 1.58216777384724, -1.07445620581248, -0.0194720434193246, 0.00121580858742903, + -0.00912811741594778, "contGamma", "", 0.0837030284080251, + "debCollin1", 0.0052776102443557, -1.72959293947675)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.137051844358902, 0.136358087042253, 16, 16, -0.000346878658324123, + "Total", 0.996031927004336, 0.069748713128858, -0.00497326248418775, + -0.164817153903397, 0.108262876539632, 50, 16, -0.0282771386818824, + "Total", 0.684812950193661, 0.0696645531747138, -0.405904256802815, + -0.209622086421797, 0.0921031511155478, 84, 16, -0.0587594676531247, + "Total", 0.445233111131892, 0.0769721382426706, -0.76338619394817, + -0.125904835384481, 0.154812309922733, 16, 50, 0.0144537372691257, + "Total", 0.840048325436809, 0.071612832562607, 0.201831665525724, + -0.146059028419195, 0.11910598291033, 50, 50, -0.0134765227544325, + "Total", 0.842088221843746, 0.0676453785429508, -0.199223110945794, + -0.183340795798497, 0.0954230923471477, 84, 50, -0.0439588517256748, + "Total", 0.536482057818487, 0.0711145435182736, -0.618141515798089, + -0.121361590509533, 0.184966252313226, 16, 84, 0.0318023309018464, + "Total", 0.684038164249859, 0.0781462938194361, 0.406958914460211, + -0.133611825676828, 0.141355967433405, 50, 84, 0.00387207087828815, + "Total", 0.955979080394436, 0.0701461341328576, 0.0552000609321449, + -0.16112264174076, 0.107902125554851, 84, 84, -0.0266102580929541, + "Total", 0.698212215650389, 0.0686300282601221, -0.387734913820751, + -0.0235238534386434, 0.0469040377956555, 16, 16, 0.011690092178506, + "Total indirect", 0.515268670397089, 0.0179666289252826, 0.650655847967994, + -0.0586000212155136, 0.0261196855254092, 50, 16, -0.0162401678450522, + "Total indirect", 0.452398466237878, 0.0216125672229646, -0.75142243295355, + -0.127746492224632, 0.0343014985920434, 84, 16, -0.0467224968162945, + "Total indirect", 0.258386285114519, 0.0413395327911353, -1.13021347029624, + -0.018812155666817, 0.0717935718787289, 16, 50, 0.0264907081059559, + "Total indirect", 0.251760885897641, 0.0231141307340932, 1.14608281880496, + -0.0244471258693981, 0.0215680220341935, 50, 50, -0.00143955191760233, + "Total indirect", 0.902398337693607, 0.0117387738413954, -0.122632221819108, + -0.0869921147146882, 0.023148352936999, 84, 50, -0.0319218808888446, + "Total indirect", 0.255911339579487, 0.0280975743739327, -1.13610806626995, + -0.0308375411316295, 0.118516144608983, 16, 84, 0.0438393017386766, + "Total indirect", 0.249895305698, 0.0381011301530781, 1.15060371077037, + -0.0243236931296222, 0.0561417765598589, 50, 84, 0.0159090417151183, + "Total indirect", 0.438328214218187, 0.0205272827266681, 0.775019369438998, + -0.052843499759278, 0.0236969252470301, 84, 84, -0.014573287256124, + "Total indirect", 0.45545372573426, 0.0195259774184754, -0.74635379032728 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-16") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-16") +}) + + +context('Model number 16 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(45259.5603266828, 45415.9729632768, 41659.3132078861, 11, 1, 5000, + 0, 0, 41659.3132078861, 11)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 16)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0329822640220589, 0.0470175705377948, 0.0399999172799268, "facExperimexperimental", + "", 0, "facGenderm", 0.00358050112819538, 11.1715974518034, + -0.0784875548023516, -0.0505639401752968, -0.0645257474888242, + "contcor2", "", 0, "facGenderm", 0.00712350197435073, + -9.05814973044987, -0.0856029575596645, -0.0576262786755978, + -0.0716146181176311, "contcor2", "", 0, "facExperimexperimental", + 0.00713703902335533, -10.0342197770362, 1.00834953577868, 1.09062788103332, + 1.049488708406, "contNormal", "", 0, "contNormal", + 0.0209897594812032, 50.0000349859103, 0.00638916567687369, 0.00691050313690721, + 0.00664983440689045, "debCollin1", "", 0, "debCollin1", + 0.000132996693854012, 49.9999978509981, 0.105866936644617, 0.114505370457174, + 0.110186153550895, "debCollin1:facExperimexperimental", "", + 0, "debCollin1:facExperimexperimental", 0.00220372258895962, + 50.0000109373631, 0.423406841567757, 0.457955615514513, 0.440681228541135, + "debCollin1:contcor2", "", 0, "debCollin1:contcor2", + 0.00881362469394139, 49.9999993015434, 0.240200103544424, 0.259799730368853, + 0.249999916956638, "facGenderm", "", 0, "facGenderm", + 0.00499999667826256, 50.0000166087131, 0.24020017344546, 0.259799812162515, + 0.249999992803987, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.00499999971215125, 50.0000014392851, + 0.959102391961111, 1.03736234273635, 0.998232367348733, "contcor2", + "", 0, "contcor2", 0.0199646400118951, 50.0000183701774 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.423881224347926, 0.539952160249642, "", 0.481916692298784, "", + "facGenderm", "contNormal", "", "", "", 0, 0.0296104767274472, + 16.2752088301258, -0.00115492557163305, 0.0103377116933029, + 16, 0.00459139306083491, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.117339244667657, 0.00293184909406203, + 1.566040036008, -0.00270722802893992, 0.00853990816278552, 16, + 0.0029163400669228, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.309428205593709, 0.00286922011844131, + 1.01642256311345, -0.00316430552046302, 0.00551242526086337, + 50, 0.00117405987020017, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.595827266829742, 0.00221349240337255, + 0.530410616459011, -0.0049157897910597, 0.00391380354363582, + 50, -0.000500993123711938, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.823988812155957, 0.00225248866926694, + -0.222417599940684, -0.00830792115003146, 0.00264476282976995, + 84, -0.00283157916013076, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.310863193348177, 0.00279410337796888, + -1.01341245368993, -0.0102581061396896, 0.00124484183160391, + 84, -0.00450663215404287, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.124599257309517, 0.00293447942462906, + -1.53575183258017)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.423881224347926, 0.539952160249642, 0.481916692298784, "facGenderm", + "", 0, "contNormal", 0.0296104767274472, 16.2752088301258, + -0.637173320036753, 0.344688447018722, -0.146242436509015, "debCollin1", + "", 0.559321355535212, "contNormal", 0.250479543195762, + -0.58384982119965, -0.584915490048282, 0.353289772811314, -0.115812858618484, + "facExperimexperimental", "", 0.628471563765105, "contNormal", + 0.239342475234249, -0.483879255051304, -0.426372335166536, 0.0181311159879184, + -0.204120609589309, "contcor2", "", 0.0718493162181735, + "contNormal", 0.113395821214227, -1.80007170814245, -0.510735343962729, + 0.893136585505909, 0.19120062077159, "debCollin1:facExperimexperimental", + "", 0.593427756112432, "contNormal", 0.358137175106839, + 0.533875380891558, 0.0744379934208202, 0.743500691224284, 0.408969342322552, + "debCollin1:contcor2", "", 0.0165712963303517, "contNormal", + 0.17068239597282, 2.39608390772577, -0.013281334153761, -0.00424008379093425, + -0.00876070897234763, "facGenderm", "", 0.000145694073017788, + "debCollin1", 0.00230648380126956, -3.79829633640846)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.428055886865062, 0.544960283854176, 16, 0.486508085359619, 0, + "Total", 0, 0.0298230982587542, 16.3131302166706, 0.426780320659836, + 0.542885744071578, 16, 0.484833032365707, 1, "Total", 0, 0.029619274723303, + 16.3688353916466, 0.42480446249729, 0.541377041840679, 50, 0.483090752168984, + 0, "Total", 0, 0.029738449344707, 16.2446517156742, 0.423512209933933, + 0.539319188416211, 50, 0.481415699175072, 1, "Total", 0, 0.0295431394137211, + 16.2953466939767, 0.420755006017455, 0.537415220259852, 84, + 0.479085113138653, 0, "Total", 0, 0.0297608055970919, 16.097854326412, + 0.419441585820824, 0.535378534468658, 84, 0.477410060144741, + 1, "Total", 0, 0.0295762956774537, 16.1416448277083, -0.00115492557163305, + 0.0103377116933029, 16, 0.00459139306083491, 0, "Total indirect", + 0.117339244667657, 0.00293184909406203, 1.566040036008, -0.00270722802893992, + 0.00853990816278552, 16, 0.0029163400669228, 1, "Total indirect", + 0.309428205593709, 0.00286922011844131, 1.01642256311345, -0.00316430552046302, + 0.00551242526086337, 50, 0.00117405987020017, 0, "Total indirect", + 0.595827266829742, 0.00221349240337255, 0.530410616459011, -0.0049157897910597, + 0.00391380354363582, 50, -0.000500993123711938, 1, "Total indirect", + 0.823988812155957, 0.00225248866926694, -0.222417599940684, + -0.00830792115003146, 0.00264476282976995, 84, -0.00283157916013076, + 0, "Total indirect", 0.310863193348177, 0.00279410337796888, + -1.01341245368993, -0.0102581061396896, 0.00124484183160391, + 84, -0.00450663215404287, 1, "Total indirect", 0.124599257309517, + 0.00293447942462906, -1.53575183258017)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-16") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-16") +}) + + +context('Model number 17 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1401.22456596664, 1468.95899080233, 1154.68783922693, 23, 1, 100, + 1.549586662211e-229, 0, 1154.68783922693, 23)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 17)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544847627358529, 0.0642088485465804, -0.240319389405975, "contcor1", + "", 0.121932812707424, "contGamma", 0.155374405016947, + -1.54671156668154, -0.403933683712059, 0.194628159763207, -0.104652761974426, + "contcor2", "", 0.493115784034354, "contGamma", 0.152697153671354, + -0.685361576546914, 0.424979121146302, 0.896762801508761, 0.660870961327531, + "contcor2", "", 3.9965295517419e-08, "contcor1", 0.120355191239183, + 5.49100503703389, 0.741603309688613, 1.31037054704521, 1.02598692836691, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.145096349178598, 7.07107335349998, 0.00468047861756399, 0.00827013967194767, + 0.00647530914475583, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915746687872449, 7.07107023209649, 0.32389173557544, + 0.572298299808508, 0.448095017691974, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.063370185930065, + 7.07106995372382, 0.318532774719203, 0.56282926884683, 0.440681021783017, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623216793917152, 7.07107103152934, 1.68041056582418, 2.96918999460448, + 2.32480028021433, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776303785688, 7.07107006632007, 0.73263447047665, + 1.29452352386616, 1.0135789971714, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341678168991, 7.0710696994663, + 0.721541721675332, 1.27492329936059, 0.998232510517961, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171363874607, + 7.07106939481453)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.209487548983258, 0.166372645534544, 16, 16, -0.0215574517243573, + "contGamma", "contNormal", "", "", "", 0.822113575128143, + 0.0958844645826504, -0.224827367167236, -0.198507312748085, + 0.314044492536655, 50, 16, 0.057768589894285, "contGamma", "contNormal", + "", "", "", 0.658629245714456, 0.130755414213649, 0.441806484585742, + -0.344935145038173, 0.633620909520647, 84, 16, 0.144342882241237, + "contGamma", "contNormal", "", "", "", 0.563120413190329, + 0.249636233695503, 0.578212866395432, -0.366989643483908, 0.186093370582465, + 16, 50, -0.0904481364507215, "contGamma", "contNormal", "", + "", "", 0.521494528297467, 0.141095198286556, -0.641043334919356, + -0.146447005878646, 0.124202816214487, 50, 50, -0.0111220948320792, + "contGamma", "contNormal", "", "", "", 0.872025918733499, + 0.06904459067309, -0.161085679901265, -0.233445810905347, 0.384350205935092, + 84, 50, 0.0754521975148725, "contGamma", "contNormal", "", "", + "", 0.632119558500643, 0.157603920713221, 0.478745688390371, + -0.669519951734786, 0.327122765593512, 16, 84, -0.171198593070637, + "contGamma", "contNormal", "", "", "", 0.500726705420612, + 0.254250263063426, -0.6733467686833, -0.385812073897909, 0.20206697099392, + 50, 84, -0.0918725514519945, "contGamma", "contNormal", "", + "", "", 0.540141891996218, 0.149971899873912, -0.612598436968765, + -0.229492938146068, 0.218896419935983, 84, 84, -0.00529825910504277, + "contGamma", "contNormal", "", "", "", 0.963056267045565, + 0.114387142217635, -0.0463186596178984, -0.0233319891607092, + 0.0488975910878438, 16, 16, 0.0127828009635673, "contGamma", + "debCollin1", "contNormal", "", "", 0.487853004725237, + 0.0184262519154155, 0.693727678436502, -0.0619908564687763, + 0.0255953231706527, 50, 16, -0.0181977666490618, "contGamma", + "debCollin1", "contNormal", "", "", 0.415391321011018, + 0.0223438237463284, -0.814442812280601, -0.139193378758556, + 0.0351751414191929, 84, 16, -0.0520091186696816, "contGamma", + "debCollin1", "contNormal", "", "", 0.242322310122015, + 0.0444825827293628, -1.16920186460645, -0.0190493738825229, + 0.0769522118275853, 16, 50, 0.0289514189725312, "contGamma", + "debCollin1", "contNormal", "", "", 0.237149483855444, + 0.0244906504577014, 1.18214169209324, -0.0252589154404939, 0.021200618160298, + 50, 50, -0.00202914864009794, "contGamma", "debCollin1", "contNormal", + "", "", 0.86406237204932, 0.0118521396227836, + -0.17120525952945, -0.0960699462493167, 0.0243889449278811, + 84, 50, -0.0358405006607178, "contGamma", "debCollin1", "contNormal", + "", "", 0.243489897867143, 0.0307298736424144, + -1.16630810389176, -0.0309767361736484, 0.126783778216051, 16, + 84, 0.0479035210212013, "contGamma", "debCollin1", "contNormal", + "", "", 0.233938434029845, 0.0402457687064901, + 1.19027471858119, -0.0239457067410522, 0.0577916135581965, 50, + 84, 0.0169229534085722, "contGamma", "debCollin1", "contNormal", + "", "", 0.417029974759562, 0.0208517403748187, + 0.811584697697894, -0.0583145455302622, 0.0245377483061669, + 84, 84, -0.0168883986120477, "contGamma", "debCollin1", "contNormal", + "", "", 0.424274152446008, 0.0211361776262108, + -0.79902804143283)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.144540597035749, 0.126022793830026, -0.00925890160286159, "contGamma", + "", 0.893289373848554, "contNormal", 0.0690225414854418, + -0.134143156765887, -2.28222466989635, 2.81250515569125, 0.265140242897453, + "debCollin1", "", 0.838352613965969, "contNormal", + 1.29969985820509, 0.204001132433465, -4.6475892478104, 0.319573645712121, + -2.16400780104914, "contcor1", "", 0.0876796655953591, + "contNormal", 1.267156675506, -1.70776656342438, -0.962512671244596, + 3.35439890465749, 1.19594311670644, "contcor2", "", + 0.277494888005416, "contNormal", 1.10127318918953, 1.08596407180909, + -0.00780478217138292, 6.97590575563683, 3.48405048673273, "debCollin1:contcor1", + "", 0.0505142744290503, "contNormal", 1.78159154782813, + 1.95558319244385, -0.173333937286445, 0.336197676828282, 0.0814318697709182, + "contGamma:contcor1", "", 0.531005686982766, "contNormal", + 0.129984943124937, 0.626471557499155, -4.987567265019, 1.27339515796201, + -1.85708605352849, "debCollin1:contcor2", "", 0.244949779623114, + "contNormal", 1.59721364075225, -1.16270360216424, -0.303234581853518, + 0.158779382175674, -0.0722275998389224, "contGamma:contcor2", + "", 0.540001675278639, "contNormal", 0.117862870867398, + -0.612810457673155, -0.0194720936144321, 0.00121576057159986, + -0.00912816652141614, "contGamma", "", 0.0837013974364214, + "debCollin1", 0.00527761080030428, -1.72960206176815)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.194505320796861, 0.176956019275281, 16, 16, -0.00877465076079001, + "Total", 0.92622416939807, 0.0947622872160361, -0.0925964433592219, + -0.188463511723075, 0.32956629343878, 16, 16, 0.0705513908578523, + "Total", 0.593437091369999, 0.132152888840817, 0.533861888882609, + -0.336069659950146, 0.650321026359754, 50, 16, 0.157125683204804, + "Total", 0.53235226778426, 0.251634900970228, 0.624419278084935, + -0.351567769206294, 0.196237098231986, 16, 16, -0.0776653354871542, + "Total", 0.578381813353523, 0.139748707567918, -0.555749937432578, + -0.136518130100335, 0.139839542363311, 84, 16, 0.00166070613148809, + "Total", 0.981206864332304, 0.070500701707664, 0.0235558808815027, + -0.225828396214495, 0.402298393171375, 16, 16, 0.0882349984784398, + "Total", 0.581877095488198, 0.160239370299774, 0.550644940212699, + -0.654532808628174, 0.337701224414035, 16, 50, -0.158415792107069, + "Total", 0.531420720811305, 0.253125578038378, -0.625838737178314, + -0.373099242825305, 0.214919741848451, 16, 16, -0.0790897504884272, + "Total", 0.59802812058021, 0.150007599453861, -0.527238291769034, + -0.222171004310553, 0.237140088027602, 50, 50, 0.00748454185852455, + "Total", 0.949069119129387, 0.117173350112844, 0.0638758032548914, + -0.232178332360338, 0.152667895613499, 16, 16, -0.0397552183734191, + "Total", 0.685525509917351, 0.0981768621794725, -0.404934701424298, + -0.213768069192342, 0.292909715682788, 84, 50, 0.0395708232452232, + "Total", 0.759497392669125, 0.129256912084033, 0.306140867882541, + -0.358001199996602, 0.610291431180952, 16, 16, 0.126145115592175, + "Total", 0.609580871559941, 0.247017965333884, 0.510671826729969, + -0.391820615864623, 0.174528809665056, 16, 84, -0.108645903099783, + "Total", 0.45206237137594, 0.144479549113395, -0.751981188801417, + -0.166505382556335, 0.107865659594053, 16, 16, -0.029319861481141, + "Total", 0.675295302438066, 0.0699938989477849, -0.418891673730213, + -0.24676271671359, 0.361271578445212, 50, 84, 0.0572544308658107, + "Total", 0.712043643998109, 0.155113639830859, 0.369112806122291, + -0.69376291934757, 0.314970199908172, 16, 16, -0.189396359719699, + "Total", 0.461735215378618, 0.257334605944931, -0.735992576762991, + -0.408828105667091, 0.188687469464978, 84, 84, -0.110070318101056, + "Total", 0.470231226805744, 0.152430243577228, -0.722102881409422, + -0.24625247944143, 0.199260427933221, 16, 16, -0.0234960257541045, + "Total", 0.836217492136174, 0.113653340288087, -0.20673414168512, + -0.285232139786745, 0.138098998998667, 16, 16, -0.073566570394039, + "Total", 0.49574123400266, 0.107994621871778, -0.681205870431073, + -0.251184854685469, 0.262703797134675, 50, 16, 0.00575947122460334, + "Total", 0.964957745032314, 0.131096452759753, 0.0439330821189964, + -0.386998275296198, 0.571665802439309, 50, 16, 0.0923337635715551, + "Total", 0.705766402433014, 0.244561656565459, 0.377547996968368, + -0.443852194324519, 0.158937684083712, 50, 16, -0.142457255120403, + "Total", 0.354240181976456, 0.153775753830928, -0.926396077219241, + -0.2165424006657, 0.0902799736621781, 84, 16, -0.0631312135017609, + "Total", 0.419921613613874, 0.0782724521338284, -0.806557246907515, + -0.277660404309243, 0.324546561999625, 50, 16, 0.0234430788451909, + "Total", 0.878715823775538, 0.153627049032278, 0.152597338768548, + -0.741287772604653, 0.294872349124016, 16, 50, -0.223207711740318, + "Total", 0.398432689625221, 0.264331418817327, -0.844423688788095, + -0.455877939893709, 0.168114599650357, 50, 16, -0.143881670121676, + "Total", 0.366066338860772, 0.159184695347986, -0.903866227887947, + -0.283642639655648, 0.169027884106199, 50, 50, -0.0573073777747244, + "Total", 0.619713291987976, 0.115479296388213, -0.496256727977205, + -0.180704855296909, 0.195492789793257, 50, 16, 0.00739396724817383, + "Total", 0.938588441265281, 0.095970550494184, 0.0770441266628133, + -0.177813663427464, 0.351253681161096, 84, 50, 0.0867200088668161, + "Total", 0.520535806490344, 0.134968639414238, 0.64251969378353, + -0.325021026629814, 0.67160962905735, 50, 16, 0.173294301213768, + "Total", 0.495493359837621, 0.254247186057616, 0.68159771559673, + -0.333984168255009, 0.210990733298629, 16, 84, -0.0614967174781904, + "Total", 0.658245174735038, 0.139026764229427, -0.442337256563823, + -0.12473405539179, 0.160392703672694, 50, 16, 0.0178293241404519, + "Total", 0.806365159857953, 0.0727377547020066, 0.245117878789295, + -0.21505517228348, 0.423862405258288, 50, 84, 0.104403616487404, + "Total", 0.521819160492228, 0.162992172963756, 0.640543742616523, + -0.635618273490167, 0.351123925293956, 50, 16, -0.142247174098106, + "Total", 0.57201218654653, 0.251724574167541, -0.565090534241722, + -0.355715579123197, 0.229873314164271, 84, 84, -0.0629211324794633, + "Total", 0.673613701205251, 0.149387666790441, -0.421193622146388, + -0.209189816670512, 0.256496136405489, 50, 16, 0.0236531598674884, + "Total", 0.842183497158475, 0.118799619980079, 0.199101309174681, + -0.212091054815461, 0.164917854086551, 16, 16, -0.0235866003644553, + "Total", 0.806270381131326, 0.0961775093511437, -0.245240290828708, + -0.198606637427267, 0.310085519935641, 84, 16, 0.055739441254187, + "Total", 0.667543212709213, 0.129770792059295, 0.429522239709523, + -0.344611480012784, 0.629238947215062, 50, 16, 0.142313733601139, + "Total", 0.5667536544569, 0.248435796501735, 0.572839081988512, + -0.370032279431907, 0.185077709250268, 84, 16, -0.0924772850908195, + "Total", 0.513735985414204, 0.141612293149469, -0.653031477946704, + -0.146090262930708, 0.119787775986354, 84, 16, -0.0131512434721772, + "Total", 0.846259557342132, 0.0678272766781108, -0.193893137337494, + -0.232299892953076, 0.379145990702625, 84, 16, 0.0734230488747745, + "Total", 0.637848577031833, 0.155983959011162, 0.470708971231589, + -0.672517801100099, 0.326062317678629, 16, 50, -0.173227741710735, + "Total", 0.496500790200503, 0.254744507209163, -0.680005797214314, + -0.38744081389675, 0.199637413712565, 84, 16, -0.0939017000920924, + "Total", 0.530670566140128, 0.149767605996874, -0.62698271409942, + -0.228045800265706, 0.213390984775425, 50, 50, -0.00732740774514071, + "Total", 0.948120757241552, 0.11261349405477, -0.0650668714850191, + -0.259175779157021, 0.144379874386871, 84, 16, -0.0573979523850751, + "Total", 0.577162904579039, 0.102949762528058, -0.557533606446461, + -0.23092843825889, 0.274784616726024, 84, 50, 0.0219280892335672, + "Total", 0.865032979757771, 0.12901080299789, 0.169970953780714, + -0.370937307847585, 0.587942071008623, 84, 16, 0.108502381580519, + "Total", 0.657359989437865, 0.244616581329996, 0.443561025138136, + -0.417994773267514, 0.165417499044635, 16, 84, -0.126288637111439, + "Total", 0.396143306112797, 0.148832396134325, -0.848529220731359, + -0.187648812330106, 0.0937236213445122, 84, 16, -0.046962595492797, + "Total", 0.512945998627413, 0.071780001034215, -0.654257381111092, + -0.258898105772685, 0.338121499480995, 50, 84, 0.0396116968541547, + "Total", 0.794799300704361, 0.152303718324136, 0.260083583579044, + -0.717643235859476, 0.303565048396767, 84, 16, -0.207039093731355, + "Total", 0.426774295335687, 0.260517104475236, -0.794723609984828, + -0.430459433779872, 0.175033329554447, 84, 84, -0.127713052112712, + "Total", 0.408346171771374, 0.154465277961832, -0.826807511680844, + -0.259607351254874, 0.177329831723353, 84, 16, -0.0411387597657606, + "Total", 0.712074578949241, 0.111465615293121, -0.369071302011639, + -0.171555318588781, 0.224247457182469, 16, 16, 0.026346069296844, + "Total", 0.794150628469793, 0.100971951243311, 0.260924632756259, + -0.170209966325902, 0.381554188156875, 16, 50, 0.105672110915486, + "Total", 0.45281389959722, 0.140758748332883, 0.750732101322613, + -0.314719796845957, 0.699212603370833, 50, 16, 0.192246403262438, + "Total", 0.457338219362071, 0.25866097750126, 0.743236978069107, + -0.318387474889409, 0.233298244030368, 16, 50, -0.0425446154295203, + "Total", 0.762427198485285, 0.140738738893011, -0.302294988317768, + -0.119785664698869, 0.193348517077114, 84, 16, 0.0367814261891221, + "Total", 0.645198048760869, 0.0798826366825987, 0.460443316803217, + -0.206502675038196, 0.453214112110343, 16, 50, 0.123355718536074, + "Total", 0.463583274816221, 0.168298191281141, 0.732959264725601, + -0.616221376261968, 0.369631232163097, 16, 50, -0.123295072049436, + "Total", 0.623961625358259, 0.25149763368137, -0.490243467680661, + -0.340007798392054, 0.252069737530467, 16, 50, -0.0439690304307932, + "Total", 0.770972693835208, 0.15104296318523, -0.291102806139153, + -0.199654766145941, 0.284865289978258, 50, 50, 0.0426052619161585, + "Total", 0.730326909694091, 0.123604326392228, 0.344690701043597, + -0.195763585815553, 0.186494589183983, 16, 50, -0.00463449831578514, + "Total", 0.962094639339229, 0.0975166324521114, -0.0475252087694995, + -0.186148236950407, 0.335531323556121, 84, 50, 0.0746915433028572, + "Total", 0.57463650786062, 0.133083965986485, 0.561236229693082, + -0.331689874528972, 0.65422154582859, 16, 50, 0.161265835649809, + "Total", 0.521403254739148, 0.251512637001064, 0.641183829061944, + -0.349367989046316, 0.202317622962017, 16, 84, -0.0735251830421494, + "Total", 0.601375632302549, 0.140738711619183, -0.522423306254908, + -0.132308974949158, 0.143910692102144, 16, 50, 0.00580085857649296, + "Total", 0.934390682353829, 0.0704654955984109, 0.0823219722962364, + -0.219765467555993, 0.404515769402882, 50, 84, 0.0923751509234447, + "Total", 0.561892127531884, 0.159258344000993, 0.580033350860841, + -0.650324497669764, 0.341773218345634, 16, 50, -0.154275639662065, + "Total", 0.542149100523591, 0.253090802647635, -0.609566361353931, + -0.366991002539851, 0.217091806453007, 84, 84, -0.0749495980434223, + "Total", 0.614960212356359, 0.149003454553254, -0.503005774383808, + -0.212882064451856, 0.236131453058915, 16, 50, 0.0116246943035294, + "Total", 0.919165769285267, 0.114546369487535, 0.101484615841923, + -0.235089193303277, 0.158197492630467, 16, 16, -0.038445850336405, + "Total", 0.7015761796163, 0.100330079796348, -0.3831936585164, + -0.212575526611909, 0.294335909176384, 50, 50, 0.0408801912822373, + "Total", 0.751907590517051, 0.129316518004092, 0.316125054348769, + -0.354965974643025, 0.609874941901403, 50, 16, 0.127454483629189, + "Total", 0.604584968008819, 0.246137409706242, 0.51781841606809, + -0.392122178709763, 0.177449108584224, 50, 50, -0.107336535062769, + "Total", 0.460079401049759, 0.145301467727645, -0.738716110314605, + -0.162740108026952, 0.106719121138698, 84, 16, -0.0280104934441269, + "Total", 0.683655834798568, 0.0687408624064295, -0.407479517474122, + -0.241488304947357, 0.358615902753006, 50, 50, 0.0585637989028248, + "Total", 0.702058381604745, 0.153090621162916, 0.382543348886816, + -0.692515787747954, 0.316341804382585, 16, 50, -0.188086991682684, + "Total", 0.46489264570112, 0.257366359812803, -0.73081420516454, + -0.404964016279326, 0.187442116151241, 50, 50, -0.108760950064042, + "Total", 0.471730105220495, 0.151126790365382, -0.719666908832569, + -0.237530837143836, 0.193157521709655, 50, 50, -0.0221866577170904, + "Total", 0.839969270633935, 0.109871498213923, -0.201932785824877, + -0.0233319891607092, 0.0488975910878438, 50, 50, 0.0127828009635673, + "Total indirect", 0.487853004725237, 0.0184262519154155, 0.693727678436502, + -0.0619908564687763, 0.0255953231706527, 84, 50, -0.0181977666490618, + "Total indirect", 0.415391321011018, 0.0223438237463284, -0.814442812280601, + -0.139193378758556, 0.0351751414191929, 50, 50, -0.0520091186696816, + "Total indirect", 0.242322310122015, 0.0444825827293628, -1.16920186460645, + -0.0190493738825229, 0.0769522118275853, 16, 84, 0.0289514189725312, + "Total indirect", 0.237149483855444, 0.0244906504577014, 1.18214169209324, + -0.0252589154404939, 0.021200618160298, 50, 50, -0.00202914864009794, + "Total indirect", 0.86406237204932, 0.0118521396227836, -0.17120525952945, + -0.0960699462493167, 0.0243889449278811, 50, 84, -0.0358405006607178, + "Total indirect", 0.243489897867143, 0.0307298736424144, -1.16630810389176, + -0.0309767361736484, 0.126783778216051, 50, 50, 0.0479035210212013, + "Total indirect", 0.233938434029845, 0.0402457687064901, 1.19027471858119, + -0.0239457067410522, 0.0577916135581965, 84, 84, 0.0169229534085722, + "Total indirect", 0.417029974759562, 0.0208517403748187, 0.811584697697894, + -0.0583145455302622, 0.0245377483061669, 50, 50, -0.0168883986120477, + "Total indirect", 0.424274152446008, 0.0211361776262108, -0.79902804143283, + 16, 16, 84, 50, 50, 16, 84, 50, 84, 16, 84, 50, 16, 50, 84, + 50, 50, 50, 84, 50, 84, 50, 84, 50, 16, 84, 84, 50, 50, 84, + 84, 50, 84, 84, 84, 50, 16, 16, 16, 84, 50, 16, 16, 84, 84, + 16, 16, 84, 16, 50, 16, 84, 50, 50, 16, 84, 84, 50, 16, 84, + 16, 84, 16, 84, 50, 84, 16, 84, 84, 84, 16, 84, 16, 16, 50, + 84, 50, 16, 50, 84, 84, 16, 50, 84, 16, 50, 50, 84, 50, 50, + 50, 84, 84, 50, 50, 84, 16, 84, 50, 84, 50, 84, 50, 84, 84, + 84, 50, 84, 16, 16, 84, 84, 50, 16, 84, 84, 84, 16, 84, 84, + 16, 50, 84, 84, 50, 50, 84, 84, 84, 50, 84, 84, 16, 84, 84, + 84, 50, 84, 84, 84, 84, 84, 84, 84, 16, 16, 50, 16, 84, 16, + 16, 50, 50, 50, 84, 50, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-17") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-17") +}) + + +context('Model number 17 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(45243.0800762282, 45412.5270992051, 50913.6501388781, 23, 1, 5000, + 0, 0, 50913.6501388781, 23)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 17)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0329830681520915, 0.0470183251006824, 0.040000696626387, "facExperimexperimental", + "", 0, "facGenderm", 0.00358048848328318, 11.1718545704434, + -0.078487263274992, -0.0505636120559754, -0.0645254376654837, + "contcor2", "", 0, "facGenderm", 0.00712351130920638, + -9.05809436732296, -0.0856030667330127, -0.0576264639694525, + -0.0716147653512326, "contcor2", "", 0, "facExperimexperimental", + 0.00713701960450193, -10.0342677083385, 1.00422771602662, 1.08616973147162, + 1.04519872374912, "contNormal", "", 0, "contNormal", + 0.0209039594837833, 50.0000358573198, 0.00638916566307953, 0.00691050312076618, + 0.00664983439192285, "debCollin1", "", 0, "debCollin1", + 0.000132996693255308, 49.9999979635391, 0.105866725052469, 0.114505122865764, + 0.110185923959117, "debCollin1:facExperimexperimental", "", + 0, "debCollin1:facExperimexperimental", 0.00220371340530594, + 50.0001151210584, 0.423407978183246, 0.457956945509224, 0.440682461846235, + "debCollin1:contcor2", "", 0, "debCollin1:contcor2", + 0.00881367402628209, 49.9998593698989, 0.240200072920397, 0.259799694535013, + 0.249999883727705, "facGenderm", "", 0, "facGenderm", + 0.00499999534920419, 50.0000232535206, 0.240199139709383, 0.259798602552155, + 0.249998871130769, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.00499995484543867, 50.000225773806, + 0.959103887305973, 1.03736409249022, 0.998233989898099, "contcor2", + "", 0, "contcor2", 0.0199647049133449, 49.9999371005405 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.46750525390182, 0.679428928332948, 16, 0.573467091117384, 0, + "facGenderm", "contNormal", "", "", "", 0, 0.0540631552678404, + 10.6073551992351, 0.224882396259608, 0.418457369126349, 16, + 0.321669882692978, 1, "facGenderm", "contNormal", "", "", + "", 7.32374161316329e-11, 0.0493822780402182, 6.51387290053736, + 0.521809738534649, 0.68595425487351, 50, 0.603881996704079, + 0, "facGenderm", "contNormal", "", "", "", 0, 0.0418743705582377, + 14.4212793805275, 0.268905044443281, 0.435264532116066, 50, + 0.352084788279674, 1, "facGenderm", "contNormal", "", "", + "", 0, 0.0424394246488729, 8.29617251394628, 0.541530343045757, + 0.737535525904287, 84, 0.639532934475022, 0, "facGenderm", "contNormal", + "", "", "", 0, 0.0500022409606997, 12.7900854479238, + 0.277362006789908, 0.498109445311325, 84, 0.387735726050616, + 1, "facGenderm", "contNormal", "", "", "", 5.76960701437201e-12, + 0.0563141568576373, 6.88522651650127, -0.00103676888191501, + 0.010537639209367, 16, 0.00475043516372599, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.107651465139327, + 0.00295270938205484, 1.6088393908987, -0.00231531722335021, + 0.00905383190603491, 16, 0.00336925734134235, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.2453678699181, + 0.00290034643979775, 1.16167410041446, -0.00292600724797799, + 0.00577719623490292, 50, 0.00142559449346246, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.520815658321167, + 0.00222024576765968, 0.642088598581209, -0.00436690909159559, + 0.00445574243375325, 50, 4.44166710788263e-05, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.984255211182563, + 0.0022507177669949, 0.0197344472639634, -0.00790463129054955, + 0.00296137307815676, 84, -0.00247162910619639, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.372583755406508, + 0.00277199082595802, -0.891644042632132, -0.00951269662632821, + 0.00180708276916815, 84, -0.00385280692858003, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.182141909533948, + 0.00288775188850033, -1.33418904301397)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.520589821749948, 0.685267261033253, 0.602928541391601, "facGenderm", + "", 0, "contNormal", 0.0420103227871173, 14.351914039006, + -0.664787862517101, 0.315540277913741, -0.17462379230168, "debCollin1", + "", 0.485021778579665, "contNormal", 0.250088304724869, + -0.698248534627759, -0.439651239837327, 0.508535041654673, 0.0344419009086733, + "facExperimexperimental", "", 0.886774021537244, "contNormal", + 0.241888700244283, 0.142387390869811, -0.447422395367342, 0.00862635639995113, + -0.219398019483696, "contcor2", "", 0.0593196358132504, + "contNormal", 0.116341105082682, -1.88581687725737, -0.543898179944083, + 0.859211229277765, 0.157656524666841, "debCollin1:facExperimexperimental", + "", 0.659609834440845, "contNormal", 0.357942651061294, + 0.4404519109399, -0.369537672232321, -0.134056744616491, -0.251797208424406, + "facGenderm:facExperimexperimental", "", 2.77071514416249e-05, + "contNormal", 0.0600727690593484, -4.19153657084868, 0.0612506015934653, + 0.73455294169078, 0.397901771642123, "debCollin1:contcor2", + "", 0.0205276302770754, "contNormal", 0.171763957248255, + 2.31656150694656, -0.0273713769881814, 0.0911476520703686, 0.0318881375410936, + "facGenderm:contcor2", "", 0.291573428623212, "contNormal", + 0.0302350017636582, 1.05467622559964, -0.0132813017503029, -0.0042400513976539, + -0.00876067657397838, "facGenderm", "", 0.000145702325734964, + "debCollin1", 0.00230648379867314, -3.79828229403483)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.47231988598573, 0.684115166576491, 16, 0.57821752628111, 0, + "Total", 0, 0.0540304011352696, 10.7017070784556, 0.229582982125014, + 0.423257653588395, 16, 0.326420317856704, 0, "Total", 3.93067800530389e-11, + 0.0494077118230392, 6.60666737666025, 0.526345451817606, 0.690919411918004, + 16, 0.608632431867805, 1, "Total", 0, 0.0419839245513022, 14.4967970091526, + 0.273304306431013, 0.440366140455786, 16, 0.3568352234434, 0, + "Total", 0, 0.0426185979289763, 8.37275839149059, 0.54580947119869, + 0.742757268078805, 50, 0.644283369638748, 0, "Total", 0, 0.050242708139949, + 12.8234204224048, 0.28158885990334, 0.503383462525344, 16, 0.392486161214342, + 0, "Total", 4.01434441243964e-12, 0.0565812954655013, 6.93667682907063, + 0.47087506351325, 0.682797633404203, 50, 0.576836348458727, + 1, "Total", 0, 0.0540628734922096, 10.6697315772875, 0.228419606535957, + 0.421658673532684, 16, 0.325039140034321, 0, "Total", 4.29454249939454e-11, + 0.0492965861926476, 6.59354257846762, 0.525070388168635, 0.689432119922209, + 84, 0.607251254045422, 0, "Total", 0, 0.0419297836720568, 14.4825754121434, + 0.272361671108853, 0.438546420133178, 16, 0.355454045621016, + 0, "Total", 0, 0.0423948476439285, 8.38436898291158, 0.544701405171841, + 0.741102978460887, 84, 0.642902191816364, 1, "Total", 0, 0.0501033628266225, + 12.8315177973395, 0.280701730557877, 0.50150823622604, 16, 0.391104983391959, + 0, "Total", 3.83315601482082e-12, 0.0563292252842035, 6.94319833831687, + 0.468803291449384, 0.680982079772309, 16, 0.574892685610847, + 0, "Total", 0, 0.0541282365381621, 10.6209387628124, 0.226259290013649, + 0.419931664359233, 16, 0.323095477186441, 1, "Total", 6.17450535145281e-11, + 0.0494071258128329, 6.53945097738353, 0.523007790540175, 0.687607391854908, + 16, 0.605307591197542, 1, "Total", 0, 0.0419904657976049, 14.4153578604043, + 0.270211808832606, 0.436808956713666, 16, 0.353510382773136, + 1, "Total", 0, 0.0425000533670919, 8.31788091463579, 0.542703529694523, + 0.739213528242445, 50, 0.640958528968484, 0, "Total", 0, 0.0501310228396971, + 12.7856662932664, 0.278643105450177, 0.49967953563798, 16, 0.389161320544079, + 1, "Total", 5.14543962992775e-12, 0.056387880576202, 6.90150643307422, + 0.467350573633448, 0.679672441943478, 50, 0.573511507788463, + 1, "Total", 0, 0.0541647372055808, 10.5882819224566, 0.225087116294562, + 0.418341482433553, 16, 0.321714299364057, 1, "Total", 6.77387035352695e-11, + 0.0493004891067789, 6.52558027704884, 0.521722365307733, 0.686130461442583, + 84, 0.603926413375158, 0, "Total", 0, 0.0419416115376813, 14.3992181328697, + 0.269260141207894, 0.434998268693611, 16, 0.352129204950752, + 1, "Total", 0, 0.0422809114843532, 8.32832577606715, 0.541587395508295, + 0.737567306783906, 84, 0.639577351146101, 1, "Total", 0, 0.0499957940098584, + 12.7926231358579, 0.277749949748232, 0.497810335695158, 16, + 0.387780142721695, 1, "Total", 4.93227680919972e-12, 0.0561388851230775, + 6.90751413875668, 0.464551820002394, 0.677439104019981, 16, + 0.570995462011188, 0, "Total", 0, 0.0543089785569569, 10.5138317306475, + 0.222220789614877, 0.416175717558687, 50, 0.319198253586782, + 0, "Total", 1.10997655511369e-10, 0.0494792071368919, 6.45115942750801, + 0.518927807837196, 0.683892927358569, 16, 0.601410367597883, + 1, "Total", 0, 0.0420837119514942, 14.2908108555412, 0.266421453465112, + 0.432804864881842, 50, 0.349613159173477, 0, "Total", 2.22044604925031e-16, + 0.0424455277569234, 8.23674902043009, 0.538922578960469, 0.735200031777182, + 50, 0.637061305368826, 0, "Total", 0, 0.0500716988589904, 12.7229816420427, + 0.275066399110126, 0.495461794778713, 50, 0.38526409694442, + 0, "Total", 7.26907423143075e-12, 0.0562243483571734, 6.85226433389629, + 0.463089982770759, 0.67613858560685, 50, 0.569614284188804, + 1, "Total", 0, 0.0543501320729848, 10.4804581417372, 0.221038011077911, + 0.414596140450886, 50, 0.317817075764398, 0, "Total", 1.22329923968323e-10, + 0.0493779811516273, 6.43641291830993, 0.517630072811228, 0.68242830673977, + 84, 0.600029189775499, 0, "Total", 0, 0.0420411383138796, 14.2724296686658, + 0.265458297820963, 0.431005664881224, 50, 0.348231981351094, + 0, "Total", 2.22044604925031e-16, 0.0422322472162954, 8.24564176203077, + 0.537796576190688, 0.733563678902196, 84, 0.635680127546442, + 1, "Total", 0, 0.049941505113281, 12.728493586738, 0.274165584176271, + 0.493600254067801, 50, 0.383882919122036, 0, "Total", 7.00306479473056e-12, + 0.0559792607472389, 6.85759179377821, -0.00103676888191501, + 0.010537639209367, 16, 0.00475043516372599, 0, "Total indirect", + 0.107651465139327, 0.00295270938205484, 1.6088393908987, -0.00231531722335021, + 0.00905383190603491, 50, 0.00336925734134235, 1, "Total indirect", + 0.2453678699181, 0.00290034643979775, 1.16167410041446, -0.00292600724797799, + 0.00577719623490292, 16, 0.00142559449346246, 1, "Total indirect", + 0.520815658321167, 0.00222024576765968, 0.642088598581209, -0.00436690909159559, + 0.00445574243375325, 50, 4.44166710788263e-05, 1, "Total indirect", + 0.984255211182563, 0.0022507177669949, 0.0197344472639634, -0.00790463129054955, + 0.00296137307815676, 50, -0.00247162910619639, 0, "Total indirect", + 0.372583755406508, 0.00277199082595802, -0.891644042632132, + -0.00951269662632821, 0.00180708276916815, 50, -0.00385280692858003, + 1, "Total indirect", 0.182141909533948, 0.00288775188850033, + -1.33418904301397, 50, 1, 50, 1, 84, 0, 50, 1, 84, 1, 50, 1, + 16, 0, 84, 0, 16, 1, 84, 0, 50, 0, 84, 0, 50, 1, 84, 0, 84, + 0, 84, 0, 84, 1, 84, 0, 16, 0, 84, 1, 16, 1, 84, 1, 50, 0, 84, + 1, 50, 1, 84, 1, 84, 0, 84, 1, 84, 1, 84, 1, 16, 0, 16, 1, 50, + 0, 50, 1, 84, 0, 84, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-17") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-17") +}) + + +context('Model number 18 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1607.63624601617, 1688.3965217818, 1323.98309233306, 21, 1, 100, + 1.7813691712083e-267, 0, 1323.98309233306, 21)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 18)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544845584294033, 0.0642107105108297, -0.240317436891602, "contcor1", + "", 0.121935733371751, "contGamma", 0.155374358817055, + -1.54669946007348, -0.403932083964775, 0.194629753518871, -0.104651165222952, + "contcor2", "", 0.493122376752006, "contGamma", 0.152697152142852, + -0.685351126424729, -0.0667350489108308, 0.346856460420067, + 0.140060705754618, "debCollin1__contcor1__contcor2", "", + 0.184355210161052, "contGamma", 0.105509976865201, 1.32746409312134, + 0.424979417508921, 0.89676340872169, 0.660871413115306, "contcor2", + "", 3.99652646532189e-08, "contcor1", 0.120355270539189, + 5.49100517289037, 0.000709126659456577, 0.276793831037575, 0.138751478848516, + "debCollin1__contcor1__contcor2", "", 0.0488346615774573, + "contcor1", 0.0704310657123906, 1.97003236349022, -0.00478933621283292, + 0.268765264168605, 0.131987963977886, "debCollin1__contcor1__contcor2", + "", 0.058579677680022, "contcor2", 0.069785619159128, + 1.89133471291445, 0.710355552187382, 1.25515384769454, 0.982754699940962, + "contNormal", "", 1.53699275529107e-12, "contNormal", + 0.138981710838683, 7.07110809048573, 0.00468048378029336, 0.00827015767927682, + 0.00647532072978509, "debCollin1", "", 1.53765888910584e-12, + "debCollin1", 0.000915749964616277, 7.07105758120167, 0.323891607815595, + 0.572297853835951, 0.448094730825773, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633701047518609, + 7.0710744850491, 0.318533071964188, 0.562830305573152, 0.44068168876867, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623218680383797, 7.0710603298554, 1.68041050118301, 2.9691897690485, + 2.32480013511576, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776262735237, 7.07107050787276, 0.732634540621275, + 1.29452377003122, 1.01357915532625, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.14334172307299, 7.07106858768632, + 0.721541809040455, 1.27492360411129, 0.998232706575872, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171419331131, + 7.07106800587181, 0.340024047065676, 0.600803458511579, 0.470413752788627, + "debCollin1__contcor1__contcor2", "", 1.53743684450092e-12, + "debCollin1__contcor1__contcor2", 0.0665265825042955, 7.07106445394597 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.149831449414334, 0.120438687319992, "", "", -0.0146963810471712, + "contGamma", "contNormal", "", "", "", 0.831208016942492, + 0.0689477303833598, -0.213152499225966, -0.0196450830671454, + 0.062126592232491, 16, 16, 0.0212407545826728, "contGamma", + "debCollin1", "contNormal", "", "", 0.308569507950384, + 0.0208605045665739, 1.01822822716897, -0.0396395856398543, 0.0406860921802501, + 50, 16, 0.000523253270197863, "contGamma", "debCollin1", "contNormal", + "", "", 0.979628242088932, 0.0204916208802057, + 0.0255349868737475, -0.0907757033755884, 0.0466011708038283, + 84, 16, -0.02208726628588, "contGamma", "debCollin1", "contNormal", + "", "", 0.528537135652942, 0.0350457649382917, + -0.63024066744644, -0.0173788731369747, 0.0856897016016942, + 16, 50, 0.0341554142323597, "contGamma", "debCollin1", "contNormal", + "", "", 0.193941648504752, 0.0262934869088567, + 1.29900664566687, -0.0175032841868008, 0.0443791100265705, 50, + 50, 0.0134379129198848, "contGamma", "debCollin1", "contNormal", + "", "", 0.394646085954869, 0.0157866151371892, + 0.851221924592852, -0.0568458976837338, 0.0385006844113477, + 84, 50, -0.00917260663619305, "contGamma", "debCollin1", "contNormal", + "", "", 0.706093358525375, 0.0243235546283409, + -0.377107983448499, -0.0295506899516112, 0.128137445210942, + 16, 84, 0.0492933776296653, "contGamma", "debCollin1", "contNormal", + "", "", 0.220435416253511, 0.0402273042786441, + 1.22537113817577, -0.0223734411184025, 0.0795251937527832, 50, + 84, 0.0285758763171904, "contGamma", "debCollin1", "contNormal", + "", "", 0.271644902812292, 0.0259950273767654, + 1.09928240901688, -0.0366193646322071, 0.0485500781544321, 84, + 84, 0.0059653567611125, "contGamma", "debCollin1", "contNormal", + "", "", 0.783657489237251, 0.0217272979142589, + 0.274555850647109)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.149831449414334, 0.120438687319992, -0.0146963810471712, "contGamma", + "", 0.831208016942492, "contNormal", 0.0689477303833598, + -0.213152499225966, -4.39510296631678, 1.52256829903868, -1.43626733363905, + "debCollin1", "", 0.341402042024977, "contNormal", + 1.50963775662035, -0.951398656625045, -3.43504498757949, 0.849165044949427, + -1.29293997131503, "contcor1", "", 0.236808121754474, + "contNormal", 1.09293080544393, -1.18300258797249, -1.18783235906966, + 2.91809642405432, 0.865132032492331, "contcor2", "", + 0.408837516187978, "contNormal", 1.04745005916206, 0.825941079409952, + -0.133631862851254, 4.63689032761794, 2.25162923238335, "debCollin1:contcor1:contcor2", + "", 0.0642906412056423, "contNormal", 1.21699230906753, + 1.85015896617174, -0.924158150037038, 5.5839109980049, 2.32987642398393, + "debCollin1:contcor1", "", 0.160519414259939, "contNormal", + 1.66025222896358, 1.40332678573687, -4.58920242770677, 1.6225099439079, + -1.48334624189944, "debCollin1:contcor2", "", 0.349236085253123, + "contNormal", 1.58464962127158, -0.936072064125534, -2.9595008687223, + 0.224911930909954, -1.36729446890617, "contcor1:contcor2", "", + 0.0923550873274586, "contNormal", 0.812365131387744, -1.68310334365343, + -0.019472093566238, 0.00121577912619413, -0.00912815722002192, + "contGamma", "", 0.0837019891637354, "debCollin1", + 0.00527761552141146, -1.7295987521237)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.131652108692616, 0.144740855763619, 16, 16, 0.00654437353550155, + "Total", 0.92605036209884, 0.0705097049324345, 0.0928152165971005, + -0.15069905554156, 0.122352799987613, 50, 16, -0.0141731277769734, + "Total", 0.838768324484001, 0.0696573655646154, -0.20346919040207, + -0.18275438332869, 0.109187088662587, 84, 16, -0.0367836473330512, + "Total", 0.621378365047572, 0.0744762338221708, -0.493897790547259, + -0.12419349749161, 0.163111563861987, 16, 50, 0.0194590331851885, + "Total", 0.790628292034545, 0.0732934542725843, 0.265494830040604, + -0.137410162264177, 0.134893226009604, 50, 50, -0.00125846812728639, + "Total", 0.985546149162578, 0.069466426531731, -0.0181162064916574, + -0.163209390552989, 0.115471415186261, 84, 50, -0.0238689876833643, + "Total", 0.737065806197725, 0.0710933486373853, -0.335741502416901, + -0.123027930139264, 0.192221923304252, 16, 84, 0.0345969965824941, + "Total", 0.667056512536215, 0.0804223587602036, 0.430191269142607, + -0.130428241255777, 0.158187231795816, 50, 84, 0.0138794952700192, + "Total", 0.850477640653817, 0.0736277491137989, 0.188509025972898, + -0.148750406604393, 0.131288358032276, 84, 84, -0.00873102428605872, + "Total", 0.902728609565577, 0.0714397730890921, -0.122215173824395, + -0.0196450830671454, 0.062126592232491, 16, 16, 0.0212407545826728, + "Total indirect", 0.308569507950384, 0.0208605045665739, 1.01822822716897, + -0.0396395856398543, 0.0406860921802501, 50, 16, 0.000523253270197863, + "Total indirect", 0.979628242088932, 0.0204916208802057, 0.0255349868737475, + -0.0907757033755884, 0.0466011708038283, 84, 16, -0.02208726628588, + "Total indirect", 0.528537135652942, 0.0350457649382917, -0.63024066744644, + -0.0173788731369747, 0.0856897016016942, 16, 50, 0.0341554142323597, + "Total indirect", 0.193941648504752, 0.0262934869088567, 1.29900664566687, + -0.0175032841868008, 0.0443791100265705, 50, 50, 0.0134379129198848, + "Total indirect", 0.394646085954869, 0.0157866151371892, 0.851221924592852, + -0.0568458976837338, 0.0385006844113477, 84, 50, -0.00917260663619305, + "Total indirect", 0.706093358525375, 0.0243235546283409, -0.377107983448499, + -0.0295506899516112, 0.128137445210942, 16, 84, 0.0492933776296653, + "Total indirect", 0.220435416253511, 0.0402273042786441, 1.22537113817577, + -0.0223734411184025, 0.0795251937527832, 50, 84, 0.0285758763171904, + "Total indirect", 0.271644902812292, 0.0259950273767654, 1.09928240901688, + -0.0366193646322071, 0.0485500781544321, 84, 84, 0.0059653567611125, + "Total indirect", 0.783657489237251, 0.0217272979142589, 0.274555850647109 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-18") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-18") +}) + + +context('Model number 21 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1196.38264812804, 1253.69639221978, 533.124121942736, 11, 1, 100, + 2.74264460931465e-107, 0, 533.124121942736, 11)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 21)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.403933916611431, 0.19462732987332, -0.104653293369055, "contcor2", + "", 0.493113157323477, "contGamma", 0.152697001375057, + -0.685365740169341, -0.544847709417517, 0.0642082319031327, + -0.240319738757192, "contcor1", "", 0.12193194277739, + "contGamma", 0.155374268640854, -1.54671517272071, 0.424978845317087, + 0.896761783088456, 0.660870314202772, "contcor1", "", + 3.99645563309292e-08, "contcor2", 0.1203550017992, 5.49100830313117, + 0.797154721669858, 1.40852658702207, 1.10284065434596, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.155965076443912, + 7.07107436800163, 0.00465468479799384, 0.00822456352868334, + 0.00643962416333859, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910700083993445, 7.07107013222252, 0.318532939711891, + 0.56282984440215, 0.44068139205702, "debCollin1:contcor2", "", + 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217841290048, + 7.07106508929235, 1.68041024861652, 2.96918888823784, 2.32479956842718, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776102465925, 7.07107223119456, 0.721541390754643, 1.27492214496961, + 0.998231767862127, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.141171153801796, 7.07107465639648, 0.732634170014418, + 1.29452247706742, 1.01357832354092, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341487773527, 7.07107439223966 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.178615817704267, 0.0960662133296491, "", "", -0.0412748021873091, + "contGamma", "contNormal", "", "", "", 0.555845313533844, + 0.0700732343044498, -0.589023791994257, -0.0180242803929854, + 0.02509101423924, 16, 16, 0.00353336692312731, "contGamma", + "debCollin1", "contNormal", "", "", 0.748025242393831, + 0.0109990017603164, 0.321244327451192, -0.0280505545133355, + 0.0402201705776763, 50, 16, 0.00608480803217038, "contGamma", + "debCollin1", "contNormal", "", "", 0.726808628245907, + 0.0174163213277189, 0.349373895765583, -0.0409462576941744, + 0.0586850211399576, 84, 16, 0.00886938172289158, "contGamma", + "debCollin1", "contNormal", "", "", 0.727119291105623, + 0.0254166095958933, 0.34896006445819, -0.0129049934738039, 0.016236222271172, + 16, 50, 0.00166561439868407, "contGamma", "debCollin1", "contNormal", + "", "", 0.822718422219696, 0.00743412021211564, + 0.22404996841046, -0.0212620999194377, 0.0269988060652241, 50, + 50, 0.00286835307289322, "contGamma", "debCollin1", "contNormal", + "", "", 0.815778359175162, 0.012311681838375, + 0.232978167446846, -0.031010769889512, 0.0393727488328131, 84, + 50, 0.00418098947165054, "contGamma", "debCollin1", "contNormal", + "", "", 0.815873745486016, 0.0179553091989193, + 0.232855331274506, -0.0198977988692705, 0.0188504423818251, + 16, 84, -0.000523678243722663, "contGamma", "debCollin1", "contNormal", + "", "", 0.957749916288223, 0.00988493705923598, + -0.052977397891812, -0.0341957917482776, 0.0323921400738253, + 50, 84, -0.000901825837226169, "contGamma", "debCollin1", "contNormal", + "", "", 0.957660928694811, 0.0169870294422092, + -0.0530890842506767, -0.0498460459971651, 0.0472169942487331, + 84, 84, -0.00131452587421598, "contGamma", "debCollin1", "contNormal", + "", "", 0.957662087605256, 0.0247614346517383, + -0.0530876297235749)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.178615817704267, 0.0960662133296491, -0.0412748021873091, "contGamma", + "", 0.555845313533844, "contNormal", 0.0700732343044498, + -0.589023791994257, -2.89508349628328, 2.25712220316661, -0.318980646558332, + "debCollin1", "", 0.808246704035515, "contNormal", + 1.31436234035162, -0.242688516526576, -1.8145216912294, 1.39871291184315, + -0.207904389693127, "contcor2", "", 0.799782009244351, + "contNormal", 0.819717767371781, -0.253629234315269, -2.05867491679516, + 2.78324009127835, 0.362282587241595, "debCollin1:contcor2", + "", 0.769294751855698, "contNormal", 1.23520509720227, + 0.293297516389918, -0.0197475228624591, 0.00115999224130965, + -0.00929376531057475, "contGamma", "", 0.0814247919885258, + "debCollin1", 0.00533364777839915, -1.74247826191556, -0.0185475979643399, + 0.0350787529510461, 0.00826557749335312, "contcor1", "", + 0.5457177818626, "debCollin1", 0.0136804429413968, 0.604189318193901, + -0.0145563098544807, 0.00654285154432042, -0.00400672915508015, + "contGamma:contcor1", "", 0.456638132628245, "debCollin1", + 0.00538253803774678, -0.744394025082903)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.174967720004561, 0.0994848494761975, 16, 16, -0.0377414352641818, + "Total", 0.589852228640243, 0.0700146971183158, -0.539050182569577, + -0.17365737041939, 0.103277382109112, 50, 16, -0.0351899941551387, + "Total", 0.618410908462071, 0.0706479187150702, -0.49810376292985, + -0.174174662056739, 0.109363821127904, 84, 16, -0.0324054204644175, + "Total", 0.654148936830079, 0.0723325748384046, -0.448005902414136, + -0.175444211197326, 0.0962258356200763, 16, 50, -0.039609187788625, + "Total", 0.567646463991404, 0.0693048568647948, -0.571521096506954, + -0.17394520349027, 0.0971323052614387, 50, 50, -0.0384064491144159, + "Total", 0.578636063026775, 0.0691536964173663, -0.555378108534065, + -0.173238614910378, 0.0990509894790612, 84, 50, -0.0370938127156585, + "Total", 0.593335371884539, 0.0694629101700912, -0.534008906693203, + -0.177683700391072, 0.0940867395290089, 16, 84, -0.0417984804310317, + "Total", 0.546583455224247, 0.0693304678207793, -0.602887615573021, + -0.17870375622826, 0.0943505001791896, 50, 84, -0.0421766280245352, + "Total", 0.544859008446555, 0.0696579780448179, -0.605481657785111, + -0.181431679573702, 0.0962530234506522, 84, 84, -0.042589328061525, + "Total", 0.547699458216537, 0.0708392361325759, -0.601211000946127, + -0.0180242803929854, 0.02509101423924, 16, 16, 0.00353336692312731, + "Total indirect", 0.748025242393831, 0.0109990017603164, 0.321244327451192, + -0.0280505545133355, 0.0402201705776763, 50, 16, 0.00608480803217038, + "Total indirect", 0.726808628245907, 0.0174163213277189, 0.349373895765583, + -0.0409462576941744, 0.0586850211399576, 84, 16, 0.00886938172289158, + "Total indirect", 0.727119291105623, 0.0254166095958933, 0.34896006445819, + -0.0129049934738039, 0.016236222271172, 16, 50, 0.00166561439868407, + "Total indirect", 0.822718422219696, 0.00743412021211564, 0.22404996841046, + -0.0212620999194377, 0.0269988060652241, 50, 50, 0.00286835307289322, + "Total indirect", 0.815778359175162, 0.012311681838375, 0.232978167446846, + -0.031010769889512, 0.0393727488328131, 84, 50, 0.00418098947165054, + "Total indirect", 0.815873745486016, 0.0179553091989193, 0.232855331274506, + -0.0198977988692705, 0.0188504423818251, 16, 84, -0.000523678243722663, + "Total indirect", 0.957749916288223, 0.00988493705923598, -0.052977397891812, + -0.0341957917482776, 0.0323921400738253, 50, 84, -0.000901825837226169, + "Total indirect", 0.957660928694811, 0.0169870294422092, -0.0530890842506767, + -0.0498460459971651, 0.0472169942487331, 84, 84, -0.00131452587421598, + "Total indirect", 0.957662087605256, 0.0247614346517383, -0.0530876297235749 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-21") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-21") +}) + + +context('Model number 21 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(42173.6903768426, 42317.0686270537, 26648.0809347451, 11, 1, 5000, + 0, 0, 26648.0809347451, 11)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 21)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.0784876418799669, -0.050564012198395, -0.0645258270391809, + "contcor2", "", 0, "facGenderm", 0.00712350581485933, + -9.05815601421744, 0.0329822867180096, 0.0470175899649074, 0.0399999383414585, + "facExperimexperimental", "", 0, "facGenderm", 0.00358050029429278, + 11.1716059359686, -0.0241739863632075, 0.00352547734420732, + -0.0103242545095001, "facExperimexperimental", "", + 0.144001397748447, "contcor2", 0.00706631956655955, -1.46105117554523, + 1.00843689187071, 1.09072257946817, 1.04957973566944, "contNormal", + "", 0, "contNormal", 0.020991632562261, 49.9999098477165, + 0.00638916501279874, 0.00691050235984955, 0.00664983368632414, + "debCollin1", "", 0, "debCollin1", 0.00013299666503136, + 50.000003268925, 0.423406784489804, 0.457955548726044, 0.440681166607924, + "debCollin1:contcor2", "", 0, "debCollin1:contcor2", + 0.00881362221672354, 50.0000063279031, 0.240200181551893, 0.259799821648366, + 0.25000000160013, "facGenderm", "", 0, "facGenderm", + 0.00500000006405027, 49.9999996795233, 0.959102546909609, 1.03736252404539, + 0.998232535477498, "contcor2", "", 0, "contcor2", 0.0199646467366451, + 50.0000099498502, 0.240200034192341, 0.259799649217512, 0.249999841704926, + "facExperimexperimental", "", 0, "facExperimexperimental", + 0.00499999366819232, 50.0000316591021)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.42512114864905, 0.539799417103415, "", 0.482460282876233, "", + "facGenderm", "contNormal", "", "", "", 0, 0.0292551978911176, + 16.4914380231459, -0.00130954056774943, 0.00907109040374669, + 16, 0.00388077491799863, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.142796543209333, 0.00264816880651308, + 1.4654560194403, -0.00130953976789957, 0.00907111206165015, + 16, 0.00388078614687529, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.142796189949127, 0.0026481741275429, + 1.4654573151034, -0.00267192410996115, 0.00349123645381682, + 50, 0.000409656171927831, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.794438150535133, 0.00157226372841343, + 0.260551817436643, -0.00267193175492284, 0.00349124646942803, + 50, 0.000409657357252599, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.794438144917211, 0.0015722682337444, + 0.260551824720765, -0.00872089588471815, 0.00140284031474041, + 84, -0.00365902778498887, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.156546727843057, 0.0025826332216595, + -1.41678181566863, -0.00872091693555487, 0.00140284019105782, + 84, -0.00365903837224852, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.156546385454376, 0.00258263856031733, + -1.41678298638851)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.42512114864905, 0.539799417103415, 0.482460282876233, "facGenderm", + "", 0, "contNormal", 0.0292551978911176, 16.4914380231459, + -0.410258407658171, 0.291896037726498, -0.0591811849658362, + "debCollin1", "", 0.741104032305852, "contNormal", + 0.179124323437363, -0.330391673392872, -0.43014327952976, 0.0129912199720831, + -0.208576029778838, "contcor2", "", 0.065031019055972, + "contNormal", 0.113046592436706, -1.84504481986592, 0.0816167443822703, + 0.749194431869048, 0.415405588125659, "debCollin1:contcor2", + "", 0.014719545177253, "contNormal", 0.170303559849198, + 2.43920672294518, -0.0152372869800999, -0.00228415375939758, + -0.00876072036974873, "facGenderm", "", 0.00802054875681346, + "debCollin1", 0.00330443143927005, -2.65120355218626, -0.00647656729660851, + 0.0064765659240808, -6.86263857422551e-10, "facExperimexperimental", + "", 0.999999834295446, "debCollin1", 0.00330443143926674, + -2.07679859617494e-07, -0.00915927368678216, 0.00915922298915059, + -2.53488157855857e-08, "facGenderm:facExperimexperimental", + "", 0.999995672012543, "debCollin1", 0.00467317175734522, + -5.42432786591737e-06)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.428881961871069, 0.543800153717394, 16, 0.486341057794231, 0, + "Total", 0, 0.029316403962722, 16.5893831457859, 0.42888197248937, + 0.543800165556846, 16, 0.486341069023108, 1, "Total", 0, 0.0293164042742459, + 16.5893833525264, 0.42558874474979, 0.540151133346531, 50, 0.482869939048161, + 0, "Total", 0, 0.0292256361597446, 16.5221361276394, 0.425588745867633, + 0.540151134599338, 50, 0.482869940233485, 1, "Total", 0, 0.0292256361941746, + 16.5221361487328, 0.42140978203546, 0.536192728147027, 84, 0.478801255091244, + 0, "Total", 0, 0.0292819018657894, 16.3514397830366, 0.421409771019907, + 0.536192717988061, 84, 0.478801244503984, 1, "Total", 0, 0.0292819020843105, + 16.3514392994481, -0.00130954056774943, 0.00907109040374669, + 16, 0.00388077491799863, 0, "Total indirect", 0.142796543209333, + 0.00264816880651308, 1.4654560194403, -0.00130953976789957, + 0.00907111206165015, 16, 0.00388078614687529, 1, "Total indirect", + 0.142796189949127, 0.0026481741275429, 1.4654573151034, -0.00267192410996115, + 0.00349123645381682, 50, 0.000409656171927831, 0, "Total indirect", + 0.794438150535133, 0.00157226372841343, 0.260551817436643, -0.00267193175492284, + 0.00349124646942803, 50, 0.000409657357252599, 1, "Total indirect", + 0.794438144917211, 0.0015722682337444, 0.260551824720765, -0.00872089588471815, + 0.00140284031474041, 84, -0.00365902778498887, 0, "Total indirect", + 0.156546727843057, 0.0025826332216595, -1.41678181566863, -0.00872091693555487, + 0.00140284019105782, 84, -0.00365903837224852, 1, "Total indirect", + 0.156546385454376, 0.00258263856031733, -1.41678298638851)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-21") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-21") +}) + + +context('Model number 22 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1196.96798989146, 1259.49207435518, 529.709463706163, 9, 1, 100, + 2.48707889246187e-108, 0, 529.709463706163, 9)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 22)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544849728107105, 0.0642076431471771, -0.240321042479964, "contcor1", + "", 0.121930794594629, "contGamma", 0.155374633426545, + -1.54671993220553, -0.403935371061789, 0.194627057613314, -0.104654156724237, + "contcor2", "", 0.493110444331926, "contGamma", 0.15269730295977, + -0.685370040568494, 0.42497942486034, 0.89676375828866, 0.6608715915745, + "contcor2", "", 3.99658306449169e-08, "contcor1", 0.120355357840678, + 5.49100267267981, 0.770396120451084, 1.36124914613017, 1.06582263329063, + "contNormal", "", 1.53765888910584e-12, "contNormal", + 0.150730582383058, 7.0710443523797, 0.00465468423068587, 0.0082245615499474, + 0.00643962289031664, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910699723928671, 7.0710715300722, 0.318532825726584, + 0.562829446825315, 0.44068113627595, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217117828978, + 7.07106919352752, 1.68041101491404, 2.96919156106441, 2.32480128798923, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776588834312, 7.07106700094397, 0.732634802252713, 1.29452468228461, + 1.01357974226866, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341889051026, 7.07106449467714, 0.721541909830159, + 1.2749239554438, 0.99823293263698, "contcor2", "", + 1.53743684450092e-12, "contcor2", 0.141171483246286, 7.07106640578021 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.181059693428169, 0.193865586933468, 16, "", 0.00640294675264975, + "contGamma", "contNormal", "", "", "", 0.946626089102419, + 0.095645961690878, 0.066944245626843, -0.161734624622888, 0.112345805470418, + 50, "", -0.0246944095762352, "contGamma", "contNormal", "", + "", "", 0.723951912998612, 0.0699197618566509, -0.353182117909148, + -0.271690094569305, 0.154423651294934, 84, "", -0.0586332216371854, + "contGamma", "contNormal", "", "", "", 0.589623426570928, + 0.108704483660254, -0.539381814465339, -0.0178558331118472, + 0.0222732501787357, 16, 16, 0.00220870853344427, "contGamma", + "debCollin1", "contNormal", "", "", 0.82918012573834, + 0.0102371991544528, 0.215753205551692, -0.0295234104788969, + 0.0371306434464349, 50, 16, 0.00380361648376899, "contGamma", + "debCollin1", "contNormal", "", "", 0.822997858492237, + 0.0170038976356429, 0.223690859900026, -0.0430577575863233, + 0.0541462691942779, 84, 16, 0.0055442558039773, "contGamma", + "debCollin1", "contNormal", "", "", 0.823082469544462, + 0.0247974012653636, 0.22358213042757, -0.0128032837366386, 0.0155424821963004, + 16, 50, 0.00136959922983094, "contGamma", "debCollin1", "contNormal", + "", "", 0.849778156074737, 0.00723119561291095, + 0.189401490866267, -0.0213838836377928, 0.0261010567078119, + 50, 50, 0.00235858653500952, "contGamma", "debCollin1", "contNormal", + "", "", 0.845624985296926, 0.012113727782796, + 0.194703610424465, -0.0311824872776351, 0.0380583682407713, + 84, 50, 0.00343794048156814, "contGamma", "debCollin1", "contNormal", + "", "", 0.845681130474812, 0.0176638081272333, + 0.194631896859639, -0.0190888569480248, 0.0198609256080647, + 16, 84, 0.000386034330019976, "contGamma", "debCollin1", "contNormal", + "", "", 0.969009413352857, 0.00993635160220301, + 0.0388507115563813, -0.0328349908504436, 0.0341645701215256, + 50, 84, 0.000664789635540993, "contGamma", "debCollin1", "contNormal", + "", "", 0.968974346185477, 0.0170920388079713, + 0.0388946949518365, -0.0478619021533972, 0.0497999333986608, + 84, 84, 0.000969015622631831, "contGamma", "debCollin1", "contNormal", + "", "", 0.968974802214317, 0.0249141913633113, + 0.0388941229719704)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.16157685792896, 0.112420437357879, -0.0245782102855407, "contGamma", + "", 0.725118104085562, "contNormal", 0.0698985536081518, + -0.351626879482014, -2.79881656975713, 2.28231687562816, -0.258249847064485, + "debCollin1", "", 0.842081819899687, "contNormal", + 1.29623133013276, -0.19923129541857, -0.0639260386787741, 0.675672139219066, + 0.305873050270146, "contcor1", "", 0.104985258824412, + "contNormal", 0.188676471540216, 1.62115099870812, -1.86124826374563, + 1.40971906153014, -0.225764601107746, "contcor2", "", + 0.786732273082704, "contNormal", 0.83444577325827, -0.270556348108998, + -0.175211694684742, 0.111365930566885, -0.0319228820589289, + "contGamma:contcor1", "", 0.66236196048183, "contNormal", + 0.0731078804284453, -0.436654460119023, -2.27531507735203, 2.60083365173965, + 0.16275928719381, "debCollin1:contcor2", "", 0.895900357391849, + "contNormal", 1.24393834977431, 0.130841924138233, -0.019747544403212, + 0.00115996863400444, -0.00929378788460379, "contGamma", "", + 0.0814240219064526, "debCollin1", 0.00533364725120774, -1.74248266652792, + -0.0185475494781709, 0.0350787961370722, 0.00826562332945065, + "contcor1", "", 0.545715514866184, "debCollin1", 0.0136804415892947, + 0.604192728392533, -0.0145563207136064, 0.00654283859981022, + -0.0040067410568981, "contGamma:contcor1", "", 0.456636750796932, + "debCollin1", 0.00538253750575116, -0.744396309847718)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.177378970880234, 0.194602281452422, 16, 16, 0.00861165528609402, + "Total", 0.927691732063884, 0.094894920331903, 0.090749381062485, + -0.159226449403813, 0.114255047318231, 16, 16, -0.0224857010427909, + "Total", 0.747227532599345, 0.0697669699237414, -0.322297228435876, + -0.270484602253514, 0.157635576046032, 50, 16, -0.0564245131037412, + "Total", 0.605413981249341, 0.109216338074705, -0.516630699201306, + -0.175839001041306, 0.196252127514143, 16, 16, 0.0102065632364187, + "Total", 0.914372718934214, 0.0949229504956357, 0.107524715394177, + -0.158935084168084, 0.117153497983151, 84, 16, -0.0208907930924662, + "Total", 0.766764912057321, 0.070432054958404, -0.296609166164525, + -0.270580694455426, 0.160921484148593, 16, 16, -0.0548296051534164, + "Total", 0.61841867689578, 0.110079109108038, -0.498092740736152, + -0.17543987545398, 0.199334280567234, 16, 16, 0.011947202556627, + "Total", 0.900554383203306, 0.0956074088548014, 0.124961053748159, + -0.160308958132679, 0.122008650588163, 50, 16, -0.0191501537722579, + "Total", 0.790319031625089, 0.0720211215480813, -0.265896355966538, + -0.271767754465876, 0.16558982279946, 50, 16, -0.0530889658332081, + "Total", 0.634200274842884, 0.111572860704369, -0.475823291596656, + -0.17924882518308, 0.194793917148042, 50, 50, 0.00777254598248069, + "Total", 0.935079751799796, 0.0954208203011696, 0.0814554513150147, + -0.158721325010862, 0.112071704318053, 84, 50, -0.0233248103464043, + "Total", 0.735631661512679, 0.0690811238025026, -0.33764375943113, + -0.268538449596535, 0.154011204781826, 50, 50, -0.0572636224073545, + "Total", 0.595262321518639, 0.107795259941351, -0.531225792660183, + -0.178522884760178, 0.196045951335496, 16, 50, 0.00876153328765927, + "Total", 0.926943573182683, 0.095555030360309, 0.091690968592885, + -0.15734190589848, 0.112670259816029, 84, 50, -0.0223358230412257, + "Total", 0.745739314615435, 0.0688819202404562, -0.324262490988271, + -0.266771195472152, 0.1542219252678, 50, 50, -0.0562746351021759, + "Total", 0.600291557281045, 0.107398177737115, -0.523981284300027, + -0.178365891114389, 0.198047665582825, 84, 50, 0.00984088723421788, + "Total", 0.918374194441165, 0.096025630997895, 0.102481880430795, + -0.156719761834436, 0.114206823645102, 84, 50, -0.0212564690946671, + "Total", 0.758423770304332, 0.0691151948751541, -0.307551315352053, + -0.265408124870394, 0.155017562559159, 84, 50, -0.0551952811556173, + "Total", 0.606815163391782, 0.107253421681678, -0.514624897650666, + -0.182532188148321, 0.19611015031366, 16, 84, 0.00678898108266972, + "Total", 0.943967998236356, 0.096594208222361, 0.0702835212132119, + -0.159653362471315, 0.111036611978884, 16, 84, -0.0243083752462152, + "Total", 0.724826601345186, 0.0690548338095411, -0.352015549168647, + -0.267204791826112, 0.150710417211781, 50, 84, -0.0582471873071655, + "Total", 0.584830628235036, 0.106612981752306, -0.546342352964961, + -0.184810499652154, 0.198945972428536, 16, 84, 0.00706773638819074, + "Total", 0.942447306841085, 0.0978988581187492, 0.0721942678802007, + -0.15987484258659, 0.111815602705201, 84, 84, -0.0240296199406942, + "Total", 0.728818640748633, 0.0693100606528618, -0.346697430565617, + -0.265050965395737, 0.149114101392448, 16, 84, -0.0579684320016444, + "Total", 0.583244979368754, 0.105656295231715, -0.548650999682638, + -0.188414779596631, 0.203158704347194, 16, 84, 0.00737196237528158, + "Total", 0.941170668278615, 0.0998930304415046, 0.0737985657527775, + -0.161759272344393, 0.114308484437186, 50, 84, -0.0237253939536034, + "Total", 0.736207009222774, 0.0704267422664821, -0.336880468839958, + -0.263778647308029, 0.148450235278922, 50, 84, -0.0576642060145536, + "Total", 0.583461883089432, 0.105162361614438, -0.548335023380046, + -0.0178558331118472, 0.0222732501787357, 50, 16, 0.00220870853344427, + "Total indirect", 0.82918012573834, 0.0102371991544528, 0.215753205551692, + -0.0295234104788969, 0.0371306434464349, 84, 16, 0.00380361648376899, + "Total indirect", 0.822997858492237, 0.0170038976356429, 0.223690859900026, + -0.0430577575863233, 0.0541462691942779, 50, 16, 0.0055442558039773, + "Total indirect", 0.823082469544462, 0.0247974012653636, 0.22358213042757, + -0.0128032837366386, 0.0155424821963004, 16, 50, 0.00136959922983094, + "Total indirect", 0.849778156074737, 0.00723119561291095, 0.189401490866267, + -0.0213838836377928, 0.0261010567078119, 84, 50, 0.00235858653500952, + "Total indirect", 0.845624985296926, 0.012113727782796, 0.194703610424465, + -0.0311824872776351, 0.0380583682407713, 50, 50, 0.00343794048156814, + "Total indirect", 0.845681130474812, 0.0176638081272333, 0.194631896859639, + -0.0190888569480248, 0.0198609256080647, 84, 84, 0.000386034330019976, + "Total indirect", 0.969009413352857, 0.00993635160220301, 0.0388507115563813, + -0.0328349908504436, 0.0341645701215256, 84, 84, 0.000664789635540993, + "Total indirect", 0.968974346185477, 0.0170920388079713, 0.0388946949518365, + -0.0478619021533972, 0.0497999333986608, 84, 84, 0.000969015622631831, + "Total indirect", 0.968974802214317, 0.0249141913633113, 0.0388941229719704, + 16, 16, 50, 16, 84, 16, 16, 50, 50, 50, 84, 50, 16, 84, 50, + 84, 84, 84, 16, 50, 84, 16, 50, 84, 16, 50, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-22") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-22") +}) + + +context('Model number 22 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(21382.6250463993, 21523.0088180323, 14110.8006372396, 9, 1, 2564, + 0, 0, 14110.8006372396, 9)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 22)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0678662266872584, 0.0881398779158054, 0.0780030523015319, "facExperimexperimental", + "", 0, "facGenderm", 0.00517194483890086, 15.0819575094519, + -0.0939552091480475, -0.0542197429833038, -0.0740874760656757, + "contcor2", "", 2.69562150378988e-13, "facGenderm", + 0.0101367847772132, -7.30877469473544, -0.0997948358108074, + -0.0599920172765488, -0.0798934265436781, "contcor2", "", + 3.5527136788005e-15, "facExperimexperimental", 0.0101539668198544, + -7.86819850420035, 0.960815345205388, 1.07209692031786, 1.01645613276162, + "contNormal", "", 0, "contNormal", 0.0283886785650774, + 35.8049822724763, 0.00607839523513996, 0.00678239355447448, + 0.00643039439480722, "debCollin1", "", 0, "debCollin1", + 0.000179594708088405, 35.8050326941809, 0.426153814621709, 0.475510859033406, + 0.450832336827558, "debCollin1:contcor2", "", 0, "debCollin1:contcor2", + 0.0125913141264377, 35.8050265683512, 0.236315045510895, 0.263685006126326, + 0.250000025818611, "facGenderm", "", 0, "facGenderm", + 0.00698226111074511, 35.8050238817167, 0.236315008098393, 0.263684959514427, + 0.24999998380641, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.00698225876391732, 35.8050298992572, + 0.975407887689172, 1.0883793653933, 1.03189362654124, "contcor2", + "", 0, "contcor2", 0.0288197840866557, 35.8050436269241 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.4954898165856, 0.727973342593819, "", 0.61173157958971, 0, "facGenderm", + "contNormal", "", "", "", 0, 0.059308111741343, 10.3144673068942, + 0.214796163814776, 0.451209792922784, "", 0.33300297836878, + 1, "facGenderm", "contNormal", "", "", "", 3.3620008554891e-08, + 0.0603107074856499, 5.52145700575663, -0.00765140937649472, + 0.00327488683300244, 16, -0.00218826127174614, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.432416863589861, + 0.00278737168021514, -0.785062604775132, -0.00592087562356976, + 0.0214747559507856, 16, 0.00777694016360793, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.265807092577524, + 0.00698880994509303, 1.11277030348611, -0.00338834790979261, + 0.00208750333593464, 50, -0.000650422286928988, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.641495021635458, + 0.00139692649684384, -0.465609528059299, -0.00651756393234577, + 0.0111406820872336, 50, 0.00231155907744392, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.607853681346294, + 0.00450473737243781, 0.513139587578885, -0.00281915289804578, + 0.00482804712141684, 84, 0.00100444711168553, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.606639620802661, + 0.00195085217886215, 0.51487607445039, -0.0156015102274343, + 0.00846202904578005, 84, -0.00356974059082714, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.560898537179918, + 0.00613877077921445, -0.581507392801519)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.4954898165856, 0.727973342593819, 0.61173157958971, "facGenderm", + "", 0, "contNormal", 0.059308111741343, 10.3144673068942, + -0.619632937495416, 0.362177783172598, -0.128727577161409, "debCollin1", + "", 0.607286086814512, "contNormal", 0.250466520918857, + -0.51395123264044, 0.0250391965129389, 0.258026605143568, 0.141532900828253, + "facExperimexperimental", "", 0.0172544985573087, "contNormal", + 0.0594366555886751, 2.38123931143967, -0.46106334454001, 0.14236977345846, + -0.159346785540775, "contcor2", "", 0.300611146009266, + "contNormal", 0.153939848578411, -1.03512369936891, -0.444961958570965, + -0.112495243870894, -0.27872860122093, "facGenderm:facExperimexperimental", + "", 0.0010150126087205, "contNormal", 0.084814495909753, + -3.28633210904786, -0.167903691469154, 0.745569703030422, 0.288833005780634, + "debCollin1:contcor2", "", 0.215178903066745, "contNormal", + 0.233033209208163, 1.23944997694567, -0.00422891250029495, 0.0142520085516369, + 0.00501154802567099, "facGenderm", "", 0.287789602586681, + "debCollin1", 0.00471460730852889, 1.06298312833074, -0.0125866320688811, + 0.00589428898299696, -0.00334617154294205, "facExperimexperimental", + "", 0.477861941989013, "debCollin1", 0.00471460730851515, + -0.709745546972377, -0.035890252772473, -0.00975428357570408, + -0.0228222681740886, "facGenderm:facExperimexperimental", "", + 0.000619495550418847, "debCollin1", 0.00666746159697988, -3.42293207724304 + )) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.49317244914585, 0.725914187490077, 16, 0.609543318317963, 0, + "Total", 0, 0.0593739834456309, 10.266168495771, 0.21244362629955, + 0.449185807894518, 16, 0.330814717097034, 0, "Total", 4.31227122899003e-08, + 0.0603945234357264, 5.47756151183304, 0.502465290467552, 0.736551749039083, + 16, 0.619508519753318, 1, "Total", 0, 0.0597170306235153, 10.3740677204631, + 0.221916840729601, 0.459642996335175, 16, 0.340779918532388, + 0, "Total", 1.91834710339123e-08, 0.0606455418264639, 5.61920807810611, + 0.494851347379788, 0.727310967225773, 50, 0.611081157302781, + 0, "Total", 0, 0.0593020131185056, 10.3045600843538, 0.213959140361082, + 0.45074597180262, 50, 0.332352556081851, 1, "Total", 3.75534545682399e-08, + 0.0604059139120112, 5.50198704990979, 0.497310034842158, 0.730776242492149, + 50, 0.614043138667154, 1, "Total", 0, 0.0595588004400956, 10.3098641028669, + 0.217329200531219, 0.453299874361229, 50, 0.335314537446224, + 1, "Total", 2.54416223643972e-08, 0.0601977066138249, 5.57022113146776, + 0.496523998058841, 0.728948055343949, 84, 0.612736026701395, + 0, "Total", 0, 0.0592929408699443, 10.3340468141966, 0.215458435002189, + 0.452556415958742, 84, 0.334007425480466, 0, "Total", 3.34921168576585e-08, + 0.0604852902468493, 5.52212652228885, 0.490972106005737, 0.725351571992027, + 84, 0.608161838998882, 1, "Total", 0, 0.0597917787865097, 10.1713287569243, + 0.211612777756527, 0.447253697799379, 84, 0.329433237777953, + 0, "Total", 4.24894304185131e-08, 0.0601135842039849, 5.48017959900842, + -0.00765140937649472, 0.00327488683300244, 16, -0.00218826127174614, + 0, "Total indirect", 0.432416863589861, 0.00278737168021514, + -0.785062604775132, -0.00592087562356976, 0.0214747559507856, + 16, 0.00777694016360793, 1, "Total indirect", 0.265807092577524, + 0.00698880994509303, 1.11277030348611, -0.00338834790979261, + 0.00208750333593464, 50, -0.000650422286928988, 1, "Total indirect", + 0.641495021635458, 0.00139692649684384, -0.465609528059299, + -0.00651756393234577, 0.0111406820872336, 50, 0.00231155907744392, + 1, "Total indirect", 0.607853681346294, 0.00450473737243781, + 0.513139587578885, -0.00281915289804578, 0.00482804712141684, + 84, 0.00100444711168553, 0, "Total indirect", 0.606639620802661, + 0.00195085217886215, 0.51487607445039, -0.0156015102274343, + 0.00846202904578005, 84, -0.00356974059082714, 0, "Total indirect", + 0.560898537179918, 0.00613877077921445, -0.581507392801519, + 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-22") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-22") +}) + + +context('Model number 28 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1198.22112680386, 1258.14004108158, 664.266215106916, 16, 1, 100, + 5.15704800314657e-131, 0, 664.266215106916, 16)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 28)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.403934261862783, 0.194628432475987, -0.104652914693398, "contcor2", + "", 0.49311576769956, "contGamma", 0.15269737073236, + -0.685361602439302, -0.544848349682213, 0.0642089589597137, + -0.24031969536125, "contcor1", "", 0.121932847833343, + "contGamma", 0.155374617453712, -1.5467114210778, 0.424979285322299, + 0.896763278364386, 0.660871281843342, "contcor1", "", + 3.99655164518009e-08, "contcor2", 0.12035527100586, 5.49100406089538, + 0.795868368944436, 1.40625399038394, 1.10106117966419, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.155713478985877, + 7.07107173274355, 0.00465468362333663, 0.00822455943155148, + 0.00643962152744405, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910699338450496, 7.07107302658275, 0.318532852496559, + 0.562829540199162, 0.44068119634786, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217287739937, + 7.07106822960522, 1.68041171720728, 2.96919401062496, 2.32480286391612, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328777034573959, 7.07106220764076, 0.72154185647865, 1.27492376936788, + 0.998232812923265, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.141171449387396, 7.07106725371901, 0.73263457261043, + 1.29452388130569, 1.01357922695806, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341743299206, 7.07106808965169 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.198258884686779, 0.164306559903479, "", 16, -0.01697616239165, + "contGamma", "contNormal", "", "", "", 0.854374180394535, + 0.09249288442291, -0.183540198768469, -0.181939931387016, 0.0938464280599971, + "", 50, -0.0440467516635096, "contGamma", "contNormal", "", + "", "", 0.531272529915979, 0.070354955913063, -0.626064661570363, + -0.29284360944581, 0.141288334665784, "", 84, -0.075777637390013, + "contGamma", "contNormal", "", "", "", 0.493834623941438, + 0.110749979983299, -0.684222583168327, -0.0180265065475134, + 0.0244997217548711, 16, 16, 0.00323660760367881, "contGamma", + "debCollin1", "contNormal", "", "", 0.765443790643838, + 0.0108487269760633, 0.298339852299728, -0.0285157853955295, + 0.0396633063780582, 50, 16, 0.00557376049126434, "contGamma", + "debCollin1", "contNormal", "", "", 0.748618893377618, + 0.0173929450518927, 0.320460995802306, -0.0416149709899846, + 0.0578639026371745, 84, 16, 0.00812446582359496, "contGamma", + "debCollin1", "contNormal", "", "", 0.748861029285786, + 0.0253777300021418, 0.320141550205998, -0.0128919112916033, + 0.0165824795471872, 16, 50, 0.00184528412779195, "contGamma", + "debCollin1", "contNormal", "", "", 0.806137132161006, + 0.00751911542030385, 0.245412395560405, -0.0210295980997791, + 0.0273851240244872, 50, 50, 0.00317776296235403, "contGamma", + "debCollin1", "contNormal", "", "", 0.796955261325356, + 0.0123509213705342, 0.257289546829702, -0.0306760173632867, + 0.0399400058764618, 84, 50, 0.00463199425658758, "contGamma", + "debCollin1", "contNormal", "", "", 0.797082947291664, + 0.0180146226657119, 0.25712413424034, -0.019434959230423, 0.0198638381464357, + 16, 84, 0.000214439458006346, "contGamma", "debCollin1", "contNormal", + "", "", 0.982934835713043, 0.0100253876313143, + 0.0213896425646969, -0.033457340204506, 0.034195912391907, 50, + 84, 0.000369286093700508, "contGamma", "debCollin1", "contNormal", + "", "", 0.982928987406947, 0.0172587999397064, + 0.0213969740069187, -0.0487685541226653, 0.0498451171547873, + 84, 84, 0.000538281516060998, "contGamma", "debCollin1", "contNormal", + "", "", 0.982929063372298, 0.0251570110612503, + 0.0213968787766732)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.180747766659017, 0.0943514967545782, -0.0431981349522194, "contGamma", + "", 0.538200617074386, "contNormal", 0.0701796730918382, + -0.615536280650519, -2.92777276064143, 2.22885848191516, -0.349457139363135, + "debCollin1", "", 0.790510607694374, "contNormal", + 1.31549132617523, -0.265647619569773, -1.80175656323064, 1.64082100257068, + -0.0804677803299791, "contcor2", "", 0.926995587834752, + "contNormal", 0.878224700289375, -0.0916255034770316, -2.19069337371826, + 2.73043486051654, 0.269870743399139, "debCollin1:contcor2", + "", 0.82979404507038, "contNormal", 1.25541292417923, + 0.214965720203635, -0.166733409141536, 0.109969749523462, -0.0283818298090371, + "contGamma:contcor2", "", 0.68763067675546, "contNormal", + 0.0705888375622197, -0.402072491759342, -0.0197475324184789, + 0.00115997840629662, -0.00929377700609113, "contGamma", "", + 0.0814243462622677, "debCollin1", 0.00533364668679917, -1.74248081131683, + -0.0185475964609507, 0.035078743479079, 0.00826557350906418, + "contcor1", "", 0.54571789326767, "debCollin1", 0.0136804401415096, + 0.604189150609601, -0.0145563141522735, 0.00654284292832093, + -0.00400673561197627, "contGamma:contcor1", "", 0.456637314965041, + "debCollin1", 0.00538253693614318, -0.744395377033356)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.19395540742069, 0.166476297844747, 16, 16, -0.0137395547879712, + "Total", 0.881217065517125, 0.0919485531643633, -0.149426546858338, + -0.178687810669239, 0.0970675225495778, 16, 16, -0.0408101440598308, + "Total", 0.561829684119543, 0.0703470409134913, -0.580125951708711, + -0.290624523503302, 0.145542463930634, 16, 50, -0.0725410297863342, + "Total", 0.514438539685526, 0.11126913322754, -0.651942076676298, + -0.191909358867167, 0.169104555066396, 50, 16, -0.0114024019003856, + "Total", 0.901466895079306, 0.0920970785129715, -0.123808508201263, + -0.177723352795646, 0.100777370451156, 50, 84, -0.0384729911722452, + "Total", 0.588155049163401, 0.0710474083818837, -0.541511535022513, + -0.289893746018014, 0.149485992220516, 50, 16, -0.0702038768987487, + "Total", 0.531102349902592, 0.112088727574665, -0.626324148893422, + -0.191154820568094, 0.173451427431984, 84, 16, -0.00885169656805501, + "Total", 0.924183204728342, 0.0930135071042238, -0.0951657113427244, + -0.178550822598264, 0.106706250918435, 84, 16, -0.0359222858399146, + "Total", 0.621564231783527, 0.0727709987955824, -0.493634640646093, + -0.29029231372853, 0.154985970595694, 84, 50, -0.0676531715664181, + "Total", 0.551460764761122, 0.113593486369271, -0.595572631220161, + -0.195867092692856, 0.16560533616514, 16, 16, -0.015130878263858, + "Total", 0.869664775757088, 0.0922140487552946, -0.164084306763391, + -0.178529521424347, 0.0941265863529117, 16, 84, -0.0422014675357176, + "Total", 0.544034801441894, 0.0695564076503281, -0.606722931234051, + -0.289379038491733, 0.141514331967291, 16, 16, -0.0739323532622211, + "Total", 0.50121565698741, 0.109923798053907, -0.672578227564192, + -0.194725724117591, 0.167128925258999, 50, 16, -0.0137983994292959, + "Total", 0.881177726862215, 0.0923115557813441, -0.149476404254087, + -0.176837375106687, 0.0950993977043758, 50, 16, -0.0408689887011555, + "Total", 0.555780530491663, 0.0693729004604333, -0.589120368759341, + -0.287363757145679, 0.142164008290361, 50, 50, -0.072599874427659, + "Total", 0.507614838540958, 0.109575423024122, -0.662556186633903, + -0.194191022642612, 0.169502686372487, 84, 16, -0.0123441681350624, + "Total", 0.894156442872242, 0.0927807122691713, -0.133046705863284, + -0.175938256481088, 0.097108741667244, 84, 84, -0.039414757406922, + "Total", 0.571497331993325, 0.06965612641408, -0.565847678244635, + -0.285764105442161, 0.14347281917531, 84, 16, -0.0711456431334255, + "Total", 0.515870119804365, 0.109501227574394, -0.649724616877834, + -0.199326871983486, 0.165803426116199, 16, 16, -0.0167617229336436, + "Total", 0.857192790374246, 0.0931471958106848, -0.179948765904995, + -0.179963019012261, 0.0922983946012546, 16, 50, -0.0438323122055032, + "Total", 0.52798635957059, 0.0694557185134724, -0.631082841609377, + -0.288921200334838, 0.137794804470824, 16, 50, -0.0755631979320067, + "Total", 0.487591997705379, 0.108858123968487, -0.694143856033025, + -0.201394081508553, 0.168180328912654, 50, 50, -0.0166068762979495, + "Total", 0.860181996328565, 0.0942809187659475, -0.17614249537784, + -0.180286997921727, 0.0929320667821093, 50, 84, -0.0436774655698091, + "Total", 0.530889184703472, 0.0697000217501327, -0.626649238738952, + -0.287183012119391, 0.136366309526766, 50, 50, -0.0754083512963125, + "Total", 0.485239389207574, 0.108050281787589, -0.697900551935203, + -0.204843513548707, 0.171967751797529, 84, 16, -0.016437880875589, + "Total", 0.864222549818739, 0.096127089150228, -0.171001546191623, + -0.182304003820477, 0.0952870635255802, 84, 50, -0.0435084701474486, + "Total", 0.538955516615762, 0.0708153490410182, -0.614393217524738, + -0.286363439962316, 0.135884728214412, 84, 50, -0.075239355873952, + "Total", 0.484875647329158, 0.107718348782775, -0.69848226160317, + -0.0180265065475134, 0.0244997217548711, 16, 50, 0.00323660760367881, + "Total indirect", 0.765443790643838, 0.0108487269760633, 0.298339852299728, + -0.0285157853955295, 0.0396633063780582, 50, 84, 0.00557376049126434, + "Total indirect", 0.748618893377618, 0.0173929450518927, 0.320460995802306, + -0.0416149709899846, 0.0578639026371745, 84, 50, 0.00812446582359496, + "Total indirect", 0.748861029285786, 0.0253777300021418, 0.320141550205998, + -0.0128919112916033, 0.0165824795471872, 16, 16, 0.00184528412779195, + "Total indirect", 0.806137132161006, 0.00751911542030385, 0.245412395560405, + -0.0210295980997791, 0.0273851240244872, 50, 50, 0.00317776296235403, + "Total indirect", 0.796955261325356, 0.0123509213705342, 0.257289546829702, + -0.0306760173632867, 0.0399400058764618, 84, 50, 0.00463199425658758, + "Total indirect", 0.797082947291664, 0.0180146226657119, 0.25712413424034, + -0.019434959230423, 0.0198638381464357, 16, 50, 0.000214439458006346, + "Total indirect", 0.982934835713043, 0.0100253876313143, 0.0213896425646969, + -0.033457340204506, 0.034195912391907, 50, 84, 0.000369286093700508, + "Total indirect", 0.982928987406947, 0.0172587999397064, 0.0213969740069187, + -0.0487685541226653, 0.0498451171547873, 84, 50, 0.000538281516060998, + "Total indirect", 0.982929063372298, 0.0251570110612503, 0.0213968787766732, + 16, 84, 50, 84, 84, 84, 16, 84, 50, 84, 84, 84, 16, 84, 50, + 84, 84, 84, 16, 16, 16, 50, 50, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-28") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-28") +}) + + +context('Model number 28 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(42173.0609450527, 42322.9563884552, 29739.709203075, 16, 1, 5000, + 0, 0, 29739.709203075, 16)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 28)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.0784872917770378, -0.0505636759257442, -0.064525483851391, + "contcor2", "", 0, "facGenderm", 0.00712350228666229, + -9.05811232379408, 0.0329823500926787, 0.0470176675180225, 0.0400000088053506, + "facExperimexperimental", "", 0, "facGenderm", 0.00358050391130974, + 11.1716143303189, -0.0241736972812066, 0.00352578313443681, + -0.0103239570733849, "facExperimexperimental", "", + 0.144013190500899, "contcor2", 0.00706632382894109, -1.46100820218594, + 1.00790234157552, 1.09014402473044, 1.04902318315298, "contNormal", + "", 0, "contNormal", 0.0209804067328861, 50.0001356746183, + 0.00638916691492156, 0.00691050458559103, 0.0066498357502563, + "debCollin1", "", 0, "debCollin1", 0.000132996747588658, + 49.9999877502524, 0.423406928207942, 0.457955716895373, 0.440681322551658, + "debCollin1:contcor2", "", 0, "debCollin1:contcor2", + 0.00881362845438695, 49.9999886349089, 0.240200180598185, 0.259799820532395, + 0.25000000056529, "facGenderm", "", 0, "facGenderm", + 0.00500000002265605, 49.9999998864975, 0.959102250732796, 1.03736217748008, + 0.998232214106439, "contcor2", "", 0, "contcor2", 0.0199646338822016, + 50.0000260458751, 0.240200253073699, 0.25979990533857, 0.250000079206135, + "facExperimexperimental", "", 0, "facExperimexperimental", + 0.0050000031682905, 49.9999841583319)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.354682657075887, 0.516147539025884, 16, 0.435415098050886, "", + "facGenderm", "contNormal", "", "", "", 0, 0.0411907777958195, + 10.5706937657069, 0.423851951020107, 0.538540298832042, 50, + 0.481196124926075, "", "facGenderm", "contNormal", "", "", + "", 0, 0.0292577692030524, 16.4467810784382, 0.449441309823407, + 0.62027572100266, 84, 0.534858515413034, "", "facGenderm", "contNormal", + "", "", "", 0, 0.0435810077447271, 12.2727431762462, + -0.00114388583840274, 0.00951722936424332, 16, 0.00418667176292029, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.123712830300911, 0.00271972222110701, 1.53937476791883, -0.00114388105777003, + 0.00951728586846889, 16, 0.00418670240534943, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.123711903561335, + 0.00271973541614358, 1.53937856620109, -0.00265067428134681, + 0.00351441291100945, 50, 0.000431869314831322, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.783628095040327, + 0.001572755224327, 0.274594106032059, -0.00265069343979018, + 0.00351443839119268, 50, 0.000431872475701251, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.78362807847959, + 0.00157276661194099, 0.274594127585316, -0.00916999795387955, + 0.00123132698621893, 84, -0.00396933548383031, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.134675526668145, + 0.00265344797714213, -1.49591607524389, -0.0091700529507831, + 0.00123132387965119, 84, -0.00396936453556596, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.134674618184798, + 0.00265346121471594, -1.4959195610443)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.422344533098094, 0.537177402844288, 0.479760967971191, "facGenderm", + "", 0, "contNormal", 0.0292946377208921, 16.3770916896862, + -0.413742465719352, 0.288278682093005, -0.0627318918131736, + "debCollin1", "", 0.726128007234357, "contNormal", + 0.179090318329778, -0.350280754416096, -0.480454781434298, -0.0248220565960651, + -0.252638419015182, "contcor2", "", 0.0297416040363423, + "contNormal", 0.116234973813857, -2.17351465506213, 0.113144550863733, + 0.785567223593947, 0.44935588722884, "debCollin1:contcor2", + "", 0.0088046671465547, "contNormal", 0.171539548184099, + 2.61954687409217, -0.010005626182523, 0.106002746910535, 0.0479985603640062, + "facGenderm:contcor2", "", 0.10483044934341, "contNormal", + 0.0295945165340071, 1.62187344094136, -0.0152372782987868, -0.00228414306794832, + -0.00876071068336758, "facGenderm", "", 0.00802062814300464, + "debCollin1", 0.00330443195206932, -2.65120020942825, -0.00647656715793474, + 0.00647656807291152, 4.57488389450779e-10, "facExperimexperimental", + "", 0.999999889535349, "debCollin1", 0.0033044319520713, + 1.38446908904877e-07, -0.00915931387936183, 0.00915918563933179, + -6.41200150208634e-08, "facGenderm:facExperimexperimental", + "", 0.999989052325757, "debCollin1", 0.00467317248255264, + -1.37208749003501e-05)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.359035363722834, 0.520168175904777, 16, 0.439601769813806, 0, + "Total", 0, 0.04110606456367, 10.6943287926018, 0.427915575215207, + 0.542850018162783, 16, 0.485382796688995, 0, "Total", 0, 0.0293205497279959, + 16.5543552624984, 0.453265368379012, 0.624825005972896, 50, + 0.539045187175954, 0, "Total", 0, 0.0437660178827583, 12.3165234867829, + 0.359035395161385, 0.520168205751085, 16, 0.439601800456235, + 1, "Total", 0, 0.0411060641574783, 10.6943296437263, 0.427915604368614, + 0.542850050294234, 84, 0.485382827331424, 1, "Total", 0, 0.029320550487715, + 16.5543558786454, 0.453265395978141, 0.624825039658625, 16, + 0.539045217818383, 1, "Total", 0, 0.043766019435491, 12.3165237499588, + 0.355174603463345, 0.516519331268089, 16, 0.435846967365717, + 0, "Total", 0, 0.0411601256649128, 10.5890582286841, 0.424342346682545, + 0.538913641799267, 16, 0.481627994240906, 0, "Total", 0, 0.0292279082729188, + 16.4783599888042, 0.449891951601207, 0.620688817854523, 50, + 0.535290384727865, 0, "Total", 0, 0.0435714297815012, 12.2853527509242, + 0.355174606642297, 0.516519334410877, 16, 0.435846970526587, + 1, "Total", 0, 0.0411601256556873, 10.589058307852, 0.424342349677999, + 0.538913645125553, 84, 0.481627997401776, 1, "Total", 0, 0.0292279083573164, + 16.4783600493675, 0.449891954501029, 0.620688821276441, 16, + 0.535290387888735, 1, "Total", 0, 0.0435714299146913, 12.2853527859146, + 0.35040398663619, 0.51248753849792, 16, 0.431445762567055, 0, + "Total", 0, 0.0413486046529999, 10.4343487812412, 0.419807839956894, + 0.534645738927595, 50, 0.477226789442244, 0, "Total", 0, 0.0292959207099028, + 16.2898716912805, 0.445706541423463, 0.616071818434943, 50, + 0.530889179929203, 0, "Total", 0, 0.0434613284619767, 12.2152082947411, + 0.350403954881007, 0.512487512149632, 50, 0.43144573351532, + 1, "Total", 0, 0.041348606032335, 10.4343477305601, 0.419807809732023, + 0.534645711048994, 84, 0.477226760390509, 1, "Total", 0, 0.029295921308452, + 16.289870366795, 0.445706513668858, 0.616071788086077, 50, 0.530889150877468, + 1, "Total", 0, 0.0434613278001631, 12.2152078122996, -0.00114388583840274, + 0.00951722936424332, 16, 0.00418667176292029, 0, "Total indirect", + 0.123712830300911, 0.00271972222110701, 1.53937476791883, -0.00114388105777003, + 0.00951728586846889, 50, 0.00418670240534943, 1, "Total indirect", + 0.123711903561335, 0.00271973541614358, 1.53937856620109, -0.00265067428134681, + 0.00351441291100945, 50, 0.000431869314831322, 0, "Total indirect", + 0.783628095040327, 0.001572755224327, 0.274594106032059, -0.00265069343979018, + 0.00351443839119268, 50, 0.000431872475701251, 1, "Total indirect", + 0.78362807847959, 0.00157276661194099, 0.274594127585316, -0.00916999795387955, + 0.00123132698621893, 84, -0.00396933548383031, 0, "Total indirect", + 0.134675526668145, 0.00265344797714213, -1.49591607524389, -0.0091700529507831, + 0.00123132387965119, 50, -0.00396936453556596, 1, "Total indirect", + 0.134674618184798, 0.00265346121471594, -1.4959195610443, 16, + 84, 50, 84, 84, 84, 16, 84, 50, 84, 84, 84, 16, 16, 50, 50, + 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-28") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-28") +}) + + +context('Model number 29 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1198.91216990491, 1264.04142455461, 660.957258207964, 14, 1, 100, + 5.50066842081986e-132, 0, 660.957258207964, 14)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 29)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.54484873740696, 0.0642087152567655, -0.240320011075097, "contcor1", + "", 0.12193244587281, "contGamma", 0.155374654194642, + -1.54671308728412, -0.403934685664951, 0.194628071132153, -0.104653307266399, + "contcor2", "", 0.49311419089459, "contGamma", 0.152697386665901, + -0.685364101845296, 0.42497945697242, 0.896763931547259, 0.660871694259839, + "contcor2", "", 3.99660091687792e-08, "contcor1", 0.120355393848105, + 5.4910018830888, 0.76996547097073, 1.36048694725837, 1.06522620911455, + "contNormal", "", 1.53765888910584e-12, "contNormal", + 0.150646001902483, 7.0710552929516, 0.00465468524595447, 0.00822456509114332, + 0.0064396251685489, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910700368309726, 7.07106902844559, 0.318532858270486, + 0.562829560338408, 0.440681209304447, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217324386834, + 7.07106802170528, 1.68041136745991, 2.969192790714, 2.32480207908695, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776812589374, 7.07106459478491, 0.73263480543267, 1.29452469337768, + 1.01357974940517, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341891069714, 7.07106444488179, 0.721542037541457, + 1.27492440091472, 0.99823321922809, "contcor2", "", + 1.53743684450092e-12, "contcor2", 0.141171564308905, 7.07106437556931 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.179641791825918, 0.198135185961429, 16, 16, 0.00924669706775583, + "contGamma", "contNormal", "", "", "", 0.923563047148094, + 0.0963734488917153, 0.0959465202718373, -0.253471653530863, + 0.255842326328351, 50, 16, 0.00118533639874421, "contGamma", + "contNormal", "", "", "", 0.992721059863685, 0.129929423162012, + 0.0091229251227121, -0.481392786703711, 0.466167558305766, 84, + 16, -0.00761261419897246, "contGamma", "contNormal", "", "", + "", 0.974876895221118, 0.241729019636001, -0.031492347134968, + -0.289015329965934, 0.254388441604073, 16, 50, -0.0173134441809306, + "contGamma", "contNormal", "", "", "", 0.90060807537296, + 0.138625958399314, -0.124893233423562, -0.162492840823568, 0.111743231123683, + 50, 50, -0.0253748048499423, "contGamma", "contNormal", "", + "", "", 0.716823594930459, 0.0699594671408226, -0.362707234445695, + -0.328339525095627, 0.25999401420031, 84, 50, -0.0341727554476589, + "contGamma", "contNormal", "", "", "", 0.819891110711769, + 0.150087844454448, -0.22768503053577, -0.540489597406272, 0.443597584456381, + 16, 84, -0.0484460064749456, "contGamma", "contNormal", "", + "", "", 0.846978044337375, 0.251047261486692, -0.19297564206855, + -0.353829633502007, 0.240814899214093, 50, 84, -0.0565073671439572, + "contGamma", "contNormal", "", "", "", 0.709520961898143, + 0.151697821339214, -0.372499529954358, -0.285374051674247, 0.154763416190899, + 84, 84, -0.0653053177416739, "contGamma", "contNormal", "", + "", "", 0.560823605921446, 0.11228202950077, -0.581618608356433, + -0.0178571832217372, 0.0222266099126078, 16, 16, 0.00218471334543531, + "contGamma", "debCollin1", "contNormal", "", "", + 0.830819683276113, 0.0102256453308634, 0.213650412736429, -0.0295512763402857, + 0.037075859959689, 50, 16, 0.00376229180970168, "contGamma", + "debCollin1", "contNormal", "", "", 0.824819964545688, + 0.0169970307683001, 0.221349944057197, -0.0430978621993819, + 0.0540658985961782, 84, 16, 0.00548401819839817, "contGamma", + "debCollin1", "contNormal", "", "", 0.824901992405763, + 0.0247871291416514, 0.221244588958187, -0.0127982369000764, + 0.0155458000838118, 16, 50, 0.00137378159186772, "contGamma", + "debCollin1", "contNormal", "", "", 0.849315824890122, + 0.00723075454637492, 0.189991457054292, -0.0213710088345256, + 0.0261025835669287, 50, 50, 0.00236578736620158, "contGamma", + "debCollin1", "contNormal", "", "", 0.845123082429535, + 0.012110832845889, 0.195344729491881, -0.0311637926421499, 0.0380606638185612, + 84, 50, 0.00344843558820565, "contGamma", "debCollin1", "contNormal", + "", "", 0.845179777834568, 0.0176596246172748, + 0.195272304080142, -0.0190539971795204, 0.0199004873909585, + 16, 84, 0.000423245105719075, "contGamma", "debCollin1", "contNormal", + "", "", 0.966027981770444, 0.00993755111771108, + 0.0425904833802316, -0.0327672726509474, 0.0342250122652271, + 50, 84, 0.000728869807139808, "contGamma", "debCollin1", "contNormal", + "", "", 0.965981772738358, 0.0170901826371814, + 0.0426484504357537, -0.0477633253019902, 0.0498881659516763, + 84, 84, 0.00106242032484307, "contGamma", "debCollin1", "contNormal", + "", "", 0.965982373871662, 0.0249115524631904, + 0.0426476963414027)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.161473479259946, 0.112449344268104, -0.0245120674959215, "contGamma", + "", 0.725756440439447, "contNormal", 0.0698795553614042, + -0.350775951122608, -2.79872166416814, 2.28099963088755, -0.258861016640296, + "debCollin1", "", 0.841669608204394, "contNormal", + 1.29587108108207, -0.199758309618379, -0.225570757835641, 0.758947614999344, + 0.266688428581852, "contcor1", "", 0.28830904624899, + "contNormal", 0.251157261204987, 1.06183841670494, -1.87023884275575, + 1.53191908108165, -0.169159880837048, "contcor2", "", + 0.845468019825442, "contNormal", 0.867913377662343, -0.194904105859812, + -0.251164949699803, 0.234614226664076, -0.00827536151786358, + "contGamma:contcor1", "", 0.946759323993763, "contNormal", + 0.123925536437313, -0.0667768867964483, -2.28051670706304, 2.59510527374397, + 0.157294283340467, "debCollin1:contcor2", "", 0.899366007342534, + "contNormal", 1.24380397274269, 0.126462277647836, -0.258825028039792, + 0.203131714454792, -0.0278466567925, "contGamma:contcor2", "", + 0.813205747921301, "contNormal", 0.117848273268907, -0.236292446381113, + -0.0197475101856484, 0.00116000654991295, -0.00929375181786775, + "contGamma", "", 0.0814252580553803, "debCollin1", + 0.00533364819468042, -1.74247559618518, -0.018547603439332, + 0.0350787516615979, 0.00826557411113297, "contcor1", "", + 0.54571797756258, "debCollin1", 0.0136804440091573, 0.604189023806556, + -0.0145563032402064, 0.00654285980537536, -0.00400672171741554, + "contGamma:contcor1", "", 0.456639003492451, "debCollin1", + 0.0053825384578516, -0.744392585169711)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.175970249910343, 0.198833070736725, 16, 16, 0.0114314104131911, + "Total", 0.904834201020221, 0.09561484894709, 0.119556852717687, + -0.250956911177537, 0.257697010665896, 16, 16, 0.00337004974417952, + "Total", 0.979280310531752, 0.129761037921011, 0.0259711990453634, + -0.479481636531515, 0.468625834824441, 50, 16, -0.00542790085353714, + "Total", 0.982095754126669, 0.241868595248308, -0.0224415280039343, + -0.285960847302501, 0.25570338563151, 16, 16, -0.0151287308354953, + "Total", 0.912818658102323, 0.138182190388851, -0.109483941403175, + -0.160014708574396, 0.113634525565382, 84, 16, -0.0231900915045069, + "Total", 0.739745934436812, 0.0698097608676201, -0.332189814379714, + -0.326743839894458, 0.262767755690011, 16, 16, -0.0319880421022236, + "Total", 0.831558711337498, 0.15038837454016, -0.21270289143049, + -0.537929571570639, 0.445406985311619, 16, 50, -0.0462612931295103, + "Total", 0.853688760333197, 0.250855772003642, -0.184413907481621, + -0.351682419397608, 0.243037111800564, 16, 16, -0.0543226537985219, + "Total", 0.720303930687, 0.151716953956615, -0.358052626168965, + -0.284208414325914, 0.157967205533437, 50, 50, -0.0631206043962386, + "Total", 0.575772755421089, 0.11280197578812, -0.559570024861976, + -0.174430197744499, 0.200448175499414, 16, 16, 0.0130089888774575, + "Total", 0.891798420484643, 0.0956339953695338, 0.136028917616484, + -0.249962102219324, 0.259857358636216, 84, 50, 0.00494762820844589, + "Total", 0.969654516840249, 0.130058374765284, 0.0380415964552444, + -0.478542058553563, 0.470841413775022, 16, 16, -0.00385032238927077, + "Total", 0.987316027765807, 0.242194111681949, -0.015897671345235, + -0.284525979963346, 0.257423675220889, 16, 84, -0.0135511523712289, + "Total", 0.921919875866422, 0.138255003525336, -0.0980156379566081, + -0.159746502125115, 0.116521476044634, 16, 16, -0.0216125130402406, + "Total", 0.759104504178373, 0.0704778200897864, -0.306656945585249, + -0.326298171888328, 0.265477244612414, 50, 84, -0.0304104636379572, + "Total", 0.840355086280741, 0.150965890487935, -0.201439302213685, + -0.53650600273913, 0.447138573408642, 16, 16, -0.0446837146652439, + "Total", 0.858668518394881, 0.25093434979077, -0.178069342449534, + -0.350833985634036, 0.245343834965525, 84, 84, -0.0527450753342555, + "Total", 0.728738517496789, 0.152088973394954, -0.346804072358907, + -0.284304154505628, 0.161218102641684, 16, 16, -0.0615430259319722, + "Total", 0.588172391546652, 0.113655725478002, -0.541486367476345, + -0.174018819301636, 0.203480249833944, 16, 16, 0.014730715266154, + "Total", 0.878427552464658, 0.0963025525247519, 0.152962874606754, + -0.249807625348733, 0.263146334543018, 50, 16, 0.00666935459714237, + "Total", 0.959352336719618, 0.13085800655978, 0.0509663472070055, + -0.478017699596983, 0.473760507595835, 50, 16, -0.00212859600057429, + "Total", 0.993005284248223, 0.242805024658699, -0.00876668843063019, + -0.283839224764522, 0.260180372799457, 50, 16, -0.0118294259825325, + "Total", 0.932073122968482, 0.138783059753938, -0.0852368149506573, + -0.161140582554698, 0.12135900925161, 84, 16, -0.0198907866515441, + "Total", 0.782546533949197, 0.0720675466576501, -0.276001994989969, + -0.326609474626779, 0.269232000128257, 50, 16, -0.0286887372492608, + "Total", 0.850298357483612, 0.152003169306925, -0.188737757114342, + -0.535437425725346, 0.449513449172251, 16, 50, -0.0429619882765474, + "Total", 0.864238694288572, 0.251267595391233, -0.170981014124221, + -0.350703886093378, 0.24865718820226, 50, 16, -0.051023348945559, + "Total", 0.738604612238997, 0.152901042831226, -0.333701772079339, + -0.285455229324744, 0.165812630238192, 50, 50, -0.0598212995432757, + "Total", 0.603317054861313, 0.115121467313297, -0.519636354012714, + -0.177834838028266, 0.199075795347513, 50, 16, 0.0106204786596235, + "Total", 0.912048857444343, 0.0961524386031587, 0.110454594952672, + -0.251246690528282, 0.256364926509506, 84, 50, 0.00255911799061192, + "Total", 0.984233015619151, 0.129495138951982, 0.0197622707023842, + -0.479251420426219, 0.46677375521201, 50, 16, -0.00623883260710474, + "Total", 0.979376117865361, 0.241337387600067, -0.0258510820438789, + -0.287312845755844, 0.255433520577718, 16, 84, -0.0159396625890629, + "Total", 0.908348010507283, 0.138458249900171, -0.115122519608297, + -0.159476136687563, 0.111474090171414, 50, 16, -0.0240010232580745, + "Total", 0.728417882783622, 0.0691212259501188, -0.347230867626608, + -0.325702182089132, 0.26010423437755, 50, 84, -0.0327989738557912, + "Total", 0.82628038236137, 0.149443158417055, -0.219474576174697, + -0.538916446156731, 0.444771996390575, 50, 16, -0.0470722248830779, + "Total", 0.85120634169058, 0.250945540404445, -0.187579443759839, + -0.35167200374188, 0.241404832637701, 84, 84, -0.0551335855520895, + "Total", 0.715556207254553, 0.151297891455582, -0.36440418978526, + -0.282267977230301, 0.154404904930688, 50, 16, -0.0639315361498062, + "Total", 0.566034776320594, 0.111398190376305, -0.573901029575474, + -0.177106710562394, 0.200331679430309, 16, 16, 0.0116124844339574, + "Total", 0.904005701610243, 0.0962870728671265, 0.120602736049338, + -0.250067541013627, 0.257169788543519, 84, 16, 0.00355112376494578, + "Total", 0.978106346552744, 0.129399655697291, 0.0274430696574112, + -0.477934552891401, 0.467440899225859, 50, 16, -0.00524682683277088, + "Total", 0.982642934590237, 0.241171638758227, -0.0217555715082684, + -0.286484139204672, 0.256588825575214, 84, 16, -0.0149476568147291, + "Total", 0.914080618639697, 0.138541567361333, -0.107892938555717, + -0.158092967675329, 0.112074932707848, 84, 16, -0.0230090174837407, + "Total", 0.738497953284363, 0.0689216492022882, -0.333843106629793, + -0.324166671322209, 0.260552735159294, 84, 16, -0.0318069680814573, + "Total", 0.831145829287764, 0.14916585485593, -0.213232231412328, + -0.538001606856942, 0.445841168639454, 16, 50, -0.046080219108744, + "Total", 0.854329172078317, 0.250984911778181, -0.183597566810986, + -0.35047999730125, 0.242196837745739, 84, 16, -0.0541415797777556, + "Total", 0.720276663146488, 0.151195848424244, -0.358089063568985, + -0.280517022746644, 0.1546379619957, 50, 50, -0.0629395303754723, + "Total", 0.570736743933416, 0.111010964531693, -0.566966791442509, + -0.176942436219088, 0.202332701531011, 84, 16, 0.0126951326559615, + "Total", 0.895610614716304, 0.0967556395785261, 0.131208193251187, + -0.249251319221336, 0.258518863195236, 84, 50, 0.00463377198694986, + "Total", 0.971464006507567, 0.129535590047011, 0.0357721919147331, + -0.476749878100389, 0.468421520878855, 84, 16, -0.00416417861076681, + "Total", 0.986221074956172, 0.241119583429756, -0.017270180014142, + -0.286018769243624, 0.258288752058174, 16, 84, -0.013865008592725, + "Total", 0.920462348837478, 0.13885651103674, -0.0998513392652968, + -0.157466109604163, 0.11361337108069, 84, 16, -0.0219263692617366, + "Total", 0.751194358423191, 0.0691541994707795, -0.317064898871419, + -0.322898733991822, 0.261450094272916, 50, 84, -0.0307243198594533, + "Total", 0.836709019509604, 0.149071317859411, -0.206104838279013, + -0.537245833985625, 0.447250692212145, 84, 16, -0.0449975708867399, + "Total", 0.857808211524643, 0.251151687980839, -0.17916491522913, + -0.349581945747045, 0.243464082635542, 84, 84, -0.0530589315557516, + "Total", 0.725805900839249, 0.151290032128258, -0.350710029004226, + -0.279153338666528, 0.155439574359592, 84, 16, -0.0618568821534682, + "Total", 0.576888887578742, 0.110867576255006, -0.557934828584972, + -0.18110094037667, 0.200440824723619, 16, 16, 0.00966994217347491, + "Total", 0.920861832093599, 0.0973338714664764, 0.0993481716876475, + -0.25240107830839, 0.255618241317317, 16, 50, 0.00160858150446328, + "Total", 0.990096930211658, 0.129599146625371, 0.0124119760534625, + -0.479417115865874, 0.465038377679367, 50, 16, -0.00718936909325338, + "Total", 0.976195284934432, 0.240936951136599, -0.0298392133682201, + -0.28965603367707, 0.255875635526647, 16, 50, -0.0168901990752116, + "Total", 0.903402064579606, 0.139168799403153, -0.121364840019084, + -0.160364623892383, 0.110461504403937, 84, 16, -0.0249515597442232, + "Total", 0.717988805942865, 0.0690895675717926, -0.361148008609193, + -0.325177200726609, 0.25767818004273, 16, 50, -0.0337495103419398, + "Total", 0.820440447736576, 0.14869032935473, -0.226978516278781, + -0.540493564534056, 0.444448041795603, 16, 50, -0.0480227613692265, + "Total", 0.848428615254882, 0.251265230917189, -0.191123782601874, + -0.352356265567314, 0.240188021490838, 16, 50, -0.0560841220382381, + "Total", 0.710622714272644, 0.151162034540447, -0.371019894041129, + -0.280908850649247, 0.151144705377338, 50, 50, -0.0648820726359548, + "Total", 0.556088747002639, 0.110219769198457, -0.58866093721473, + -0.183359069965463, 0.203310203715254, 16, 50, 0.00997556687489564, + "Total", 0.919448002725076, 0.0986419334055918, 0.101129068850248, + -0.252549601057263, 0.256378013469031, 84, 50, 0.00191420620588401, + "Total", 0.988236538991644, 0.129830858765939, 0.0147438461401151, + -0.478484483203714, 0.464716994420048, 16, 50, -0.00688374439183265, + "Total", 0.977176661439631, 0.240617043237431, -0.0286087149073645, + -0.29097151485854, 0.257802366110958, 16, 84, -0.0165845743737908, + "Total", 0.905699457982879, 0.139995909439703, -0.118464706862981, + -0.160549799152357, 0.111257929066752, 16, 50, -0.0246459350428024, + "Total", 0.722262877283556, 0.0693399803167544, -0.355436141317267, + -0.323686114060522, 0.256798342779484, 50, 84, -0.0334438856405191, + "Total", 0.821324507861756, 0.148085490707685, -0.22584174506695, + -0.540971528748402, 0.445537255412791, 16, 50, -0.0477171366678058, + "Total", 0.849618080525108, 0.25166502852671, -0.189605750736008, + -0.352081983856436, 0.240524989182801, 84, 84, -0.0557784973368174, + "Total", 0.71215826561183, 0.151178026156002, -0.368959026355186, + -0.2787339414026, 0.149581045533532, 16, 50, -0.0645764479345341, + "Total", 0.554519064481157, 0.109266035068661, -0.591002024498787, + -0.186933096126352, 0.207551330911549, 16, 16, 0.0103091173925989, + "Total", 0.91840740929548, 0.100635631610974, 0.102440032695881, + -0.253594632836606, 0.258090146283781, 50, 50, 0.00224775672358727, + "Total", 0.986261367929323, 0.13053423000537, 0.0172196727516974, + -0.477944797833399, 0.46484441008514, 50, 16, -0.00655019387412939, + "Total", 0.978272787300448, 0.240511870461687, -0.0272343891449334, + -0.293212591464155, 0.26071054375198, 50, 50, -0.0162510238560876, + "Total", 0.908442714660554, 0.141309518844583, -0.115003037226112, + -0.162394487639866, 0.113769718589668, 84, 16, -0.0243123845250992, + "Total", 0.730023199025815, 0.0704513471696119, -0.345094671739449, + -0.322833435313133, 0.256612765067502, 50, 50, -0.0331103351228159, + "Total", 0.822765118929755, 0.14782062449903, -0.223989955630536, + -0.541948397405958, 0.447181225105753, 16, 50, -0.0473835861501025, + "Total", 0.851047938310227, 0.252333622024139, -0.187781500419986, + -0.352543421145009, 0.241653527506781, 50, 50, -0.0554449468191141, + "Total", 0.714535728018897, 0.151583639632855, -0.365771312480721, + -0.277403156462948, 0.148917361629287, 50, 50, -0.0642428974168308, + "Total", 0.55472144739388, 0.108757232646874, -0.590700000848883, + -0.0178571832217372, 0.0222266099126078, 50, 50, 0.00218471334543531, + "Total indirect", 0.830819683276113, 0.0102256453308634, 0.213650412736429, + -0.0295512763402857, 0.037075859959689, 84, 50, 0.00376229180970168, + "Total indirect", 0.824819964545688, 0.0169970307683001, 0.221349944057197, + -0.0430978621993819, 0.0540658985961782, 50, 50, 0.00548401819839817, + "Total indirect", 0.824901992405763, 0.0247871291416514, 0.221244588958187, + -0.0127982369000764, 0.0155458000838118, 16, 84, 0.00137378159186772, + "Total indirect", 0.849315824890122, 0.00723075454637492, 0.189991457054292, + -0.0213710088345256, 0.0261025835669287, 50, 50, 0.00236578736620158, + "Total indirect", 0.845123082429535, 0.012110832845889, 0.195344729491881, + -0.0311637926421499, 0.0380606638185612, 50, 84, 0.00344843558820565, + "Total indirect", 0.845179777834568, 0.0176596246172748, 0.195272304080142, + -0.0190539971795204, 0.0199004873909585, 50, 50, 0.000423245105719075, + "Total indirect", 0.966027981770444, 0.00993755111771108, 0.0425904833802316, + -0.0327672726509474, 0.0342250122652271, 84, 84, 0.000728869807139808, + "Total indirect", 0.965981772738358, 0.0170901826371814, 0.0426484504357537, + -0.0477633253019902, 0.0498881659516763, 50, 50, 0.00106242032484307, + "Total indirect", 0.965982373871662, 0.0249115524631904, 0.0426476963414027, + 16, 16, 84, 50, 50, 16, 84, 50, 84, 16, 84, 50, 16, 50, 84, + 50, 50, 50, 84, 50, 84, 50, 84, 50, 16, 84, 84, 50, 50, 84, + 84, 50, 84, 84, 84, 50, 16, 16, 16, 84, 50, 16, 16, 84, 84, + 16, 16, 84, 16, 50, 16, 84, 50, 50, 16, 84, 84, 50, 16, 84, + 16, 84, 16, 84, 50, 84, 16, 84, 84, 84, 16, 84, 16, 16, 50, + 84, 50, 16, 50, 84, 84, 16, 50, 84, 16, 50, 50, 84, 50, 50, + 50, 84, 84, 50, 50, 84, 16, 84, 50, 84, 50, 84, 50, 84, 84, + 84, 50, 84, 16, 16, 84, 84, 50, 16, 84, 84, 84, 16, 84, 84, + 16, 50, 84, 84, 50, 50, 84, 84, 84, 50, 84, 84, 16, 84, 84, + 84, 50, 84, 84, 84, 84, 84, 84, 84, 16, 16, 50, 16, 84, 16, + 16, 50, 50, 50, 84, 50, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-29") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-29") +}) + + +context('Model number 29 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(21384.5216195062, 21530.7547149573, 15627.3102718658, 14, 1, 2564, + 0, 0, 15627.3102718658, 14)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 29)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0678663343168202, 0.0881399871054185, 0.0780031607111193, "facExperimexperimental", + "", 0, "facGenderm", 0.00517194523688044, 15.0819773099857, + -0.0939553483531026, -0.0542198203806841, -0.0740875843668933, + "contcor2", "", 2.69562150378988e-13, "facGenderm", + 0.010136800544767, -7.30877401007366, -0.0997950680136577, -0.0599921809277959, + -0.0798936244707268, "contcor2", "", 3.5527136788005e-15, + "facExperimexperimental", 0.0101539843078296, -7.86820444553196, + 0.960770780733796, 1.07204643905106, 1.01640860989243, "contNormal", + "", 0, "contNormal", 0.0283871691508094, 35.8052120129579, + 0.00607839547616921, 0.00678239385476758, 0.00643039466546839, + "debCollin1", "", 0, "debCollin1", 0.000179594723207015, + 35.8050311871147, 0.426153937154772, 0.475511011694451, 0.450832474424612, + "debCollin1:contcor2", "", 0, "debCollin1:contcor2", + 0.0125913218122886, 35.8050156405834, 0.236315011884197, 0.263684964231416, + 0.249999988057807, "facGenderm", "", 0, "facGenderm", + 0.00698225900146881, 35.8050292899785, 0.236315000280803, 0.263684949774963, + 0.249999975027883, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.0069822582736342, 35.8050311561678, + 0.97540942909666, 1.08838128580144, 1.03189535744905, "contcor2", + "", 0, "contcor2", 0.0288198807722723, 35.8049835668245 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.472887128051253, 0.784656584859665, 16, 0.628771856455459, 0, + "facGenderm", "contNormal", "", "", "", 2.66453525910038e-15, + 0.0795344861608708, 7.90565057758304, 0.203705952697893, 0.488289477720542, + 16, 0.345997715209217, 1, "facGenderm", "contNormal", "", "", + "", 1.88046912574791e-06, 0.0725991720428048, 4.76586310110005, + 0.497059824107869, 0.732438798076476, 50, 0.614749311092173, + 0, "facGenderm", "contNormal", "", "", "", 0, 0.0600467599979504, + 10.2378431594503, 0.213606819642859, 0.450343520049003, 50, + 0.331975169845931, 1, "facGenderm", "contNormal", "", "", + "", 3.86518475004038e-08, 0.0603931251475774, 5.49690331531465, + 0.462116112740831, 0.737203171500477, 84, 0.599659642120654, + 0, "facGenderm", "contNormal", "", "", "", 0, 0.0701765596024971, + 8.54501339930771, 0.16322201817433, 0.470548983574495, 84, 0.316885500874413, + 1, "facGenderm", "contNormal", "", "", "", 5.30320049569877e-05, + 0.078401176711491, 4.04184623453448, -0.00753819130053618, 0.00326569308719967, + 16, -0.00213624910666826, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.438288674784653, 0.0027561436008405, + -0.775086285785978, -0.0061236859683105, 0.0213080959925375, + 16, 0.00759220501211349, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.277963420544224, 0.00699803215192381, + 1.08490570595997, -0.00338782515532942, 0.00208748165229887, + 50, -0.000650171751515274, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.641590290188624, 0.00139678760702156, + -0.465476460592078, -0.00651819139928747, 0.0111395974096451, + 50, 0.0023107030051788, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.60797732094667, 0.00450462073492547, + 0.512962831091046, -0.00284116206964545, 0.00473915592611302, + 84, 0.000948996928233788, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.623607146241344, 0.00193379012460205, + 0.49074453125004, -0.015448900750989, 0.00870345218646843, 84, + -0.00337272428226028, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.584108555344023, 0.00616142774254224, + -0.547393302849751)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.497057229915168, 0.732344776996298, 0.614701003455733, "facGenderm", + "", 0, "contNormal", 0.0600234363837929, 10.2410165177032, + -0.619608462015562, 0.362179309123092, -0.128714576446235, "debCollin1", + "", 0.607313979341342, "contNormal", 0.250460666339502, + -0.513911339163178, 0.0250958857884882, 0.25807873519741, 0.141587310492949, + "facExperimexperimental", "", 0.017209484814104, "contNormal", + 0.0594354925005412, 2.38220135034063, -0.457794021312867, 0.163095570684383, + -0.147349225314242, "contcor2", "", 0.352228481349486, + "contNormal", 0.158393112550727, -0.930275457949927, -0.450822004285616, + -0.114726278206867, -0.282774141246242, "facGenderm:facExperimexperimental", + "", 0.000973652381934809, "contNormal", 0.0857402811301199, + -3.29803142139343, -0.181437377398382, 0.73966602602884, 0.279114324315229, + "debCollin1:contcor2", "", 0.234903048888529, "contNormal", + 0.234979675823834, 1.18782325891233, -0.0936270558766399, 0.0672294403359608, + -0.0131988077703395, "facGenderm:contcor2", "", 0.747723118350873, + "contNormal", 0.0410355745007093, -0.321643060464803, -0.00422896756811406, + 0.0142519538725941, 0.00501149315224001, "facGenderm", "", + 0.287794891069091, "debCollin1", 0.00471460740770833, 1.06297146694469, + -0.0125865435172473, 0.00589437792335831, -0.00334608279694447, + "facExperimexperimental", "", 0.477873626351598, "debCollin1", + 0.00471460740768216, -0.709726708419504, -0.0358902676519014, + -0.00975429790552447, -0.0228222827787129, "facGenderm:facExperimexperimental", + "", 0.000619490722506777, "debCollin1", 0.00666746173718857, + -3.42293419569533)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.470445989597829, 0.782825225099753, 16, 0.626635607348791, 0, + "Total", 3.77475828372553e-15, 0.0796900448084587, 7.86341140671911, + 0.201259532276716, 0.486463399928383, 16, 0.343861466102549, + 0, "Total", 2.28832765802878e-06, 0.0727574256214193, 4.72613569220787, + 0.494749378710054, 0.730476745260955, 16, 0.612613061985504, + 1, "Total", 0, 0.06013563728984, 10.1871883228384, 0.211325982512359, + 0.448351858966167, 16, 0.329838920739263, 0, "Total", 4.90093057248231e-08, + 0.0604668959030467, 5.45486775554231, 0.460042408597507, 0.735004377430465, + 50, 0.597523393013986, 0, "Total", 0, 0.0701446483205364, 8.51844591598085, + 0.161163828546221, 0.468334674989267, 16, 0.314749251767744, + 0, "Total", 5.90340549426749e-05, 0.0783613497150893, 4.01663897970272, + 0.480627978093084, 0.792100144842061, 50, 0.636364061467572, + 1, "Total", 1.11022302462516e-15, 0.0794586454664039, 8.00874540123686, + 0.211376246547872, 0.49580359389479, 16, 0.353589920221331, + 0, "Total", 1.09852536311905e-06, 0.0725593300668904, 4.87311445537557, + 0.50403335542515, 0.740649676783422, 84, 0.622341516104286, + 0, "Total", 0, 0.0603624156424994, 10.3100830124186, 0.220482631702599, + 0.45865211801349, 16, 0.339567374858044, 0, "Total", 2.28655019363089e-08, + 0.0607586384723243, 5.58879170758111, 0.468431133327155, 0.74607256093838, + 84, 0.607251847132768, 1, "Total", 0, 0.0708281962835098, 8.57358903651974, + 0.16959214100487, 0.479363270768183, 16, 0.324477705886526, + 0, "Total", 4.02519011450941e-05, 0.0790246994859977, 4.10602897571309, + 0.472245034405419, 0.783998335002468, 16, 0.628121684703944, + 0, "Total", 2.88657986402541e-15, 0.0795303646026457, 7.89788513911891, + 0.202900040291456, 0.487795046623948, 16, 0.345347543457702, + 1, "Total", 2.01706872449137e-06, 0.0726786330207359, 4.75170664477373, + 0.496421265377798, 0.731777013303516, 16, 0.614099139340657, + 1, "Total", 0, 0.0600408348781341, 10.2280246533398, 0.21277038230629, + 0.449879613882542, 16, 0.331324998094416, 1, "Total", 4.31332700667753e-08, + 0.0604881603556339, 5.47751818118495, 0.461476718232257, 0.736542222506021, + 50, 0.599009470369139, 0, "Total", 0, 0.0701710609081203, 8.53641747206106, + 0.162429070236308, 0.470041588009487, 16, 0.316235329122897, + 1, "Total", 5.58221775748269e-05, 0.078474023043175, 4.02980906113237, + 0.474834088490223, 0.787331030431053, 50, 0.631082559460638, + 1, "Total", 2.44249065417534e-15, 0.0797200725130068, 7.91623162858605, + 0.206203077120663, 0.49041375930813, 16, 0.348308418214396, + 1, "Total", 1.55538332569094e-06, 0.0725040573268908, 4.80398519829059, + 0.498885925669267, 0.735234102525436, 84, 0.617060014097351, + 0, "Total", 0, 0.0602940101758128, 10.2341843293895, 0.216138455118749, + 0.452433290583471, 16, 0.33428587285111, 1, "Total", 2.93090289815723e-08, + 0.0602804024279491, 5.54551494991542, 0.464008958790576, 0.73993173146109, + 84, 0.601970345125833, 1, "Total", 0, 0.0703897558442292, 8.55195955584757, + 0.165700165759208, 0.472692241999974, 16, 0.319196203879591, + 1, "Total", 4.58642382465957e-05, 0.0783157442336391, 4.07576033405664, + 0.474084616702878, 0.785357090064507, 16, 0.629720853383693, + 0, "Total", 2.22044604925031e-15, 0.079407702339662, 7.93022383005237, + 0.204559465736961, 0.489333958537941, 50, 0.346946712137451, + 0, "Total", 1.79056404925326e-06, 0.0726478892079766, 4.77573011301418, + 0.498092216641794, 0.733304399399019, 16, 0.615698308020406, + 1, "Total", 0, 0.0600042104376785, 10.2609184177147, 0.21419743704179, + 0.45165089650654, 50, 0.332924166774165, 0, "Total", 3.88553142993686e-08, + 0.0605759752061141, 5.49597700476742, 0.462910471658632, 0.738306806439144, + 50, 0.600608639048888, 0, "Total", 0, 0.0702554579963721, 8.5489249686466, + 0.163692934996515, 0.471976060608778, 50, 0.317834497802646, + 0, "Total", 5.31382476380848e-05, 0.0786450996150851, 4.04137701342147, + 0.468007733635098, 0.7827905307113, 50, 0.625399132173199, 1, + "Total", 6.88338275267597e-15, 0.0803032095383305, 7.78797181045026, + 0.199981279502242, 0.485268702351672, 50, 0.342624990926957, + 0, "Total", 2.50451285888076e-06, 0.0727787411145666, 4.70776198763324, + 0.492559744255865, 0.730193429363959, 84, 0.611376586809912, + 0, "Total", 0, 0.0606219519803726, 10.0850692997787, 0.210678860119563, + 0.446526031007778, 50, 0.328602445563671, 0, "Total", 4.71918593092369e-08, + 0.0601662001823878, 5.46157883608314, 0.458577648592902, 0.733996187083885, + 84, 0.596286917838394, 1, "Total", 0, 0.0702611223123101, 8.48672634615632, + 0.160914070097964, 0.466111483086341, 50, 0.313512776592152, + 0, "Total", 5.65579750202438e-05, 0.0778579135626307, 4.0267297471304, + -0.00753819130053618, 0.00326569308719967, 16, -0.00213624910666826, + 0, "Total indirect", 0.438288674784653, 0.0027561436008405, + -0.775086285785978, -0.0061236859683105, 0.0213080959925375, + 50, 0.00759220501211349, 1, "Total indirect", 0.277963420544224, + 0.00699803215192381, 1.08490570595997, -0.00338782515532942, + 0.00208748165229887, 16, -0.000650171751515274, 1, "Total indirect", + 0.641590290188624, 0.00139678760702156, -0.465476460592078, + -0.00651819139928747, 0.0111395974096451, 50, 0.0023107030051788, + 1, "Total indirect", 0.60797732094667, 0.00450462073492547, + 0.512962831091046, -0.00284116206964545, 0.00473915592611302, + 50, 0.000948996928233788, 0, "Total indirect", 0.623607146241344, + 0.00193379012460205, 0.49074453125004, -0.015448900750989, 0.00870345218646843, + 50, -0.00337272428226028, 1, "Total indirect", 0.584108555344023, + 0.00616142774254224, -0.547393302849751, 50, 1, 50, 1, 84, 0, + 50, 1, 84, 1, 50, 1, 16, 0, 84, 0, 16, 1, 84, 0, 50, 0, 84, + 0, 50, 1, 84, 0, 84, 0, 84, 0, 84, 1, 84, 0, 16, 0, 84, 1, 16, + 1, 84, 1, 50, 0, 84, 1, 50, 1, 84, 1, 84, 0, 84, 1, 84, 1, 84, + 1, 16, 0, 16, 1, 50, 0, 50, 1, 84, 0, 84, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-29") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-29") +}) + + +context('Model number 58 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(958.59632829339, 1005.48939164118, 543.41164073932, 7, 1, 100, + 3.69260016564852e-113, 0, 543.41164073932, 7)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 58)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544850342205407, 0.0642073572517329, -0.240321492476837, "contcor1", + "", 0.121930296983905, "contGamma", 0.155374717153302, + -1.54672199492869, 0.761632558235449, 1.34576183563598, 1.05369719693572, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.149015308956713, 7.07106675356288, 0.00465468629005572, 0.00822456873290904, + 0.00643962751148238, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910701030991411, 7.07106645577424, 0.323891019804785, + 0.57229580297932, 0.448093411392052, "debCollin1:contcor1", + "", 1.53721479989599e-12, "debCollin1:contcor1", 0.0633697315700493, + 7.07109530512572, 1.68041035426769, 2.96918925675011, 2.3247998055089, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776169523558, 7.07107151007281, 0.732635298192203, 1.29452641210943, + 1.01358085515082, "contcor1", "", 1.53765888910584e-12, + "contcor1", 0.143342203823476, 7.07105673077991)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.154214786798171, 0.117649810144068, "", -0.0182824883270516, + "contGamma", "contNormal", "", "", "", 0.792080988058466, + 0.069354487910664, -0.263609304571629, -0.023278253082387, 0.0451690710874684, + 16, 0.0109454090025407, "contGamma", "debCollin1", "contNormal", + "", "", 0.530767049400064, 0.0174613729409722, + 0.62683553232277, -0.0219983552368604, 0.0247267072120138, 50, + 0.00136417598757672, "contGamma", "debCollin1", "contNormal", + "", "", 0.908884673016081, 0.0119198778185302, + 0.114445467339944, -0.0845447758777078, 0.0328915348764435, + 84, -0.0258266205006321, "contGamma", "debCollin1", "contNormal", + "", "", 0.388648194621357, 0.0299587930391767, + -0.862071461519127)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.154214786798171, 0.117649810144068, -0.0182824883270516, "contGamma", + "", 0.792080988058466, "contNormal", 0.069354487910664, + -0.263609304571629, -2.65751356429108, 2.35036736188524, -0.15357310120292, + "debCollin1", "", 0.904317092387952, "contNormal", + 1.27754411960573, -0.120209626302624, -2.74312795020685, 0.527136182923002, + -1.10799588364192, "contcor1", "", 0.184142421231238, + "contNormal", 0.834266384210444, -1.32810802953608, -0.533864634660994, + 4.39040483940347, 1.92827010237124, "debCollin1:contcor1", "", + 0.124787506258954, "contNormal", 1.25621427559549, 1.53498502590824, + -0.0197475137168438, 0.00116000682212206, -0.00929375344736086, + "contGamma", "", 0.0814252600610483, "debCollin1", + 0.00533364916495449, -1.74247558471352, -0.0185476606085329, + 0.0350787042478878, 0.00826552181967744, "contcor1", "", + 0.545720591616907, "debCollin1", 0.0136804464978486, 0.604185091544876, + -0.0145562855422278, 0.00654288134163602, -0.00400670210029591, + "contGamma:contcor1", "", 0.456641289654218, "debCollin1", + 0.00538253943702318, -0.744388805168109)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.146211761150457, 0.131537602501436, 16, -0.00733707932451087, + "Total", 0.917526823215162, 0.0708557314937276, -0.103549553011959, + -0.150833824497433, 0.116997199818483, 50, -0.0169183123394748, + "Total", 0.804433498011749, 0.0683254963939473, -0.247613456650621, + -0.184095043899858, 0.0958768262444909, 84, -0.0441091088276837, + "Total", 0.536853404854649, 0.0714227078540044, -0.617578220610837, + -0.023278253082387, 0.0451690710874684, 16, 0.0109454090025407, + "Total indirect", 0.530767049400064, 0.0174613729409722, 0.62683553232277, + -0.0219983552368604, 0.0247267072120138, 50, 0.00136417598757672, + "Total indirect", 0.908884673016081, 0.0119198778185302, 0.114445467339944, + -0.0845447758777078, 0.0328915348764435, 84, -0.0258266205006321, + "Total indirect", 0.388648194621357, 0.0299587930391767, -0.862071461519127 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-58") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-58") +}) + + +context('Model number 58 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(10495.3424505786, 10600.6302793033, 14338.7825477815, 7, 1, 2564, + 0, 0, 14338.7825477815, 7)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 58)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0678663088525538, 0.0881399624974935, 0.0780031356750237, "facExperimexperimental", + "", 0, "facGenderm", 0.00517194545533891, 15.081971832186, + 0.966971060218897, 1.07896542833763, 1.02296824427826, "contNormal", + "", 0, "contNormal", 0.0285705168569761, 35.8050310884902, + 0.00607839596065344, 0.00678239445837599, 0.00643039520951471, + "debCollin1", "", 0, "debCollin1", 0.000179594753596394, + 35.805028157815, 0.10358611917774, 0.115583441195006, 0.109584780186373, + "debCollin1:facExperimexperimental", "", 0, "debCollin1:facExperimexperimental", + 0.00306059757013379, 35.8050275069592, 0.236315014657093, 0.263684967686099, + 0.249999991171596, "facGenderm", "", 0, "facGenderm", + 0.00698225917539745, 35.8050288440296, 0.236315021739871, 0.263684976510064, + 0.249999999124968, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.00698225961958593, 35.8050277053137 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.383040512744439, 0.548379716442532, 0.465710114593486, "", "facGenderm", + "contNormal", "", "", "", 0, 0.0421791433419868, 11.0412416586446, + -0.00374336065851366, 0.00310504177054914, -0.000319159443982259, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.855047290387664, 0.00174707353887167, -0.182682318105731, + -0.0130503249678589, 0.0121362985468836, -0.000457013210487625, + 1, "facGenderm", "debCollin1", "contNormal", "", "", + 0.94329636701286, 0.00642527712585828, -0.0711273928790391 + )) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.383040512744439, 0.548379716442532, 0.465710114593486, "facGenderm", + "", 0, "contNormal", 0.0421791433419868, 11.0412416586446, + -0.736772208559491, 0.609404203648704, -0.0636840024553935, + "debCollin1", "", 0.852882918290868, "contNormal", + 0.343418660451586, -0.185441298884722, -0.713137034687581, 0.591730301512737, + -0.0607033665874222, "facExperimexperimental", "", + 0.855301888394998, "contNormal", 0.332880437215415, -0.182357867272746, + -0.887538428252144, 1.06622537577614, 0.0893434737619991, "debCollin1:facExperimexperimental", + "", 0.857738262539736, "contNormal", 0.498418292233767, + 0.179254002419509, -0.00422885016231172, 0.0142520720603326, + 0.00501161094901046, "facGenderm", "", 0.287783580532559, + "debCollin1", 0.00471460760718552, 1.0629964074576, -0.0125866542838664, + 0.00589426793881253, -0.00334619317252695, "facExperimexperimental", + "", 0.477859124390514, "debCollin1", 0.00471460760719435, + -0.709750089789183, -0.0358902989039887, -0.00975432805158497, + -0.0228223134777868, "facGenderm:facExperimexperimental", "", + 0.00061948055959915, "debCollin1", 0.00666746201934345, -3.42293865515475 + )) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.382719660425542, 0.548062249873466, 0.465390955149504, 0, "Total", + 0, 0.0421800070695496, 11.0334489603601, 0.382583560822818, + 0.547922641943179, 0.465253101382998, 1, "Total", 0, 0.0421791120715824, + 11.0304147842993, -0.00374336065851366, 0.00310504177054914, + -0.000319159443982259, 0, "Total indirect", 0.855047290387664, + 0.00174707353887167, -0.182682318105731, -0.0130503249678589, + 0.0121362985468836, -0.000457013210487625, 1, "Total indirect", + 0.94329636701286, 0.00642527712585828, -0.0711273928790391 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-58") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-58") +}) + + +context('Model number 59 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(960.578646212924, 1010.0768797467, 543.393958658855, 6, 1, 100, + 3.7483283394797e-114, 0, 543.393958658855, 6)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 59)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848953501463, 0.0642073552255787, -0.240320799137942, "contcor1", + "", 0.12193052147262, "contGamma", 0.155374362368697, + -1.54672106436499, 0.761497639789602, 1.3455229979054, 1.0535103188475, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.148988798447959, 7.07107064304223, 0.00465468749421574, 0.00822457293295432, + 0.00643963021358503, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910701795261899, 7.07106348871655, 0.32389181553758, + 0.572298578509785, 0.448095197023683, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702366297561, + 7.07106712638146, 1.68041060020607, 2.96919011461086, 2.32480035740846, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776325629072, 7.07106983132148, 0.732634198211124, 1.29452257527609, + 1.01357838674361, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341505634051, 7.07107395209915)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.197083636002834, 0.178067172897201, 16, -0.00950823155281656, + "contGamma", "contNormal", "", "", "", 0.920859639899872, + 0.0957034955384836, -0.0993509327879584, -0.155656191514571, + 0.11737177857343, 50, -0.0191422064705705, "contGamma", "contNormal", + "", "", "", 0.783447429650578, 0.0696512722278598, + -0.274829243720746, -0.245504416637786, 0.186191485344437, 84, + -0.0296564656466746, "contGamma", "contNormal", "", "", + "", 0.787706848256214, 0.110128529245278, -0.269289582362656, + -0.0231725927473381, 0.0445489435766491, 16, 0.0106881754146555, + "contGamma", "debCollin1", "contNormal", "", "", + 0.536137718950369, 0.017276219578055, 0.618664017690078, -0.0219694665289017, + 0.0250246611025318, 50, 0.00152759728681504, "contGamma", "debCollin1", + "contNormal", "", "", 0.898606647209736, 0.0119885181569961, + 0.127421693557981, -0.0852931975651522, 0.0360454758352586, + 84, -0.0246238608649468, "contGamma", "debCollin1", "contNormal", + "", "", 0.426328239999699, 0.0309543120071376, + -0.795490491252685)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.155571786653351, 0.117359370896805, -0.019106207878273, "contGamma", + "", 0.783769785044923, "contNormal", 0.0696265746980564, + -0.274409705793073, -2.68757788096218, 2.34580593529393, -0.170885972834128, + "debCollin1", "", 0.894127286129227, "contNormal", + 1.28405007846032, -0.13308357337514, -2.93401777393737, 0.846759490056056, + -1.04362914194066, "contcor1", "", 0.279234891772943, + "contNormal", 0.964501718862111, -1.08203969109759, -0.790605228664743, + 4.51340290868325, 1.86139884000925, "debCollin1:contcor1", "", + 0.168924729075026, "contNormal", 1.35308816365641, 1.37566707773073, + -0.155645287421784, 0.135865841104511, -0.00988972315863626, + "contGamma:contcor1", "", 0.894204171801255, "contNormal", + 0.074366450308704, -0.132986354970324, -0.0197475248886052, + 0.00116000003681493, -0.00929376242589516, "contGamma", "", + 0.0814250296614429, "debCollin1", 0.0053336502839685, -1.74247690251265, + -0.0185476175276457, 0.0350787585797928, 0.00826557052607356, + "contcor1", "", 0.545718309103503, "debCollin1", 0.0136804493680589, + 0.604188525076668, -0.0145563079968569, 0.00654286331368933, + -0.00400672234158378, "contGamma:contcor1", "", 0.456639109715151, + "debCollin1", 0.00538254056629964, -0.744392409537994)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.185870730213619, 0.188230617937297, 16, 0.00117994386183895, + "Total", 0.990135407356475, 0.095435771040126, 0.0123637484035503, + -0.148155441430648, 0.131247379318818, 16, -0.00845403105591498, + "Total", 0.905586542284252, 0.0712775395245424, -0.118607223429816, + -0.239527025177156, 0.201590444713118, 50, -0.0189682902320191, + "Total", 0.866143511235607, 0.112532034611287, -0.168559026747719, + -0.195782696440131, 0.179821427908128, 16, -0.00798063426600152, + "Total", 0.933622128614004, 0.0958191393594414, -0.083288519593817, + -0.151916740695842, 0.116687522328331, 84, -0.0176146091837554, + "Total", 0.797130767507314, 0.0685227547911313, -0.257062186677224, + -0.240836972318938, 0.184579235599219, 16, -0.0281288683598596, + "Total", 0.795489533422533, 0.10852653703685, -0.259188850283765, + -0.236915573861087, 0.16865138902556, 16, -0.0341320924177633, + "Total", 0.741477754317339, 0.103462861074415, -0.329897047726277, + -0.183540211155952, 0.0960080764849174, 50, -0.0437660673355173, + "Total", 0.539411112217949, 0.0713146491073077, -0.613703746472371, + -0.259207324982325, 0.150646671959082, 50, -0.0542803265116214, + "Total", 0.603657389372114, 0.104556512306931, -0.519148212904031, + -0.0231725927473381, 0.0445489435766491, 50, 0.0106881754146555, + "Total indirect", 0.536137718950369, 0.017276219578055, 0.618664017690078, + -0.0219694665289017, 0.0250246611025318, 84, 0.00152759728681504, + "Total indirect", 0.898606647209736, 0.0119885181569961, 0.127421693557981, + -0.0852931975651522, 0.0360454758352586, 50, -0.0246238608649468, + "Total indirect", 0.426328239999699, 0.0309543120071376, -0.795490491252685, + 16, 84, 50, 84, 84, 84, 16, 50, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-59") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-59") +}) + + +context('Model number 59 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(10484.6911160928, 10595.8282686356, 14326.1312132957, 6, 1, 2564, + 0, 0, 14326.1312132957, 6)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 59)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0678663435356827, 0.0881399963933273, 0.078003169964505, "facExperimexperimental", + "", 0, "facGenderm", 0.00517194525449462, 15.0819790477707, + 0.962211420910033, 1.07365450978596, 1.017932965348, "contNormal", + "", 0, "contNormal", 0.0284298818128747, 35.8050368287855, + 0.0060783959294377, 0.00678239441948499, 0.00643039517446134, + "debCollin1", "", 0, "debCollin1", 0.00017959475163838, + 35.8050283529953, 0.103586113405441, 0.115583434003424, 0.109584773704432, + "debCollin1:facExperimexperimental", "", 0, "debCollin1:facExperimexperimental", + 0.00306059720806523, 35.805029624825, 0.236314995912674, 0.263684944332788, + 0.249999970122731, "facGenderm", "", 0, "facGenderm", + 0.00698225799963816, 35.8050318587034, 0.236315011942438, 0.263684964303617, + 0.249999988123028, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.00698225900503002, 35.8050292810576 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.498432148642078, 0.731051745689131, 0.614741947165604, 0, "facGenderm", + "contNormal", "", "", "", 0, 0.0593428243788987, 10.3591622677163, + 0.198114711534296, 0.431997777373025, 0.31505624445366, 1, "facGenderm", + "contNormal", "", "", "", 1.28897218232282e-07, 0.0596651437688572, + 5.28040702749647, -0.00390768756896095, 0.00301979979913862, + -0.000443943884911167, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.801654660759345, 0.00176724863893998, + -0.251206239534835, -0.0113234868279682, 0.0139057938412942, + 0.00129115350666296, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.841004072893798, 0.00643615925299336, + 0.200609316194665)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.498432148642078, 0.731051745689131, 0.614741947165604, "facGenderm", + "", 0, "contNormal", 0.0593428243788987, 10.3591622677163, + -0.760152799159976, 0.58298610762786, -0.0885833457660582, "debCollin1", + "", 0.795998684328215, "contNormal", 0.342643772381111, + -0.258528982302734, -0.523052885383759, 0.796625395926225, 0.136786255271233, + "facExperimexperimental", "", 0.684518298413622, "contNormal", + 0.336658808967777, 0.406305290779799, -0.959218027956937, 0.991398414228695, + 0.0160901931358789, "debCollin1:facExperimexperimental", "", + 0.974205218575009, "contNormal", 0.4976153790508, 0.0323345977903071, + -0.464619905818997, -0.134751499604891, -0.299685702711944, + "facGenderm:facExperimexperimental", "", 0.000369082757130323, + "contNormal", 0.0841516499323624, -3.56125759807228, -0.00422886572275907, + 0.0142520564494582, 0.00501159536334955, "facGenderm", "", + 0.287785078392792, "debCollin1", 0.00471460759432123, 1.06299310453452, + -0.0125866701000481, 0.00589425207224351, -0.0033462090139023, + "facExperimexperimental", "", 0.47785703917935, "debCollin1", + 0.0047146075943402, -0.709753451786606, -0.0358902767965233, + -0.00975430601529395, -0.0228222914059086, "facGenderm:facExperimexperimental", + "", 0.000619488082563846, "debCollin1", 0.00666746200118638, + -3.42293535408941)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.498034029036429, 0.730561977524958, 0.614298003280693, 0, "Total", + 0, 0.059319444214965, 10.3557612754187, 0.197619481805796, 0.431605119331702, + 0.314612300568749, 0, "Total", 1.35937817447029e-07, 0.0596913104964057, + 5.27065494043214, 0.499041227533351, 0.733024973811183, 0.616033100672267, + 1, "Total", 0, 0.0596908280262969, 10.3203979747252, 0.200084375430592, + 0.432610420490054, 0.316347397960323, 0, "Total", 9.66087707610086e-08, + 0.059318958637403, 5.33298974269001, -0.00390768756896095, 0.00301979979913862, + -0.000443943884911167, 0, "Total indirect", 0.801654660759345, + 0.00176724863893998, -0.251206239534835, -0.0113234868279682, + 0.0139057938412942, 0.00129115350666296, 1, "Total indirect", + 0.841004072893798, 0.00643615925299336, 0.200609316194665, 1, + 1, 0, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-59") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-59") +}) + + +context('Model number 60 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1196.87892000912, 1259.40300447283, 685.183438989589, 15, 1, 100, + 2.67003943517969e-136, 0, 685.183438989589, 15)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 60)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848188093639, 0.0642087188224904, -0.240319734635574, "contcor1", + "", 0.121932540740097, "contGamma", 0.155374514970758, + -1.54671269403997, -0.403934246773286, 0.194627989702913, -0.104653128535187, + "contcor2", "", 0.493114553467481, "contGamma", 0.152697253928537, + -0.685363527127767, 0.424979260329582, 0.89676336768198, 0.660871314005781, + "contcor2", "", 3.9965756926108e-08, "contcor1", 0.12035530016719, + 5.49100299768886, 0.761631936828172, 1.34575966799503, 1.0536958024116, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.149014914502098, 7.07107611296696, 0.00462621249907128, 0.00817425623782709, + 0.00640023436844919, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000905129830635239, 7.07106776489442, 0.323891802417322, + 0.572298532669237, 0.448095167543279, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702282825898, + 7.07106759257783, 1.68041079719287, 2.96919080165245, 2.32480079942266, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776450645346, 7.07106848698978, 0.732634664844097, 1.29452420328156, + 1.01357943406283, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341801907987, 7.07106664330517, 0.721541901042944, + 1.27492392489302, 0.998232912967983, "contcor2", "", + 1.53743684450092e-12, "contcor2", 0.141171477694255, 7.07106654454612 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.154211801653895, 0.117652615283141, "", "", -0.018279593185377, + "contGamma", "contNormal", "", "", "", 0.792113023357423, + 0.0693544419901251, -0.263567734969012, -0.0238488510189696, + 0.0426897218706071, 16, 16, 0.00942043542581875, "contGamma", + "debCollin1", "contNormal", "", "", 0.578909870844893, + 0.016974437646412, 0.554977762565819, -0.0317976552185578, 0.0691943791342612, + 16, 16, 0.0186983619578517, "contGamma", "debCollin1", "contNormal", + "", "", 0.467984375340146, 0.0257637474845026, + 0.725762506758737, -0.0593185145589707, 0.116966593706018, 50, + 16, 0.0288240395735238, "contGamma", "debCollin1", "contNormal", + "", "", 0.521561733968734, 0.0449715172461085, + 0.640939895707389, -0.0355936845808231, 0.0557476173172897, + 16, 50, 0.0100769663682333, "contGamma", "debCollin1", "contNormal", + "", "", 0.66541091378818, 0.0233017807007173, + 0.432454776639585, -0.0191479286349112, 0.0578577144354437, + 84, 50, 0.0193548929002663, "contGamma", "debCollin1", "contNormal", + "", "", 0.324501437961386, 0.0196446576768159, + 0.98524969071405, -0.0373655632752766, 0.0963267043071534, 16, + 50, 0.0294805705159384, "contGamma", "debCollin1", "contNormal", + "", "", 0.38737592824305, 0.0341057970036637, + 0.864385914006686, -0.0683985044227472, 0.0900915472318065, + 16, 84, 0.0108465214045297, "contGamma", "debCollin1", "contNormal", + "", "", 0.788494136241994, 0.0404318785714184, + 0.268266570532222, -0.0371276650361854, 0.0773765609093106, + 16, 84, 0.0201244479365626, "contGamma", "debCollin1", "contNormal", + "", "", 0.490861878577892, 0.0292107984760666, + 0.6889386455167, -0.0301315316963335, 0.0906317828008029, 50, + 84, 0.0302501255522347, "contGamma", "debCollin1", "contNormal", + "", "", 0.326145791844594, 0.0308075340796316, + 0.981906746383658, -0.0111614385539769, 0.0125247868664723, + 16, 16, 0.000681674156247743, "contGamma", "debCollin1", "contNormal", + "", "", 0.910178830291757, 0.006042515476632, + 0.112812976463851, -0.0219514812669067, 0.0246575536584014, + 84, 16, 0.00135303619574736, "contGamma", "debCollin1", "contNormal", + "", "", 0.90940150478946, 0.0118902784165817, + 0.113793483074414, -0.0339632086443424, 0.0381346937122368, + 16, 16, 0.00208574253394722, "contGamma", "debCollin1", "contNormal", + "", "", 0.909712797913359, 0.0183926599991832, + 0.113400809564242, -0.0121075060499098, 0.0135658691161807, + 16, 50, 0.000729181533135481, "contGamma", "debCollin1", "contNormal", + "", "", 0.911350891510515, 0.0065494507472073, + 0.111334760925778, -0.0225862326534967, 0.0253873197987669, + 16, 50, 0.0014005435726351, "contGamma", "debCollin1", "contNormal", + "", "", 0.908890054756237, 0.0122383760188128, + 0.11443867801432, -0.0344760796698679, 0.0387425794915378, 50, + 50, 0.00213324991083496, "contGamma", "debCollin1", "contNormal", + "", "", 0.909072592405069, 0.0186785726010644, + 0.114208401059158, -0.0137457137455541, 0.0153154486871878, + 16, 84, 0.000784867470816852, "contGamma", "debCollin1", "contNormal", + "", "", 0.915687716877238, 0.00741369807352909, + 0.105867201905518, -0.023659491583599, 0.0265719506042319, 84, + 84, 0.00145622951031647, "contGamma", "debCollin1", "contNormal", + "", "", 0.909522961152188, 0.012814378882482, + 0.113640272671133, -0.0353021719702896, 0.0396800436673223, + 16, 84, 0.00218893584851633, "contGamma", "debCollin1", "contNormal", + "", "", 0.90889422815607, 0.0191284677241679, + 0.114433413072115, -0.0414442783015078, 0.0237331320983394, + 16, 16, -0.0088555731015842, "contGamma", "debCollin1", "contNormal", + "", "", 0.594313477594343, 0.0166271959367515, + -0.532595702562843, -0.0684093552096546, 0.033254990530541, + 50, 16, -0.0175771823395568, "contGamma", "debCollin1", "contNormal", + "", "", 0.49794095747884, 0.0259352586430442, + -0.677733065302242, -0.114566533202295, 0.0603751125325627, + 50, 16, -0.0270957103348661, "contGamma", "debCollin1", "contNormal", + "", "", 0.543761185236258, 0.044628790915235, + -0.607135209787107, -0.0535092371756846, 0.0345637620925433, + 50, 50, -0.00947273754157066, "contGamma", "debCollin1", "contNormal", + "", "", 0.673309775495614, 0.0224680147091826, + -0.421609904754923, -0.0589904738570557, 0.0226017802979691, + 84, 50, -0.0181943467795433, "contGamma", "debCollin1", "contNormal", + "", "", 0.382058862421568, 0.0208147330253551, + -0.874109062911362, -0.0967824559652296, 0.0413567064155244, + 50, 50, -0.0277128747748526, "contGamma", "debCollin1", "contNormal", + "", "", 0.431633880323516, 0.0352402297874803, + -0.786398810166047, -0.0854326761565411, 0.0650403781673296, + 16, 84, -0.0101961489946057, "contGamma", "debCollin1", "contNormal", + "", "", 0.790534353680437, 0.0383866886102966, + -0.26561678966679, -0.0761851061439699, 0.0383495896788131, + 50, 84, -0.0189177582325784, "contGamma", "debCollin1", "contNormal", + "", "", 0.517336446908325, 0.0292185715467779, + -0.647456642508745, -0.0923682459435924, 0.035495673487817, + 50, 84, -0.0284362862278877, "contGamma", "debCollin1", "contNormal", + "", "", 0.383332734315403, 0.0326189461745174, + -0.871772070003374)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.154211801653895, 0.117652615283141, -0.018279593185377, "contGamma", + "", 0.792113023357423, "contNormal", 0.0693544419901251, + -0.263567734969012, -2.65748651013435, 2.35039109865478, -0.153547705739782, + "debCollin1", "", 0.904332775780148, "contNormal", + 1.27754327331794, -0.120189827575076, -2.74314534960221, 0.527116544926344, + -1.10801440233794, "contcor1", "", 0.184134788988389, + "contNormal", 0.834265813128192, -1.32813113626613, -0.533834126385587, + 4.39043197446001, 1.92829892403721, "debCollin1:contcor1", "", + 0.124781612245685, "contNormal", 1.25621341506466, 1.53500902069093, + -0.0199697887885515, 0.000908052911918603, -0.00953086793831647, + "contGamma", "", 0.0735388124299525, "debCollin1", + 0.00532607789356128, -1.78947212729246, -0.0336994263178881, + 0.0420651707382203, 0.00418287221016612, "contcor1", "", + 0.828664660813495, "debCollin1", 0.0193280584882503, 0.216414504990707, + -0.0310213882377816, 0.0494312367477557, 0.00920492425498702, + "contcor2", "", 0.65379563515847, "debCollin1", 0.0205240059562669, + 0.448495497155922, -0.0233913117308837, 0.0139844943943638, + -0.00470340866825996, "contGamma:contcor1", "", 0.621809360622509, + "debCollin1", 0.00953481962425409, -0.493287639788771, -0.0182406512923103, + 0.0175608045207551, -0.000339923385777581, "contGamma:contcor2", + "", 0.970310816825671, "debCollin1", 0.00913319226665967, + -0.03721846380246)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.147683756860465, 0.129965441341348, 16, 16, -0.00885915775955828, + "Total", 0.900463357150866, 0.0708301786134526, -0.125076033026912, + -0.142437285353607, 0.143274822898556, 16, 16, 0.000418768772474678, + "Total", 0.995415822745912, 0.0728870812182836, 0.00574544577001981, + -0.148488899317633, 0.169577792093926, 50, 16, 0.0105444463881468, + "Total", 0.896604234775761, 0.0811409530788394, 0.129952212637944, + -0.150432997801804, 0.134027744167517, 16, 50, -0.00820262681714373, + "Total", 0.910003681296356, 0.0725678492597598, -0.113033897253618, + -0.137916491025806, 0.140067090455584, 84, 50, 0.00107529971488923, + "Total", 0.987902047056726, 0.0709154820379581, 0.0151631164872244, + -0.137018950403698, 0.15942090506482, 16, 50, 0.0112009773305613, + "Total", 0.882252450652584, 0.0756238017144187, 0.148114443821008, + -0.163631488454998, 0.148765344893303, 16, 84, -0.00743307178084737, + "Total", 0.925689437694914, 0.0796945341374757, -0.0932695304802845, + -0.143374139350143, 0.147063848852514, 16, 84, 0.00184485475118559, + "Total", 0.980135298932773, 0.0740926849915598, 0.0248992832611714, + -0.133360768761363, 0.157301833495078, 50, 84, 0.0119705323668577, + "Total", 0.871749427266084, 0.0741499855479873, 0.161436745784809, + -0.152033943248046, 0.116838105189788, 16, 16, -0.0175979190291293, + "Total", 0.797516268170426, 0.06859106865194, -0.256562835001573, + -0.150864404685643, 0.117011290706383, 84, 16, -0.0169265569896297, + "Total", 0.804372094069654, 0.0683368922860307, -0.247692811648237, + -0.15076802911307, 0.118380327810211, 16, 16, -0.0161938506514298, + "Total", 0.813548813923993, 0.0686615568057089, -0.235850327385576, + -0.15193641879465, 0.116835595490167, 16, 50, -0.0175504116522415, + "Total", 0.797977515899304, 0.0685655492664293, -0.255965449704849, + -0.150795609542604, 0.11703751031712, 16, 50, -0.0168790496127419, + "Total", 0.804879681202185, 0.0683260309812726, -0.247036881410078, + -0.150730735825728, 0.118438049276644, 50, 50, -0.0161463432745421, + "Total", 0.814099627990466, 0.0686667681716455, -0.235140573882569, + -0.151887631399401, 0.116898179970281, 16, 84, -0.0174947257145602, + "Total", 0.798614819183339, 0.0685690689956117, -0.255140196167456, + -0.150780729938165, 0.117134002588044, 84, 84, -0.0168233636750606, + "Total", 0.805568539146043, 0.0683468509216205, -0.246146873604366, + -0.150752440378149, 0.118571125704428, 16, 84, -0.0160906573368607, + "Total", 0.814833639246849, 0.0687062538411334, -0.234194944961873, + -0.164032622527162, 0.109762289953239, 16, 16, -0.0271351662869612, + "Total", 0.697649908213179, 0.0698469243925042, -0.388494790901248, + -0.175413954516176, 0.103700403466309, 50, 16, -0.0358567755249339, + "Total", 0.614557635526903, 0.0712039507317746, -0.503578455358557, + -0.199274538507878, 0.108523931467391, 50, 16, -0.0453753035202432, + "Total", 0.56335097060458, 0.0785214607011006, -0.577871363001875, + -0.167618129477401, 0.112113468023505, 50, 50, -0.0277523307269477, + "Total", 0.697351393799649, 0.0713614126859965, -0.388898281050897, + -0.17249217012349, 0.0995442901936489, 84, 50, -0.0364739399649203, + "Total", 0.599184412447468, 0.0693983314139768, -0.525573730978415, + -0.19003681968613, 0.0980518837656705, 50, 50, -0.0459924679602296, + "Total", 0.531443283473209, 0.0734933666445423, -0.625804342079968, + -0.180851985757274, 0.123900501397309, 16, 84, -0.0284757421799828, + "Total", 0.714160761471462, 0.0777444099887629, -0.366273821926215, + -0.17879869433182, 0.104403991495909, 50, 84, -0.0371973514179554, + "Total", 0.606647884759015, 0.0722469106732562, -0.51486424916055, + -0.188138013178357, 0.0947062543518279, 50, 84, -0.0467158794132647, + "Total", 0.517351355908775, 0.0721554757539488, -0.647433599808371, + -0.0238488510189696, 0.0426897218706071, 50, 16, 0.00942043542581875, + "Total indirect", 0.578909870844893, 0.016974437646412, 0.554977762565819, + -0.0317976552185578, 0.0691943791342612, 84, 16, 0.0186983619578517, + "Total indirect", 0.467984375340146, 0.0257637474845026, 0.725762506758737, + -0.0593185145589707, 0.116966593706018, 50, 16, 0.0288240395735238, + "Total indirect", 0.521561733968734, 0.0449715172461085, 0.640939895707389, + -0.0355936845808231, 0.0557476173172897, 16, 50, 0.0100769663682333, + "Total indirect", 0.66541091378818, 0.0233017807007173, 0.432454776639585, + -0.0191479286349112, 0.0578577144354437, 50, 50, 0.0193548929002663, + "Total indirect", 0.324501437961386, 0.0196446576768159, 0.98524969071405, + -0.0373655632752766, 0.0963267043071534, 50, 50, 0.0294805705159384, + "Total indirect", 0.38737592824305, 0.0341057970036637, 0.864385914006686, + -0.0683985044227472, 0.0900915472318065, 50, 84, 0.0108465214045297, + "Total indirect", 0.788494136241994, 0.0404318785714184, 0.268266570532222, + -0.0371276650361854, 0.0773765609093106, 84, 84, 0.0201244479365626, + "Total indirect", 0.490861878577892, 0.0292107984760666, 0.6889386455167, + -0.0301315316963335, 0.0906317828008029, 50, 84, 0.0302501255522347, + "Total indirect", 0.326145791844594, 0.0308075340796316, 0.981906746383658, + -0.0111614385539769, 0.0125247868664723, 16, 16, 0.000681674156247743, + "Total indirect", 0.910178830291757, 0.006042515476632, 0.112812976463851, + -0.0219514812669067, 0.0246575536584014, 84, 16, 0.00135303619574736, + "Total indirect", 0.90940150478946, 0.0118902784165817, 0.113793483074414, + -0.0339632086443424, 0.0381346937122368, 50, 16, 0.00208574253394722, + "Total indirect", 0.909712797913359, 0.0183926599991832, 0.113400809564242, + -0.0121075060499098, 0.0135658691161807, 84, 50, 0.000729181533135481, + "Total indirect", 0.911350891510515, 0.0065494507472073, 0.111334760925778, + -0.0225862326534967, 0.0253873197987669, 84, 50, 0.0014005435726351, + "Total indirect", 0.908890054756237, 0.0122383760188128, 0.11443867801432, + -0.0344760796698679, 0.0387425794915378, 84, 50, 0.00213324991083496, + "Total indirect", 0.909072592405069, 0.0186785726010644, 0.114208401059158, + -0.0137457137455541, 0.0153154486871878, 16, 84, 0.000784867470816852, + "Total indirect", 0.915687716877238, 0.00741369807352909, 0.105867201905518, + -0.023659491583599, 0.0265719506042319, 84, 84, 0.00145622951031647, + "Total indirect", 0.909522961152188, 0.012814378882482, 0.113640272671133, + -0.0353021719702896, 0.0396800436673223, 50, 84, 0.00218893584851633, + "Total indirect", 0.90889422815607, 0.0191284677241679, 0.114433413072115, + -0.0414442783015078, 0.0237331320983394, 84, 16, -0.0088555731015842, + "Total indirect", 0.594313477594343, 0.0166271959367515, -0.532595702562843, + -0.0684093552096546, 0.033254990530541, 84, 16, -0.0175771823395568, + "Total indirect", 0.49794095747884, 0.0259352586430442, -0.677733065302242, + -0.114566533202295, 0.0603751125325627, 84, 16, -0.0270957103348661, + "Total indirect", 0.543761185236258, 0.044628790915235, -0.607135209787107, + -0.0535092371756846, 0.0345637620925433, 16, 50, -0.00947273754157066, + "Total indirect", 0.673309775495614, 0.0224680147091826, -0.421609904754923, + -0.0589904738570557, 0.0226017802979691, 84, 50, -0.0181943467795433, + "Total indirect", 0.382058862421568, 0.0208147330253551, -0.874109062911362, + -0.0967824559652296, 0.0413567064155244, 50, 50, -0.0277128747748526, + "Total indirect", 0.431633880323516, 0.0352402297874803, -0.786398810166047, + -0.0854326761565411, 0.0650403781673296, 84, 84, -0.0101961489946057, + "Total indirect", 0.790534353680437, 0.0383866886102966, -0.26561678966679, + -0.0761851061439699, 0.0383495896788131, 84, 84, -0.0189177582325784, + "Total indirect", 0.517336446908325, 0.0292185715467779, -0.647456642508745, + -0.0923682459435924, 0.035495673487817, 84, 84, -0.0284362862278877, + "Total indirect", 0.383332734315403, 0.0326189461745174, -0.871772070003374, + 16, 16, 50, 16, 84, 16, 16, 16, 50, 16, 84, 16, 16, 16, 50, + 16, 84, 16, 16, 50, 50, 50, 84, 50, 16, 50, 50, 50, 84, 50, + 16, 50, 50, 50, 84, 50, 16, 84, 50, 84, 84, 84, 16, 84, 50, + 84, 84, 84, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-60") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-60") +}) + + +context('Model number 60 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(749.460734616451, 811.984819080165, 604.620767837396, 15, 1, 100, + 3.70244112878444e-119, 0, 604.620767837396, 15)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 60)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.00962233365144148, 0.0896223100756361, 0.0399999882120973, + "facExperimexperimental", "", 0.114128707778073, "facGenderm", + 0.025317976378624, 1.57990463431625, -0.16325077778488, 0.0341991729783156, + -0.0645258024032823, "contcor2", "", 0.200188132616233, + "facGenderm", 0.0503708109742465, -1.28101575406981, -0.170527234698352, + 0.0272978878091314, -0.0716146734446101, "contcor2", "", + 0.155883523869846, "facExperimexperimental", 0.050466519810543, + -1.41905314084386, 0.762422669814598, 1.34715658859101, 1.0547896292028, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.149169557040006, 7.07107837640032, 0.00473838176106858, 0.00837245361886595, + 0.00655541768996727, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000927076182639698, 7.07106687964066, 0.0796446954340268, + 0.140727690303632, 0.110186192868829, "debCollin1:facExperimexperimental", + "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", + 0.0155826829858661, 7.07106683545904, 0.180704803743018, 0.319295173642811, + 0.249999988692914, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.03535533586152, 7.07106813161431, 0.180704809076322, + 0.31929519224514, 0.250000000660731, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353553392465375, 7.07106779311173, 0.721541925776301, 1.27492401107895, + 0.998232968427625, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.141171493371219, 7.07106615216369)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0581192138908964, 0.876431095056518, "", 0.467275154473707, + "", "facGenderm", "contNormal", "", "", "", 0.0251969222336683, + 0.208756866866014, 2.23837022220503, -0.035213880088879, 0.0329314821792055, + 16, -0.00114119895483677, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.94766028166686, 0.0173843404280911, + -0.0656452259179602, -0.0442838193641306, 0.0473905284949735, + 16, 0.00155335456542145, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.947043206048489, 0.0233867429662534, + 0.0664203034883013, -0.0210860026403081, 0.0197395123600153, + 50, -0.000673245140146429, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.948458467840166, 0.0104148635695222, + -0.0646427229365345, -0.0572906417615912, 0.0613332585218148, + 50, 0.00202130838011179, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.946745576176461, 0.030261755118741, + 0.0667941555993889, -0.00758216750734612, 0.00733270462236423, + 84, -0.000124731442490942, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.973848489525761, 0.00380488423444435, + -0.0327819283860964, -0.0728623571571133, 0.0780020013126478, + 84, 0.00256982207776728, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.946763201246988, 0.0384865129307885, + 0.0667720165344329, -0.0339860660224271, 0.0375618533785417, + 16, 0.00178789367805731, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.921968714467863, 0.0182523556466674, + 0.0979541333002545, -0.0498531999092182, 0.0449859805772557, + 16, -0.00243360966598125, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.919878434483504, 0.0241941130639525, + -0.100586851832447, -0.0207719836214634, 0.0228815031311842, + 50, 0.00105475975486043, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.924542253787135, 0.0111362981914415, + 0.094713677447236, -0.0640766897244485, 0.0577432025460922, + 50, -0.00316674358917813, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.918836312264993, 0.0310770741787708, + -0.101899669542939, -0.0106558370211265, 0.0110466655555189, + 84, 0.000195414267196224, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.971843774587019, 0.00553645443177324, + 0.0352959226169654, -0.0815246477151241, 0.0734724695614394, + 84, -0.00402608907684234, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.918898666045618, 0.0395408075095158, + -0.101821114196351)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0581192138908964, 0.876431095056518, 0.467275154473707, "facGenderm", + "", 0.0251969222336683, "contNormal", 0.208756866866014, + 2.23837022220503, -3.5907517197883, 3.35308690020196, -0.11883240979317, + "debCollin1", "", 0.94651551730688, "contNormal", 1.77141995331608, + -0.0670831383437433, -3.51917002780582, 3.11341949449605, -0.202875266654887, + "facExperimexperimental", "", 0.904561295730788, "contNormal", + 1.69201821426794, -0.119901349136872, -4.66098418480432, 5.27099374466062, + 0.305004779928149, "debCollin1:facExperimexperimental", "", + 0.904183309105638, "contNormal", 2.53371439674584, 0.120378516347336, + -0.0402674710505829, 0.0518453679176567, 0.00578894843353692, + "facGenderm", "", 0.805409097858919, "debCollin1", + 0.0234986049985648, 0.246352855154189, -0.0489096438187818, + 0.0420350580679669, -0.00343729287540747, "facExperimexperimental", + "", 0.882220200140582, "debCollin1", 0.0232006053693101, + -0.148155309772836, -0.0174100406608698, 0.0258806821009516, + 0.00423532072004092, "contcor2", "", 0.701346330914427, + "debCollin1", 0.0110437546565379, 0.383503695234087, -0.088281312349547, + 0.0429308305247966, -0.0226752409123752, "facGenderm:facExperimexperimental", + "", 0.498141536722901, "debCollin1", 0.0334731005032052, + -0.677416808466965, -0.0370220838636414, 0.0287647324935523, + -0.00412867568504453, "facGenderm:contcor2", "", 0.805675708151149, + "debCollin1", 0.0167826594968356, -0.24600842827223)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0562731228839236, 0.875994788153817, 16, 0.466133955518871, + 0, "Total", 0.0258096893503152, 0.209116512276693, 2.22906336015256, + 0.0561494048540982, 0.881507613224159, 16, 0.468828509039129, + 0, "Total", 0.0259714743209254, 0.210554432346814, 2.22663804230395, + 0.0573575385772787, 0.875846280089843, 50, 0.466601909333561, + 1, "Total", 0.0254395321452057, 0.208801985130518, 2.23466222814835, + 0.0546155930935681, 0.88397733261407, 50, 0.469296462853819, + 0, "Total", 0.0265479280229477, 0.2115757600809, 2.21810127338961, + 0.0580044744788301, 0.876296371583603, 84, 0.467150423031216, + 0, "Total", 0.0252323144311133, 0.20875176879763, 2.23782737613154, + 0.0522173319721734, 0.887472621130776, 84, 0.469844976551475, + 0, "Total", 0.0274523679380694, 0.213079244248106, 2.20502460579593, + 0.0557366574098427, 0.882389438893687, 16, 0.469063048151765, + 1, "Total", 0.0261307410457341, 0.210884686658626, 2.22426320082249, + 0.0565154046085575, 0.873167685006895, 16, 0.464841544807726, + 0, "Total", 0.0256653865904795, 0.208333491543719, 2.23123772065318, + 0.0570470712494816, 0.879612757207654, 50, 0.468329914228568, + 0, "Total", 0.0256267831350419, 0.209842041090159, 2.23182119176657, + 0.0550731044857199, 0.873143717283339, 50, 0.464108410884529, + 0, "Total", 0.0261581095743153, 0.208695317681972, 2.22385636649395, + 0.057883748765735, 0.877057388716072, 84, 0.467470568740904, + 1, "Total", 0.0252895695608912, 0.208976707330307, 2.23695058991442, + 0.052673457044539, 0.873824673749191, 84, 0.463249065396865, + 0, "Total", 0.0270073774400363, 0.209481200466383, 2.21141116417846, + -0.035213880088879, 0.0329314821792055, 16, -0.00114119895483677, + 0, "Total indirect", 0.94766028166686, 0.0173843404280911, -0.0656452259179602, + -0.0442838193641306, 0.0473905284949735, 16, 0.00155335456542145, + 1, "Total indirect", 0.947043206048489, 0.0233867429662534, + 0.0664203034883013, -0.0210860026403081, 0.0197395123600153, + 50, -0.000673245140146429, 1, "Total indirect", 0.948458467840166, + 0.0104148635695222, -0.0646427229365345, -0.0572906417615912, + 0.0613332585218148, 50, 0.00202130838011179, 1, "Total indirect", + 0.946745576176461, 0.030261755118741, 0.0667941555993889, -0.00758216750734612, + 0.00733270462236423, 84, -0.000124731442490942, 0, "Total indirect", + 0.973848489525761, 0.00380488423444435, -0.0327819283860964, + -0.0728623571571133, 0.0780020013126478, 84, 0.00256982207776728, + 1, "Total indirect", 0.946763201246988, 0.0384865129307885, + 0.0667720165344329, -0.0339860660224271, 0.0375618533785417, + 16, 0.00178789367805731, 1, "Total indirect", 0.921968714467863, + 0.0182523556466674, 0.0979541333002545, -0.0498531999092182, + 0.0449859805772557, 16, -0.00243360966598125, 1, "Total indirect", + 0.919878434483504, 0.0241941130639525, -0.100586851832447, -0.0207719836214634, + 0.0228815031311842, 50, 0.00105475975486043, 0, "Total indirect", + 0.924542253787135, 0.0111362981914415, 0.094713677447236, -0.0640766897244485, + 0.0577432025460922, 50, -0.00316674358917813, 1, "Total indirect", + 0.918836312264993, 0.0310770741787708, -0.101899669542939, -0.0106558370211265, + 0.0110466655555189, 84, 0.000195414267196224, 1, "Total indirect", + 0.971843774587019, 0.00553645443177324, 0.0352959226169654, + -0.0815246477151241, 0.0734724695614394, 84, -0.00402608907684234, + 1, "Total indirect", 0.918898666045618, 0.0395408075095158, + -0.101821114196351, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, + 1, 1, 0, 1, 1, 1, 0, 1, 1, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-60") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-60") +}) + + +context('Model number 61 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1198.8612379332, 1263.9904925829, 685.165756913672, 14, 1, 100, + 3.7762304580643e-137, 0, 685.165756913672, 14)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 61)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544847640751334, 0.0642086845259603, -0.240319478112687, "contcor1", + "", 0.121932582695463, "contGamma", 0.155374366590777, + -1.54671252012654, -0.403933771516005, 0.194627906229902, -0.104652932643051, + "contcor2", "", 0.493114959196565, "contGamma", 0.15269711139268, + -0.685362884003242, 0.424978967513543, 0.896762429179994, 0.660870698346769, + "contcor2", "", 3.9965214027049e-08, "contcor1", 0.12035513544836, + 5.49100539735859, 0.76149543059547, 1.34551529264235, 1.05350536161891, + "contNormal", "", 1.53699275529107e-12, "contNormal", + 0.1489873963638, 7.07110391436363, 0.00462621308488272, 0.0081742582811046, + 0.00640023568299366, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000905130202444637, 7.07106631256748, 0.323891780237947, + 0.572298455355813, 0.44809511779688, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702142175229, + 7.07106837699429, 1.68041043882976, 2.96918955166883, 2.32479999524929, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776223186956, 7.0710709330319, 0.732634402791268, 1.29452328907534, + 1.01357884593331, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341635539271, 7.07107074730997, 0.721541645644914, + 1.27492303376245, 0.998232339703684, "contcor2", "", + 1.53743684450092e-12, "contcor2", 0.141171315514607, 7.07107060711917 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.197084008453469, 0.178065917312505, 16, "", -0.00950904557048169, + "contGamma", "contNormal", "", "", "", 0.920852701103417, + 0.0957032702450425, -0.0993596723093614, -0.155656310692403, + 0.11737101661344, 50, "", -0.0191426470394817, "contGamma", + "contNormal", "", "", "", 0.783442072669538, 0.0696511082498067, + -0.274836216113401, -0.245503939578574, 0.186190942291103, 84, + "", -0.0296564986437352, "contGamma", "contNormal", "", "", + "", 0.787706128055921, 0.110128269007704, -0.269290518328773, + -0.0236251778426157, 0.0420232817145788, 16, 16, 0.00919905193598155, + "contGamma", "debCollin1", "contNormal", "", "", + 0.582810853133864, 0.0167473637462273, 0.549283581307169, -0.0319214365966987, + 0.0684393807903761, 16, 16, 0.0182589720968387, "contGamma", + "debCollin1", "contNormal", "", "", 0.475743457496054, + 0.0256027197894217, 0.713165329582788, -0.05911256771359, 0.115406014646125, + 50, 16, 0.0281467234662674, "contGamma", "debCollin1", "contNormal", + "", "", 0.52724690986596, 0.04452086460167, + 0.63221421502249, -0.0350385149247445, 0.0547187457623969, 16, + 50, 0.00984011541882618, "contGamma", "debCollin1", "contNormal", + "", "", 0.667382688091804, 0.0228976811296369, + 0.429742879338552, -0.0199131075794087, 0.0577131787387753, + 84, 50, 0.0189000355796833, "contGamma", "debCollin1", "contNormal", + "", "", 0.339879573922452, 0.0198029879453118, + 0.954403226012049, -0.0381171927440506, 0.0956927666422747, + 16, 50, 0.028787786949112, "contGamma", "debCollin1", "contNormal", + "", "", 0.399043498820643, 0.0341358209747223, + 0.843330733730689, -0.0669793224630463, 0.0881624028998186, + 16, 84, 0.0105915402183862, "contGamma", "debCollin1", "contNormal", + "", "", 0.788996567372958, 0.0395776980053213, + 0.267613852047739, -0.0371458135345135, 0.0764487342930001, + 16, 84, 0.0196514603792433, "contGamma", "debCollin1", "contNormal", + "", "", 0.497686823742574, 0.0289787334674343, + 0.67813385982956, -0.0313163822070836, 0.0903948057044275, 50, + 84, 0.029539211748672, "contGamma", "debCollin1", "contNormal", + "", "", 0.341419879812278, 0.0310493429653691, + 0.951363504909541, -0.0111877875343308, 0.0127146641540513, + 16, 16, 0.000763438309860225, "contGamma", "debCollin1", "contNormal", + "", "", 0.900364017228439, 0.00609767625245199, + 0.125201515832073, -0.0219543540020818, 0.0249850138775569, + 84, 16, 0.00151532993773756, "contGamma", "debCollin1", "contNormal", + "", "", 0.899299823981587, 0.0119745485758643, + 0.126545892576848, -0.03399812514223, 0.0386699733154401, 16, + 16, 0.00233592408660507, "contGamma", "debCollin1", "contNormal", + "", "", 0.899726763947836, 0.0185381208611145, + 0.126006519436654, -0.0121761922541784, 0.0138094738437287, + 16, 50, 0.000816640794775188, "contGamma", "debCollin1", "contNormal", + "", "", 0.901956678057589, 0.00662911826515149, + 0.123189957112121, -0.0225556633954574, 0.0256927282407625, + 16, 50, 0.00156853242265253, "contGamma", "debCollin1", "contNormal", + "", "", 0.898596110711244, 0.0123084893438852, + 0.127435006752618, -0.0344477440045722, 0.0392259971476123, + 50, 50, 0.00238912657152003, "contGamma", "debCollin1", "contNormal", + "", "", 0.898847591205321, 0.0187946670789141, + 0.127117259459223, -0.0139854743593701, 0.0157434789057981, + 16, 84, 0.000879002273213989, "contGamma", "debCollin1", "contNormal", + "", "", 0.907730731677714, 0.00758405600808648, + 0.115901342537127, -0.0236707752578615, 0.0269325630600442, + 84, 84, 0.00163089390109133, "contGamma", "debCollin1", "contNormal", + "", "", 0.899466535235486, 0.0129092520875532, + 0.126335274114276, -0.0352548105635339, 0.0401577866634516, + 16, 84, 0.00245148804995883, "contGamma", "debCollin1", "contNormal", + "", "", 0.89860186457609, 0.0192382609634234, + 0.127427736562037, -0.0405308682819992, 0.0236449446335634, + 16, 16, -0.00844296182421792, "contGamma", "debCollin1", "contNormal", + "", "", 0.606060303062955, 0.0163716816792995, + -0.515705227453406, -0.0677675218689627, 0.0342510670351591, + 50, 16, -0.0167582274169018, "contGamma", "debCollin1", "contNormal", + "", "", 0.519632177270802, 0.0260256284576736, + -0.643912497412167, -0.112761347849245, 0.0610947819125983, + 50, 16, -0.0258332829683234, "contGamma", "debCollin1", "contNormal", + "", "", 0.560255455174792, 0.0443518684866656, + -0.582462111513748, -0.0518828473388218, 0.0338201775321461, + 50, 50, -0.00903133490333783, "contGamma", "debCollin1", "contNormal", + "", "", 0.679548200606815, 0.0218634182941581, + -0.413079728971339, -0.0595857747507176, 0.0248925737586743, + 84, 50, -0.0173466004960217, "contGamma", "debCollin1", "contNormal", + "", "", 0.420871911400837, 0.0215509951141313, + -0.804909490450734, -0.0968903844344793, 0.0440470723395927, + 50, 50, -0.0264216560474433, "contGamma", "debCollin1", "contNormal", + "", "", 0.462417461900855, 0.0359540935154341, + -0.734871984356973, -0.082043395211695, 0.0626013982872671, + 16, 84, -0.00972099846221396, "contGamma", "debCollin1", "contNormal", + "", "", 0.792209389015153, 0.0368998600586291, + -0.263442691835919, -0.0752582597943479, 0.0391857316845523, + 50, 84, -0.0180362640548978, "contGamma", "debCollin1", "contNormal", + "", "", 0.536722403101266, 0.0291954322583527, + -0.617776914391727, -0.0932777946157978, 0.039055155403159, + 50, 84, -0.0271113196063194, "contGamma", "debCollin1", "contNormal", + "", "", 0.421926424366279, 0.0337590259471047, + -0.803083585669763)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.155571907345563, 0.117358607660315, -0.0191066498426238, "contGamma", + "", 0.783764411089085, "contNormal", 0.0696264107806877, + -0.27441669947352, -2.68756564831249, 2.34580630453253, -0.170879671889979, + "debCollin1", "", 0.89413091884133, "contNormal", 1.28404705202433, + -0.133078979949047, -2.93401856368291, 0.84674957644698, -1.04363449361797, + "contcor1", "", 0.279231266145437, "contNormal", 0.964499391303133, + -1.08204785096641, -0.790592412038361, 4.51340292110115, 1.86140525453139, + "debCollin1:contcor1", "", 0.168922232080974, "contNormal", + 1.35308489721667, 1.37567513935035, -0.15564455964148, 0.135865880049224, + -0.00988933979612793, "contGamma:contcor1", "", 0.894208000209358, + "contNormal", 0.0743662745821101, -0.132981514156781, -0.0199697900384697, + 0.000908053806044499, -0.00953086811621258, "contGamma", "", + 0.0735388366260541, "debCollin1", 0.00532607844052134, -1.78947197692411, + -0.0336993907115584, 0.0420652141227488, 0.00418291170559522, + "contcor1", "", 0.828663085450864, "debCollin1", 0.0193280604725211, + 0.216416526197344, -0.0310214397681216, 0.0494311934763693, + 0.00920487685412386, "contcor2", "", 0.653797334803115, + "debCollin1", 0.0205240080631815, 0.448493141582647, -0.0233913307102965, + 0.0139844792520168, -0.00470342572913988, "contGamma:contcor1", + "", 0.621808132275768, "debCollin1", 0.00953482060311539, + -0.493289378470643, -0.0182406327594935, 0.0175608267288697, + -0.000339903015311895, "contGamma:contcor2", "", 0.970312598223553, + "debCollin1", 0.00913319320425287, -0.0372162296045176)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.187675421492022, 0.187055434223022, 16, 16, -0.00030999363450014, + "Total", 0.997412676648254, 0.095596362655353, -0.00324273461761028, + -0.149529966075987, 0.129642775868987, 16, 16, -0.0099435951035002, + "Total", 0.888960015994966, 0.0712188448734397, -0.139620280575606, + -0.240571342429275, 0.199656449013768, 16, 16, -0.0204574467077536, + "Total", 0.855457478575352, 0.11230507165323, -0.182159598018165, + -0.179420043492759, 0.196919896545473, 50, 16, 0.008749926526357, + "Total", 0.927382490480036, 0.0960068508928617, 0.0911385640189514, + -0.144756560573972, 0.142989210688685, 16, 16, -0.000883674942643062, + "Total", 0.990395135351155, 0.0734058823356855, -0.0120382034044903, + -0.236478653104343, 0.21368360001055, 16, 16, -0.0113975265468965, + "Total", 0.920941752856236, 0.11483941966937, -0.0992475108260792, + -0.179507495909942, 0.216782851701514, 84, 16, 0.0186376778957857, + "Total", 0.853734478921994, 0.101096334100357, 0.184355625370989, + -0.150837450372229, 0.1688456032258, 16, 16, 0.00900407642678563, + "Total", 0.912086393190942, 0.0815532979482399, 0.110407263143427, + -0.239414781709495, 0.236395231354559, 16, 16, -0.00150977517746778, + "Total", 0.990076025179469, 0.121382335802388, -0.0124381786483802, + -0.189305176970512, 0.189967316667201, 16, 50, 0.000331069848344495, + "Total", 0.997269855816238, 0.0967549650476655, 0.00342173497950618, + -0.152148791452033, 0.133543728210722, 50, 50, -0.00930253162065556, + "Total", 0.898435368612273, 0.0728820840373245, -0.127638112212756, + -0.242170436201942, 0.202537669752124, 16, 50, -0.019816383224909, + "Total", 0.861336061673299, 0.11344803003062, -0.174673665285863, + -0.175854159542915, 0.194636139561318, 50, 50, 0.00939099000920163, + "Total", 0.920852251758498, 0.0945145681315099, 0.0993602382664943, + -0.140498917808964, 0.140013694889367, 50, 50, -0.000242611459798429, + "Total", 0.997294944163935, 0.0715606549178912, -0.00339029121626684, + -0.233701381333696, 0.212188455205593, 16, 50, -0.0107564630640518, + "Total", 0.924662153943034, 0.11374949745414, -0.094562730427785, + -0.170571313831756, 0.209128796589017, 84, 50, 0.0192787413786303, + "Total", 0.842240174485817, 0.0968640529662277, 0.199028853204728, + -0.140005933209006, 0.159296213028267, 50, 50, 0.00964513990963026, + "Total", 0.899477550091363, 0.0763539913483436, 0.126321358442508, + -0.232202714660436, 0.23046529127119, 16, 50, -0.000868711694623145, + "Total", 0.994127535140773, 0.118029721357406, -0.00736010967943066, + -0.198593808518747, 0.200758797814556, 16, 84, 0.00108249464790447, + "Total", 0.991522277224772, 0.101877536904592, 0.0106254497389176, + -0.164722457662592, 0.1476202440204, 84, 84, -0.00855110682109559, + "Total", 0.914537394045105, 0.0796807247854327, -0.107317131516089, + -0.250383779891766, 0.212253863041068, 16, 84, -0.019064958425349, + "Total", 0.871670188211976, 0.118021975552118, -0.161537360615778, + -0.179438196905263, 0.199723026522786, 50, 84, 0.0101424148087616, + "Total", 0.916489641724408, 0.096726579268503, 0.10485654393512, + -0.145684864064819, 0.146702490744342, 84, 84, 0.000508813339761546, + "Total", 0.994557296417981, 0.0745899815291188, 0.00682147024748776, + -0.236914341374957, 0.216904264845973, 16, 84, -0.0100050382644919, + "Total", 0.931132504257986, 0.115772179948354, -0.0864200559145995, + -0.167521808310173, 0.207582140666553, 84, 84, 0.0200301661781903, + "Total", 0.834198335736038, 0.0956915412567523, 0.209320133369436, + -0.136585952257088, 0.157379081675468, 84, 84, 0.0103965647091902, + "Total", 0.889738739456657, 0.0749924580888512, 0.138634803740829, + -0.229913877274086, 0.229679303483959, 16, 84, -0.000117286895063171, + "Total", 0.999201832594079, 0.11724531276678, -0.00100035466062915, + -0.196078962005701, 0.178587747484458, 16, 16, -0.00874560726062146, + "Total", 0.927094995367575, 0.0955799985217797, -0.0915003912521364, + -0.153299575806412, 0.116541158347169, 16, 16, -0.0183792087296215, + "Total", 0.789475728527594, 0.0688381868957928, -0.266991470264084, + -0.242866210487315, 0.185080089819565, 16, 16, -0.0288930603338749, + "Total", 0.791274189287976, 0.109171980628845, -0.264656372151968, + -0.195801856121807, 0.179814424856319, 50, 16, -0.00799371563274412, + "Total", 0.933515724857872, 0.0958222405975161, -0.083422341023315, + -0.151958602650208, 0.11670396844672, 16, 16, -0.0176273171017442, + "Total", 0.797030704971514, 0.0685376295728147, -0.257191811441579, + -0.240881403367141, 0.184599065955146, 16, 16, -0.0281411687059976, + "Total", 0.795432304675751, 0.108542930553424, -0.259263026735275, + -0.196356490855499, 0.182010247887745, 84, 16, -0.00717312148387662, + "Total", 0.940760172148746, 0.096523900879749, -0.0743144590976799, + -0.151698729840119, 0.118085283934365, 16, 16, -0.0168067229528767, + "Total", 0.807076250847758, 0.068823717145444, -0.244199581916788, + -0.239472165781256, 0.184831016666996, 16, 16, -0.0273205745571301, + "Total", 0.800730878121268, 0.108242596750527, -0.252401322374937, + -0.196051689702857, 0.178666880151444, 16, 50, -0.0086924047757065, + "Total", 0.927547277145159, 0.0955932284496128, -0.0909311769953273, + -0.153194072860477, 0.116542060371064, 50, 50, -0.0183260062447066, + "Total", 0.789991351198019, 0.0688115024967769, -0.266321844165006, + -0.242719253717117, 0.185039538019197, 16, 50, -0.02883985784896, + "Total", 0.791560438211639, 0.109124145930849, -0.264284843679194, + -0.195788276856912, 0.179907250561254, 50, 50, -0.00794051314782916, + "Total", 0.933971096951793, 0.0958424568975767, -0.0828496410136365, + -0.151872115591599, 0.116723886357941, 50, 50, -0.0175741146168292, + "Total", 0.797580909224885, 0.068520647335408, -0.256479109585817, + -0.240746056314538, 0.184570123872373, 16, 50, -0.0280879662210826, + "Total", 0.79573336014397, 0.108501019289576, -0.258872832762236, + -0.196357529119635, 0.182117691121712, 84, 50, -0.00711991899896165, + "Total", 0.941215573602784, 0.0965515752398288, -0.0737421319256176, + -0.151633294532218, 0.118126253596295, 50, 50, -0.0167535204679617, + "Total", 0.807657872415941, 0.0688174757945407, -0.243448633861266, + -0.239349890536814, 0.184815146392384, 16, 50, -0.0272673720722151, + "Total", 0.801047359566328, 0.10820735489911, -0.251991854875656, + -0.196077567369188, 0.178817480774653, 16, 84, -0.0086300432972677, + "Total", 0.928099425899382, 0.0956382492487017, -0.090236316171219, + -0.153150784271532, 0.116623494738997, 84, 84, -0.0182636447662678, + "Total", 0.790718244185875, 0.0688212337416591, -0.265378049379727, + -0.242597658046882, 0.18504266530584, 16, 84, -0.0287774963705212, + "Total", 0.791944494001449, 0.109093923849084, -0.263786426917146, + -0.195830043509348, 0.180073740170568, 50, 84, -0.00787815166939036, + "Total", 0.934524701672964, 0.0958955844711936, -0.0821534350390961, + -0.151851459705332, 0.116827953428551, 84, 84, -0.0175117531383904, + "Total", 0.798344931670156, 0.068541926089763, -0.255489656293826, + -0.240638369006714, 0.184587159521427, 16, 84, -0.0280256047426438, + "Total", 0.79613437555537, 0.108477893441478, -0.258353143239854, + -0.196415991932174, 0.182300876891128, 84, 84, -0.00705755752052285, + "Total", 0.941766645006946, 0.0966132214190087, -0.0730496035311195, + -0.151636960810955, 0.118254642831909, 84, 84, -0.0166911589895229, + "Total", 0.808451815177996, 0.068851164044782, -0.242423773382636, + -0.239257671899952, 0.184847650712399, 16, 84, -0.0272050105937763, + "Total", 0.801465488224343, 0.108192121375097, -0.251450939754272, + -0.210273267545967, 0.174369252756567, 16, 16, -0.0179520073946996, + "Total", 0.854836787925678, 0.0981248949818836, -0.182950589633895, + -0.164378949945332, 0.109207732217933, 16, 16, -0.0275856088636997, + "Total", 0.692662539736251, 0.0697938034375331, -0.395244384243787, + -0.24971733017167, 0.173518409235764, 16, 16, -0.0380994604679531, + "Total", 0.72418599927814, 0.107970284848564, -0.352869870829647, + -0.22456389371867, 0.172029347743903, 50, 16, -0.0262672729873834, + "Total", 0.795152471063301, 0.101173604359787, -0.259625750743974, + -0.174990605531984, 0.103188856619217, 16, 16, -0.0359008744563835, + "Total", 0.612932273276594, 0.0709654525148024, -0.505892278343397, + -0.255124396118534, 0.16229494399726, 16, 16, -0.0464147260606369, + "Total", 0.662927897339303, 0.106486482253844, -0.435874348351493, + -0.247727505579031, 0.177042848501421, 84, 16, -0.035342328538805, + "Total", 0.744309922875634, 0.108361775377249, -0.326151250436466, + -0.197540458634132, 0.107588598618522, 16, 16, -0.0449759300078051, + "Total", 0.56340172956945, 0.0778404755545189, -0.577796187489943, + -0.268713127189497, 0.15773356396538, 16, 16, -0.0554897816120585, + "Total", 0.610005242167417, 0.108789420244105, -0.51006597413194, + -0.213085971082723, 0.176005210135084, 16, 50, -0.0185403804738195, + "Total", 0.851828080321875, 0.099259778314017, -0.186786438462167, + -0.167646596553652, 0.111298632668013, 50, 50, -0.0281739819428196, + "Total", 0.692164086818257, 0.0711608048469129, -0.395919945023525, + -0.251739452868735, 0.174363785774589, 16, 50, -0.038687833547073, + "Total", 0.721909518365877, 0.108701803197501, -0.355907928010917, + -0.223216667801215, 0.169505375668208, 50, 50, -0.0268556460665034, + "Total", 0.78865484547113, 0.100186035704524, -0.268057777490148, + -0.172363184318262, 0.0993846892472552, 50, 50, -0.0364892475355034, + "Total", 0.59864318602954, 0.0693247109918932, -0.52635268165446, + -0.253265498615221, 0.159259300335707, 16, 50, -0.0470030991397568, + "Total", 0.655137308616689, 0.10523785186995, -0.446636816550016, + -0.242257427916248, 0.170396024680398, 84, 50, -0.0359307016179249, + "Total", 0.732864725630725, 0.105270672280614, -0.341317299866258, + -0.189156998919472, 0.0980283927456222, 50, 50, -0.045564303086925, + "Total", 0.533988869733109, 0.0732629257298543, -0.621928521595443, + -0.262659372753853, 0.150503063371496, 16, 50, -0.0560781546911784, + "Total", 0.594692618368178, 0.105400517403463, -0.532048191722976, + -0.222467453052774, 0.184007364987383, 16, 84, -0.0192300440326957, + "Total", 0.852876803348395, 0.103694461032544, -0.185449095749294, + -0.179757732008928, 0.122030441005536, 84, 84, -0.0288636455016957, + "Total", 0.707727383595078, 0.0769881935063427, -0.374910024344418, + -0.259726033900513, 0.180971039688615, 16, 84, -0.0393774971059491, + "Total", 0.726146314072948, 0.112424788686244, -0.350256358638523, + -0.22782271838042, 0.172732099129661, 50, 84, -0.0275453096253795, + "Total", 0.787494794848786, 0.102184229064821, -0.269565175345267, + -0.178154348013091, 0.103796525824331, 84, 84, -0.0371789110943796, + "Total", 0.60523030860364, 0.071927565011759, -0.516893781797026, + -0.256983456735431, 0.161597931338165, 16, 84, -0.047692762698633, + "Total", 0.655140179737574, 0.106782928506675, -0.446632840713407, + -0.241671723050685, 0.168430992697083, 84, 84, -0.0366203651768011, + "Total", 0.726314462996245, 0.104619962147929, -0.350032292355652, + -0.187509625626395, 0.0950016923347927, 84, 84, -0.0462539666458011, + "Total", 0.521011201217977, 0.0720705380786588, -0.641787447116308, + -0.261355619961921, 0.147819983461812, 16, 84, -0.0567678182500546, + "Total", 0.586552087813685, 0.104383449556027, -0.543839262751944, + -0.0236251778426157, 0.0420232817145788, 16, 16, 0.00919905193598155, + "Total indirect", 0.582810853133864, 0.0167473637462273, 0.549283581307169, + -0.0319214365966987, 0.0684393807903761, 16, 16, 0.0182589720968387, + "Total indirect", 0.475743457496054, 0.0256027197894217, 0.713165329582788, + -0.05911256771359, 0.115406014646125, 50, 16, 0.0281467234662674, + "Total indirect", 0.52724690986596, 0.04452086460167, 0.63221421502249, + -0.0350385149247445, 0.0547187457623969, 50, 50, 0.00984011541882618, + "Total indirect", 0.667382688091804, 0.0228976811296369, 0.429742879338552, + -0.0199131075794087, 0.0577131787387753, 16, 50, 0.0189000355796833, + "Total indirect", 0.339879573922452, 0.0198029879453118, 0.954403226012049, + -0.0381171927440506, 0.0956927666422747, 50, 50, 0.028787786949112, + "Total indirect", 0.399043498820643, 0.0341358209747223, 0.843330733730689, + -0.0669793224630463, 0.0881624028998186, 84, 84, 0.0105915402183862, + "Total indirect", 0.788996567372958, 0.0395776980053213, 0.267613852047739, + -0.0371458135345135, 0.0764487342930001, 16, 84, 0.0196514603792433, + "Total indirect", 0.497686823742574, 0.0289787334674343, 0.67813385982956, + -0.0313163822070836, 0.0903948057044275, 50, 84, 0.029539211748672, + "Total indirect", 0.341419879812278, 0.0310493429653691, 0.951363504909541, + -0.0111877875343308, 0.0127146641540513, 16, 16, 0.000763438309860225, + "Total indirect", 0.900364017228439, 0.00609767625245199, 0.125201515832073, + -0.0219543540020818, 0.0249850138775569, 50, 16, 0.00151532993773756, + "Total indirect", 0.899299823981587, 0.0119745485758643, 0.126545892576848, + -0.03399812514223, 0.0386699733154401, 50, 16, 0.00233592408660507, + "Total indirect", 0.899726763947836, 0.0185381208611145, 0.126006519436654, + -0.0121761922541784, 0.0138094738437287, 50, 50, 0.000816640794775188, + "Total indirect", 0.901956678057589, 0.00662911826515149, 0.123189957112121, + -0.0225556633954574, 0.0256927282407625, 50, 50, 0.00156853242265253, + "Total indirect", 0.898596110711244, 0.0123084893438852, 0.127435006752618, + -0.0344477440045722, 0.0392259971476123, 50, 50, 0.00238912657152003, + "Total indirect", 0.898847591205321, 0.0187946670789141, 0.127117259459223, + -0.0139854743593701, 0.0157434789057981, 84, 84, 0.000879002273213989, + "Total indirect", 0.907730731677714, 0.00758405600808648, 0.115901342537127, + -0.0236707752578615, 0.0269325630600442, 50, 84, 0.00163089390109133, + "Total indirect", 0.899466535235486, 0.0129092520875532, 0.126335274114276, + -0.0352548105635339, 0.0401577866634516, 50, 84, 0.00245148804995883, + "Total indirect", 0.89860186457609, 0.0192382609634234, 0.127427736562037, + -0.0405308682819992, 0.0236449446335634, 16, 16, -0.00844296182421792, + "Total indirect", 0.606060303062955, 0.0163716816792995, -0.515705227453406, + -0.0677675218689627, 0.0342510670351591, 84, 16, -0.0167582274169018, + "Total indirect", 0.519632177270802, 0.0260256284576736, -0.643912497412167, + -0.112761347849245, 0.0610947819125983, 50, 16, -0.0258332829683234, + "Total indirect", 0.560255455174792, 0.0443518684866656, -0.582462111513748, + -0.0518828473388218, 0.0338201775321461, 50, 50, -0.00903133490333783, + "Total indirect", 0.679548200606815, 0.0218634182941581, -0.413079728971339, + -0.0595857747507176, 0.0248925737586743, 84, 50, -0.0173466004960217, + "Total indirect", 0.420871911400837, 0.0215509951141313, -0.804909490450734, + -0.0968903844344793, 0.0440470723395927, 50, 50, -0.0264216560474433, + "Total indirect", 0.462417461900855, 0.0359540935154341, -0.734871984356973, + -0.082043395211695, 0.0626013982872671, 84, 84, -0.00972099846221396, + "Total indirect", 0.792209389015153, 0.0368998600586291, -0.263442691835919, + -0.0752582597943479, 0.0391857316845523, 84, 84, -0.0180362640548978, + "Total indirect", 0.536722403101266, 0.0291954322583527, -0.617776914391727, + -0.0932777946157978, 0.039055155403159, 50, 84, -0.0271113196063194, + "Total indirect", 0.421926424366279, 0.0337590259471047, -0.803083585669763, + 16, 16, 50, 50, 16, 50, 84, 16, 50, 16, 50, 50, 50, 50, 50, + 84, 50, 50, 16, 84, 50, 50, 84, 50, 84, 84, 50, 16, 16, 50, + 50, 16, 50, 84, 16, 50, 16, 50, 50, 50, 50, 50, 84, 50, 50, + 16, 84, 50, 50, 84, 50, 84, 84, 50, 16, 16, 84, 50, 16, 84, + 84, 16, 84, 16, 50, 84, 50, 50, 84, 84, 50, 84, 16, 84, 84, + 50, 84, 84, 84, 84, 84, 16, 16, 84, 50, 16, 84, 84, 16, 84, + 16, 50, 84, 50, 50, 84, 84, 50, 84, 16, 84, 84, 50, 84, 84, + 84, 84, 84, 16, 16, 84, 50, 16, 84, 84, 16, 84, 16, 50, 84, + 50, 50, 84, 84, 50, 84, 16, 84, 84, 50, 84, 84, 84, 84, 84, + 16, 16, 50, 16, 84, 16, 16, 16, 50, 16, 84, 16, 16, 16, 50, + 16, 84, 16, 16, 50, 50, 50, 84, 50, 16, 50, 50, 50, 84, 50, + 16, 50, 50, 50, 84, 50, 16, 84, 50, 84, 84, 84, 16, 84, 50, + 84, 84, 84, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-61") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-61") +}) + + +context('Model number 61 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(750.952947729932, 816.082202379635, 604.112980950878, 14, 1, 100, + 7.08620251279473e-120, 0, 604.112980950878, 14)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 61)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.00962230818089595, 0.0896223530988225, 0.0400000224589633, + "facExperimexperimental", "", 0.114128461958038, "facGenderm", + 0.0253179808564208, 1.57990570756037, -0.163250714760379, 0.0341991445998761, + -0.0645257850802516, "contcor2", "", 0.200188045125042, + "facGenderm", 0.0503707876567414, -1.28101600316381, -0.170527145897113, + 0.0272978519402032, -0.071614646978455, "contcor2", "", + 0.155883416047444, "facExperimexperimental", 0.0504664880063447, + -1.41905351070698, 0.75856232143478, 1.34033785082053, 1.04945008612765, + "contNormal", "", 1.53765888910584e-12, "contNormal", + 0.148414852001036, 7.0710584013541, 0.00473838132391251, 0.00837245209409034, + 0.00655541670900143, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000927075905180635, 7.0710679377695, 0.0796446823044575, + 0.140727644508406, 0.110186163406432, "debCollin1:facExperimexperimental", + "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", + 0.0155826746526374, 7.0710687261755, 0.180704820668484, 0.31929523267654, + 0.250000026672512, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553466036212, 7.07106705741943, 0.18070480747618, + 0.319295186663926, 0.249999997070053, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353553382309392, 7.0710678946717, 0.721541652815207, 1.27492305900471, + 0.99823235590996, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.141171320124887, 7.07107049099546)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0394539460104752, 1.19060669953157, "", 0.615030322771021, 0, + "facGenderm", "contNormal", "", "", "", 0.0362320770796893, + 0.293666812911165, 2.09431333651266, -0.26088747655723, 0.89665608714282, + "", 0.317884305292795, 1, "facGenderm", "contNormal", "", "", + "", 0.281708360680265, 0.295297151588143, 1.07648957527418, + -0.0357578788729814, 0.032960427326016, 16, -0.00139872577348268, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.936405775156766, 0.0175305022798987, -0.0797881173710881, + -0.0440559325059381, 0.0478637155046445, 16, 0.00190389149935323, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.935289456448222, 0.0234493206853884, 0.0811917549722271, -0.0215579942364333, + 0.0199076436598497, 50, -0.000825175288291808, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.937822145667004, + 0.0105781632273243, -0.078007426294984, -0.0568269847516547, + 0.0617818687207429, 50, 0.0024774419845441, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.934744141992577, + 0.0302579165760109, 0.0818774808344958, -0.00891729431250534, + 0.00861152214322597, 84, -0.000152886084639682, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.972725995349761, + 0.00447171901983822, -0.0341895552831971, -0.0722853594311316, + 0.078584821807524, 84, 0.00314973118819623, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.934776563028013, + 0.0384879983583118, 0.0818367107292297, -0.0336092648679903, + 0.0352664434041377, 16, 0.000828589268073669, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.96238765322023, + 0.0175706566078282, 0.0471575585686712, -0.0477218387244319, + 0.0454661513068578, 16, -0.00112784370878707, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.9621606008082, + 0.0237728832688623, -0.0474424450762488, -0.0199909127971767, + 0.0209685617418383, 50, 0.000488824472330818, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.962687158481483, + 0.0104490375491841, 0.0467817700941257, -0.0619252261781504, + 0.0589900091690906, 50, -0.00146760850452992, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.962052469675785, + 0.030846290110687, -0.0475781203919059, -0.00592405848463985, + 0.00610519444620124, 84, 9.05679807806958e-05, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.97645540990371, + 0.00306874336103273, 0.0295130514759686, -0.0787424513624174, + 0.0750107213702573, 84, -0.00186586499608004, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.962058848398766, + 0.0392234688865357, -0.0475701167960833)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0394539460104752, 1.19060669953157, 0.615030322771021, "facGenderm", + "", 0.0362320770796893, "contNormal", 0.293666812911165, + 2.09431333651266, -3.60955224613575, 3.31825549128505, -0.145648377425347, + "debCollin1", "", 0.934319477595839, "contNormal", + 1.76733036730942, -0.0824115174612668, -3.35825942467107, 3.34465789891277, + -0.00680076287914703, "facExperimexperimental", "", + 0.996826702619452, "contNormal", 1.70995930957293, -0.0039771489538225, + -4.72554238696798, 5.18940003221608, 0.23192882262405, "debCollin1:facExperimexperimental", + "", 0.926940880259395, "contNormal", 2.5293685234504, + 0.0916943578896395, -1.11339655546415, 0.519104520507701, -0.297146017478227, + "facGenderm:facExperimexperimental", "", 0.475535857218416, + "contNormal", 0.416462008702409, -0.713500898687155, -0.0402674389777432, + 0.0518453930989761, 0.00578897706061646, "facGenderm", "", + 0.805408140625775, "debCollin1", 0.0234986032404915, 0.246354091831348, + -0.0489096418282235, 0.0420350532542148, -0.00343729428700433, + "facExperimexperimental", "", 0.882220143376906, "debCollin1", + 0.0232006036334847, -0.148155381700646, -0.0174100422105897, + 0.0258806773122055, 0.00423531755080793, "contcor2", "", + 0.701346522379012, "debCollin1", 0.0110437538302405, 0.383503436957332, + -0.0882813433236677, 0.042930789734031, -0.0226752767948183, + "facGenderm:facExperimexperimental", "", 0.498140824623694, + "debCollin1", 0.0334730979989131, -0.677417931126502, -0.0370220615622998, + 0.0287647498728265, -0.00412865584473663, "facGenderm:contcor2", + "", 0.805676609039799, "debCollin1", 0.0167826582411831, + -0.246007264487177)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0380329866373853, 1.18923020735769, 16, 0.613631596997539, 0, + "Total", 0.036665466750645, 0.293678156792881, 2.08946965514466, + -0.263305181827774, 0.896276340866399, 16, 0.316485579519312, + 0, "Total", 0.284678142331682, 0.295817048639874, 1.06986930257897, + 0.0381660799751598, 1.19570234856559, 16, 0.616934214270375, + 0, "Total", 0.0366887199669836, 0.295295290556594, 2.08921115236051, + -0.260805534472852, 0.900381928057148, 16, 0.319788196792148, + 1, "Total", 0.280347692509422, 0.296226734697499, 1.0795386078799, + 0.0388473013903323, 1.18956299357513, 50, 0.61420514748273, + 0, "Total", 0.0364118824400474, 0.293555315623525, 2.09229782188794, + -0.262083879356626, 0.896202139365633, 50, 0.317059130004503, + 0, "Total", 0.283267996539949, 0.295486556859889, 1.07300695291814, + 0.0371192265200168, 1.19789630299111, 50, 0.617507764755566, + 0, "Total", 0.0370407082098405, 0.296122042452606, 2.08531509387518, + -0.261440444503284, 0.902163939057961, 50, 0.320361747277339, + 1, "Total", 0.280485893014416, 0.296843307514732, 1.07922846554807, + 0.0393439979076904, 1.19041087546507, 84, 0.614877436686382, + 0, "Total", 0.036264529472174, 0.29364490537501, 2.09394893434684, + -0.261106719069826, 0.896569557486137, 84, 0.317731419208155, + 1, "Total", 0.281995020870139, 0.29533100753064, 1.075848492391, + 0.0354456237049819, 1.20091448421345, 84, 0.618180053959218, + 1, "Total", 0.0376006721865156, 0.297318948129032, 2.07918149128839, + -0.262633016032837, 0.904701088994819, 84, 0.321034036480991, + 0, "Total", 0.281016884382183, 0.297794784556104, 1.07803780700702, + 0.0392532137401053, 1.19246461033809, 16, 0.615858912039095, + 0, "Total", 0.0363142485006096, 0.294191986611582, 2.09339118693334, + -0.26478130996868, 0.902207099090417, 16, 0.318712894560868, + 0, "Total", 0.284367132729503, 0.297706595188522, 1.07056040985267, + 0.0364432460276392, 1.19136171209683, 16, 0.613902479062234, + 0, "Total", 0.0371914135318698, 0.29462747151964, 2.08365661184215, + -0.258822416511333, 0.892335339679348, 16, 0.316756461584008, + 1, "Total", 0.280756877385206, 0.293668089125838, 1.07862063776455, + 0.039578538204401, 1.1914597562823, 50, 0.615519147243352, 0, + "Total", 0.0362019063684786, 0.293852649121054, 2.09465236772389, + -0.262948287880949, 0.899694547411201, 50, 0.318373129765126, + 0, "Total", 0.283084387638884, 0.296598010081544, 1.07341627031683, + 0.0348198620701851, 1.1923055664628, 50, 0.613562714266492, + 0, "Total", 0.0377199952643152, 0.295282391289512, 2.07788453482456, + -0.25891869941649, 0.89175209299302, 50, 0.316416696788265, + 1, "Total", 0.281069614701498, 0.293543861388743, 1.07791965156863, + 0.0395130891896868, 1.19072869231392, 84, 0.615120890751802, + 0, "Total", 0.0362148057776233, 0.293682846267807, 2.0945073863486, + -0.261234292535361, 0.897184039082512, 84, 0.317974873273576, + 1, "Total", 0.281934794734501, 0.295520310769823, 1.07598314459422, + 0.032476783589403, 1.19385213196048, 84, 0.613164457774941, + 1, "Total", 0.0384915865099518, 0.296274665639741, 2.06958113158594, + -0.259479270535227, 0.891516151128656, 84, 0.316018440296715, + 0, "Total", 0.281811307038534, 0.29362667649579, 1.07625929656036, + -0.0357578788729814, 0.032960427326016, 16, -0.00139872577348268, + 0, "Total indirect", 0.936405775156766, 0.0175305022798987, + -0.0797881173710881, -0.0440559325059381, 0.0478637155046445, + 16, 0.00190389149935323, 0, "Total indirect", 0.935289456448222, + 0.0234493206853884, 0.0811917549722271, -0.0215579942364333, + 0.0199076436598497, 50, -0.000825175288291808, 0, "Total indirect", + 0.937822145667004, 0.0105781632273243, -0.078007426294984, -0.0568269847516547, + 0.0617818687207429, 50, 0.0024774419845441, 1, "Total indirect", + 0.934744141992577, 0.0302579165760109, 0.0818774808344958, -0.00891729431250534, + 0.00861152214322597, 84, -0.000152886084639682, 0, "Total indirect", + 0.972725995349761, 0.00447171901983822, -0.0341895552831971, + -0.0722853594311316, 0.078584821807524, 84, 0.00314973118819623, + 0, "Total indirect", 0.934776563028013, 0.0384879983583118, + 0.0818367107292297, -0.0336092648679903, 0.0352664434041377, + 16, 0.000828589268073669, 0, "Total indirect", 0.96238765322023, + 0.0175706566078282, 0.0471575585686712, -0.0477218387244319, + 0.0454661513068578, 16, -0.00112784370878707, 1, "Total indirect", + 0.9621606008082, 0.0237728832688623, -0.0474424450762488, -0.0199909127971767, + 0.0209685617418383, 50, 0.000488824472330818, 0, "Total indirect", + 0.962687158481483, 0.0104490375491841, 0.0467817700941257, -0.0619252261781504, + 0.0589900091690906, 50, -0.00146760850452992, 1, "Total indirect", + 0.962052469675785, 0.030846290110687, -0.0475781203919059, -0.00592405848463985, + 0.00610519444620124, 84, 9.05679807806958e-05, 1, "Total indirect", + 0.97645540990371, 0.00306874336103273, 0.0295130514759686, -0.0787424513624174, + 0.0750107213702573, 84, -0.00186586499608004, 0, "Total indirect", + 0.962058848398766, 0.0392234688865357, -0.0475701167960833, + 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, + 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-61") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-61") +}) + + +context('Model number 62 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1199.76473288704, 1267.49915772273, 684.069251867512, 13, 1, 100, + 8.73845479778979e-138, 0, 684.069251867512, 13)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 62)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544847697186375, 0.0642085802437243, -0.240319558471326, "contcor1", + "", 0.121932428613061, "contGamma", 0.155374354384636, + -1.54671315882931, -0.403933911767193, 0.194627668208388, -0.104653121779402, + "contcor2", "", 0.493114107150101, "contGamma", 0.152697086450812, + -0.685364234589465, 0.42497898457396, 0.896762443420121, 0.66087071399704, + "contcor2", "", 3.99651771676446e-08, "contcor1", 0.120355134728885, + 5.49100556021756, 0.753191555622171, 1.33084346163989, 1.04201750863103, + "contNormal", "", 1.53721479989599e-12, "contNormal", + 0.147362887934208, 7.07109858688608, 0.00462621328633657, 0.00817425898376441, + 0.00640023613505049, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000905130330305653, 7.07106581312903, 0.323891768392782, + 0.572298414016146, 0.448095091204464, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702066932769, + 7.07106879693993, 1.6804103095535, 2.96918910081273, 2.32479970518311, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776141149774, 7.07107181516571, 0.732634415618539, 1.29452333278533, + 1.01357887420193, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341643417659, 7.07107055587912, 0.72154162049433, + 1.27492294616255, 0.998232283328442, "contcor2", "", + 1.53743684450092e-12, "contcor2", 0.141171299583366, 7.07107100575321 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.183779065307315, 0.172839232622136, "", 16, -0.00546991634258978, + "contGamma", "contNormal", "", "", "", 0.952056072388258, + 0.0909757272945857, -0.0601250081230767, -0.151287148508328, + 0.121034180273272, "", 50, -0.0151264841175281, "contGamma", + "contNormal", "", "", "", 0.827633177876081, 0.0694710032759876, + -0.217738097972115, -0.241504655758772, 0.188613728261017, "", + 84, -0.0264454637488775, "contGamma", "contNormal", "", "", + "", 0.809544696912022, 0.109726093798791, -0.241013443870257, + -0.0233877762641554, 0.0416920559762207, 16, 16, 0.00915213985603269, + "contGamma", "debCollin1", "contNormal", "", "", + 0.581457343272158, 0.0166023030917194, 0.551257244580567, -0.031456896512803, + 0.0677885819797549, 16, 16, 0.0181658427334759, "contGamma", + "debCollin1", "contNormal", "", "", 0.473064615950934, + 0.0253181893329147, 0.717501654427538, -0.0583990607922368, + 0.114405368416484, 50, 16, 0.0280031538121235, "contGamma", + "debCollin1", "contNormal", "", "", 0.52527921887157, + 0.0440835725992365, 0.635228774825036, -0.034762066426559, 0.0543420126462316, + 16, 50, 0.00978997310983629, "contGamma", "debCollin1", "contNormal", + "", "", 0.666695801927357, 0.0227310501049081, + 0.430687234626369, -0.0193925011214802, 0.0569998530960393, + 84, 50, 0.0188036759872795, "contGamma", "debCollin1", "contNormal", + "", "", 0.334607538392583, 0.0194882035639667, + 0.964874772862451, -0.0373594931812233, 0.0946414673130776, + 16, 50, 0.0286409870659272, "contGamma", "debCollin1", "contNormal", + "", "", 0.395031207147089, 0.033674333185586, + 0.850528707074346, -0.0665723111864504, 0.0876475343567466, + 16, 84, 0.0105376115851481, "contGamma", "debCollin1", "contNormal", + "", "", 0.788820308661309, 0.0393425202604904, + 0.267842820322075, -0.0366476735782352, 0.0757503025034179, + 16, 84, 0.0195513144625914, "contGamma", "debCollin1", "contNormal", + "", "", 0.495327140490114, 0.0286734799639774, + 0.681860537582245, -0.0305038447593649, 0.0892810958418428, + 50, 84, 0.029388625541239, "contGamma", "debCollin1", "contNormal", + "", "", 0.336183049299454, 0.0305579443158283, + 0.961734377073801, -0.0113372430407418, 0.0121019328528603, + 16, 16, 0.000382344906059265, "contGamma", "debCollin1", "contNormal", + "", "", 0.949015841995428, 0.00597949148006986, + 0.0639427127429903, -0.0224387918250349, 0.0239566046082039, + 84, 16, 0.000758906391584476, "contGamma", "debCollin1", "contNormal", + "", "", 0.948874924549988, 0.0118357777997963, + 0.0641196889990229, -0.0346293856793069, 0.0369691364659171, + 16, 16, 0.0011698753933051, "contGamma", "debCollin1", "contNormal", + "", "", 0.948931060050484, 0.0182652647472056, + 0.0640491889658528, -0.012181075062769, 0.012999057831364, 16, + 50, 0.000408991384297495, "contGamma", "debCollin1", "contNormal", + "", "", 0.949233065366941, 0.00642362132486889, + 0.0636699088587453, -0.0231837551315697, 0.0247548608712151, + 16, 50, 0.000785552869822706, "contGamma", "debCollin1", "contNormal", + "", "", 0.948783546344875, 0.0122294634954822, + 0.064234450686484, -0.0353357520416904, 0.037728795784777, 50, + 50, 0.00119652187154333, "contGamma", "debCollin1", "contNormal", + "", "", 0.94881603855467, 0.0186392577625893, + 0.0641936436945927, -0.0133441186582696, 0.0142245689518601, + 16, 84, 0.000440225146795232, "contGamma", "debCollin1", "contNormal", + "", "", 0.950089332678349, 0.00703295770422009, + 0.0625945960873726, -0.0241608449189954, 0.0257944181836363, + 84, 84, 0.000816786632320443, "contGamma", "debCollin1", "contNormal", + "", "", 0.948896779885492, 0.0127439237395872, + 0.0640922410562779, -0.0362348781988512, 0.0386903894669334, + 16, 84, 0.00122775563404107, "contGamma", "debCollin1", "contNormal", + "", "", 0.948784287714149, 0.0191139399133825, + 0.0642335195990369, -0.0428925660695259, 0.0245150227302202, + 16, 16, -0.00918877166965289, "contGamma", "debCollin1", "contNormal", + "", "", 0.593098604772369, 0.017196129452237, + -0.534351157053981, -0.070702427752842, 0.0342253232307326, + 50, 16, -0.0182385522610547, "contGamma", "debCollin1", "contNormal", + "", "", 0.495642287347664, 0.0267677752783294, + -0.681362275027024, -0.118489553520426, 0.0622590783621678, + 50, 16, -0.0281152375791289, "contGamma", "debCollin1", "contNormal", + "", "", 0.542033923318861, 0.0461101921536098, + -0.609740195518309, -0.055428583255673, 0.0357702675014549, + 50, 50, -0.00982915787710905, "contGamma", "debCollin1", "contNormal", + "", "", 0.672675492834166, 0.0232654404561749, + -0.422478907958963, -0.060834330831383, 0.0230764538943614, + 84, 50, -0.0188789384685108, "contGamma", "debCollin1", "contNormal", + "", "", 0.377810534246169, 0.0214062057740912, + -0.881937633775376, -0.0999096143475594, 0.0423983667743893, + 50, 50, -0.028755623786585, "contGamma", "debCollin1", "contNormal", + "", "", 0.428311293039434, 0.0363037234980989, + -0.79208469588776, -0.0885835292915885, 0.0674239516796728, + 16, 84, -0.0105797888059578, "contGamma", "debCollin1", "contNormal", + "", "", 0.790367464850161, 0.0397985580862272, + -0.265833470223614, -0.0787629057548324, 0.0395037669601132, + 50, 84, -0.0196295693973596, "contGamma", "debCollin1", "contNormal", + "", "", 0.515292714697406, 0.0301706239624345, + -0.650618609074855, -0.0952580799125052, 0.0362455704816375, + 50, 84, -0.0295062547154338, "contGamma", "debCollin1", "contNormal", + "", "", 0.379109904711897, 0.0335474660329033, + -0.879537509226303)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.150615714976677, 0.120968180535856, -0.0148237672204106, "contGamma", + "", 0.83057822306458, "contNormal", 0.0692828790872569, + -0.213960034797935, -2.59462419128581, 2.41616283228818, -0.0892306794988119, + "debCollin1", "", 0.944348891594633, "contNormal", + 1.27828548460544, -0.0698049696827732, -2.701136461421, 0.664866115622196, + -1.0181351728994, "contcor1", "", 0.235746981556025, + "contNormal", 0.858689905425251, -1.18568433897588, -0.533052290973951, + 0.294764163462254, -0.119144063755849, "contcor2", "", + 0.572632738595359, "contNormal", 0.211181547458503, -0.564178382011621, + -0.593567511740079, 4.46386619385329, 1.93514934105661, "debCollin1:contcor1", + "", 0.133640245947353, "contNormal", 1.29018536704903, + 1.49990023951579, -0.146765909037933, 0.126517287157165, -0.0101243109403841, + "contGamma:contcor2", "", 0.884536066595712, "contNormal", + 0.0697163821250597, -0.145221404665301, -0.01996978477207, 0.000908059809752676, + -0.00953086248115864, "contGamma", "", 0.0735390170422328, + "debCollin1", 0.00532607862861369, -1.78947085571649, -0.033699418706373, + 0.0420651888059251, 0.00418288504977609, "contcor1", "", + 0.82866416632656, "debCollin1", 0.0193280611556946, 0.216415139422491, + -0.0310213934683782, 0.0494312426199297, 0.00920492457577573, + "contcor2", "", 0.653795668539982, "debCollin1", 0.0205240087886584, + 0.448495450891757, -0.0233913151137576, 0.0139844961696305, + -0.00470340947206356, "contGamma:contcor1", "", 0.621809349160168, + "debCollin1", 0.00953482094013046, -0.493287656013308, -0.0182406535464803, + 0.0175608072074518, -0.000339923169514234, "contGamma:contcor2", + "", 0.970310839801, "debCollin1", 0.00913319352710801, + -0.0372184349872054)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.175583318787221, 0.182947765814107, 16, 16, 0.00368222351344291, + "Total", 0.967886756140586, 0.0914636920446947, 0.0402588549743165, + -0.145027013954384, 0.133078325431393, 16, 16, -0.00597434426149542, + "Total", 0.932890186472795, 0.0709465432986109, -0.0842090958025913, + -0.23541819086064, 0.200831543074951, 16, 50, -0.0172933238928448, + "Total", 0.876514340964587, 0.111290242416869, -0.155389399081977, + -0.168504747158463, 0.193896599940236, 16, 16, 0.0126959263908862, + "Total", 0.890773142857793, 0.0924510220486893, 0.13732597119586, + -0.140069915828319, 0.146148633060214, 16, 84, 0.00303935861594783, + "Total", 0.96679703133281, 0.0730162776321883, 0.0416257677672679, + -0.230196523902267, 0.213637281871463, 16, 16, -0.00827962101540156, + "Total", 0.941706341299824, 0.11322499017192, -0.0731253851541946, + -0.169992289938383, 0.21505876487745, 50, 16, 0.0225332374695338, + "Total", 0.81856216202462, 0.0982291148850352, 0.22939469113517, + -0.145870233184637, 0.171623572573828, 16, 16, 0.0128766696945954, + "Total", 0.873683508356091, 0.0809948060940957, 0.15898142505133, + -0.231978910528286, 0.235094290654778, 50, 50, 0.00155769006324605, + "Total", 0.989569578051956, 0.119153516306238, 0.0130729676432092, + -0.177372576186404, 0.186012689720897, 16, 16, 0.00432005676724652, + "Total", 0.962830808252332, 0.0927020263570245, 0.0466015354465783, + -0.147615669735924, 0.136942647720541, 50, 84, -0.00533651100769181, + "Total", 0.94139789071064, 0.0725927414230631, -0.0735130111231255, + -0.236935434613153, 0.203624453335071, 16, 16, -0.0166554906390412, + "Total", 0.882189681960928, 0.112389791706201, -0.148193980842855, + -0.164936417103112, 0.191603936392492, 84, 16, 0.0133337596446898, + "Total", 0.883450938334563, 0.0909558431450652, 0.146595965510691, + -0.135816435588044, 0.143170819327547, 16, 16, 0.00367719186975143, + "Total", 0.958794338584095, 0.0711715258842017, 0.0516666156031886, + -0.227328841372169, 0.212045265848973, 84, 50, -0.00764178776159796, + "Total", 0.945644646797114, 0.112087291064241, -0.0681771116871599, + -0.160967028364136, 0.207309169810811, 16, 16, 0.0231710707233374, + "Total", 0.805192547526449, 0.0939497360869542, 0.246632632388575, + -0.13505526467616, 0.162084270572958, 84, 84, 0.013514502948399, + "Total", 0.858498217353421, 0.0758022947342187, 0.178286198271229, + -0.224627805646135, 0.229018852280234, 16, 16, 0.00219552331704966, + "Total", 0.984863954118282, 0.115728314781465, 0.0189713582297951, + -0.187064311965208, 0.197199702450324, 16, 16, 0.00506769524255835, + "Total", 0.95877074238926, 0.0980283355833468, 0.0516962285690308, + -0.160097510235545, 0.150919765170785, 16, 50, -0.00458887253237998, + "Total", 0.953879122352876, 0.0793425996241753, -0.05783617570027, + -0.245050377645982, 0.213234673318523, 16, 50, -0.0159078521637294, + "Total", 0.891768034570384, 0.116911600054746, -0.136067354790117, + -0.168732916390234, 0.196895712630237, 16, 50, 0.0140813981200016, + "Total", 0.880001296553903, 0.0932743233815784, 0.150967571883589, + -0.140958703252503, 0.149808363942629, 16, 84, 0.00442483034506327, + "Total", 0.952432311374851, 0.0741766352567358, 0.059652616079825, + -0.230464646309799, 0.216676347737226, 16, 50, -0.00689414928628612, + "Total", 0.951806329075497, 0.114068676152729, -0.0604385841828775, + -0.157958511756774, 0.205795930154073, 50, 16, 0.0239187091986492, + "Total", 0.79659580289079, 0.0927962056395157, 0.257755250161477, + -0.131623230998478, 0.1601475138459, 16, 50, 0.0142621414237109, + "Total", 0.848046702910326, 0.0744326801782657, 0.191611284042885, + -0.22222756115348, 0.228113884738203, 50, 50, 0.00294316179236149, + "Total", 0.979561789634354, 0.114885132952421, 0.0256182999203246, + -0.182946677693028, 0.172771534819967, 16, 50, -0.00508757143653051, + "Total", 0.955290984559445, 0.0907461094486569, -0.0560637967560361, + -0.14926556493802, 0.119777286515083, 50, 84, -0.0147441392114688, + "Total", 0.829907142374427, 0.068634641650377, -0.214820662815945, + -0.239310697672574, 0.187184459986937, 16, 50, -0.0260631188428182, + "Total", 0.810681614525745, 0.108801784375542, -0.239546795968514, + -0.182872477795903, 0.173450457893893, 84, 16, -0.0047110099510053, + "Total", 0.958667277546589, 0.090900378399916, -0.0518260763478808, + -0.148250087385077, 0.11951493193319, 16, 50, -0.0143675777259436, + "Total", 0.833407635400927, 0.0683086580749349, -0.210333186609849, + -0.237761670872024, 0.186388556157437, 84, 50, -0.025686557357293, + "Total", 0.812353456411059, 0.108203576794039, -0.237391019025058, + -0.183646187200203, 0.175046105301634, 16, 50, -0.00430004094928468, + "Total", 0.962519197882846, 0.0915048172647955, -0.0469925090046491, + -0.148282399535853, 0.120369182087407, 84, 84, -0.013956608724223, + "Total", 0.838632817180556, 0.0685348260841397, -0.203642578841429, + -0.236788379397781, 0.186237202686636, 16, 50, -0.0252755883555724, + "Total", 0.814818898130899, 0.107916672301427, -0.234213933922776, + -0.182921205883099, 0.172799355966514, 16, 16, -0.00506092495829228, + "Total", 0.955525200978777, 0.0907467087802356, -0.0557697907320088, + -0.149167035462485, 0.119732049996024, 16, 84, -0.0147174927332306, + "Total", 0.83012046343235, 0.0685979659778321, -0.214547071818232, + -0.239184408595944, 0.187111463866784, 16, 50, -0.02603647236458, + "Total", 0.810784763937061, 0.10875094538096, -0.239413756573545, + -0.182889750509627, 0.173521023564093, 16, 84, -0.00468436347276707, + "Total", 0.958910976817447, 0.0909227865626723, -0.0515202365640012, + -0.14820812455976, 0.11952626206435, 16, 84, -0.0143409312477054, + "Total", 0.833693337131727, 0.0683008434685445, -0.209967117819124, + -0.237670759910985, 0.186350938152876, 16, 84, -0.0256599108790548, + "Total", 0.812488728135691, 0.108170788190112, -0.237216639615836, + -0.183709502709535, 0.175162713767442, 50, 16, -0.00427339447104645, + "Total", 0.96276995088048, 0.0915507170814655, -0.0466778918535811, + -0.148302364733248, 0.120442440241279, 16, 84, -0.0139299622459848, + "Total", 0.838991787700343, 0.0685586079882977, -0.203183271287575, + -0.2367366070728, 0.186238723318132, 50, 50, -0.0252489418773342, + "Total", 0.814989005309215, 0.107903852756303, -0.233994813274722, + -0.182910167082601, 0.172850784691012, 16, 84, -0.00502969119579455, + "Total", 0.955804410705139, 0.0907570125216101, -0.0554193120294361, + -0.149076403674526, 0.119703885733061, 50, 84, -0.0146862589707329, + "Total", 0.830401716539186, 0.068567660305927, -0.214186380360763, + -0.239052030725894, 0.187041553521729, 16, 84, -0.0260052386020823, + "Total", 0.810919427408719, 0.108699340296198, -0.239240077549871, + -0.182928759370848, 0.173622499950309, 84, 16, -0.00465312971026933, + "Total", 0.959200772390743, 0.0909586252945432, -0.0511565527205531, + -0.148183940300997, 0.119564545330582, 16, 84, -0.0143096974852077, + "Total", 0.834058880927041, 0.0683044402202144, -0.20949878864497, + -0.237579966361633, 0.186322612128519, 84, 50, -0.0256286771165571, + "Total", 0.812661077955077, 0.108140399985368, -0.236994473111111, + -0.18380230285115, 0.175317981434053, 16, 84, -0.00424216070854871, + "Total", 0.963067376885293, 0.0916140008484591, -0.0463047205586597, + -0.148350643825111, 0.120553186858137, 84, 84, -0.013898728483487, + "Total", 0.839441590110109, 0.0685991765165907, -0.202607803610086, + -0.236691746662876, 0.186256330433203, 16, 84, -0.0252177081148364, + "Total", 0.815202039142923, 0.107896900257413, -0.233720413234058, + -0.196565226838247, 0.167247850813762, 16, 16, -0.0146586880122427, + "Total", 0.874503290545051, 0.0928111640116144, -0.157940999537602, + -0.161236432517307, 0.112605920942945, 50, 16, -0.024315255787181, + "Total", 0.72779380268884, 0.0698590269056689, -0.348061759005233, + -0.248196354545834, 0.176927883708773, 16, 50, -0.0356342354185304, + "Total", 0.742479721790479, 0.108452053611172, -0.328571329283337, + -0.210427437422011, 0.163010500214722, 50, 16, -0.0237084686036445, + "Total", 0.803465506172608, 0.0952665305542255, -0.248864616625769, + -0.172827212448814, 0.106097139691648, 16, 84, -0.0333650363785828, + "Total", 0.639138782726195, 0.0711554789630274, -0.468903264580924, + -0.255939202734074, 0.16657117071421, 50, 16, -0.0446840160099322, + "Total", 0.678460181806934, 0.107785239111788, -0.41456526309311, + -0.234709226853271, 0.167538919009834, 50, 16, -0.0335851539217186, + "Total", 0.743449328756865, 0.102616208521174, -0.327288977109194, + -0.197731202172083, 0.111247758778769, 50, 16, -0.043241721696657, + "Total", 0.583283148612896, 0.0788226118918608, -0.548595392347333, + -0.272906946274367, 0.163785543618354, 50, 50, -0.0545607013280064, + "Total", 0.624304540475622, 0.1114031924406, -0.48975886716261, + -0.199810574765598, 0.1692124263262, 50, 16, -0.0152990742196988, + "Total", 0.870901392618684, 0.0941402505358783, -0.162513633994081, + -0.165048745643741, 0.115137461654466, 50, 84, -0.0249556419946372, + "Total", 0.726983922428607, 0.071477386704113, -0.349140380550611, + -0.250686450148534, 0.178137206896561, 50, 16, -0.0362746216259865, + "Total", 0.740198400617047, 0.109395800236025, -0.331590623659435, + -0.208421973873704, 0.159724264251503, 84, 16, -0.0243488548111006, + "Total", 0.795434297637778, 0.0939165824038343, -0.259260443554072, + -0.169625489264679, 0.101614644092601, 50, 16, -0.0340054225860389, + "Total", 0.62311382958483, 0.069195183048461, -0.491442049690412, + -0.253850099720461, 0.163201295285684, 84, 50, -0.0453244022173883, + "Total", 0.670099987698654, 0.106392616980667, -0.426010784429001, + -0.227506189009519, 0.159055108751169, 50, 16, -0.0342255401291748, + "Total", 0.728542962793699, 0.0986143880218804, -0.347064366728929, + -0.187748991457733, 0.0999847756495064, 84, 84, -0.0438821079041131, + "Total", 0.549956098128273, 0.0734028199948689, -0.597825913325682, + -0.26595419417367, 0.155552019102745, 50, 16, -0.0552010875354625, + "Total", 0.60769975728024, 0.10752907109549, -0.513359661467192, + -0.21114668417473, 0.179047273877635, 16, 16, -0.0160497051485476, + "Total", 0.87190677105523, 0.0995411041045053, -0.161236961282823, + -0.1791843617541, 0.127771815907128, 50, 50, -0.0257062729234859, + "Total", 0.742702023249816, 0.0783065862644569, -0.328277277171434, + -0.260179199390167, 0.186128694280496, 16, 50, -0.0370252525548353, + "Total", 0.745034802424942, 0.113856146641235, -0.325193269288335, + -0.21386513711336, 0.163666165633461, 50, 50, -0.0250994857399494, + "Total", 0.794393801521585, 0.0963107755358617, -0.260609320195989, + -0.17636632550293, 0.106854218473155, 16, 84, -0.0347560535148877, + "Total", 0.630486022916825, 0.0722514664070596, -0.481042880418158, + -0.258300005481012, 0.166149939188537, 50, 50, -0.0460750331462371, + "Total", 0.670459584303316, 0.108280036780664, -0.425517339263268, + -0.226368132310712, 0.156415790194665, 50, 16, -0.0349761710580236, + "Total", 0.720211495289558, 0.0976507541783238, -0.358176148789924, + -0.185637215547678, 0.0963717378817539, 50, 50, -0.0446327388329619, + "Total", 0.534997351215341, 0.071942381506467, -0.620395626310338, + -0.264511685726872, 0.152608248798249, 50, 50, -0.0559517184643113, + "Total", 0.599018770920213, 0.106410101873124, -0.525812093771176, + -0.0233877762641554, 0.0416920559762207, 50, 50, 0.00915213985603269, + "Total indirect", 0.581457343272158, 0.0166023030917194, 0.551257244580567, + -0.031456896512803, 0.0677885819797549, 50, 84, 0.0181658427334759, + "Total indirect", 0.473064615950934, 0.0253181893329147, 0.717501654427538, + -0.0583990607922368, 0.114405368416484, 50, 50, 0.0280031538121235, + "Total indirect", 0.52527921887157, 0.0440835725992365, 0.635228774825036, + -0.034762066426559, 0.0543420126462316, 84, 16, 0.00978997310983629, + "Total indirect", 0.666695801927357, 0.0227310501049081, 0.430687234626369, + -0.0193925011214802, 0.0569998530960393, 50, 50, 0.0188036759872795, + "Total indirect", 0.334607538392583, 0.0194882035639667, 0.964874772862451, + -0.0373594931812233, 0.0946414673130776, 84, 50, 0.0286409870659272, + "Total indirect", 0.395031207147089, 0.033674333185586, 0.850528707074346, + -0.0665723111864504, 0.0876475343567466, 50, 50, 0.0105376115851481, + "Total indirect", 0.788820308661309, 0.0393425202604904, 0.267842820322075, + -0.0366476735782352, 0.0757503025034179, 84, 84, 0.0195513144625914, + "Total indirect", 0.495327140490114, 0.0286734799639774, 0.681860537582245, + -0.0305038447593649, 0.0892810958418428, 50, 50, 0.029388625541239, + "Total indirect", 0.336183049299454, 0.0305579443158283, 0.961734377073801, + -0.0113372430407418, 0.0121019328528603, 16, 16, 0.000382344906059265, + "Total indirect", 0.949015841995428, 0.00597949148006986, 0.0639427127429903, + -0.0224387918250349, 0.0239566046082039, 50, 84, 0.000758906391584476, + "Total indirect", 0.948874924549988, 0.0118357777997963, 0.0641196889990229, + -0.0346293856793069, 0.0369691364659171, 16, 50, 0.0011698753933051, + "Total indirect", 0.948931060050484, 0.0182652647472056, 0.0640491889658528, + -0.012181075062769, 0.012999057831364, 50, 84, 0.000408991384297495, + "Total indirect", 0.949233065366941, 0.00642362132486889, 0.0636699088587453, + -0.0231837551315697, 0.0247548608712151, 16, 84, 0.000785552869822706, + "Total indirect", 0.948783546344875, 0.0122294634954822, 0.064234450686484, + -0.0353357520416904, 0.037728795784777, 50, 84, 0.00119652187154333, + "Total indirect", 0.94881603855467, 0.0186392577625893, 0.0641936436945927, + -0.0133441186582696, 0.0142245689518601, 50, 16, 0.000440225146795232, + "Total indirect", 0.950089332678349, 0.00703295770422009, 0.0625945960873726, + -0.0241608449189954, 0.0257944181836363, 50, 84, 0.000816786632320443, + "Total indirect", 0.948896779885492, 0.0127439237395872, 0.0640922410562779, + -0.0362348781988512, 0.0386903894669334, 50, 50, 0.00122775563404107, + "Total indirect", 0.948784287714149, 0.0191139399133825, 0.0642335195990369, + -0.0428925660695259, 0.0245150227302202, 50, 84, -0.00918877166965289, + "Total indirect", 0.593098604772369, 0.017196129452237, -0.534351157053981, + -0.070702427752842, 0.0342253232307326, 50, 84, -0.0182385522610547, + "Total indirect", 0.495642287347664, 0.0267677752783294, -0.681362275027024, + -0.118489553520426, 0.0622590783621678, 50, 84, -0.0281152375791289, + "Total indirect", 0.542033923318861, 0.0461101921536098, -0.609740195518309, + -0.055428583255673, 0.0357702675014549, 84, 16, -0.00982915787710905, + "Total indirect", 0.672675492834166, 0.0232654404561749, -0.422478907958963, + -0.060834330831383, 0.0230764538943614, 50, 84, -0.0188789384685108, + "Total indirect", 0.377810534246169, 0.0214062057740912, -0.881937633775376, + -0.0999096143475594, 0.0423983667743893, 84, 50, -0.028755623786585, + "Total indirect", 0.428311293039434, 0.0363037234980989, -0.79208469588776, + -0.0885835292915885, 0.0674239516796728, 50, 84, -0.0105797888059578, + "Total indirect", 0.790367464850161, 0.0397985580862272, -0.265833470223614, + -0.0787629057548324, 0.0395037669601132, 84, 84, -0.0196295693973596, + "Total indirect", 0.515292714697406, 0.0301706239624345, -0.650618609074855, + -0.0952580799125052, 0.0362455704816375, 50, 84, -0.0295062547154338, + "Total indirect", 0.379109904711897, 0.0335474660329033, -0.879537509226303, + 16, 16, 84, 16, 16, 50, 84, 16, 16, 84, 84, 16, 50, 16, 84, + 16, 50, 50, 84, 16, 50, 84, 84, 16, 84, 16, 84, 16, 84, 50, + 84, 16, 84, 84, 84, 16, 16, 16, 84, 50, 16, 50, 84, 50, 16, + 84, 84, 50, 50, 16, 84, 50, 50, 50, 84, 50, 50, 84, 84, 50, + 84, 16, 84, 50, 84, 50, 84, 50, 84, 84, 84, 50, 16, 16, 84, + 84, 16, 50, 84, 84, 16, 84, 84, 84, 50, 16, 84, 84, 50, 50, + 84, 84, 50, 84, 84, 84, 84, 16, 84, 84, 84, 50, 84, 84, 84, + 84, 84, 84, 16, 16, 16, 16, 50, 16, 16, 50, 84, 50, 16, 50, + 16, 84, 16, 84, 50, 84, 16, 16, 84, 16, 16, 16, 16, 50, 16, + 50, 50, 50, 16, 84, 84, 84, 16, 84, 16, 16, 50, 16, 50, 16, + 50, 50, 84, 50, 50, 50, 16, 84, 50, 84, 50, 84, 50, 84, 50, + 16, 50, 50, 50, 84, 50, 16, 84, 50, 84, 84, 84, 16, 84, 50, + 84, 84, 84, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-62") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-62") +}) + + +context('Model number 62 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(753.030601947515, 820.765026783205, 604.190635168461, 13, 1, 100, + 9.79931707470255e-121, 0, 604.190635168461, 13)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 62)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.00962234808216831, 0.0896223395343577, 0.0399999957260947, + "facExperimexperimental", "", 0.114128799831793, "facGenderm", + 0.0253179875751176, 1.57990423241247, -0.163250753829678, 0.0341991623924257, + -0.0645257957186263, "contcor2", "", 0.200188100517751, + "facGenderm", 0.0503708021625815, -1.2810158454566, -0.170527235225315, + 0.0272978499588659, -0.0716146926332246, "contcor2", "", + 0.15588333497823, "facExperimexperimental", 0.0504665102891176, + -1.41905378879877, 0.759151500773236, 1.34137871743906, 1.05026510910615, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.148530080465346, 7.07105998876229, 0.00473838148034164, 0.0083724526397062, + 0.00655541706002392, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000927076004464789, 7.0710675591355, 0.0796446852077329, + 0.140727654634868, 0.1101861699213, "debCollin1:facExperimexperimental", + "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", + 0.0155826764953207, 7.07106830809122, 0.180704830096934, 0.319295265563631, + 0.250000047830282, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553525880784, 7.07106645896048, 0.180704832181605, + 0.319295272835152, 0.250000052508378, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353553539112786, 7.07106632663708, 0.721541742965493, 1.27492337344465, + 0.998232558205069, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.141171377342685, 7.07106905801393)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.143609726036934, 1.01999607066175, 16, 0.438193172312409, "", + "facGenderm", "contNormal", "", "", "", 0.139896945529473, + 0.296843668015601, 1.47617490122571, 0.0679149066844604, 0.889736776067091, + 50, 0.478825841375776, "", "facGenderm", "contNormal", "", "", + "", 0.0223771339420669, 0.209652288476997, 2.28390467308595, + -0.0768028391346652, 1.12970997169298, 84, 0.526453566279156, + "", "facGenderm", "contNormal", "", "", "", 0.0871857209199722, + 0.307789536018126, 1.71043360697016, -0.0350119520900529, 0.032854790002382, + 16, -0.00107858104383546, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.95032554812094, 0.0173132625465976, + -0.062297966136222, -0.0442355104520217, 0.0471717549225, 16, + 0.00146812223523914, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.949798949001359, 0.023318608427382, + 0.0629592559011882, -0.0209349799773271, 0.0196623707686141, + 50, -0.000636304604356486, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.951009444749171, 0.0103566573330347, + -0.0614391867853794, -0.0572625996961626, 0.0610833970455988, + 50, 0.00191039867471812, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.949545623835877, 0.030190860055404, + 0.0632773849838096, -0.00726247811548345, 0.0070267006520787, + 84, -0.000117888731702376, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.974200726580559, 0.00364526564780613, + -0.0323402306148322, -0.0728240678621754, 0.0776816969569199, + 84, 0.00242881454737223, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.949560613323843, 0.0383950332777198, + 0.0632585608092607, -0.0336650936809287, 0.0360667213459884, + 16, 0.00120081383252984, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.946181307863082, 0.017789055201257, + 0.067502957236593, -0.0485068167669886, 0.0452378153359033, + 16, -0.00163450071554265, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.945509744694463, 0.0239148864066732, + -0.068346580776004, -0.0201977414041362, 0.0216145721095908, + 50, 0.000708415352727319, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.947047954711696, 0.010666602509928, + 0.0664143387801275, -0.0627581186095957, 0.0585043202189054, + 50, -0.00212689919534517, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.945185342673567, 0.030934864054902, + -0.0687541148256036, -0.00766248492541775, 0.00792498243645171, + 84, 0.000131248755516983, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.973669510312677, 0.00397646780369982, + 0.0330063669558358, -0.0798155732900592, 0.0744074417049482, + 84, -0.00270406579255551, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.945204562320771, 0.0393433288089728, + -0.0687299695886131)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0658873024568868, 0.889216850823088, 0.477552076639988, "facGenderm", + "", 0.0229865625641743, "contNormal", 0.210036907530067, + 2.27365791210588, -3.57764001208729, 3.35301573616779, -0.112312137959751, + "debCollin1", "", 0.949350108553172, "contNormal", + 1.76805691403597, -0.0635229200305402, -3.45403497095483, 3.18283365296447, + -0.135600658995184, "facExperimexperimental", "", 0.936165914786509, + "contNormal", 1.69310984188232, -0.0800896998179571, -0.228514936315793, + 0.32118913495083, 0.0463370993175184, "contcor2", "", + 0.741075935092401, "contNormal", 0.14023320724325, 0.330428863665233, + -4.73029545761873, 5.20500009531333, 0.237352318847301, "debCollin1:facExperimexperimental", + "", 0.925390103105195, "contNormal", 2.53456074481481, + 0.0936463327355147, -0.369791554675067, 0.454993209242831, 0.0426008272838823, + "facGenderm:contcor2", "", 0.839551201701312, "contNormal", + 0.210408142808668, 0.202467579035765, -0.0402674684836221, 0.0518453660593447, + 0.00578894878786131, "facGenderm", "", 0.805409077026669, + "debCollin1", 0.0234986038696479, 0.24635288206797, -0.0489096644546161, + 0.0420350330627835, -0.0034373156959163, "facExperimexperimental", + "", 0.88221941827671, "debCollin1", 0.0232006042546597, + -0.148156300507817, -0.0174100459501837, 0.0258806747316682, + 0.00423531439074226, "contcor2", "", 0.701346742111183, + "debCollin1", 0.0110437541259236, 0.38350314054896, -0.0882812957838166, + 0.0429308407869176, -0.0226752274984495, "facGenderm:facExperimexperimental", + "", 0.49814177026691, "debCollin1", 0.0334730988951121, + -0.677416440273497, -0.03702207299039, 0.0287647402061374, -0.00412866639212634, + "facGenderm:contcor2", "", 0.805676127638846, "debCollin1", + 0.0167826586905283, -0.246007886370021)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.145650619157022, 1.01987980169417, 16, 0.437114591268573, 0, + "Total", 0.141532014368123, 0.297334652586667, 1.47010981554248, + 0.06607293221431, 0.889421588449571, 16, 0.47774726033194, 0, + "Total", 0.0229338747873435, 0.21004178207603, 2.27453440743998, + -0.0779232008295507, 1.12867317130019, 50, 0.525374985235321, + 0, "Total", 0.0878571658873182, 0.307810853068531, 1.70681111467616, + -0.143969883928324, 1.02329247302362, 16, 0.439661294547648, + 0, "Total", 0.139814832070589, 0.297776481139235, 1.47648092577892, + 0.0659882675695532, 0.894599659652477, 84, 0.480293963611015, + 0, "Total", 0.0230782997179666, 0.211384341400889, 2.27213596062984, + -0.0783009080237737, 1.13414428505256, 16, 0.527921688514395, + 0, "Total", 0.0878571565616171, 0.309302926645579, 1.70681116483364, + -0.144584421790643, 1.01969815720675, 16, 0.437556867708052, + 1, "Total", 0.140703989647098, 0.297016319733705, 1.4731744979547, + 0.0671530597926098, 0.889226013750229, 16, 0.478189536771419, + 0, "Total", 0.0225974310188941, 0.209716341841489, 2.2801729830518, + -0.07724223715556, 1.12887676050516, 50, 0.5258172616748, 1, + "Total", 0.0874650146021907, 0.307689071629487, 1.70892407354649, + -0.144747351975398, 1.02495449394965, 16, 0.440103570987127, + 0, "Total", 0.14024378782253, 0.298398811190285, 1.47488379471619, + 0.0644712981054624, 0.897001181995525, 84, 0.480736240050494, + 1, "Total", 0.0236034024091241, 0.212383975026315, 2.2635240723361, + -0.079394172398388, 1.13612210230614, 16, 0.528363964953874, + 0, "Total", 0.088395081995585, 0.310086380232586, 1.70392509518659, + -0.143768588706579, 1.01991915586799, 16, 0.438075283580706, + 0, "Total", 0.140031473314042, 0.296864573470123, 1.47567383490707, + 0.0678045320808933, 0.889611373207253, 50, 0.478707952644073, + 0, "Total", 0.0224077517060763, 0.209648454667705, 2.28338412225757, + -0.0768632861626811, 1.12953464125759, 50, 0.526335677547454, + 0, "Total", 0.0872264122023463, 0.307760228487917, 1.71021343509341, + -0.14608659200059, 1.02733056572015, 50, 0.440621986859781, + 0, "Total", 0.141035515936004, 0.299346612227701, 1.47194579414387, + 0.0621011265868796, 0.900408185259416, 84, 0.481254655923148, + 0, "Total", 0.0244267895281258, 0.213857771184827, 2.25034916083186, + -0.0810854280359775, 1.13885018968903, 50, 0.528882380826528, + 0, "Total", 0.0892404081526492, 0.311213784372496, 1.69941823718676, + -0.14414402958034, 1.02293200187022, 16, 0.439393986144939, + 1, "Total", 0.139992536098668, 0.297728948250147, 1.47581882355547, + 0.0653487324666047, 0.894704577950007, 50, 0.480026655208306, + 0, "Total", 0.023278483309932, 0.211574256472378, 2.26883300081915, + -0.0792258005632951, 1.13453456078667, 50, 0.527654380111686, + 1, "Total", 0.088362694292802, 0.309638434921241, 1.70409846001805, + -0.146188293138512, 1.01930563633224, 50, 0.436558671596866, + 0, "Total", 0.142026522537765, 0.297325343389987, 1.46828610914696, + 0.066744885226232, 0.887637796094234, 84, 0.477191340660233, + 1, "Total", 0.0226858463055224, 0.209415304909453, 2.27868417194513, + -0.0766798342832608, 1.12631796541049, 50, 0.524819065563614, + 0, "Total", 0.0872463997316955, 0.30689283302725, 1.71010531717765, + -0.143685226241222, 1.02148840157149, 16, 0.438901587665136, + 0, "Total", 0.139790435249752, 0.297243632281883, 1.47657187572286, + 0.0667359657995057, 0.8923325476575, 84, 0.479534256728503, + 0, "Total", 0.0227966195592113, 0.210615243027473, 2.27682597819357, + -0.0780035077933837, 1.13232747105715, 50, 0.527161981631884, + 0, "Total", 0.0877603331049921, 0.308763576371166, 1.70733215305869, + -0.147665257401281, 1.01979780363541, 84, 0.436066273117064, + 0, "Total", 0.143151250918244, 0.297827682101684, 1.464156286749, + 0.0653977909118116, 0.88800009344905, 84, 0.476698942180431, + 0, "Total", 0.0231105246667787, 0.209851382225852, 2.27160258428693, + -0.077321350684263, 1.12597468485189, 84, 0.524326667083811, + 0, "Total", 0.0876219812190531, 0.306968914997315, 1.70807740284842, + -0.143606409112368, 1.02025525124822, 16, 0.438324421067926, + 1, "Total", 0.139865405705265, 0.296908940557322, 1.47629242906986, + 0.0677204297016049, 0.89019375056098, 84, 0.478957090131293, + 0, "Total", 0.0224467956472671, 0.209818478131981, 2.2827212092827, + -0.0770089831140329, 1.13017861318338, 50, 0.526584815034673, + 1, "Total", 0.0872836810642053, 0.307961678331733, 1.70990370583525, + -0.149852639834006, 1.02083085287371, 84, 0.435489106519853, + 0, "Total", 0.144786539561113, 0.298649235889517, 1.45819595092137, + 0.0631712169822124, 0.889072334184228, 84, 0.47612177558322, + 1, "Total", 0.0238342889090408, 0.210692932042787, 2.25978997476066, + -0.0785186339710031, 1.1260176349442, 84, 0.523749500486601, + 0, "Total", 0.0882988361887596, 0.307285306877176, 1.70444042967517, + -0.0350119520900529, 0.032854790002382, 16, -0.00107858104383546, + 0, "Total indirect", 0.95032554812094, 0.0173132625465976, -0.062297966136222, + -0.0442355104520217, 0.0471717549225, 16, 0.00146812223523914, + 1, "Total indirect", 0.949798949001359, 0.023318608427382, 0.0629592559011882, + -0.0209349799773271, 0.0196623707686141, 50, -0.000636304604356486, + 0, "Total indirect", 0.951009444749171, 0.0103566573330347, + -0.0614391867853794, -0.0572625996961626, 0.0610833970455988, + 16, 0.00191039867471812, 1, "Total indirect", 0.949545623835877, + 0.030190860055404, 0.0632773849838096, -0.00726247811548345, + 0.0070267006520787, 84, -0.000117888731702376, 0, "Total indirect", + 0.974200726580559, 0.00364526564780613, -0.0323402306148322, + -0.0728240678621754, 0.0776816969569199, 16, 0.00242881454737223, + 1, "Total indirect", 0.949560613323843, 0.0383950332777198, + 0.0632585608092607, -0.0336650936809287, 0.0360667213459884, + 16, 0.00120081383252984, 1, "Total indirect", 0.946181307863082, + 0.017789055201257, 0.067502957236593, -0.0485068167669886, 0.0452378153359033, + 16, -0.00163450071554265, 1, "Total indirect", 0.945509744694463, + 0.0239148864066732, -0.068346580776004, -0.0201977414041362, + 0.0216145721095908, 50, 0.000708415352727319, 1, "Total indirect", + 0.947047954711696, 0.010666602509928, 0.0664143387801275, -0.0627581186095957, + 0.0585043202189054, 16, -0.00212689919534517, 1, "Total indirect", + 0.945185342673567, 0.030934864054902, -0.0687541148256036, -0.00766248492541775, + 0.00792498243645171, 84, 0.000131248755516983, 1, "Total indirect", + 0.973669510312677, 0.00397646780369982, 0.0330063669558358, + -0.0798155732900592, 0.0744074417049482, 16, -0.00270406579255551, + 1, "Total indirect", 0.945204562320771, 0.0393433288089728, + -0.0687299695886131, 16, 0, 50, 1, 50, 0, 50, 1, 84, 0, 50, + 1, 16, 1, 50, 1, 50, 1, 50, 1, 84, 1, 50, 1, 16, 0, 84, 1, 50, + 0, 84, 1, 84, 0, 84, 1, 16, 1, 84, 1, 50, 1, 84, 1, 84, 1, 84, + 1, 16, 0, 16, 0, 50, 1, 50, 0, 84, 0, 84, 0, 16, 1, 16, 0, 50, + 0, 50, 0, 84, 1, 84, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-62") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-62") +}) + + +context('Model number 63 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1201.55680928168, 1271.89640430336, 683.861328262155, 12, 1, 100, + 1.2539692175767e-138, 0, 683.861328262155, 12)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 63)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.54484814468573, 0.0642077462541877, -0.240320199215771, "contcor1", + "", 0.121931196982797, "contGamma", 0.15537425578839, + -1.54671826420892, -0.403933857861012, 0.194627045515016, -0.104653406172998, + "contcor2", "", 0.4931124434234, "contGamma", 0.152696913845713, + -0.685366871780662, 0.424978996785142, 0.896761729666764, 0.660870363225953, + "contcor2", "", 3.99639243919836e-08, "contcor1", 0.120354949530447, + 5.49101109513381, 0.751630347026985, 1.32809045545639, 1.03986040124169, + "contNormal", "", 1.53765888910584e-12, "contNormal", + 0.147058852350464, 7.07104934263692, 0.0046262136667813, 0.00817426031073514, + 0.00640023698875822, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000905130571770803, 7.07106486994109, 0.323891791967617, + 0.572298496220252, 0.448095144093934, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702216499985, + 7.07106796262792, 1.6804102078878, 2.96918874620304, 2.32479947704542, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776076622062, 7.07107250907993, 0.732634106928478, 1.29452225733479, + 1.01357818213164, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341447811904, 7.07107537703736, 0.721541147364327, + 1.27492129646048, 0.998231221912401, "contcor2", "", + 1.53743684450092e-12, "contcor2", 0.141170999431913, 7.07107852129252 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.209495521342191, 0.168873703407218, 16, 16, -0.0203109089674864, + "contGamma", "contNormal", "", "", "", 0.833338135533884, + 0.0965245350766486, -0.210422240846411, -0.218423955013282, + 0.292839614922516, 50, 16, 0.037207829954617, "contGamma", "contNormal", + "", "", "", 0.775431519032901, 0.130426776708291, 0.285277539579429, + -0.386804462843049, 0.586768908932984, 84, 16, 0.0999822230449677, + "contGamma", "contNormal", "", "", "", 0.68727087065035, + 0.248365117791821, 0.402561454417978, -0.347628486890036, 0.205316958359226, + 16, 50, -0.0711557642654047, "contGamma", "contNormal", "", + "", "", 0.613955175602509, 0.141060103555684, -0.504435786390272, + -0.1498069114761, 0.122532860789497, 50, 50, -0.0136370253433013, + "contGamma", "contNormal", "", "", "", 0.84438725975839, + 0.0694757083328516, -0.196284797529053, -0.258618165070521, + 0.35689290056462, 84, 50, 0.0491373677470493, "contGamma", "contNormal", + "", "", "", 0.75433006215943, 0.157021014286541, 0.312934978609809, + -0.62771438446542, 0.366206906630621, 16, 84, -0.1307537389174, + "contGamma", "contNormal", "", "", "", 0.606077990950662, + 0.253556008920563, -0.515679906282022, -0.367459600223237, 0.220989600232644, + 50, 84, -0.0732349999952962, "contGamma", "contNormal", "", + "", "", 0.625654909982392, 0.150117350394572, -0.487851669396, + -0.235995878141236, 0.215074664331345, 84, 84, -0.0104606069049456, + "contGamma", "contNormal", "", "", "", 0.927567622880191, + 0.115071130395907, -0.0909055717881225, -0.0248324277916171, + 0.0446235444929573, 16, 16, 0.00989555835067012, "contGamma", + "debCollin1", "contNormal", "", "", 0.576515630299489, + 0.0177186858616878, 0.558481505226455, -0.0328310532499913, + 0.0721138484555209, 16, 16, 0.0196413976027648, "contGamma", + "debCollin1", "contNormal", "", "", 0.463161866104849, + 0.0267721505428937, 0.733650349503893, -0.0615347453644733, + 0.122090230328897, 50, 16, 0.0302777424822118, "contGamma", + "debCollin1", "contNormal", "", "", 0.518050715906503, + 0.04684396681311, 0.646353085403905, -0.0372063110954764, 0.0583767250252676, + 16, 50, 0.0105852069648956, "contGamma", "debCollin1", "contNormal", + "", "", 0.664210865758981, 0.0243838756412594, + 0.4341068302934, -0.0193085705607925, 0.059970662994773, 84, + 50, 0.0203310462169903, "contGamma", "debCollin1", "contNormal", + "", "", 0.314771704669253, 0.0202246659073611, + 1.00525992914377, -0.0381767423858954, 0.10011152457877, 16, + 50, 0.0309673910964372, "contGamma", "debCollin1", "contNormal", + "", "", 0.380050295140454, 0.0352782673700807, + 0.877803628267202, -0.0717263811455089, 0.0945135431371664, + 16, 84, 0.0113935809958288, "contGamma", "debCollin1", "contNormal", + "", "", 0.788191341499414, 0.0424089232235782, + 0.268659992515307, -0.0384178353999347, 0.0806966758957816, + 16, 84, 0.0211394202479235, "contGamma", "debCollin1", "contNormal", + "", "", 0.486632295713173, 0.0303869132890391, + 0.695675143007984, -0.0303972870869372, 0.093948817341678, 50, + 84, 0.0317757651273704, "contGamma", "debCollin1", "contNormal", + "", "", 0.316483775791722, 0.0317215278978189, + 1.00170979247047, -0.0115359412589584, 0.0118568289697684, 16, + 16, 0.000160443855404977, "contGamma", "debCollin1", "contNormal", + "", "", 0.978550989369306, 0.00596765308272143, + 0.0268855868766102, -0.0228860292305621, 0.023522949643793, + 84, 16, 0.000318460206615452, "contGamma", "debCollin1", "contNormal", + "", "", 0.97854053261188, 0.011839242771914, + 0.0268986972182823, -0.0352863616564784, 0.0362681915976815, + 16, 16, 0.000490914970601548, "contGamma", "debCollin1", "contNormal", + "", "", 0.978544689643764, 0.0182540479872521, + 0.0268934852666315, -0.0123494065736099, 0.0126926578294811, + 16, 50, 0.000171625627935634, "contGamma", "debCollin1", "contNormal", + "", "", 0.978567248896813, 0.00638839912381544, + 0.0268652012201034, -0.0236820567970624, 0.0243413407553546, + 16, 50, 0.000329641979146108, "contGamma", "debCollin1", "contNormal", + "", "", 0.978533789838038, 0.0122510918392428, + 0.0269071510908273, -0.0360755895093079, 0.0370797829955723, + 50, 50, 0.000502096743132204, "contGamma", "debCollin1", "contNormal", + "", "", 0.978536184025274, 0.0186624277491628, + 0.026904149335808, -0.0133340195556873, 0.0137034843189799, + 16, 84, 0.000184732381646343, "contGamma", "debCollin1", "contNormal", + "", "", 0.978633043568742, 0.00689744915925384, + 0.0267827101557537, -0.0246333980715422, 0.0253188955372558, + 84, 84, 0.000342748732856817, "contGamma", "debCollin1", "contNormal", + "", "", 0.978542149714973, 0.0127431662017301, + 0.0268966697468235, -0.0370132164980007, 0.0380436234916866, + 16, 84, 0.000515203496842913, "contGamma", "debCollin1", "contNormal", + "", "", 0.978533844426238, 0.0191475048984895, + 0.0269070826498943, -0.0479965627562355, 0.0270681701261475, + 16, 16, -0.010464196315044, "contGamma", "debCollin1", "contNormal", + "", "", 0.584758730993657, 0.0191495184285232, + -0.546446969624968, -0.0783503760911381, 0.0368102359325494, + 50, 16, -0.0207700700792944, "contGamma", "debCollin1", "contNormal", + "", "", 0.479573892736552, 0.0293782469810822, + -0.706988068167205, -0.131959604559114, 0.0679243616586956, + 50, 16, -0.032017621450209, "contGamma", "debCollin1", "contNormal", + "", "", 0.530070672091814, 0.0509917446938996, + -0.627898136108283, -0.0624066458569105, 0.0400196961182862, + 50, 50, -0.0111934748693122, "contGamma", "debCollin1", "contNormal", + "", "", 0.668372928039545, 0.026129649009656, + -0.428382136521456, -0.0663388945431896, 0.0233401972760645, + 84, 50, -0.0214993486335626, "contGamma", "debCollin1", "contNormal", + "", "", 0.347345974508831, 0.0228777397254825, + -0.939749682072628, -0.109781348159417, 0.0442875481504626, + 50, 50, -0.0327469000044772, "contGamma", "debCollin1", "contNormal", + "", "", 0.404749200195869, 0.0393040120954149, + -0.833169395658144, -0.100396398953774, 0.0762997964081217, + 16, 84, -0.0120483012728264, "contGamma", "debCollin1", "contNormal", + "", "", 0.789248730455785, 0.0450763883305135, + -0.267286304849551, -0.0874733554117805, 0.042765005337627, + 50, 84, -0.0223541750370768, "contGamma", "debCollin1", "contNormal", + "", "", 0.501062876964615, 0.0332246821310777, + -0.67281832671522, -0.103899377944597, 0.0366959251286137, 50, + 84, -0.0336017264079914, "contGamma", "debCollin1", "contNormal", + "", "", 0.348837048214009, 0.035866807804176, + -0.936847421478059)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.148356154665181, 0.123840050220273, -0.0122580522224536, "contGamma", + "", 0.859877912008506, "contNormal", 0.0694390833281895, + -0.176529580099992, -2.5531937579234, 2.46857917583242, -0.0423072910454859, + "debCollin1", "", 0.973655051197332, "contNormal", + 1.28108806421111, -0.0330244986487628, -3.22919852808104, 0.713601026650623, + -1.25779875071521, "contcor1", "", 0.211116060962056, + "contNormal", 1.00583469539031, -1.25050244983558, -0.56188541238055, + 0.46545324723084, -0.0482160825748551, "contcor2", "", + 0.854033876127472, "contNormal", 0.262081004476334, -0.183973968930698, + -0.538502823243488, 4.83480539630545, 2.14815128653098, "debCollin1:contcor1", + "", 0.117087535338758, "contNormal", 1.37076708090886, + 1.56711619096272, -0.194607004259334, 0.312698323622266, 0.0590456596814661, + "contGamma:contcor1", "", 0.648214924051304, "contNormal", + 0.129417002527383, 0.456243449688712, -0.283643559703187, 0.177028220433071, + -0.053307669635058, "contGamma:contcor2", "", 0.650114400581896, + "contNormal", 0.117520470725477, -0.45360326848573, -0.019969797699979, + 0.000908048274278169, -0.00953087471285041, "contGamma", "", + 0.0735386667011897, "debCollin1", 0.00532607898383311, -1.78947303293485, + -0.0336994725845448, 0.042065139981301, 0.00418283369837812, + "contcor1", "", 0.828666248357344, "debCollin1", 0.0193280624448886, + 0.216412468156335, -0.0310213856470028, 0.0494312558073738, + 0.00920493508018552, "contcor2", "", 0.653795320831482, + "debCollin1", 0.0205240101575786, 0.448495932788581, -0.0233913119939642, + 0.0139845017824976, -0.00470340510573328, "contGamma:contcor1", + "", 0.621809695928992, "debCollin1", 0.00953482157613035, + -0.493287165174425, -0.0182406581071456, 0.0175608050348066, + -0.000339926536169458, "contGamma:contcor2", "", 0.970310547869826, + "debCollin1", 0.00913319413630801, -0.0372188011221745)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.199820620081751, 0.178989918848119, 16, 16, -0.0104153506168162, + "Total", 0.914171832523765, 0.09663711729345, -0.107777952287099, + -0.211758371637595, 0.305965148248169, 16, 16, 0.0471033883052871, + "Total", 0.721359921067618, 0.132074753406058, 0.356641879621535, + -0.380372717853357, 0.600128280644633, 16, 16, 0.109877781395638, + "Total", 0.660459765197446, 0.250132401980867, 0.439278480218818, + -0.336657004768462, 0.214136592938993, 50, 16, -0.0612602059147346, + "Total", 0.66285044765728, 0.140511152769144, -0.435981092656634, + -0.143479547292735, 0.135996613307472, 16, 16, -0.00374146699263122, + "Total", 0.958148020913076, 0.0712962490139308, -0.0524777536599459, + -0.253089540824423, 0.371155393019862, 16, 16, 0.0590329260977194, + "Total", 0.710864306323167, 0.159249082832197, 0.370695548431655, + -0.616420693937374, 0.374704332803915, 84, 50, -0.120858180566729, + "Total", 0.632651928876847, 0.252842663069107, -0.477997578018298, + -0.357887739122563, 0.231208855833311, 16, 16, -0.0633394416446261, + "Total", 0.673412524275878, 0.15028250508749, -0.421469163078909, + -0.230302324416694, 0.229172227308143, 16, 50, -0.000565048554275433, + "Total", 0.99615372110859, 0.117215049702217, -0.00482061438109636, + -0.191237530594799, 0.189898507865356, 16, 16, -0.000669511364721546, + "Total", 0.994505949411695, 0.0972303678706617, -0.00688582568783599, + -0.205839958293269, 0.319538413408032, 16, 50, 0.0568492275573818, + "Total", 0.67144859318162, 0.134027557609583, 0.424160736577632, + -0.374378567527628, 0.613625808823093, 16, 16, 0.119623620647732, + "Total", 0.635065540608938, 0.252046564157294, 0.474609209800929, + -0.326501912211148, 0.223473178885868, 50, 84, -0.0515143666626399, + "Total", 0.713494585389989, 0.14030234622553, -0.367166822569259, + -0.138411237090189, 0.150419981609116, 16, 16, 0.00600437225946346, + "Total", 0.935052688218849, 0.0736827872801667, 0.0814894832443407, + -0.248153378494008, 0.385710909193636, 16, 84, 0.0687787653498141, + "Total", 0.670588872851498, 0.161703044721098, 0.425339952432202, + -0.605657648434248, 0.383432965804978, 84, 16, -0.111112341314635, + "Total", 0.659679003481019, 0.252323670751362, -0.440356392183767, + -0.349069387242854, 0.241882182457791, 16, 84, -0.0535936023925314, + "Total", 0.722215326363772, 0.150755721626008, -0.355499624256287, + -0.225388747206086, 0.243750328601725, 16, 16, 0.00918079069781925, + "Total", 0.938853605210243, 0.11968053482317, 0.0767108094176217, + -0.191988160937887, 0.211921827967338, 16, 16, 0.00996683351472541, + "Total", 0.922942670604619, 0.103040155862867, 0.0967276634168721, + -0.206688953185012, 0.341660098058669, 16, 16, 0.0674855724368288, + "Total", 0.629502391883085, 0.139887532518196, 0.482427355905004, + -0.37179146857364, 0.632311399627999, 16, 16, 0.130259965527179, + "Total", 0.611086418450895, 0.256153397746559, 0.508523278133753, + -0.322586715866834, 0.240830672300448, 50, 16, -0.0408780217831929, + "Total", 0.776099784762736, 0.143731566654145, -0.284405317041844, + -0.145513279559763, 0.178794713837584, 16, 16, 0.0166407171389104, + "Total", 0.840591268883716, 0.0827331512097792, 0.201137233328826, + -0.248815681511131, 0.407645901969653, 16, 16, 0.0794151102292611, + "Total", 0.635349224311332, 0.167467766922981, 0.474211316532238, + -0.597932886462302, 0.396980893591927, 84, 50, -0.100475996435188, + "Total", 0.69219933880999, 0.253809199531722, -0.395872161531442, + -0.346091960871731, 0.260177445845562, 16, 16, -0.0429572575130844, + "Total", 0.781206773338444, 0.154663404914444, -0.27774674647081, + -0.22809211290579, 0.267726384060322, 16, 50, 0.0198171355772662, + "Total", 0.875501974784656, 0.126486634672133, 0.156673751567779, + -0.201752061038992, 0.18230065703381, 16, 16, -0.00972570200259076, + "Total", 0.92092567935463, 0.0979744324646168, -0.0992677554534768, + -0.213203458587404, 0.308789532426429, 50, 50, 0.0477930369195126, + "Total", 0.719667065240425, 0.133163924217804, 0.358903788696869, + -0.38093572947409, 0.602070589493817, 16, 16, 0.110567430009863, + "Total", 0.6592788570126, 0.250771526089698, 0.440909028763955, + -0.337691397067277, 0.216550282466259, 50, 84, -0.0605705573005091, + "Total", 0.668366378417006, 0.141390781643266, -0.428391134107532, + -0.146541495855883, 0.140437859099071, 50, 16, -0.00305181837840575, + "Total", 0.966749329020763, 0.0732103643787872, -0.0416856056420616, + -0.254288626802985, 0.373733776226875, 16, 84, 0.0597225747119449, + "Total", 0.709319300996886, 0.160212740637997, 0.372770445559565, + -0.616635487533856, 0.376298423628848, 84, 16, -0.120168531952504, + "Total", 0.635211718967852, 0.253304121656021, -0.474404171423982, + -0.358902938694056, 0.233603352633255, 50, 84, -0.0626497930304006, + "Total", 0.678521785268094, 0.151152341573857, -0.414481127967101, + -0.232053104622904, 0.232302304742804, 16, 16, 0.000124600059950035, + "Total", 0.999160760704989, 0.118460189327071, 0.00105183066697633, + -0.187212021739666, 0.187252296238674, 16, 16, 2.01372495039175e-05, + "Total", 0.999831807023951, 0.0955283670853309, 0.000210798636241001, + -0.202951648054941, 0.318029400398156, 50, 16, 0.0575388761716073, + "Total", 0.665065729622141, 0.132905770861743, 0.432929855479812, + -0.372645056191262, 0.613271594715178, 16, 16, 0.120313269261958, + "Total", 0.632396697738126, 0.251513971349276, 0.478356206681177, + -0.323424531261355, 0.221775095164526, 50, 16, -0.0508247180484144, + "Total", 0.714794647396785, 0.139084093056389, -0.365424376947323, + -0.133514287094285, 0.146902328841663, 50, 16, 0.00669402087368893, + "Total", 0.925446500970265, 0.0715361654978964, 0.0935753381118222, + -0.24575932761894, 0.384696155547019, 16, 16, 0.0694684139640396, + "Total", 0.665793970801647, 0.160833435751604, 0.431927687420226, + -0.603588221770312, 0.382742836369494, 84, 50, -0.110422692700409, + "Total", 0.660771979108205, 0.251619689422831, -0.438847583643786, + -0.34625205952326, 0.240444151966648, 50, 16, -0.052903953778306, + "Total", 0.72373588791515, 0.149670151114432, -0.353470303760552, + -0.222271938737169, 0.242012817361259, 16, 50, 0.00987043931204471, + "Total", 0.933584758407462, 0.118442165203199, 0.0833355190283036, + -0.181850578368725, 0.203163542626627, 16, 16, 0.0106564821289509, + "Total", 0.913601943722967, 0.0982196928189227, 0.108496390317542, + -0.199322092018696, 0.335672534120804, 50, 50, 0.0681752210510542, + "Total", 0.617411204817652, 0.136480728819374, 0.499522691890671, + -0.36760713121956, 0.62950635950237, 16, 16, 0.130949614141405, + "Total", 0.606693465229887, 0.254370360523723, 0.514799027181442, + -0.315116970135304, 0.234740223797369, 50, 84, -0.0401883731689675, + "Total", 0.774493185218704, 0.140272269865639, -0.286502622417547, + -0.133101868809123, 0.167762600315395, 50, 16, 0.0173303657531359, + "Total", 0.821360626631065, 0.0767525504289106, 0.225795307859998, + -0.242682222088551, 0.402891739775524, 16, 84, 0.0801047588434865, + "Total", 0.62668610553374, 0.164690261391607, 0.48639645214364, + -0.593379270029987, 0.393806574388062, 84, 16, -0.0997863478209624, + "Total", 0.691933382673184, 0.251837751153808, -0.396232683002393, + -0.33920406210426, 0.254668844306542, 50, 84, -0.042267608898859, + "Total", 0.780250715555691, 0.151500974276873, -0.278992323980791, + -0.220033541342413, 0.261047109725396, 16, 16, 0.0205067841914917, + "Total", 0.867297024769094, 0.122726911020435, 0.167092808097135, + -0.212405225009893, 0.194570569066578, 16, 16, -0.00891732797165758, + "Total", 0.931553602415045, 0.103822263390206, -0.0858903252584915, + -0.221178687538628, 0.318381509439519, 84, 50, 0.0486014109504458, + "Total", 0.724019968925711, 0.137645436659584, 0.353091334735955, + -0.384989179100954, 0.607740787182546, 16, 16, 0.111375804040796, + "Total", 0.66009474353584, 0.2532520939451, 0.439782361937511, + -0.344847840259073, 0.225323473719921, 50, 50, -0.0597621832695759, + "Total", 0.681171506280023, 0.145454538572248, -0.410865029418741, + -0.160976203185402, 0.156489314490457, 84, 16, -0.00224344434747257, + "Total", 0.977900555932647, 0.0809875896138874, -0.0277010880082776, + -0.260950848090595, 0.382012745576351, 16, 50, 0.0605309487428781, + "Total", 0.712100606126736, 0.164024338900756, 0.36903638294499, + -0.620251817949114, 0.381531502105972, 84, 50, -0.119360157921571, + "Total", 0.640463875895898, 0.255561665407381, -0.467050321226007, + -0.365663525855038, 0.241980687856103, 84, 50, -0.0618414189994674, + "Total", 0.689937020318638, 0.155014127428912, -0.398940535454275, + -0.241118968027052, 0.242984916208818, 16, 50, 0.000932974090883221, + "Total", 0.993972391545832, 0.123498158143318, 0.00755455874735005, + -0.191369177597876, 0.193026200158751, 16, 50, 0.000828511280437105, + "Total", 0.993258861494409, 0.0980618472555334, 0.00844886470757722, + -0.205978898068599, 0.32267339847368, 84, 50, 0.0583472502025405, + "Total", 0.665275104155161, 0.134862757864997, 0.432641680521976, + -0.374016337389662, 0.616259623975444, 16, 50, 0.121121643292891, + "Total", 0.631618309543841, 0.252626060778738, 0.479450310548029, + -0.325950029394922, 0.22591734135996, 50, 84, -0.0500163440174813, + "Total", 0.722389302910407, 0.140785079498384, -0.355267363528074, + -0.139521546625676, 0.15452633643492, 84, 50, 0.00750239490462211, + "Total", 0.920333365635177, 0.0750135934588614, 0.10001380494772, + -0.248261920258964, 0.38881549624891, 16, 84, 0.0702767879949728, + "Total", 0.665441967234685, 0.162522735502555, 0.432412042399249, + -0.604564947255682, 0.38533630991673, 84, 50, -0.109614318669476, + "Total", 0.664242161663477, 0.252530471217999, -0.434063731559946, + -0.348652363545773, 0.244461204051028, 84, 84, -0.0520955797473728, + "Total", 0.730618251586939, 0.151307261836239, -0.344303235120044, + -0.225802916166432, 0.247160542852388, 16, 50, 0.0106788133429779, + "Total", 0.92947438938651, 0.120656160712517, 0.0885061589886148, + -0.178408386653527, 0.201338098973295, 16, 16, 0.0114648561598841, + "Total", 0.905793651083001, 0.0968758835933245, 0.118345822867664, + -0.19686715570156, 0.334834345865535, 84, 50, 0.0689835950819874, + "Total", 0.611049322019249, 0.135640630583288, 0.508576189784291, + -0.36605859187525, 0.629574568219927, 16, 16, 0.131757988172338, + "Total", 0.603937105960593, 0.253992718220489, 0.518747108560648, + -0.312369529590633, 0.233609531314565, 50, 50, -0.0393799991380343, + "Total", 0.777380868564367, 0.139282932036459, -0.282733846583056, + -0.129158024266816, 0.165435503834955, 84, 16, 0.0181387397840691, + "Total", 0.809277533764764, 0.0751527911802174, 0.241358165135505, + -0.240643431972896, 0.402469697721736, 16, 50, 0.0809131328744197, + "Total", 0.621881981348036, 0.164062486547566, 0.493184850340306, + -0.591427634440266, 0.393471686860207, 84, 50, -0.0989779737900292, + "Total", 0.693628868985523, 0.25125444372173, -0.393935216921574, + -0.336709775696402, 0.25379130596055, 84, 50, -0.0414592348679258, + "Total", 0.78314786414886, 0.15064079909497, -0.275219164509265, + -0.217435721687953, 0.260066038132803, 16, 50, 0.0213151582224249, + "Total", 0.861094317125544, 0.121813911782877, 0.174981312975297, + -0.209232433393992, 0.168931503169829, 16, 50, -0.0201504651120814, + "Total", 0.834547101670829, 0.0964721646792312, -0.208873359264628, + -0.217265146682892, 0.292001694302936, 16, 50, 0.037368273810022, + "Total", 0.773629196214955, 0.129917397718239, 0.287631021451532, + -0.385592078245835, 0.58587741204658, 16, 50, 0.100142666900373, + "Total", 0.686153400145873, 0.247828403469462, 0.404080668310936, + -0.347495838688992, 0.205505197868993, 50, 84, -0.0709953204099997, + "Total", 0.614790078149181, 0.141074285272583, -0.503247776678952, + -0.147964515216345, 0.121011352240552, 16, 50, -0.0134765814878964, + "Total", 0.844296024513682, 0.0686175535822456, -0.19640136939221, + -0.256879637187165, 0.355475260392074, 16, 84, 0.0492978116024543, + "Total", 0.752325148391797, 0.156215854579323, 0.315574957069559, + -0.627633314352929, 0.36644672422894, 84, 50, -0.130593295061995, + "Total", 0.606577560276795, 0.253596506472324, -0.514964882121697, + -0.366632743061277, 0.220483630781495, 16, 84, -0.0730745561398912, + "Total", 0.625629219351425, 0.149777337357694, -0.487887937047356, + -0.233819397209091, 0.21321907111001, 16, 50, -0.0103001630495406, + "Total", 0.928034024573819, 0.114042521149696, -0.0903186192807881, + -0.209678132678755, 0.169693235157013, 16, 16, -0.0199924487608709, + "Total", 0.836341129981695, 0.0967801885208609, -0.206575840225415, + -0.216645626393176, 0.291698206715641, 16, 50, 0.0375262901612325, + "Total", 0.772296896178146, 0.129681932198389, 0.289371769259454, + -0.38467106181217, 0.585272428315337, 16, 16, 0.100300683251583, + "Total", 0.685216575897128, 0.24743911055976, 0.405355010469775, + -0.34784737905152, 0.206172770933941, 50, 50, -0.0708373040587893, + "Total", 0.616227541466016, 0.141334267964999, -0.501204025596482, + -0.147130245256398, 0.120493114983026, 16, 16, -0.0133185651366859, + "Total", 0.845330755690066, 0.0682725198907742, -0.195079442768387, + -0.255597213500021, 0.35450886940735, 16, 50, 0.0494558279536648, + "Total", 0.750672000127339, 0.155642166825465, 0.317753401680175, + -0.627821840604118, 0.36695128318255, 84, 50, -0.130435278710784, + "Total", 0.607263579196843, 0.253773317171466, -0.513983424910876, + -0.366272188554639, 0.220439108977277, 16, 50, -0.0729165397886808, + "Total", 0.626138538552605, 0.149673999665254, -0.487169047074032, + -0.232259552879179, 0.211975259482519, 16, 50, -0.0101421466983301, + "Total", 0.928689081665237, 0.113327289650668, -0.0894943021190508, + -0.210957231869185, 0.171317243875415, 16, 50, -0.0198199939968848, + "Total", 0.838948503956068, 0.097520790881856, -0.203238651139491, + -0.216565516656919, 0.291963006507356, 16, 50, 0.0376987449252186, + "Total", 0.771360304750349, 0.129729047874217, 0.290596019495732, + -0.383977573745474, 0.584923849776612, 16, 50, 0.100473138015569, + "Total", 0.684383570417306, 0.247173272357211, 0.406488683251994, + -0.348775656293817, 0.20744595770421, 50, 84, -0.0706648492948032, + "Total", 0.618480550584051, 0.141895876247072, -0.498004953799786, + -0.147350326377772, 0.121058105632373, 16, 50, -0.0131461103726998, + "Total", 0.847749831725956, 0.068472796981811, -0.19199026404883, + -0.254691468563548, 0.35394803399885, 16, 84, 0.0496282827176509, + "Total", 0.749249017487755, 0.155268032311632, 0.31962975236296, + -0.628331809389757, 0.367806161496161, 84, 50, -0.130262823946798, + "Total", 0.608230757746365, 0.254121498849807, -0.512600565227214, + -0.366395282035562, 0.220907111986173, 16, 84, -0.0727440850246947, + "Total", 0.627302077120606, 0.149824792356977, -0.485527687910105, + -0.231233285944199, 0.211293902075511, 16, 50, -0.00996969193434401, + "Total", 0.929628677843013, 0.112891663191342, -0.0883120298922893, + -0.209241692785773, 0.168963126106672, 16, 16, -0.0201392833395507, + "Total", 0.83465520428628, 0.0964825940363387, -0.208734886750304, + -0.217204738131113, 0.291963649296218, 50, 84, 0.0373794555825526, + "Total", 0.773520718277998, 0.129892281553025, 0.28777272317981, + -0.385518243389794, 0.585825940735601, 16, 16, 0.100153848672903, + "Total", 0.686081888668963, 0.247796437023138, 0.404177920700093, + -0.34750546562896, 0.205537188354022, 50, 84, -0.0709841386374691, + "Total", 0.614872418262541, 0.141084902157721, -0.503130650777322, + -0.147874158057378, 0.120943358626647, 50, 16, -0.0134653997153657, + "Total", 0.844333091366985, 0.0685771572346286, -0.196354008511835, + -0.256775219967037, 0.355393206717007, 16, 84, 0.049308993374985, + "Total", 0.752197825391388, 0.156168284599296, 0.315742684255668, + -0.627638162283285, 0.366473935704357, 84, 50, -0.130582113289464, + "Total", 0.606619977329504, 0.253604685042448, -0.514904183523295, + -0.366592838818712, 0.220466090083991, 50, 84, -0.0730633743673606, + "Total", 0.625648290133935, 0.149762682766967, -0.487861014623039, + -0.233690393405914, 0.213112430851895, 16, 50, -0.0102889812770099, + "Total", 0.928074127421863, 0.113982406764138, -0.0902681525079636, + -0.209735138458283, 0.169772604481603, 16, 84, -0.0199812669883402, + "Total", 0.836489318772887, 0.0968149787275161, -0.206386111436094, + -0.216620822338306, 0.291695766205832, 50, 50, 0.0375374719337631, + "Total", 0.77221904996457, 0.129674981926626, 0.289473508120502, + -0.384615835155943, 0.585239565204171, 16, 84, 0.100311865024114, + "Total", 0.685156302181808, 0.247416638267389, 0.405437022047419, + -0.347889710376596, 0.206237465804079, 50, 84, -0.0708261222862586, + "Total", 0.616351332343768, 0.14136157106752, -0.501028120665336, + -0.147107302132384, 0.120492535404074, 50, 84, -0.0133073833641552, + "Total", 0.845445560025411, 0.068266519090976, -0.194932794894977, + -0.255522196862266, 0.354456216314657, 16, 84, 0.0494670097261954, + "Total", 0.750567038682997, 0.155609597418206, 0.31789176597669, + -0.627844914297275, 0.366996720420768, 84, 84, -0.130424096938253, + "Total", 0.607319131860796, 0.253790794771034, -0.513903969826487, + -0.366263188286373, 0.220452472254072, 50, 84, -0.0729053580161501, + "Total", 0.626194044368868, 0.149675112698086, -0.487090717367352, + -0.232170663078755, 0.211908733227156, 16, 84, -0.0101309649257994, + "Total", 0.928742629895394, 0.113287641969126, -0.0894269202686769, + -0.211065490582367, 0.171447866133659, 16, 16, -0.0198088122243541, + "Total", 0.83913726834557, 0.0975817310249684, -0.202997139078068, + -0.216579653035491, 0.29199950643099, 50, 84, 0.0377099266977492, + "Total", 0.771316513452999, 0.129741965535614, 0.290653271222393, + -0.383942736927533, 0.584911376503732, 16, 16, 0.1004843197881, + "Total", 0.684335754884708, 0.247161203234718, 0.406553773298612, + -0.348853364553576, 0.207546029509031, 50, 84, -0.0706536675222725, + "Total", 0.618648239640165, 0.141941229137733, -0.497767054375116, + -0.147401172980924, 0.121131315780586, 50, 16, -0.0131349286001691, + "Total", 0.847947171110273, 0.0685044446937956, -0.191738341342379, + -0.254648835179422, 0.353927764159785, 16, 84, 0.0496394644901815, + "Total", 0.749169366968134, 0.155251985276153, 0.319734813064617, + -0.628374711416073, 0.367871427067539, 84, 50, -0.130251642174267, + "Total", 0.608300481748439, 0.254149093131781, -0.512500912630562, + -0.366419991297457, 0.220954184793129, 50, 84, -0.072732903252164, + "Total", 0.627397079762132, 0.149843104445724, -0.485393729135591, + -0.231188851033398, 0.211271830709771, 16, 50, -0.00995851016181335, + "Total", 0.929696861741233, 0.112874696992711, -0.0882262404873295, + -0.209259341742006, 0.169006988570326, 16, 84, -0.02012617658584, + "Total", 0.834787742057404, 0.0964982860134291, -0.208565119830617, + -0.217138969475836, 0.291924094148362, 84, 50, 0.0373925623362634, + "Total", 0.773397881634843, 0.129865412742179, 0.287933188265444, + -0.385434335108324, 0.585768245961552, 16, 84, 0.100166955426614, + "Total", 0.685999660893948, 0.247760313130904, 0.404289751497412, + -0.347521397236599, 0.205579333469083, 50, 84, -0.0709710318837584, + "Total", 0.614974866784852, 0.141099717920449, -0.502984931010077, + -0.147777758562374, 0.120873172639064, 84, 84, -0.013452292961655, + "Total", 0.844387475949345, 0.0685346601571567, -0.196284521303638, + -0.256656992964078, 0.355301193221469, 16, 84, 0.0493221001286957, + "Total", 0.752051758208067, 0.156114650833534, 0.315935114772078, + -0.627646430806893, 0.366508417735386, 84, 84, -0.130569006535753, + "Total", 0.606671566618344, 0.253615590996581, -0.514830362055752, + -0.366550442185887, 0.220449906958587, 84, 84, -0.0730502676136499, + "Total", 0.625675802883508, 0.149747738676491, -0.487822175208034, + -0.233544860898228, 0.212993111851629, 16, 84, -0.0102758745232992, + "Total", 0.928123011806308, 0.113914841362416, -0.0902066350652845, + -0.209808699809239, 0.16987237933998, 16, 16, -0.0199681602346295, + "Total", 0.836668609529333, 0.0968591979608032, -0.206156572168915, + -0.216596806444832, 0.29169796381978, 84, 84, 0.0375505786874738, + "Total", 0.772132204495442, 0.129669415936715, 0.289587011834774, + -0.384553747684149, 0.585203691239798, 16, 16, 0.100324971777824, + "Total", 0.685087267487278, 0.247391647645893, 0.405530957623217, + -0.3479439556415, 0.206317924576404, 50, 84, -0.0708130155325479, + "Total", 0.616502271943086, 0.141395934973768, -0.500813658792138, + -0.14709001823445, 0.120501465013561, 84, 16, -0.0132942766104445, + "Total", 0.845591108853572, 0.0682643878557817, -0.194746880885105, + -0.255438465624654, 0.354398698584466, 16, 84, 0.0494801164799061, + "Total", 0.750447280592855, 0.155573563856132, 0.318049643226425, + -0.627874541859763, 0.367052561490677, 84, 50, -0.130410990184543, + "Total", 0.607386105716468, 0.25381259839423, -0.513808183713497, + -0.366257021434683, 0.220472518909804, 84, 84, -0.0728922512624394, + "Total", 0.626264263393169, 0.149678653529487, -0.486991628689921, + -0.23207222896951, 0.211836512625333, 16, 50, -0.0101178581720887, + "Total", 0.928807286946941, 0.113244106804089, -0.0893455602912081, + -0.211199009228284, 0.171607598286997, 16, 84, -0.0197957054706434, + "Total", 0.839363723723433, 0.0976565412769854, -0.202707419408767, + -0.216601275508303, 0.292047342411222, 84, 50, 0.0377230334514599, + "Total", 0.771269612878848, 0.129759684854334, 0.290714589002024, + -0.383904555708455, 0.584899408792076, 16, 84, 0.100497426541811, + "Total", 0.684281339268033, 0.247148409905063, 0.406627849964378, + -0.348949034396549, 0.207667912859426, 50, 84, -0.0706405607685618, + "Total", 0.618850462589023, 0.141996728421159, -0.497480199396167, + -0.147470307283019, 0.121226663590102, 84, 84, -0.0131218218464584, + "Total", 0.848188906606786, 0.0685464051871789, -0.191429759308702, + -0.254603084147534, 0.353908226635318, 16, 84, 0.0496525712438922, + "Total", 0.749079351461313, 0.155235329726136, 0.319853549649353, + -0.62842757259293, 0.367950501751816, 84, 84, -0.130238535420557, + "Total", 0.608384046247746, 0.254182750857681, -0.512381485293933, + -0.366453326124433, 0.221013733127527, 84, 84, -0.0727197964984533, + "Total", 0.627513538114059, 0.149866799565152, -0.485229528551051, + -0.231142572980937, 0.211251766164732, 16, 84, -0.00994540340810264, + "Total", 0.929778649101904, 0.112857772549705, -0.0881233359777901, + -0.225857763688735, 0.164307553123675, 16, 16, -0.0307751052825303, + "Total", 0.757175086571183, 0.0995337975314812, -0.309192515967218, + -0.228025584027238, 0.281512851306384, 16, 16, 0.026743633639573, + "Total", 0.83699296919905, 0.129986683263773, 0.20574133417424, + -0.393769696836636, 0.572805750296484, 16, 16, 0.0895180267299237, + "Total", 0.716576034777184, 0.246579900130141, 0.363038620271472, + -0.36367693071552, 0.200437009554622, 50, 16, -0.0816199605804487, + "Total", 0.570603670368641, 0.143909261782309, -0.567162666041017, + -0.161776653994473, 0.113574210677782, 16, 16, -0.0241012216583453, + "Total", 0.731517299271446, 0.0702438582658119, -0.343107885206749, + -0.264924845964306, 0.342271188828317, 16, 16, 0.0386731714320054, + "Total", 0.802845856076218, 0.154899793971243, 0.249665738349432, + -0.642304915052843, 0.359869044587956, 84, 50, -0.141217935232444, + "Total", 0.580699457008842, 0.255661320194101, -0.552363318491939, + -0.380312938801372, 0.212914546180692, 16, 16, -0.0836991963103402, + "Total", 0.5802172148975, 0.151336322927709, -0.553067463852166, + -0.243014327589096, 0.201164721149117, 16, 50, -0.0209248032199895, + "Total", 0.853492864168805, 0.113313063975114, -0.18466364323698, + -0.24309292569742, 0.160930967603858, 16, 16, -0.0410809790467807, + "Total", 0.690205189862252, 0.103069213640701, -0.398576622404327, + -0.238499894968368, 0.271375414719013, 16, 50, 0.0164377598753227, + "Total", 0.899436111419659, 0.130072622178064, 0.126373710317149, + -0.401145601745095, 0.559569907676441, 16, 16, 0.0792121529656733, + "Total", 0.746541667414496, 0.245084990591546, 0.323202790895044, + -0.3802786746031, 0.196427005913702, 50, 84, -0.0919258343446991, + "Total", 0.532083049894918, 0.147121499442281, -0.624829373634567, + -0.175403625025787, 0.106589434180595, 16, 16, -0.0344070954225957, + "Total", 0.632446650936721, 0.0719383267832235, -0.478286011937376, + -0.271945785683863, 0.328680381019373, 16, 84, 0.028367297667755, + "Total", 0.853122055547413, 0.153223776416531, 0.185136395481077, + -0.657155669172946, 0.354108051179559, 84, 16, -0.151523808996694, + "Total", 0.556970877612045, 0.257980179311769, -0.587346707801057, + -0.393820679278309, 0.205810539129128, 16, 84, -0.0940050700745906, + "Total", 0.538863248315748, 0.1529699584118, -0.614532886395417, + -0.251058198682815, 0.188596844714335, 16, 16, -0.0312306769842399, + "Total", 0.780666841851353, 0.112158959773009, -0.27845013048842, + -0.272336925442622, 0.167679864607231, 16, 16, -0.0523285304176954, + "Total", 0.641091474082912, 0.112251243778113, -0.466173279301326, + -0.258777157514661, 0.269157574523477, 16, 16, 0.005190208504408, + "Total", 0.969259195304997, 0.134679702331885, 0.0385374218575121, + -0.413962777293512, 0.54989198048303, 16, 16, 0.0679646015947587, + "Total", 0.782235368775926, 0.245885833969222, 0.276407145941014, + -0.40592508514882, 0.199578313717593, 50, 16, -0.103173385715614, + "Total", 0.50418001060567, 0.15446799115763, -0.66792728346113, + -0.205285306626551, 0.11397601303953, 16, 16, -0.0456546467935103, + "Total", 0.57510222181288, 0.0814457107845791, -0.560553113892826, + -0.287206949502672, 0.321446442096352, 16, 16, 0.0171197462968403, + "Total", 0.912205720745211, 0.155271575498327, 0.110256795179004, + -0.677794590910212, 0.352251870174995, 84, 50, -0.162771360367609, + "Total", 0.535626518925431, 0.262771782851645, -0.619440027392537, + -0.416002431854811, 0.205497188963801, 16, 16, -0.105252621445505, + "Total", 0.506786143981789, 0.158548735007613, -0.663850275692527, + -0.270129382511827, 0.185172925801517, 16, 50, -0.0424782283551546, + "Total", 0.714576585455314, 0.116150682335163, -0.365716563184536, + -0.22982516624162, 0.166816398568023, 16, 16, -0.0315043838367985, + "Total", 0.755533479153044, 0.101185931970766, -0.311351422309383, + -0.230875908194631, 0.28290461836524, 50, 50, 0.0260143550853048, + "Total", 0.842670689641533, 0.13106886927834, 0.198478519182616, + -0.395407910839017, 0.572985407190328, 16, 16, 0.0887887481756555, + "Total", 0.719292060012019, 0.247043651227244, 0.359405100007945, + -0.366759927235742, 0.202061448966308, 50, 84, -0.0823492391347169, + "Total", 0.570378162881783, 0.145110160362343, -0.567494646336886, + -0.166602125539787, 0.11694112511456, 50, 16, -0.0248305002126135, + "Total", 0.731390358472617, 0.072333791052004, -0.343276632559764, + -0.267196325709206, 0.34308411146468, 16, 84, 0.0379438928777372, + "Total", 0.807447963346747, 0.155686645771989, 0.243719637542374, + -0.644432149978831, 0.360537722405407, 84, 16, -0.141947213786712, + "Total", 0.579803903521928, 0.256374576347145, -0.553671178356263, + -0.383082163881924, 0.214225214152707, 50, 84, -0.0844284748646084, + "Total", 0.579526997923665, 0.152377131096825, -0.554075760954969, + -0.246002467810258, 0.202694304261743, 16, 16, -0.0216540817742577, + "Total", 0.849955261101492, 0.114465565594895, -0.189175510221945, + -0.240716513403737, 0.157095998201639, 16, 16, -0.0418102576010489, + "Total", 0.680349661200222, 0.101484648377029, -0.41198603207175, + -0.236401502296634, 0.267818464938743, 50, 16, 0.0157084813210545, + "Total", 0.902802768782195, 0.128629906266799, 0.122121532829796, + -0.400165155195558, 0.557130904018368, 16, 16, 0.0784828744114051, + "Total", 0.747929239193161, 0.244212665835943, 0.321371023663975, + -0.37894456166445, 0.193634335866515, 50, 16, -0.0926551128989673, + "Total", 0.525868448851601, 0.14606872933569, -0.634325452958725, + -0.171171933019885, 0.100899185066157, 50, 16, -0.0351363739768639, + "Total", 0.612691345259716, 0.0694071728440176, -0.506235487444903, + -0.270032482867323, 0.325308521094296, 16, 16, 0.0276380191134868, + "Total", 0.85559988704476, 0.151875495840126, 0.181978132552603, + -0.656780104334801, 0.352273929232877, 84, 50, -0.152253087550962, + "Total", 0.554208240804486, 0.257416473345166, -0.591465983401958, + -0.392366161673679, 0.202897464415961, 50, 16, -0.0947343486288588, + "Total", 0.532729840230711, 0.15185575622435, -0.623844304518159, + -0.248324378823933, 0.184404467746917, 16, 50, -0.0319599555385081, + "Total", 0.772188661491219, 0.110392040359966, -0.289513224271363, + -0.263793137920717, 0.15767751997679, 16, 16, -0.0530578089719636, + "Total", 0.621681095703285, 0.107520000679098, -0.493469202351654, + -0.251460580055149, 0.260382439955429, 50, 50, 0.0044609299501398, + "Total", 0.972746499579265, 0.130574598321176, 0.0341638420297277, + -0.410116931836145, 0.544587577917126, 16, 16, 0.0672353230404905, + "Total", 0.782500457054959, 0.243551544131387, 0.276061986304712, + -0.400084521372715, 0.192279192832951, 50, 84, -0.103902664269882, + "Total", 0.491724200223122, 0.1511159691908, -0.687569055912903, + -0.192529101458956, 0.0997612507633991, 50, 16, -0.0463839253477785, + "Total", 0.533903518478389, 0.0745652355165463, -0.622058322842496, + -0.280738006947134, 0.313518942432278, 16, 84, 0.0163904677425721, + "Total", 0.913902650443241, 0.151598946222185, 0.108117293365286, + -0.674757593511126, 0.347756315667373, 84, 16, -0.163500638921877, + "Total", 0.530790978775148, 0.260850178177752, -0.626799031014892, + -0.410139021010282, 0.198175221010735, 50, 84, -0.105981899999773, + "Total", 0.494645499012011, 0.155185056159022, -0.682938825573328, + -0.26130217748666, 0.174887163667814, 16, 16, -0.0432075069094228, + "Total", 0.69779744082399, 0.111274835812056, -0.388295400250247, + -0.243507973224881, 0.178789552744256, 16, 16, -0.0323592102403127, + "Total", 0.763894464976782, 0.107730940287721, -0.300370628473953, + -0.241344062979908, 0.291663120343489, 84, 50, 0.0251595286817906, + "Total", 0.853203708421846, 0.135973718784551, 0.18503229084773, + -0.401184313145395, 0.577052156689677, 16, 16, 0.0879339217721413, + "Total", 0.724565814934031, 0.249554705482161, 0.352363308887506, + -0.37682244291352, 0.210414311837057, 50, 50, -0.0832040655382311, + "Total", 0.578618006579669, 0.149808047337254, -0.555404512755706, + -0.184431650663663, 0.133060997431408, 84, 16, -0.0256853266161277, + "Total", 0.751149295613596, 0.0809945107663745, -0.317124288709096, + -0.275913235078511, 0.350091368026957, 16, 50, 0.0370890664742229, + "Total", 0.816347690956019, 0.159697986300594, 0.232245047876882, + -0.650635730827443, 0.365031650446991, 84, 50, -0.142802040190226, + "Total", 0.581538522858597, 0.25910358284282, -0.551138809519489, + -0.392491474717605, 0.221924872181359, 84, 50, -0.0852833012681226, + "Total", 0.586372141282312, 0.156741744171169, -0.54410075451878, + -0.257612545569453, 0.212594729213909, 16, 50, -0.0225089081777719, + "Total", 0.851152856051014, 0.11995303956917, -0.187647668275987, + -0.247271269804874, 0.161941101795748, 16, 50, -0.0426650840045631, + "Total", 0.68276169943104, 0.104392829365345, -0.408697458091184, + -0.241346122862059, 0.27105343269714, 84, 50, 0.0148536549175402, + "Total", 0.909529099947395, 0.130716574284258, 0.113632528995438, + -0.402935688314939, 0.55819178433072, 16, 50, 0.0776280480078909, + "Total", 0.751544452228898, 0.245190085181899, 0.316603536192343, + -0.383908434124506, 0.196888555519543, 50, 84, -0.0935099393024815, + "Total", 0.527962481089636, 0.148165219928861, -0.631119363554946, + -0.17970689287392, 0.107724492113164, 84, 50, -0.0359912003803781, + "Total", 0.623539390021589, 0.0733256802814506, -0.490840320092917, + -0.274073817880745, 0.32764020330069, 16, 84, 0.0267831927099726, + "Total", 0.861486779712305, 0.153501295413507, 0.174481867646935, + -0.660058387082841, 0.353842559173888, 84, 50, -0.153107913954476, + "Total", 0.553888476594814, 0.258652953384412, -0.591943420521962, + -0.396944210332792, 0.205765860268046, 84, 84, -0.095589175032373, + "Total", 0.53414151968237, 0.153755394322278, -0.621696399360233, + -0.253727459159808, 0.188097895275763, 16, 50, -0.0328147819420223, + "Total", 0.770946762323338, 0.112712620721767, -0.291136713279219, + -0.262447769995955, 0.154622499245, 16, 16, -0.0539126353754778, + "Total", 0.612358361500094, 0.106397431924962, -0.506709930870327, + -0.250071314470285, 0.257283521563536, 84, 50, 0.0036061035466256, + "Total", 0.977772616025763, 0.129429632390128, 0.0278614987930742, + -0.409518940735535, 0.542279934009487, 16, 16, 0.0663804966369763, + "Total", 0.784557903843738, 0.242810297090327, 0.273384191001926, + -0.399496121719736, 0.189981140372944, 50, 50, -0.104757490673396, + "Total", 0.486040458393853, 0.150379615835393, -0.696620283882522, + -0.189662311175471, 0.0951848076728853, 84, 16, -0.0472387517512928, + "Total", 0.515642612698794, 0.0726664166013238, -0.650076802472082, + -0.279371249691385, 0.310442532369501, 16, 50, 0.0155356413390579, + "Total", 0.917764124380256, 0.150465464343544, 0.103250545943133, + -0.674857645526299, 0.346146714875517, 84, 50, -0.164355465325391, + "Total", 0.528035507545687, 0.260465082127878, -0.631007672823872, + -0.409358207061613, 0.195684754255038, 84, 50, -0.106836726403288, + "Total", 0.488830902626385, 0.154350530440649, -0.692169480067764, + -0.259310244940025, 0.171185578314151, 16, 50, -0.044062333312937, + "Total", 0.688262195373615, 0.109822381087069, -0.401214514535098, + -0.0248324277916171, 0.0446235444929573, 16, 50, 0.00989555835067012, + "Total indirect", 0.576515630299489, 0.0177186858616878, 0.558481505226455, + -0.0328310532499913, 0.0721138484555209, 16, 50, 0.0196413976027648, + "Total indirect", 0.463161866104849, 0.0267721505428937, 0.733650349503893, + -0.0615347453644733, 0.122090230328897, 50, 50, 0.0302777424822118, + "Total indirect", 0.518050715906503, 0.04684396681311, 0.646353085403905, + -0.0372063110954764, 0.0583767250252676, 50, 84, 0.0105852069648956, + "Total indirect", 0.664210865758981, 0.0243838756412594, 0.4341068302934, + -0.0193085705607925, 0.059970662994773, 16, 50, 0.0203310462169903, + "Total indirect", 0.314771704669253, 0.0202246659073611, 1.00525992914377, + -0.0381767423858954, 0.10011152457877, 50, 84, 0.0309673910964372, + "Total indirect", 0.380050295140454, 0.0352782673700807, 0.877803628267202, + -0.0717263811455089, 0.0945135431371664, 84, 50, 0.0113935809958288, + "Total indirect", 0.788191341499414, 0.0424089232235782, 0.268659992515307, + -0.0384178353999347, 0.0806966758957816, 16, 84, 0.0211394202479235, + "Total indirect", 0.486632295713173, 0.0303869132890391, 0.695675143007984, + -0.0303972870869372, 0.093948817341678, 50, 50, 0.0317757651273704, + "Total indirect", 0.316483775791722, 0.0317215278978189, 1.00170979247047, + -0.0115359412589584, 0.0118568289697684, 16, 16, 0.000160443855404977, + "Total indirect", 0.978550989369306, 0.00596765308272143, 0.0268855868766102, + -0.0228860292305621, 0.023522949643793, 16, 50, 0.000318460206615452, + "Total indirect", 0.97854053261188, 0.011839242771914, 0.0268986972182823, + -0.0352863616564784, 0.0362681915976815, 50, 16, 0.000490914970601548, + "Total indirect", 0.978544689643764, 0.0182540479872521, 0.0268934852666315, + -0.0123494065736099, 0.0126926578294811, 50, 50, 0.000171625627935634, + "Total indirect", 0.978567248896813, 0.00638839912381544, 0.0268652012201034, + -0.0236820567970624, 0.0243413407553546, 16, 16, 0.000329641979146108, + "Total indirect", 0.978533789838038, 0.0122510918392428, 0.0269071510908273, + -0.0360755895093079, 0.0370797829955723, 50, 50, 0.000502096743132204, + "Total indirect", 0.978536184025274, 0.0186624277491628, 0.026904149335808, + -0.0133340195556873, 0.0137034843189799, 84, 50, 0.000184732381646343, + "Total indirect", 0.978633043568742, 0.00689744915925384, 0.0267827101557537, + -0.0246333980715422, 0.0253188955372558, 16, 50, 0.000342748732856817, + "Total indirect", 0.978542149714973, 0.0127431662017301, 0.0268966697468235, + -0.0370132164980007, 0.0380436234916866, 50, 50, 0.000515203496842913, + "Total indirect", 0.978533844426238, 0.0191475048984895, 0.0269070826498943, + -0.0479965627562355, 0.0270681701261475, 16, 50, -0.010464196315044, + "Total indirect", 0.584758730993657, 0.0191495184285232, -0.546446969624968, + -0.0783503760911381, 0.0368102359325494, 16, 50, -0.0207700700792944, + "Total indirect", 0.479573892736552, 0.0293782469810822, -0.706988068167205, + -0.131959604559114, 0.0679243616586956, 50, 50, -0.032017621450209, + "Total indirect", 0.530070672091814, 0.0509917446938996, -0.627898136108283, + -0.0624066458569105, 0.0400196961182862, 50, 84, -0.0111934748693122, + "Total indirect", 0.668372928039545, 0.026129649009656, -0.428382136521456, + -0.0663388945431896, 0.0233401972760645, 16, 50, -0.0214993486335626, + "Total indirect", 0.347345974508831, 0.0228777397254825, -0.939749682072628, + -0.109781348159417, 0.0442875481504626, 50, 84, -0.0327469000044772, + "Total indirect", 0.404749200195869, 0.0393040120954149, -0.833169395658144, + -0.100396398953774, 0.0762997964081217, 84, 50, -0.0120483012728264, + "Total indirect", 0.789248730455785, 0.0450763883305135, -0.267286304849551, + -0.0874733554117805, 0.042765005337627, 16, 84, -0.0223541750370768, + "Total indirect", 0.501062876964615, 0.0332246821310777, -0.67281832671522, + -0.103899377944597, 0.0366959251286137, 50, 50, -0.0336017264079914, + "Total indirect", 0.348837048214009, 0.035866807804176, -0.936847421478059, + 16, 16, 50, 84, 50, 16, 50, 84, 50, 16, 50, 84, 84, 50, 50, + 84, 50, 50, 16, 84, 50, 50, 50, 84, 50, 84, 50, 84, 50, 84, + 84, 84, 50, 84, 50, 84, 16, 16, 50, 84, 50, 16, 50, 84, 50, + 16, 50, 84, 84, 50, 50, 84, 50, 50, 16, 84, 84, 50, 50, 84, + 50, 84, 84, 84, 50, 84, 84, 84, 84, 84, 50, 84, 16, 16, 84, + 84, 50, 16, 50, 84, 84, 16, 50, 84, 84, 50, 84, 84, 50, 50, + 16, 84, 84, 50, 50, 84, 50, 84, 84, 84, 50, 84, 84, 84, 84, + 84, 50, 84, 16, 16, 16, 16, 50, 16, 50, 16, 16, 16, 50, 16, + 84, 50, 16, 16, 50, 50, 16, 16, 16, 50, 50, 16, 50, 84, 16, + 16, 50, 84, 84, 16, 16, 84, 50, 16, 16, 16, 16, 16, 50, 16, + 50, 16, 16, 16, 50, 16, 84, 50, 16, 16, 50, 50, 16, 16, 50, + 50, 50, 16, 50, 84, 50, 16, 50, 84, 84, 16, 50, 84, 50, 16, + 16, 16, 50, 16, 50, 16, 50, 16, 50, 16, 50, 16, 84, 50, 50, + 16, 50, 50, 16, 16, 50, 50, 50, 16, 50, 84, 50, 16, 50, 84, + 84, 16, 50, 84, 50, 16, 16, 16, 84, 50, 50, 16, 50, 50, 84, + 16, 50, 50, 84, 50, 84, 50, 50, 50, 16, 50, 84, 50, 50, 50, + 50, 84, 84, 50, 50, 84, 84, 50, 84, 84, 50, 50, 16, 16, 84, + 50, 50, 16, 50, 50, 84, 16, 50, 50, 84, 50, 84, 50, 50, 50, + 16, 50, 16, 50, 50, 50, 50, 84, 16, 50, 50, 84, 84, 50, 16, + 84, 50, 50, 16, 16, 16, 50, 50, 16, 50, 50, 16, 16, 50, 50, + 84, 50, 16, 50, 50, 50, 16, 50, 16, 50, 50, 50, 50, 84, 16, + 50, 50, 84, 84, 50, 16, 84, 50, 50, 16, 16, 50, 84, 50, 16, + 50, 84, 50, 16, 50, 84, 84, 50, 50, 84, 50, 50, 16, 84, 50, + 50, 50, 84, 50, 84, 50, 84, 50, 84, 84, 84, 50, 84, 50, 84, + 16, 16, 50, 84, 50, 16, 50, 84, 50, 16, 50, 84, 84, 50, 50, + 84, 50, 50, 16, 84, 84, 50, 50, 84, 50, 84, 84, 84, 50, 84, + 84, 84, 84, 84, 50, 84, 16, 16, 84, 84, 50, 16, 50, 84, 84, + 16, 50, 84, 84, 50, 84, 84, 50, 50, 16, 84, 84, 50, 50, 84, + 50, 84, 84, 84, 50, 84, 84, 84, 84, 84, 50, 84, 16, 16, 16, + 16, 84, 16, 50, 50, 16, 50, 84, 50, 84, 84, 16, 84, 84, 84, + 16, 16, 16, 16, 84, 16, 50, 50, 16, 50, 84, 50, 84, 84, 16, + 84, 84, 84, 16, 16, 16, 16, 84, 16, 50, 50, 16, 50, 84, 50, + 84, 84, 16, 84, 84, 84, 16, 50, 84, 50, 50, 84, 84, 50, 84, + 16, 50, 84, 50, 50, 84, 84, 50, 84, 16, 50, 84, 50, 50, 84, + 84, 50, 84, 16, 84, 84, 50, 84, 84, 84, 84, 84, 16, 84, 84, + 50, 84, 84, 84, 84, 84, 16, 84, 84, 50, 84, 84, 84, 84, 84, + 16, 16, 84, 50, 16, 84, 84, 16, 84, 16, 16, 84, 50, 16, 84, + 84, 16, 84, 16, 16, 84, 50, 16, 84, 84, 16, 84, 16, 50, 84, + 50, 50, 84, 84, 50, 84, 16, 50, 84, 50, 50, 84, 84, 50, 84, + 16, 50, 84, 50, 50, 84, 84, 50, 84, 16, 84, 84, 50, 84, 84, + 84, 84, 84, 16, 84, 84, 50, 84, 84, 84, 84, 84, 16, 84, 84, + 50, 84, 84, 84, 84, 84, 16, 16, 84, 50, 16, 84, 84, 16, 84, + 16, 16, 84, 50, 16, 84, 84, 16, 84, 16, 16, 84, 50, 16, 84, + 84, 16, 84, 16, 50, 84, 50, 50, 84, 84, 50, 84, 16, 50, 84, + 50, 50, 84, 84, 50, 84, 16, 50, 84, 50, 50, 84, 84, 50, 84, + 16, 84, 84, 50, 84, 84, 84, 84, 84, 16, 84, 84, 50, 84, 84, + 84, 84, 84, 16, 84, 84, 50, 84, 84, 84, 84, 84, 16, 16, 50, + 16, 84, 16, 16, 16, 50, 16, 84, 16, 16, 16, 50, 16, 84, 16, + 16, 50, 50, 50, 84, 50, 16, 50, 50, 50, 84, 50, 16, 50, 50, + 50, 84, 50, 16, 84, 50, 84, 84, 84, 16, 84, 50, 84, 84, 84, + 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-63") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-63") +}) + + +context('Model number 63 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(754.654502609893, 824.994097631571, 603.814535830838, 12, 1, 100, + 1.62462961804045e-121, 0, 603.814535830838, 12)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 63)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.0096223026798359, 0.0896223504214103, 0.0400000238707872, "facExperimexperimental", + "", 0.114128419365242, "facGenderm", 0.0253179787700375, + 1.57990589351964, -0.163250954227253, 0.0341992441943959, -0.0645258550164284, + "contcor2", "", 0.200188330096619, "facGenderm", 0.0503708741535841, + -1.28101519182861, -0.170527432681318, 0.027297917164222, -0.0716147577585478, + "contcor2", "", 0.155883512228557, "facExperimexperimental", + 0.0504665778060109, -1.41905318077696, 0.756299984034513, 1.33633729292945, + 1.04631863848198, "contNormal", "", 1.53721479989599e-12, + "contNormal", 0.147971420258281, 7.07108600198376, 0.00473838146160099, + 0.00837245257433989, 0.00655541701797044, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000927075992570269, 7.0710676044969, + 0.0796447027558305, 0.140727715841635, 0.110186209298733, "debCollin1:facExperimexperimental", + "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", + 0.015582687632941, 7.07106578109186, 0.180704813481218, 0.319295207609724, + 0.250000010545471, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553420424279, 7.07106751351636, 0.18070480504641, + 0.319295178185673, 0.249999991616041, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353553366879304, 7.07106804901073, 0.721542442066324, 1.27492581187256, + 0.998234126969443, "contcor2", "", 1.53765888910584e-12, + "contcor2", 0.141171821056727, 7.07105794553944)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.161370913672876, 1.33151604017944, 16, 0.585072563253284, 0, + "facGenderm", "contNormal", "", "", "", 0.124477944100934, + 0.380845506761354, 1.53624646442239, -0.359838051419311, 1.00920233572427, + 16, 0.324682142152482, 1, "facGenderm", "contNormal", "", "", + "", 0.352551492708419, 0.349251414296998, 0.929651617319944, + 0.0271127681784677, 1.18765480159197, 50, 0.607383784885219, + 0, "facGenderm", "contNormal", "", "", "", 0.0402141970509182, + 0.296062081387135, 2.05154196727745, -0.240703479012544, 0.934690206581378, + 50, 0.346993363784417, 1, "facGenderm", "contNormal", "", "", + "", 0.247182519478213, 0.299850837787142, 1.15721992423026, + -0.058890744038441, 1.32596266647087, 84, 0.633535961216215, + 0, "facGenderm", "contNormal", "", "", "", 0.0729298475124029, + 0.353285422954927, 1.79326946443823, -0.4028432406352, 1.14913432086603, + 84, 0.373145540115413, 1, "facGenderm", "contNormal", "", "", + "", 0.345948321940431, 0.395919918361518, 0.942477311219009, + -0.0354515825530727, 0.0328678744935438, 16, -0.00129185402976449, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.940913310547086, 0.0174287531774848, -0.0741219992393584, + -0.0440456001744575, 0.047562444644691, 16, 0.00175842223511675, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.940021160464337, 0.0233698286146432, 0.0752432661836018, -0.0213121217180152, + 0.0197878751006601, 50, -0.000762123308677567, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.942054554640044, + 0.0104848857282243, -0.0726878030368996, -0.0568860306624949, + 0.0614623365749023, 50, 0.00228815295620368, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.939587704696692, + 0.0301914647847905, 0.0757880736331938, -0.00835300321595484, + 0.00807060802693936, 84, -0.000141197594507738, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.973115956506071, + 0.00418977373371183, -0.033700529785566, -0.0723550479162216, + 0.0781732052569686, 84, 0.00290907867037351, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.939613431183413, + 0.0384007702081615, 0.0757557375699519, -0.03380150773669, 0.0345866684702242, + 16, 0.000392580366767098, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.982047329791788, 0.017446283897651, + 0.0225022342333862, -0.0470145583502215, 0.0459458276266437, + 16, -0.000534365361788901, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.982022811222045, 0.0237148199431533, + -0.0225329714950325, -0.0199780542375211, 0.0204412561800764, + 50, 0.000231600971277643, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.982080202026152, 0.0103112380473365, + 0.0224610245844791, -0.0611389909124626, 0.0597483013979059, + 50, -0.000695344757278356, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.982011254173253, 0.0308391616539671, + -0.0225474597876725, -0.0043054185483573, 0.00439123537001259, + 84, 4.29084108276419e-05, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.984569453197837, 0.00221857492968442, + 0.0193405281261992, -0.0777329060581017, 0.075964831422645, + 84, -0.000884037317728357, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.982011933784411, 0.0392093269807749, + -0.0225466078048679)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0245836244172288, 1.18878510801458, 0.606684366215902, "facGenderm", + "", 0.0410783464915339, "contNormal", 0.296995631751507, + 2.04273834816368, -3.59405923433471, 3.32501863079112, -0.134520301771791, + "debCollin1", "", 0.939251225642467, "contNormal", + 1.76510331814835, -0.0762110072473873, -3.32422238662218, 3.38382016420504, + 0.0297988887914321, "facExperimexperimental", "", 0.98610685843174, + "contNormal", 1.71126678952762, 0.0174133507257848, -0.22814429206147, + 0.320526802343211, 0.0461912551408706, "contcor2", "", + 0.74139317030969, "contNormal", 0.139969687895423, 0.330008988627466, + -4.78684671780639, 5.13764582995921, 0.175399556076411, "debCollin1:facExperimexperimental", + "", 0.944767965701938, "contNormal", 2.53180482550923, + 0.0692784666136864, -1.09180000844235, 0.571019166240749, -0.260390421100802, + "facGenderm:facExperimexperimental", "", 0.539318370331719, + "contNormal", 0.424196359677833, -0.613844072821753, -0.392770150628188, + 0.439554008107608, 0.02339192873971, "facGenderm:contcor2", + "", 0.912276913947038, "contNormal", 0.212331493155248, + 0.110167024175763, -0.0402674807978981, 0.0518453534497075, + 0.00578893632590472, "facGenderm", "", 0.805409486908136, + "debCollin1", 0.0234986037942993, 0.246352352530371, -0.0489096640469303, + 0.0420350331788153, -0.00343731543405748, "facExperimexperimental", + "", 0.882219426808958, "debCollin1", 0.0232006041802568, + -0.148156289696221, -0.0174100319447411, 0.0258806885981654, + 0.00423532832671216, "contcor2", "", 0.701345805742261, + "debCollin1", 0.0110437540904777, 0.383504403666865, -0.0882812793604622, + 0.0429308567892146, -0.0226752112856238, "facGenderm:facExperimexperimental", + "", 0.49814207611237, "debCollin1", 0.0334730987876975, + -0.67741595809342, -0.0370220749473695, 0.0287647380378663, + -0.00412866845475162, "facGenderm:contcor2", "", 0.805676031888362, + "debCollin1", 0.0167826586366264, -0.246008010062317)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.162995608484688, 1.33055702693173, 16, 0.583780709223519, 0, + "Total", 0.125480194097715, 0.381015326607368, 1.53217119747285, + -0.362319597670334, 1.00910017391577, 16, 0.323390288122717, + 0, "Total", 0.355306103237886, 0.349858411277882, 0.924346186051413, + 0.0257469255330637, 1.18643693617785, 16, 0.606091930855455, + 0, "Total", 0.0406661841221545, 0.296099831374494, 2.0469175144139, + -0.243031535885572, 0.934434555394877, 16, 0.345701509754653, + 1, "Total", 0.249780613745142, 0.300379522421879, 1.15088241357918, + -0.0598965610520487, 1.32438477542495, 50, 0.632244107186451, + 0, "Total", 0.0733972836280119, 0.353139483020105, 1.79035236099741, + -0.404609898349051, 1.14831727052035, 16, 0.371853686085648, + 0, "Total", 0.347915573189574, 0.396162169590536, 0.938640068712234, + -0.161625887864295, 1.3352878588411, 50, 0.586830985488401, + 0, "Total", 0.124362234932468, 0.381872768712297, 1.53671859731512, + -0.359150658776585, 1.01203178755178, 16, 0.326440564387598, + 0, "Total", 0.350703146766807, 0.3497978680078, 0.933226283644242, + 0.0258036286902456, 1.19248078555043, 84, 0.609142207120336, + 0, "Total", 0.0406913019866826, 0.29762719265833, 2.04666180425126, + -0.240667102494727, 0.938170674533795, 16, 0.348751786019534, + 1, "Total", 0.246176598282768, 0.300729448685548, 1.15968618152923, + -0.0601767832383208, 1.33076555014098, 84, 0.635294383451332, + 0, "Total", 0.0733936647753379, 0.35483874814815, 1.79037488652758, + -0.402811661927773, 1.15261958662883, 16, 0.37490396235053, + 0, "Total", 0.344752757165464, 0.396800977167348, 0.944816126781906, + -0.162151195060285, 1.3307720749495, 16, 0.584310439944606, + 0, "Total", 0.124978488196697, 0.380854771257475, 1.5342080079905, + -0.361108081962398, 1.00894811965001, 16, 0.323920018843804, + 0, "Total", 0.354039840520225, 0.349510555402863, 0.926781791956006, + 0.0265363095335547, 1.18670701361953, 16, 0.606621661576542, + 0, "Total", 0.0404011787531999, 0.295967352777207, 2.04962356788447, + -0.241850928150799, 0.934313409102278, 16, 0.346231240475739, + 1, "Total", 0.248532281567127, 0.300047436210693, 1.15392167601331, + -0.0592919136383665, 1.32483958945344, 50, 0.632773837907537, + 0, "Total", 0.0731255350967288, 0.353101259515394, 1.79204639138352, + -0.403714093408205, 1.14848092702168, 16, 0.372383416806735, + 0, "Total", 0.347001860224531, 0.395975393597382, 0.940420598925816, + -0.162216468121415, 1.33693790054039, 50, 0.587360716209487, + 0, "Total", 0.124585734523405, 0.382444366449318, 1.53580695059689, + -0.359505441429613, 1.01344603164698, 16, 0.326970295108685, + 1, "Total", 0.350543149789715, 0.350249158634103, 0.933536275672436, + 0.0247525009159314, 1.19459137476691, 84, 0.609671937841423, + 0, "Total", 0.0410618097150102, 0.298433767936177, 2.0429053389555, + -0.241308717111302, 0.939871750592544, 16, 0.349281516740621, + 1, "Total", 0.246397446958067, 0.301327084839529, 1.15914411386759, + -0.0611153406484661, 1.3327635689933, 84, 0.635824114172419, + 1, "Total", 0.0737610502220483, 0.355587888511347, 1.78809271832701, + -0.403296940595406, 1.15416432673864, 16, 0.375433693071617, + 0, "Total", 0.344700790956023, 0.397318848616378, 0.944917902533508, + -0.161508237317556, 1.33137096863511, 16, 0.584931365658776, + 0, "Total", 0.12456690954719, 0.380843530220021, 1.5358836877729, + -0.360065484925279, 1.00914737404123, 50, 0.324540944557974, + 1, "Total", 0.352821574283816, 0.349295413019495, 0.929130279016463, + 0.0270152754610324, 1.18746989912039, 16, 0.607242587290712, + 0, "Total", 0.0402455716247929, 0.29603978257072, 2.05121954224395, + -0.240906892296745, 0.934611224676564, 50, 0.346852166189909, + 1, "Total", 0.247424955091501, 0.299882581069256, 1.15662658682335, + -0.0589572788587596, 1.32574680610217, 50, 0.633394763621707, + 1, "Total", 0.0729628292465965, 0.353247329002804, 1.79306313627266, + -0.402997621177817, 1.14900630621963, 50, 0.373004342520905, + 0, "Total", 0.346139051499461, 0.395926644479045, 0.942104674495194, + -0.163251369234462, 1.33921465308178, 50, 0.587981641923657, + 0, "Total", 0.12501936939708, 0.383289191578902, 1.53404180144386, + -0.360296396945061, 1.01547883859077, 50, 0.327591220822855, + 1, "Total", 0.350618963603461, 0.350969519437034, 0.933389376229372, + 0.0230846901975779, 1.19750103691361, 84, 0.610292863555593, + 0, "Total", 0.041648508940048, 0.299601512063404, 2.03701529859581, + -0.242495119596961, 0.942300004506542, 50, 0.349902442454791, + 1, "Total", 0.247001970265043, 0.302249208008161, 1.15766206555401, + -0.0625820864662251, 1.3354721662394, 84, 0.636445039886589, + 1, "Total", 0.0743435116982825, 0.356653046620576, 1.78449349000983, + -0.404196030391035, 1.15630526796261, 50, 0.376054618785786, + 0, "Total", 0.34484431137733, 0.398094380984211, 0.944636841786272, + -0.16067843288053, 1.33160872012063, 16, 0.585465143620051, + 0, "Total", 0.124074250671625, 0.380692493528487, 1.5378951609831, + -0.362246664422111, 1.01239610946061, 50, 0.325074722519249, + 0, "Total", 0.35393573311882, 0.350680620849599, 0.926982283000656, + 0.0266975187281104, 1.18885521177586, 16, 0.607776365251986, + 0, "Total", 0.0403630619557125, 0.296474247030737, 2.05001402765676, + -0.244742566489128, 0.939514454791496, 50, 0.347385944151184, + 1, "Total", 0.250202198960356, 0.30211193435744, 1.14985839566397, + -0.0603461059008856, 1.32820318906685, 50, 0.633928541582982, + 0, "Total", 0.073517496753901, 0.35422826794789, 1.78960461076539, + -0.406853802125826, 1.15393004309019, 50, 0.37353812048218, + 0, "Total", 0.348169580820703, 0.398166460589908, 0.938145618615793, + -0.164820918150114, 1.3338973139331, 50, 0.584538197891495, + 0, "Total", 0.126296296262043, 0.382333105073592, 1.52887152625453, + -0.35929143714503, 1.00758699072641, 50, 0.324147776790693, + 0, "Total", 0.352583627325688, 0.348699883940013, 0.929589574645387, + 0.0244497502657319, 1.18924908878113, 84, 0.60684941952343, + 0, "Total", 0.0411272017867197, 0.297148148563746, 2.04224533269554, + -0.238367936784337, 0.931285933629594, 50, 0.346458998422628, + 1, "Total", 0.245598033268194, 0.298386572314597, 1.16110787337088, + -0.0596156379404043, 1.32561882964926, 84, 0.633001595854426, + 0, "Total", 0.0732509371469239, 0.353382633180052, 1.79126401928163, + -0.399776371390845, 1.14499872089809, 50, 0.372611174753624, + 0, "Total", 0.344395704653612, 0.39408252000392, 0.945515611171785, + -0.160773870213805, 1.33138219866293, 16, 0.585304164224561, + 0, "Total", 0.124144645171001, 0.38065905308635, 1.5376073666946, + -0.361055336845183, 1.0108828230927, 84, 0.324913743123759, + 0, "Total", 0.353226167252563, 0.349990655634378, 0.928349765609697, + 0.0271099434413816, 1.18812082827161, 16, 0.607615385856497, + 0, "Total", 0.0402187224604453, 0.296181688538192, 2.05149544813317, + -0.242851986935582, 0.937301916446971, 84, 0.347224964755695, + 1, "Total", 0.248778455249209, 0.301065201373968, 1.15332148375524, + -0.059547047579204, 1.32708217195419, 50, 0.633767562187493, + 0, "Total", 0.0731926375487761, 0.353738443785434, 1.79162760882138, + -0.405031561239423, 1.1517858434128, 84, 0.373377141086691, + 0, "Total", 0.347150634565776, 0.39715459491404, 0.940130482860217, + -0.166419100774979, 1.33517353776699, 50, 0.584377218496005, + 0, "Total", 0.127128286928763, 0.383066385501555, 1.5255246626009, + -0.359742593803814, 1.00771618859422, 84, 0.323986797395203, + 1, "Total", 0.353027166689017, 0.34884793628464, 0.928733593340935, + 0.0229272311859743, 1.19044964906991, 84, 0.606688440127941, + 0, "Total", 0.0416558944228358, 0.297842824432796, 2.03694160261642, + -0.238382245275999, 0.930978283330276, 84, 0.346298019027139, + 1, "Total", 0.245699037192903, 0.298311738845724, 1.16085951014563, + -0.0604416680720906, 1.32612290098996, 84, 0.632840616458937, + 1, "Total", 0.0736002262825435, 0.353721951015197, 1.78909059684494, + -0.399394936739061, 1.14429532745533, 84, 0.372450195358135, + 0, "Total", 0.344265250284681, 0.393805773057776, 0.945771293463216, + -0.161222288078227, 1.33145323140645, 16, 0.585115471664111, + 0, "Total", 0.124396989049134, 0.380791568431541, 1.53657675266858, + -0.360022361981214, 1.00947246310783, 84, 0.324725050563309, + 1, "Total", 0.352647663716072, 0.349367344474553, 0.929465949519964, + 0.0271611454643549, 1.18769224112774, 16, 0.607426693296047, + 0, "Total", 0.0401982205016178, 0.296059291093486, 2.05170623442532, + -0.241054000136563, 0.935126544527052, 84, 0.347036272195245, + 1, "Total", 0.247440419432922, 0.300051570830173, 1.15658875317692, + -0.0589714436971018, 1.32612918295119, 50, 0.633578869627043, + 1, "Total", 0.0729615990157302, 0.353348489455364, 1.79307083101901, + -0.403212683874809, 1.14958958092729, 84, 0.373188448526241, + 0, "Total", 0.346149085439021, 0.396130305722556, 0.942085074368475, + -0.168622584276769, 1.33699963614788, 50, 0.584188525935555, + 0, "Total", 0.128272247505613, 0.384094358952717, 1.52095054852777, + -0.360638274374314, 1.00823448404382, 84, 0.323798104834753, + 1, "Total", 0.353805097327038, 0.349208651081252, 0.927233915403241, + 0.0207177720213939, 1.19228172311359, 84, 0.606499747567491, + 0, "Total", 0.0424294291268235, 0.298873846747527, 2.02928343904186, + -0.238828454363096, 0.931047107296474, 84, 0.346109326466689, + 1, "Total", 0.24616437630356, 0.298443127243, 1.15971619002932, + -0.0617708226301971, 1.32707467042717, 84, 0.632651923898487, + 1, "Total", 0.0741608434884786, 0.354303830073513, 1.78561977093847, + -0.399272913130213, 1.14379591872558, 84, 0.372261502797685, + 0, "Total", 0.344315482148905, 0.393647241486917, 0.945672834875072, + -0.0354515825530727, 0.0328678744935438, 16, -0.00129185402976449, + 0, "Total indirect", 0.940913310547086, 0.0174287531774848, + -0.0741219992393584, -0.0440456001744575, 0.047562444644691, + 16, 0.00175842223511675, 0, "Total indirect", 0.940021160464337, + 0.0233698286146432, 0.0752432661836018, -0.0213121217180152, + 0.0197878751006601, 16, -0.000762123308677567, 0, "Total indirect", + 0.942054554640044, 0.0104848857282243, -0.0726878030368996, + -0.0568860306624949, 0.0614623365749023, 16, 0.00228815295620368, + 1, "Total indirect", 0.939587704696692, 0.0301914647847905, + 0.0757880736331938, -0.00835300321595484, 0.00807060802693936, + 50, -0.000141197594507738, 0, "Total indirect", 0.973115956506071, + 0.00418977373371183, -0.033700529785566, -0.0723550479162216, + 0.0781732052569686, 16, 0.00290907867037351, 0, "Total indirect", + 0.939613431183413, 0.0384007702081615, 0.0757557375699519, -0.03380150773669, + 0.0345866684702242, 50, 0.000392580366767098, 0, "Total indirect", + 0.982047329791788, 0.017446283897651, 0.0225022342333862, -0.0470145583502215, + 0.0459458276266437, 16, -0.000534365361788901, 0, "Total indirect", + 0.982022811222045, 0.0237148199431533, -0.0225329714950325, + -0.0199780542375211, 0.0204412561800764, 84, 0.000231600971277643, + 0, "Total indirect", 0.982080202026152, 0.0103112380473365, + 0.0224610245844791, -0.0611389909124626, 0.0597483013979059, + 16, -0.000695344757278356, 1, "Total indirect", 0.982011254173253, + 0.0308391616539671, -0.0225474597876725, -0.0043054185483573, + 0.00439123537001259, 84, 4.29084108276419e-05, 0, "Total indirect", + 0.984569453197837, 0.00221857492968442, 0.0193405281261992, + -0.0777329060581017, 0.075964831422645, 16, -0.000884037317728357, + 0, "Total indirect", 0.982011933784411, 0.0392093269807749, + -0.0225466078048679, 16, 0, 16, 0, 16, 0, 16, 1, 50, 0, 16, + 0, 50, 0, 16, 1, 84, 0, 16, 1, 84, 1, 16, 0, 16, 0, 50, 1, 16, + 0, 50, 1, 50, 1, 50, 0, 50, 0, 50, 1, 84, 0, 50, 1, 84, 1, 50, + 0, 16, 0, 50, 0, 16, 1, 50, 1, 50, 0, 50, 1, 50, 0, 50, 0, 84, + 1, 50, 1, 84, 0, 50, 1, 16, 0, 84, 0, 16, 1, 84, 1, 50, 0, 84, + 1, 50, 0, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 16, 0, 84, 1, 16, + 1, 84, 1, 50, 1, 84, 1, 50, 0, 84, 1, 84, 1, 84, 1, 84, 1, 84, + 1, 16, 0, 16, 0, 50, 1, 50, 1, 84, 0, 84, 1, 16, 0, 16, 0, 50, + 1, 50, 1, 84, 0, 84, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, + 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, + 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, + 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-63") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-63") +}) + + +context('Model number 64 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1401.09592919121, 1468.8303540269, 1019.15858565413, 16, 1, 100, + 8.84243940846504e-207, 0, 1019.15858565413, 16)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 64)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848493694896, 0.0642086261020683, -0.240319933796414, "contcor1", + "", 0.121932361932028, "contGamma", 0.155374569278091, + -1.54671343523589, -0.403934401098614, 0.194628024635603, -0.104653188231505, + "contcor2", "", 0.493114443543145, "contGamma", 0.152697302209531, + -0.68536370136979, 0.424979252115245, 0.896763384748252, 0.660871318431748, + "contcor2", "", 3.99658153238391e-08, "contcor1", 0.120355306616443, + 5.49100274022698, 0.744754894356353, 1.31594032990851, 1.03034761213243, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.14571324780904, 7.07106339076816, 0.00465468574058654, 0.00822456681639146, + 0.006439626278489, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910700682248165, 7.07106780966945, 0.323891805441149, + 0.572298543263145, 0.448095174352147, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702302137685, + 7.07106748453611, 0.318532879338284, 0.562829633789865, 0.440681256564074, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623217458021074, 7.07106726379884, 1.68041108660027, 2.96919181106681, + 2.32480144883354, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776634323965, 7.07106651180924, 0.732634681948735, + 1.29452426312842, 1.01357947253858, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341812811817, 7.07106637383772, + 0.721541915573713, 1.27492397588121, 0.99823294572746, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171486994787, + 7.071066310751)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.146732335205939, 0.12266105100774, "", "", -0.0120356420990995, + "contGamma", "contNormal", "", "", "", 0.860977525721048, + 0.0687240654263599, -0.175129949376992, -0.0197123878892484, + 0.0335574441508946, 16, 16, 0.00692252813082309, "contGamma", + "debCollin1", "contNormal", "", "", 0.610469782029129, + 0.0135894925774985, 0.509402988474008, -0.0239436346961765, + 0.0477861870513473, 16, 16, 0.0119212761775854, "contGamma", + "debCollin1", "contNormal", "", "", 0.514736686670234, + 0.0182987601591967, 0.651479995030919, -0.0351161434302175, + 0.0698696921224967, 50, 16, 0.0173767743461396, "contGamma", + "debCollin1", "contNormal", "", "", 0.516462154758087, + 0.0267825930427368, 0.648808512245682, -0.0436619023115123, + 0.0244290754011258, 16, 16, -0.00961641345519325, "contGamma", + "debCollin1", "contNormal", "", "", 0.579847772366467, + 0.0173704665620723, -0.553607090565447, -0.0596850726263149, + 0.0265642478435988, 84, 16, -0.016560412391358, "contGamma", + "debCollin1", "contNormal", "", "", 0.45165975685468, + 0.0220027819771785, -0.752650842449589, -0.0873437942839797, + 0.0390659849426096, 16, 16, -0.024138904670685, "contGamma", + "debCollin1", "contNormal", "", "", 0.45413454827432, + 0.0322479852241402, -0.74853993212001, -0.109447875941899, 0.0541147436397345, + 16, 16, -0.0276665661510822, "contGamma", "debCollin1", "contNormal", + "", "", 0.507295589127131, 0.0417259247801987, + -0.663054594878903, -0.129958802279475, 0.0346696912092191, + 50, 16, -0.0476445555351282, "contGamma", "debCollin1", "contNormal", + "", "", 0.256604737242499, 0.0419978363855824, + -1.13445262031366, -0.19092332696511, 0.0520273433433753, 50, + 16, -0.0694479918108672, "contGamma", "debCollin1", "contNormal", + "", "", 0.262492163873885, 0.061978350680127, + -1.12052016629631, -0.0304624560797274, 0.0618358917283618, + 50, 50, 0.0156867178243172, "contGamma", "debCollin1", "contNormal", + "", "", 0.505271885194611, 0.0235459295517996, + 0.666217818659797, -0.0190057290233835, 0.0730338794243563, + 84, 50, 0.0270140752004864, "contGamma", "debCollin1", "contNormal", + "", "", 0.24993057274495, 0.0234799234000564, + 1.15051802939108, -0.0285609678379812, 0.107313860051166, 50, + 50, 0.0393764461065926, "contGamma", "debCollin1", "contNormal", + "", "", 0.255959558434299, 0.0346625828231822, + 1.13599284587234, -0.0146280928290486, 0.0129236453056503, 16, + 50, -0.000852223761699124, "contGamma", "debCollin1", "contNormal", + "", "", 0.903492806039204, 0.00702863377899376, + -0.121250272598657, -0.0249284093172146, 0.0219931825803005, + 84, 50, -0.00146761336845706, "contGamma", "debCollin1", "contNormal", + "", "", 0.902417921661721, 0.0119700138032195, + -0.122607491735918, -0.036341320249345, 0.0320628544288809, + 50, 50, -0.00213923291023206, "contGamma", "debCollin1", "contNormal", + "", "", 0.902432107626962, 0.0174503652153277, + -0.122589578145507, -0.0746775012609918, 0.0368727483458156, + 84, 50, -0.0189023764575881, "contGamma", "debCollin1", "contNormal", + "", "", 0.506537769480701, 0.0284572192363486, + -0.664238353740619, -0.088496671533222, 0.0233931585087676, + 84, 50, -0.0325517565122272, "contGamma", "debCollin1", "contNormal", + "", "", 0.254114562067396, 0.0285438484902178, + -1.14041232118307, -0.13001970150245, 0.0351230614016216, 84, + 50, -0.0474483200504143, "contGamma", "debCollin1", "contNormal", + "", "", 0.26005469250785, 0.0421290299736875, + -1.12626186931076, -0.0503106426763042, 0.102230029420192, 16, + 84, 0.025959693371944, "contGamma", "debCollin1", "contNormal", + "", "", 0.504707231108322, 0.0389141518159818, + 0.66710161112345, -0.0311509722617722, 0.120561276799049, 16, + 84, 0.0447051522686383, "contGamma", "debCollin1", "contNormal", + "", "", 0.248054450081337, 0.0387028155255678, + 1.15508785760316, -0.046831464905929, 0.177158341241963, 50, + 84, 0.0651634381680168, "contGamma", "debCollin1", "contNormal", + "", "", 0.254123394605518, 0.0571413066552995, + 1.14039111077929, -0.0233840945910136, 0.042225598162869, 16, + 84, 0.00942075178592766, "contGamma", "debCollin1", "contNormal", + "", "", 0.573534405324741, 0.0167374740738614, + 0.562853853834483, -0.0247316837925317, 0.0571786111919214, + 84, 84, 0.0162234636996948, "contGamma", "debCollin1", "contNormal", + "", "", 0.437515322972199, 0.020895867380868, + 0.776395801331935, -0.0363983744998868, 0.0836938928022711, + 16, 84, 0.0236477591511922, "contGamma", "debCollin1", "contNormal", + "", "", 0.440182084706789, 0.0306363454250768, + 0.771885772375309, -0.0392933004518783, 0.0220344986319557, + 16, 84, -0.00862940090996129, "contGamma", "debCollin1", "contNormal", + "", "", 0.581242371105003, 0.0156451341880718, + -0.551570910560841, -0.0538227396702933, 0.0241013807821428, + 50, 84, -0.0148606794440753, "contGamma", "debCollin1", "contNormal", + "", "", 0.45472685762705, 0.0198789674369253, + -0.747557914727075, -0.078761181714651, 0.0354385257366708, + 50, 84, -0.0216613279889901, "contGamma", "debCollin1", "contNormal", + "", "", 0.457161199691545, 0.0291331137592615, + -0.743529447898574)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.146732335205939, 0.12266105100774, -0.0120356420990995, "contGamma", + "", 0.860977525721048, "contNormal", 0.0687240654263599, + -0.175129949376992, -2.33172153000961, 2.72584568291644, 0.197062076453416, + "debCollin1", "", 0.878607006447256, "contNormal", + 1.29021942566789, 0.152735319692931, -3.9278320456899, 0.322239799466767, + -1.80279612311156, "contcor1", "", 0.0963613588942218, + "contNormal", 1.08422192414776, -1.662755643434, -1.07378891498678, + 3.00631404675718, 0.966262565885199, "contcor2", "", + 0.353236712411354, "contNormal", 1.04086171835995, 0.92832943016456, + -0.0857478612167744, 6.36780662311259, 3.14102938094791, "debCollin1:contcor1", + "", 0.0564066999004491, "contNormal", 1.64634517145064, + 1.90788021577532, -4.80096013742904, 1.40102909612514, -1.69996552065195, + "debCollin1:contcor2", "", 0.282619955317005, "contNormal", + 1.58216918333058, -1.07445242807308, -0.0197475173598975, 0.00116000117750698, + -0.00929375809119524, "contGamma", "", 0.081425078671161, + "debCollin1", 0.0053336486543427, -1.74247662219524, -0.0185476014060098, + 0.0350787583167505, 0.00826557845537036, "contcor1", "", + 0.545717801080429, "debCollin1", 0.0136804451882173, 0.604189289284924, + -0.0145563069117613, 0.00654285795226424, -0.00400672447974851, + "contGamma:contcor1", "", 0.456638731907442, "debCollin1", + 0.00538253892174882, -0.744393034216406)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.140911152045214, 0.130684924108661, 16, 16, -0.00511311396827641, + "Total", 0.941171730118838, 0.0692859864508203, -0.0737972313045689, + -0.136938445990609, 0.136709714147581, 16, 16, -0.000114365921514068, + "Total", 0.998692860149599, 0.0698094868825887, -0.0016382575867721, + -0.135604745846207, 0.146287010340288, 50, 16, 0.00534113224704012, + "Total", 0.940793422289563, 0.0719124837012367, 0.0742726710598688, + -0.157798458199972, 0.114494347091387, 16, 16, -0.0216520555542927, + "Total", 0.755266209096753, 0.0694637267417081, -0.311703050929057, + -0.165281936692675, 0.10808982771176, 84, 16, -0.0285960544904575, + "Total", 0.681773611911226, 0.0697389764711892, -0.410044080619268, + -0.178350943952132, 0.106001850412563, 16, 16, -0.0361745467697845, + "Total", 0.618003433555165, 0.072540311099498, -0.498681991040356, + -0.193577344492898, 0.114172927992534, 16, 16, -0.0397022082501817, + "Total", 0.61306616461805, 0.0785091651971482, -0.505701571918177, + -0.211112807274629, 0.0917524120061738, 50, 16, -0.0596801976342277, + "Total", 0.43985999739398, 0.0772629552557509, -0.772429651916343, + -0.254697815233494, 0.0917305474135607, 50, 16, -0.0814836339099667, + "Total", 0.356524020654957, 0.0883762062414508, -0.922008732614602, + -0.13769897872836, 0.145001130178795, 50, 50, 0.00365107572521771, + "Total", 0.959623606003236, 0.0721186999192479, 0.0506259226706231, + -0.125578535797559, 0.155535402000333, 84, 50, 0.0149784331013869, + "Total", 0.834554970946184, 0.0717140569967824, 0.208863279092674, + -0.121060474683236, 0.175742082698222, 50, 50, 0.0273408040074931, + "Total", 0.718028272538486, 0.0757163294128357, 0.361095211819106, + -0.145872547152701, 0.120096815431104, 16, 50, -0.0128878658607986, + "Total", 0.849352361189141, 0.067850573959965, -0.189944831835956, + -0.146083816222336, 0.119077305287223, 84, 50, -0.0135032554675566, + "Total", 0.841776824124451, 0.0676443862237054, -0.199621228329284, + -0.147164595634055, 0.118814845615391, 50, 50, -0.0141748750093316, + "Total", 0.834522242842025, 0.0678531450953839, -0.208905202395635, + -0.173130292317615, 0.11125425520424, 84, 50, -0.0309380185566876, + "Total", 0.669782500354693, 0.0725484115435395, -0.426446532714508, + -0.1841937581821, 0.0950189609594465, 84, 50, -0.0445873986113267, + "Total", 0.53133319740171, 0.0712290433252704, -0.625972167107684, + -0.209023728647953, 0.0900558043489253, 84, 50, -0.0594839621495138, + "Total", 0.435605797180211, 0.0762972012128742, -0.779634917191125, + -0.140368017814552, 0.168216120360241, 16, 84, 0.0139240512728445, + "Total", 0.85960540876449, 0.078721889945138, 0.17687648610251, + -0.121056204263118, 0.186395224602196, 16, 84, 0.0326695101695388, + "Total", 0.677023687848431, 0.078432928178898, 0.416527993128381, + -0.120937378712077, 0.227192970849911, 50, 84, 0.0531277960689173, + "Total", 0.549695838740799, 0.0888103945552051, 0.59821596711737, + -0.139399741871802, 0.134169961245458, 16, 84, -0.00261489031317184, + "Total", 0.97011164456624, 0.0697894719686542, -0.0374682633269716, + -0.133447656287245, 0.141823299488436, 84, 84, 0.00418782160059535, + "Total", 0.952445833990013, 0.070223472968632, 0.0596356378224985, + -0.131462690770114, 0.154686924874299, 16, 84, 0.0116121170520927, + "Total", 0.873611402603091, 0.0729986922977986, 0.159072946193624, + -0.155523634451866, 0.114193548433745, 16, 84, -0.0206650430090608, + "Total", 0.763921723600764, 0.0688066681360233, -0.300334888592603, + -0.161496279852123, 0.107703636765774, 50, 84, -0.0268963215431748, + "Total", 0.695318222850671, 0.068674710030723, -0.391648126816148, + -0.172090905932224, 0.104696965756045, 50, 84, -0.0336969700880896, + "Total", 0.633202930842973, 0.0706104484244448, -0.477223567332904, + -0.0197123878892484, 0.0335574441508946, 50, 16, 0.00692252813082309, + "Total indirect", 0.610469782029129, 0.0135894925774985, 0.509402988474008, + -0.0239436346961765, 0.0477861870513473, 84, 16, 0.0119212761775854, + "Total indirect", 0.514736686670234, 0.0182987601591967, 0.651479995030919, + -0.0351161434302175, 0.0698696921224967, 50, 16, 0.0173767743461396, + "Total indirect", 0.516462154758087, 0.0267825930427368, 0.648808512245682, + -0.0436619023115123, 0.0244290754011258, 16, 16, -0.00961641345519325, + "Total indirect", 0.579847772366467, 0.0173704665620723, -0.553607090565447, + -0.0596850726263149, 0.0265642478435988, 84, 16, -0.016560412391358, + "Total indirect", 0.45165975685468, 0.0220027819771785, -0.752650842449589, + -0.0873437942839797, 0.0390659849426096, 50, 16, -0.024138904670685, + "Total indirect", 0.45413454827432, 0.0322479852241402, -0.74853993212001, + -0.109447875941899, 0.0541147436397345, 84, 16, -0.0276665661510822, + "Total indirect", 0.507295589127131, 0.0417259247801987, -0.663054594878903, + -0.129958802279475, 0.0346696912092191, 84, 16, -0.0476445555351282, + "Total indirect", 0.256604737242499, 0.0419978363855824, -1.13445262031366, + -0.19092332696511, 0.0520273433433753, 84, 16, -0.0694479918108672, + "Total indirect", 0.262492163873885, 0.061978350680127, -1.12052016629631, + -0.0304624560797274, 0.0618358917283618, 16, 50, 0.0156867178243172, + "Total indirect", 0.505271885194611, 0.0235459295517996, 0.666217818659797, + -0.0190057290233835, 0.0730338794243563, 16, 50, 0.0270140752004864, + "Total indirect", 0.24993057274495, 0.0234799234000564, 1.15051802939108, + -0.0285609678379812, 0.107313860051166, 50, 50, 0.0393764461065926, + "Total indirect", 0.255959558434299, 0.0346625828231822, 1.13599284587234, + -0.0146280928290486, 0.0129236453056503, 16, 50, -0.000852223761699124, + "Total indirect", 0.903492806039204, 0.00702863377899376, -0.121250272598657, + -0.0249284093172146, 0.0219931825803005, 84, 50, -0.00146761336845706, + "Total indirect", 0.902417921661721, 0.0119700138032195, -0.122607491735918, + -0.036341320249345, 0.0320628544288809, 16, 50, -0.00213923291023206, + "Total indirect", 0.902432107626962, 0.0174503652153277, -0.122589578145507, + -0.0746775012609918, 0.0368727483458156, 16, 50, -0.0189023764575881, + "Total indirect", 0.506537769480701, 0.0284572192363486, -0.664238353740619, + -0.088496671533222, 0.0233931585087676, 50, 50, -0.0325517565122272, + "Total indirect", 0.254114562067396, 0.0285438484902178, -1.14041232118307, + -0.13001970150245, 0.0351230614016216, 50, 50, -0.0474483200504143, + "Total indirect", 0.26005469250785, 0.0421290299736875, -1.12626186931076, + -0.0503106426763042, 0.102230029420192, 50, 84, 0.025959693371944, + "Total indirect", 0.504707231108322, 0.0389141518159818, 0.66710161112345, + -0.0311509722617722, 0.120561276799049, 84, 84, 0.0447051522686383, + "Total indirect", 0.248054450081337, 0.0387028155255678, 1.15508785760316, + -0.046831464905929, 0.177158341241963, 50, 84, 0.0651634381680168, + "Total indirect", 0.254123394605518, 0.0571413066552995, 1.14039111077929, + -0.0233840945910136, 0.042225598162869, 16, 84, 0.00942075178592766, + "Total indirect", 0.573534405324741, 0.0167374740738614, 0.562853853834483, + -0.0247316837925317, 0.0571786111919214, 84, 84, 0.0162234636996948, + "Total indirect", 0.437515322972199, 0.020895867380868, 0.776395801331935, + -0.0363983744998868, 0.0836938928022711, 50, 84, 0.0236477591511922, + "Total indirect", 0.440182084706789, 0.0306363454250768, 0.771885772375309, + -0.0392933004518783, 0.0220344986319557, 84, 84, -0.00862940090996129, + "Total indirect", 0.581242371105003, 0.0156451341880718, -0.551570910560841, + -0.0538227396702933, 0.0241013807821428, 84, 84, -0.0148606794440753, + "Total indirect", 0.45472685762705, 0.0198789674369253, -0.747557914727075, + -0.078761181714651, 0.0354385257366708, 84, 84, -0.0216613279889901, + "Total indirect", 0.457161199691545, 0.0291331137592615, -0.743529447898574, + 16, 16, 50, 16, 84, 16, 16, 50, 50, 50, 84, 50, 16, 84, 50, + 84, 84, 84, 16, 16, 50, 16, 84, 16, 16, 50, 50, 50, 84, 50, + 16, 84, 50, 84, 84, 84, 16, 16, 50, 16, 84, 16, 16, 50, 50, + 50, 84, 50, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-64") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-64") +}) + + +context('Model number 64 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(23004.5630930694, 23156.6455123384, 24958.9636417385, 16, 1, 2564, + 0, 0, 24958.9636417385, 16)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 64)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0678662881889131, 0.0881399413662532, 0.0780031147775831, "facExperimexperimental", + "", 0, "facGenderm", 0.00517194533605108, 15.0819681395049, + -0.0939551397734539, -0.0542196889181075, -0.0740874143457807, + "contcor2", "", 2.69562150378988e-13, "facGenderm", + 0.010136780871683, -7.30877142197512, -0.0997947965936914, -0.0599919931539736, + -0.0798933948738325, "contcor2", "", 3.5527136788005e-15, + "facExperimexperimental", 0.0101539629691355, -7.86819836911763, + 0.964859803322361, 1.07660977867477, 1.02073479099857, "contNormal", + "", 0, "contNormal", 0.0285081706178988, 35.8049909508293, + 0.0060783963191446, 0.00678239490501237, 0.00643039561207848, + "debCollin1", "", 0, "debCollin1", 0.000179594776082832, + 35.8050259163032, 0.103586127942183, 0.115583452114436, 0.109584790028309, + "debCollin1:facExperimexperimental", "", 0, "debCollin1:facExperimexperimental", + 0.00306059811988557, 35.8050242912672, 0.426153700944209, 0.475510717404433, + 0.450832209174321, "debCollin1:contcor2", "", 0, "debCollin1:contcor2", + 0.0125913069958291, 35.8050367069645, 0.236315041114868, 0.263685000649249, + 0.250000020882059, "facGenderm", "", 0, "facGenderm", + 0.0069822608349621, 35.8050245889182, 0.236315001260415, 0.26368495099514, + 0.249999976127778, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.00698225833500401, 35.8050309989904, + 0.975407576830999, 1.08837897810205, 1.03189327746652, "contcor2", + "", 0, "contcor2", 0.0288197645880626, 35.8050557392111 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.391910922570117, 0.557911004690411, "", 0.474910963630264, "", + "facGenderm", "contNormal", "", "", "", 0, 0.0423477378741858, + 11.2145533024979, -0.0082446366848504, 0.0037661597589055, 16, + -0.00223923846297245, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.464893010685424, 0.00306403498699352, + -0.730813607702838, -0.00808103130953919, 0.0239970539361381, + 16, 0.00795801131329943, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.330819021447659, 0.00818333538236036, + 0.972465497436824, -0.00789987104341213, 0.00382443764722054, + 16, -0.00203771669809579, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.495685397431206, 0.00299095003354973, + -0.681294129035443, -0.00918554067034087, 0.0236691901832378, + 16, 0.00724182475644845, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.387572107633509, 0.00838146290256672, + 0.864028731097852, -0.00402359769436255, 0.00300485284729362, + 50, -0.000509372423534464, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.77634242474679, 0.00179300502384118, + -0.284088676139473, -0.0102612362852843, 0.0138817452897511, + 50, 0.00181025450223337, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.768820234245478, 0.00615903704493353, + 0.293918430596631, -0.00391358341090018, 0.00329788209358458, + 50, -0.000307850658657804, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.86710408496639, 0.00183969337226803, + -0.167338026705111, -0.0115732644444706, 0.0137614003352354, + 50, 0.00109406794538239, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.865575925885035, 0.00646304344864053, + 0.169280611228526, -0.00342239853910491, 0.00612667333275448, + 84, 0.00135213739682479, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.578855529066291, 0.00243603248508168, + 0.555057210897355, -0.0194897708037837, 0.00987907066711024, + 84, -0.00480535006833673, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.521274970369139, 0.00749218906636847, + -0.641381314028415, -0.00354321789428845, 0.00665053621769134, + 84, 0.00155365916170145, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.550208707957958, 0.00260049526225656, + 0.597447410980197, -0.0207749928332832, 0.00973191958290774, + 84, -0.00552153662518772, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.478027031978333, 0.00778251862198121, + -0.709479397786791)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.391910922570117, 0.557911004690411, 0.474910963630264, "facGenderm", + "", 0, "contNormal", 0.0423477378741858, 11.2145533024979, + -0.775998371852353, 0.57509942058305, -0.100449475634652, "debCollin1", + "", 0.770720051020511, "contNormal", 0.344674137660868, + -0.291433167328284, -0.675058847612791, 0.631186922809024, -0.0219359624018836, + "facExperimexperimental", "", 0.947514857682004, "contNormal", + 0.333232085060061, -0.0658278820838332, -0.476780849026528, + 0.127660118904272, -0.174560365061128, "contcor2", "", + 0.257608782298365, "contNormal", 0.154196957877429, -1.13206101770105, + -0.936867591524202, 1.01728964674282, 0.0402110276093069, "debCollin1:facExperimexperimental", + "", 0.935711530902999, "contNormal", 0.498518659955275, + 0.0806610280403836, -0.132293352323467, 0.782084113817048, 0.324895380746791, + "debCollin1:contcor2", "", 0.163673147980072, "contNormal", + 0.233263843966779, 1.39282357360561, -0.00422885695131318, 0.0142520658498601, + 0.00501160444927346, "facGenderm", "", 0.287784220828373, + "debCollin1", 0.00471460775477214, 1.06299499554352, -0.0125866545942996, + 0.00589426820698572, -0.00334619319365694, "facExperimexperimental", + "", 0.477859135392946, "debCollin1", 0.00471460775480073, + -0.709750072049924, -0.0358902904688765, -0.00975431879822117, + -0.0228223046335489, "facGenderm:facExperimexperimental", "", + 0.000619483826785672, "debCollin1", 0.00666746222808495, -3.42293722151373 + )) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.389575304543542, 0.555768145791041, 16, 0.472671725167292, 0, + "Total", 0, 0.0423969120245084, 11.1487300040638, 0.397912890124336, + 0.567825059762791, 16, 0.482868974943564, 0, "Total", 0, 0.043345737722402, + 11.1399413256267, 0.389475500042087, 0.55627099382225, 16, 0.472873246932168, + 1, "Total", 0, 0.0425506527405159, 11.1131843221269, 0.398213483488069, + 0.566092093285356, 16, 0.482152788386713, 0, "Total", 0, 0.0428269629241897, + 11.2581597074767, 0.391398070238624, 0.557405112174835, 50, + 0.47440159120673, 0, "Total", 0, 0.0423495133700552, 11.2020553119785, + 0.392598899550508, 0.560843536714487, 50, 0.476721218132497, + 1, "Total", 0, 0.0429203389682339, 11.1071168027197, 0.3912838172315, + 0.557922408711712, 50, 0.474603112971606, 1, "Total", 0, 0.0425106259080871, + 11.1643407461879, 0.392896861001994, 0.559113202149299, 50, + 0.476005031575646, 1, "Total", 0, 0.0424029070070672, 11.2257641084917, + 0.39314303271609, 0.559383169338087, 84, 0.476263101027089, + 0, "Total", 0, 0.0424089773927679, 11.2302425171965, 0.385756378842524, + 0.55445484828133, 84, 0.470105613561927, 0, "Total", 0, 0.0430361146351357, + 10.9235142983405, 0.393014058153711, 0.55991518743022, 84, 0.476464622791966, + 1, "Total", 0, 0.0425776010663981, 11.1904994846689, 0.386037808999465, + 0.552741045010688, 84, 0.469389427005076, 0, "Total", 0, 0.0425271171629062, + 11.0374146737248, -0.0082446366848504, 0.0037661597589055, 16, + -0.00223923846297245, 0, "Total indirect", 0.464893010685424, + 0.00306403498699352, -0.730813607702838, -0.00808103130953919, + 0.0239970539361381, 16, 0.00795801131329943, 1, "Total indirect", + 0.330819021447659, 0.00818333538236036, 0.972465497436824, -0.00789987104341213, + 0.00382443764722054, 16, -0.00203771669809579, 1, "Total indirect", + 0.495685397431206, 0.00299095003354973, -0.681294129035443, + -0.00918554067034087, 0.0236691901832378, 16, 0.00724182475644845, + 1, "Total indirect", 0.387572107633509, 0.00838146290256672, + 0.864028731097852, -0.00402359769436255, 0.00300485284729362, + 50, -0.000509372423534464, 0, "Total indirect", 0.77634242474679, + 0.00179300502384118, -0.284088676139473, -0.0102612362852843, + 0.0138817452897511, 50, 0.00181025450223337, 0, "Total indirect", + 0.768820234245478, 0.00615903704493353, 0.293918430596631, -0.00391358341090018, + 0.00329788209358458, 50, -0.000307850658657804, 1, "Total indirect", + 0.86710408496639, 0.00183969337226803, -0.167338026705111, -0.0115732644444706, + 0.0137614003352354, 50, 0.00109406794538239, 0, "Total indirect", + 0.865575925885035, 0.00646304344864053, 0.169280611228526, -0.00342239853910491, + 0.00612667333275448, 84, 0.00135213739682479, 0, "Total indirect", + 0.578855529066291, 0.00243603248508168, 0.555057210897355, -0.0194897708037837, + 0.00987907066711024, 84, -0.00480535006833673, 1, "Total indirect", + 0.521274970369139, 0.00749218906636847, -0.641381314028415, + -0.00354321789428845, 0.00665053621769134, 84, 0.00155365916170145, + 1, "Total indirect", 0.550208707957958, 0.00260049526225656, + 0.597447410980197, -0.0207749928332832, 0.00973191958290774, + 84, -0.00552153662518772, 1, "Total indirect", 0.478027031978333, + 0.00778251862198121, -0.709479397786791, 0, 0, 1, 0, 0, 1, 1, + 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-64") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-64") +}) + + +context('Model number 65 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1403.04678020479, 1473.38637522646, 1019.10943666771, 15, 1, 100, + 1.07986547341907e-207, 0, 1019.10943666771, 15)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 65)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848615529459, 0.0642088375410346, -0.240319888994212, "contcor1", + "", 0.121932635671159, "contGamma", 0.155374654298411, + -1.5467123005317, -0.403934494938674, 0.194628250089699, -0.104653122424487, + "contcor2", "", 0.493114946070568, "contGamma", 0.152697383663618, + -0.685362904809364, 0.424979419633323, 0.896763822570732, 0.660871621102027, + "contcor2", "", 3.99659580985201e-08, "contcor1", 0.120355375572915, + 5.49100210901384, 0.744389509153586, 1.31529568537418, 1.02984259726389, + "contNormal", "", 1.53765888910584e-12, "contNormal", + 0.145642006874573, 7.07105470024719, 0.00465468718613714, 0.00822457185839234, + 0.00643962952226474, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910701599726831, 7.07106424782425, 0.32389166500815, + 0.572298053234521, 0.448094859121335, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633701410295723, + 7.07107246159082, 0.31853279756593, 0.562829348681308, 0.440681073123619, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623216939296737, 7.07107020584039, 1.68041144168819, 2.96919304958081, + 2.3248022456345, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776859691904, 7.0710640883092, 0.732634785073595, + 1.29452462138669, 1.01357970323014, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341877898065, 7.07106477250792, + 0.72154200474705, 1.27492428531659, 0.99823314503182, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171543185117, + 7.07106490805194)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.214331791757814, 0.16073179598061, 16, "", -0.0267999978886016, + "contGamma", "contNormal", "", "", "", 0.779403340820114, + 0.0956812448332923, -0.280096668216387, -0.145834699241884, + 0.125269857966767, 50, "", -0.0102824206375585, "contGamma", + "contNormal", "", "", "", 0.881810443587459, 0.0691605966607266, + -0.148674550741657, -0.212948953606123, 0.228437784810211, 84, + "", 0.00774441560204408, "contGamma", "contNormal", "", "", + "", 0.945166592954441, 0.112600726824048, 0.0687776697404951, + -0.0202407826437038, 0.0348496851816114, 16, 16, 0.00730445126895383, + "contGamma", "debCollin1", "contNormal", "", "", + 0.603242233803052, 0.0140539490163752, 0.519743686307877, -0.0240250411061439, + 0.0491830332672908, 16, 16, 0.0125789960805735, "contGamma", + "debCollin1", "contNormal", "", "", 0.500602140839979, + 0.0186758723504337, 0.673542624651822, -0.0352543489056073, + 0.0719253316358171, 50, 16, 0.0183354913651049, "contGamma", + "debCollin1", "contNormal", "", "", 0.502480664013419, + 0.0273422576605601, 0.670591711654921, -0.0447224093001771, + 0.0248548080622791, 16, 16, -0.00993380061894903, "contGamma", + "debCollin1", "contNormal", "", "", 0.575709435195139, + 0.0177496162968484, -0.559662837371468, -0.0607597900758668, + 0.0265457924872827, 84, 16, -0.0171069987942921, "contGamma", + "debCollin1", "contNormal", "", "", 0.442436043736327, + 0.0222722415441827, -0.768086084211865, -0.0889290268464311, + 0.0390577610210105, 16, 16, -0.0249356329127103, "contGamma", + "debCollin1", "contNormal", "", "", 0.445034980032741, + 0.0326502907392649, -0.763718556500418, -0.113637781680981, + 0.0561434584223794, 16, 16, -0.0287471616293007, "contGamma", + "debCollin1", "contNormal", "", "", 0.506871051184891, + 0.0433123367170451, -0.663717633548678, -0.134784028266426, + 0.0357730498512398, 50, 16, -0.0495054892075933, "contGamma", + "debCollin1", "contNormal", "", "", 0.255208637447573, + 0.0435102582146914, -1.13778890861368, -0.198019536831395, 0.053698405943541, + 50, 16, -0.0721605654439268, "contGamma", "debCollin1", "contNormal", + "", "", 0.261125537287556, 0.0642149408765811, + -1.1237348264887, -0.0313513210702246, 0.0637151806538074, 50, + 50, 0.0161819297917914, "contGamma", "debCollin1", "contNormal", + "", "", 0.504620009795561, 0.024252104241176, + 0.667238175742178, -0.019388651211118, 0.0751224562382581, 84, + 50, 0.02786690251357, "contGamma", "debCollin1", "contNormal", + "", "", 0.247761619911059, 0.0241104194247618, + 1.15580330738462, -0.0291502178528768, 0.110389348088219, 50, + 50, 0.040619565117671, "contGamma", "debCollin1", "contNormal", + "", "", 0.253836748086893, 0.0355974821582861, + 1.1410797240393, -0.0150446471959717, 0.0129320030037488, 16, + 50, -0.00105632209611146, "contGamma", "debCollin1", "contNormal", + "", "", 0.882338189939158, 0.00713703170578561, + -0.148005801242996, -0.0255099623092681, 0.0218717775866771, + 84, 50, -0.00181909236129552, "contGamma", "debCollin1", "contNormal", + "", "", 0.880374160507901, 0.0120874006537075, + -0.150494917262262, -0.0371916264373687, 0.0318885081170804, + 50, 50, -0.00265155916014417, "contGamma", "debCollin1", "contNormal", + "", "", 0.880400292214625, 0.0176228071279229, + -0.150461793112565, -0.0785789164744302, 0.038839550261504, + 84, 50, -0.0198696831064631, "contGamma", "debCollin1", "contNormal", + "", "", 0.507116309400947, 0.0299542409100668, + -0.663334556402845, -0.0932610335561105, 0.0248258680069169, + 84, 50, -0.0342175827745968, "contGamma", "debCollin1", "contNormal", + "", "", 0.256014198002316, 0.0301247631319968, + -1.13586230121268, -0.137012591634645, 0.0372596082519236, 84, + 50, -0.0498764916913607, "contGamma", "debCollin1", "contNormal", + "", "", 0.261914053058059, 0.0444580107749952, + -1.12187861809177, -0.0513798286606208, 0.104555223133137, 16, + 84, 0.0265876972362582, "contGamma", "debCollin1", "contNormal", + "", "", 0.503899292428013, 0.0397800809157091, + 0.668367097910018, -0.0314623158714253, 0.123035666698712, 16, + 84, 0.0457866754136436, "contGamma", "debCollin1", "contNormal", + "", "", 0.245356916457753, 0.0394134748874975, + 1.16170105641124, -0.047328012460704, 0.18080785239487, 50, + 84, 0.0667399199670828, "contGamma", "debCollin1", "contNormal", + "", "", 0.251483371997121, 0.058198994128229, + 1.14675383942265, -0.0233146980654664, 0.042013588762177, 16, + 84, 0.00934944534835531, "contGamma", "debCollin1", "contNormal", + "", "", 0.574797710344034, 0.0166656855286486, + 0.560999745992052, -0.02479963103894, 0.057000992116496, 84, + 84, 0.016100680538778, "contGamma", "debCollin1", "contNormal", + "", "", 0.440379279956897, 0.020867889359363, + 0.771552899361813, -0.0364926395478355, 0.0834302309263707, + 16, 84, 0.0234687956892676, "contGamma", "debCollin1", "contNormal", + "", "", 0.443006422878388, 0.0305931311544861, + 0.767126305926557, -0.0426362628895676, 0.023708431565575, 16, + 84, -0.00946391566199631, "contGamma", "debCollin1", "contNormal", + "", "", 0.576046683392307, 0.0169249779532841, + -0.559168566607198, -0.0579549659047121, 0.0253593461556656, + 50, 84, -0.0162978098745233, "contGamma", "debCollin1", "contNormal", + "", "", 0.443194538935376, 0.0212540415838123, + -0.766809917551686, -0.0848228528849707, 0.0373105792010729, + 50, 84, -0.0237561368419489, "contGamma", "debCollin1", "contNormal", + "", "", 0.445783120939371, 0.0311570602953464, + -0.762464000671369)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.145835135269376, 0.125146853870265, -0.0103441406995555, "contGamma", + "", 0.881052894404491, "contNormal", 0.0691293287216276, + -0.149634618053499, -2.31532568576367, 2.78531687551206, 0.234995594874195, + "debCollin1", "", 0.85668313204388, "contNormal", 1.30120823686276, + 0.180597992094467, -4.28113571775036, 0.442162888353815, -1.91948641469827, + "contcor1", "", 0.111158585535365, "contNormal", 1.20494525495391, + -1.59300715680374, -1.06800074668119, 3.01246784044244, 0.972233546880625, + "contcor2", "", 0.350313018685853, "contNormal", 1.0409549918544, + 0.933982309022452, -0.159098544082765, 6.70679376158842, 3.27384760875283, + "debCollin1:contcor1", "", 0.0616046992864261, "contNormal", + 1.75153532407444, 1.86913022178575, -0.132929443398119, 0.166841565374514, + 0.0169560609881979, "contGamma:contcor1", "", 0.824528458661965, + "contNormal", 0.0764736013358379, 0.221724368828067, -4.82825906309699, + 1.38437183277314, -1.72194361516192, "debCollin1:contcor2", + "", 0.277266989119187, "contNormal", 1.5848839429894, + -1.08647931148447, -0.019747507426246, 0.00116001637693632, + -0.00929374552465485, "contGamma", "", 0.0814255673313009, + "debCollin1", 0.00533364999767807, -1.7424738272479, -0.0185476090790011, + 0.0350787641492855, 0.00826557753514219, "contcor1", "", + 0.545717946949592, "debCollin1", 0.0136804486335679, 0.604189069857023, + -0.0145563088304594, 0.00654286134734123, -0.00400672374155909, + "contGamma:contcor1", "", 0.456638928237994, "debCollin1", + 0.00538254027732862, -0.744392709597642)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.205599470582752, 0.166608377343456, 16, 16, -0.0194955466196477, + "Total", 0.837323329988353, 0.0949527263924582, -0.205318450141903, + -0.140187456647773, 0.134231517910564, 16, 16, -0.00297796936860466, + "Total", 0.966069264464457, 0.0700061268275639, -0.0425386963049658, + -0.209078693111961, 0.239176426853956, 16, 16, 0.0150488668709979, + "Total", 0.895300508422042, 0.114352897170993, 0.131600223897215, + -0.199376766753687, 0.170934763137631, 50, 16, -0.0142210018080281, + "Total", 0.880341566646612, 0.0944689629024532, -0.150536232971165, + -0.136217246399732, 0.140810397285762, 16, 16, 0.00229657544301499, + "Total", 0.974076160438666, 0.0706716158742335, 0.0324964331805, + -0.206324934118645, 0.24697175748388, 16, 16, 0.0203234116826176, + "Total", 0.860491363914142, 0.115639036017516, 0.175748712394481, + -0.195002119871344, 0.17807310682435, 84, 16, -0.00846450652349666, + "Total", 0.929131841052072, 0.0951740005526795, -0.0889371726978262, + -0.135042620370561, 0.151148761825654, 16, 16, 0.00805307072754641, + "Total", 0.912169939499363, 0.073009347226188, 0.110301913843955, + -0.205236784295734, 0.257396598230032, 16, 16, 0.026079906967149, + "Total", 0.825110308354517, 0.118020888693609, 0.220977042757697, + -0.227377186480561, 0.15390958946546, 16, 16, -0.0367337985075506, + "Total", 0.705688875335113, 0.0972688220175375, -0.377652342709851, + -0.157079725857232, 0.116647283344217, 50, 16, -0.0202162212565075, + "Total", 0.772192736618562, 0.0698296018091587, -0.289507898265804, + -0.221662276543554, 0.217283506509744, 16, 16, -0.00218938501690496, + "Total", 0.984400821085055, 0.111978022687061, -0.0195519171027293, + -0.236302463751314, 0.148488470385526, 50, 16, -0.0439069966828936, + "Total", 0.654667323420343, 0.098162756349612, -0.447287732289387, + -0.164542440900005, 0.109763602036304, 50, 16, -0.0273894194318506, + "Total", 0.695498450595485, 0.0699773172109285, -0.391404251027404, + -0.227541014116867, 0.208815847732371, 16, 16, -0.00936258319224799, + "Total", 0.93297138625021, 0.111317571468447, -0.0841069659420467, + -0.24967296398901, 0.146201702386386, 84, 16, -0.0517356308013119, + "Total", 0.60845281194033, 0.100990291020142, -0.512283213353581, + -0.177795290927893, 0.107359183827355, 50, 16, -0.0352180535502688, + "Total", 0.628292622961506, 0.0727448251612045, -0.484131393157172, + -0.237223661764438, 0.202841227143106, 16, 16, -0.0171912173106662, + "Total", 0.878293613082395, 0.112263514120341, -0.153132720326553, + -0.26462802463032, 0.153533705594515, 16, 16, -0.0555471595179022, + "Total", 0.602569024289147, 0.106675870965804, -0.520709688282822, + -0.194372870338455, 0.116313705804737, 84, 16, -0.0390295822668591, + "Total", 0.62241139085852, 0.0792582360170516, -0.492435666350969, + -0.247758730029337, 0.205753237974824, 16, 16, -0.0210027460272566, + "Total", 0.855946008225704, 0.115693954476053, -0.181537109025034, + -0.28784411445969, 0.1352331402673, 50, 16, -0.0763054870961949, + "Total", 0.479571774544463, 0.107929854340225, -0.706991476664638, + -0.211942466221622, 0.0923666465313181, 84, 16, -0.0597879098451518, + "Total", 0.441209678173175, 0.0776313021956759, -0.770152092701622, + -0.261395733656211, 0.177873586445113, 16, 16, -0.0417610736055493, + "Total", 0.709397620658511, 0.11206055916492, -0.372665225988115, + -0.332140410690941, 0.134219284025884, 84, 16, -0.0989605633325284, + "Total", 0.405521497727829, 0.118971496005899, -0.831800613212612, + -0.257305489526261, 0.09241951736329, 84, 16, -0.0824429860814853, + "Total", 0.355449603778478, 0.0892172023690581, -0.924070514343743, + -0.295210505909998, 0.166378206226232, 16, 16, -0.0644161498418827, + "Total", 0.584352474646929, 0.117754386248212, -0.547038219927545, + -0.200334316146287, 0.179098179952667, 16, 50, -0.0106180680968102, + "Total", 0.912650817658829, 0.0967957827520989, -0.109695565188039, + -0.137196603514533, 0.148995621822999, 16, 50, 0.00589950915423292, + "Total", 0.935597342411463, 0.0730095623172108, 0.0808046092455783, + -0.204552123662524, 0.252404814450195, 50, 50, 0.0239263453938355, + "Total", 0.837378278661379, 0.116572789530098, 0.205248115707636, + -0.185827399994086, 0.187961209244023, 50, 50, 0.00106690462496848, + "Total", 0.9910729365387, 0.0953559892392172, 0.0111886482797841, + -0.125021846596787, 0.16019081034881, 16, 50, 0.0175844818760115, + "Total", 0.8090289229163, 0.072759667829439, 0.241678974088125, + -0.194757173849222, 0.265979810080451, 50, 50, 0.0356113181156141, + "Total", 0.761905582206871, 0.117537104651899, 0.302979371672304, + -0.177054898627538, 0.204694033085677, 84, 50, 0.0138195672290695, + "Total", 0.887155818826684, 0.0973867210633463, 0.141904020159796, + -0.120816119942897, 0.181490408903122, 16, 50, 0.0303371444801126, + "Total", 0.694043532193194, 0.0771204295667099, 0.393373644967455, + -0.189710750835032, 0.286438712274462, 50, 50, 0.0483639807197151, + "Total", 0.690512790025796, 0.121468931792956, 0.39815926596071, + -0.215438945929253, 0.159726305959827, 16, 50, -0.027856319984713, + "Total", 0.771007124286927, 0.0957071800421679, -0.29105778659908, + -0.145004104260162, 0.122326618792822, 50, 50, -0.0113387427336699, + "Total", 0.867950433513227, 0.0681978661755149, -0.166262426810956, + -0.211537371810118, 0.224913558821983, 50, 50, 0.00668809350593261, + "Total", 0.9521012749609, 0.111341569047893, 0.0600682527031368, + -0.216835186446961, 0.159597005947166, 50, 50, -0.0286190902498971, + "Total", 0.765686985947382, 0.096030385089567, -0.298021196345346, + -0.145232638922171, 0.121029612924463, 50, 50, -0.012101512998854, + "Total", 0.858597981725494, 0.0679252919816072, -0.178159160539653, + -0.211018117474088, 0.222868763955585, 50, 50, 0.00592532324074856, + "Total", 0.95730802062996, 0.110687462844245, 0.0535320178861305, + -0.218971684045416, 0.160068569947924, 84, 50, -0.0294515570487457, + "Total", 0.760686252027949, 0.0966957191517704, -0.304579740521083, + -0.146354785139165, 0.120486825543759, 50, 50, -0.0129339797977027, + "Total", 0.849308064154085, 0.0680730903189387, -0.19000136084764, + -0.210982021563853, 0.221167734447653, 50, 50, 0.00509285644189991, + "Total", 0.963153956319553, 0.110244310461888, 0.0461960932093682, + -0.246199325658083, 0.152859963667954, 16, 50, -0.0466696809950646, + "Total", 0.646641674498852, 0.101802709762466, -0.458432600703437, + -0.173404600734762, 0.113100393246719, 84, 50, -0.0301521037440216, + "Total", 0.679945447255837, 0.0730893517027345, -0.412537572732274, + -0.231504415654061, 0.207253880645223, 50, 50, -0.012125267504419, + "Total", 0.913734849929601, 0.111930193554615, -0.108328835315581, + -0.26279935067719, 0.140764189350793, 50, 50, -0.0610175806631983, + "Total", 0.55339452896241, 0.102951774423214, -0.592681194715182, + -0.184578421242482, 0.0955784144181712, 84, 50, -0.0445000034121553, + "Total", 0.533521222916838, 0.071469893801747, -0.622639842387278, + -0.239217194980607, 0.186270860635501, 50, 50, -0.0264731671725527, + "Total", 0.807314873726606, 0.108544865868022, -0.243891472533957, + -0.290606125992789, 0.137253146832865, 84, 50, -0.0766764895799622, + "Total", 0.482374429239619, 0.109149779332823, -0.702488727404184, + -0.210837693996939, 0.0905198693391009, 84, 50, -0.0601589123289191, + "Total", 0.433908485398437, 0.0768783420800357, -0.782520937643134, + -0.257061060965834, 0.172796908787201, 50, 50, -0.0421320760893166, + "Total", 0.700824577972545, 0.109659660367155, -0.384207610604055, + -0.199320465853936, 0.198895864549249, 16, 84, -0.000212300652343386, + "Total", 0.998332560463865, 0.10158766526943, -0.00208982706493278, + -0.140127212470523, 0.172737765667922, 16, 84, 0.0163052765986997, + "Total", 0.838126076321621, 0.0798139610233361, 0.204291033669314, + -0.203514856682638, 0.272179082359242, 84, 84, 0.0343321128383022, + "Total", 0.777244479801389, 0.121352724538332, 0.282911759656931, + -0.176908632227423, 0.214881987277507, 50, 84, 0.018986677525042, + "Total", 0.849336750576328, 0.0999484231841311, 0.189964753021302, + -0.120612450594304, 0.191620960146474, 16, 84, 0.0355042547760851, + "Total", 0.655786916207639, 0.0796528439307137, 0.445737440422951, + -0.18678082323541, 0.293843005266785, 84, 84, 0.0535310910156876, + "Total", 0.662404998127015, 0.122610372510233, 0.43659512584239, + -0.17019272325437, 0.250072567411332, 84, 84, 0.0399399220784813, + "Total", 0.709497945354053, 0.107212503387996, 0.372530449493758, + -0.12082903458857, 0.233744033247619, 16, 84, 0.0564574993295243, + "Total", 0.532524356556854, 0.0904539753365411, 0.624157192864877, + -0.182813065010137, 0.331781736148391, 84, 84, 0.0744843355691269, + "Total", 0.570452824836294, 0.131276596207274, 0.567384725998858, + -0.206899216038074, 0.171998110957582, 16, 84, -0.0174505525402462, + "Total", 0.856731170850194, 0.0966592575129824, -0.180536794811428, + -0.138456802011623, 0.136590851433217, 50, 84, -0.000932975289203174, + "Total", 0.989391168582588, 0.070166507041553, -0.0132965901901125, + -0.204362391319104, 0.238550113219903, 84, 84, 0.0170938609503994, + "Total", 0.879749680711536, 0.112989960028002, 0.151286547461058, + -0.201088521411307, 0.17968988671166, 50, 84, -0.0106993173498235, + "Total", 0.912294972800499, 0.097139133965343, -0.11014425302207, + -0.132518345291883, 0.144154865094322, 50, 84, 0.00581825990121954, + "Total", 0.934301944000293, 0.0705811975547938, 0.0824335673350215, + -0.197789489115167, 0.245479681396812, 84, 84, 0.0238450961408221, + "Total", 0.832990669576563, 0.11308094791752, 0.210867494303411, + -0.198008453903163, 0.191346049504495, 84, 84, -0.00333120219933395, + "Total", 0.973245765319841, 0.0993269535764015, -0.0335377465973686, + -0.130490359100029, 0.156863109203447, 50, 84, 0.0131863750517091, + "Total", 0.857245414823824, 0.0733058032112029, 0.179881734788685, + -0.193440776700818, 0.255867199283441, 84, 84, 0.0312132112913117, + "Total", 0.785379415504472, 0.114621487825374, 0.272315530739446, + -0.229390791939618, 0.156862964838422, 16, 84, -0.0362639135505979, + "Total", 0.712852874713081, 0.0985359322479291, -0.368027304591316, + -0.155208543023517, 0.115715870424407, 84, 84, -0.0197463362995548, + "Total", 0.77510476352945, 0.0691146407752749, -0.28570410086858, + -0.216963747629504, 0.2135247475096, 84, 84, -0.00171950005995224, + "Total", 0.987507738992083, 0.109820511635607, -0.0156573670468561, + -0.239760575631255, 0.153564960105006, 50, 84, -0.0430978077631248, + "Total", 0.667546473900391, 0.10033999064237, -0.429517757448607, + -0.161386366087067, 0.108225905062904, 84, 84, -0.0265802305120817, + "Total", 0.699160880540625, 0.068779904446367, -0.386453437614302, + -0.219397093918612, 0.202290305373653, 84, 84, -0.00855339427247918, + "Total", 0.936626366226673, 0.107575292867237, -0.0795107691041593, + -0.254225792649008, 0.153113523187907, 84, 84, -0.0505561347305504, + "Total", 0.626602561320756, 0.103915000237238, -0.486514310880343, + -0.172891264728155, 0.10481414976914, 84, 84, -0.0340385574795074, + "Total", 0.630894323282505, 0.0708445197686796, -0.480468462354598, + -0.22508017027608, 0.193056727796271, 84, 84, -0.0160117212399048, + "Total", 0.880681105742823, 0.106669536116623, -0.150105848612663, + -0.0202407826437038, 0.0348496851816114, 16, 16, 0.00730445126895383, + "Total indirect", 0.603242233803052, 0.0140539490163752, 0.519743686307877, + -0.0240250411061439, 0.0491830332672908, 16, 16, 0.0125789960805735, + "Total indirect", 0.500602140839979, 0.0186758723504337, 0.673542624651822, + -0.0352543489056073, 0.0719253316358171, 16, 16, 0.0183354913651049, + "Total indirect", 0.502480664013419, 0.0273422576605601, 0.670591711654921, + -0.0447224093001771, 0.0248548080622791, 50, 16, -0.00993380061894903, + "Total indirect", 0.575709435195139, 0.0177496162968484, -0.559662837371468, + -0.0607597900758668, 0.0265457924872827, 16, 16, -0.0171069987942921, + "Total indirect", 0.442436043736327, 0.0222722415441827, -0.768086084211865, + -0.0889290268464311, 0.0390577610210105, 16, 16, -0.0249356329127103, + "Total indirect", 0.445034980032741, 0.0326502907392649, -0.763718556500418, + -0.113637781680981, 0.0561434584223794, 84, 16, -0.0287471616293007, + "Total indirect", 0.506871051184891, 0.0433123367170451, -0.663717633548678, + -0.134784028266426, 0.0357730498512398, 16, 16, -0.0495054892075933, + "Total indirect", 0.255208637447573, 0.0435102582146914, -1.13778890861368, + -0.198019536831395, 0.053698405943541, 16, 16, -0.0721605654439268, + "Total indirect", 0.261125537287556, 0.0642149408765811, -1.1237348264887, + -0.0313513210702246, 0.0637151806538074, 16, 50, 0.0161819297917914, + "Total indirect", 0.504620009795561, 0.024252104241176, 0.667238175742178, + -0.019388651211118, 0.0751224562382581, 50, 50, 0.02786690251357, + "Total indirect", 0.247761619911059, 0.0241104194247618, 1.15580330738462, + -0.0291502178528768, 0.110389348088219, 16, 50, 0.040619565117671, + "Total indirect", 0.253836748086893, 0.0355974821582861, 1.1410797240393, + -0.0150446471959717, 0.0129320030037488, 50, 50, -0.00105632209611146, + "Total indirect", 0.882338189939158, 0.00713703170578561, -0.148005801242996, + -0.0255099623092681, 0.0218717775866771, 50, 50, -0.00181909236129552, + "Total indirect", 0.880374160507901, 0.0120874006537075, -0.150494917262262, + -0.0371916264373687, 0.0318885081170804, 16, 50, -0.00265155916014417, + "Total indirect", 0.880400292214625, 0.0176228071279229, -0.150461793112565, + -0.0785789164744302, 0.038839550261504, 84, 50, -0.0198696831064631, + "Total indirect", 0.507116309400947, 0.0299542409100668, -0.663334556402845, + -0.0932610335561105, 0.0248258680069169, 50, 50, -0.0342175827745968, + "Total indirect", 0.256014198002316, 0.0301247631319968, -1.13586230121268, + -0.137012591634645, 0.0372596082519236, 16, 50, -0.0498764916913607, + "Total indirect", 0.261914053058059, 0.0444580107749952, -1.12187861809177, + -0.0513798286606208, 0.104555223133137, 16, 84, 0.0265876972362582, + "Total indirect", 0.503899292428013, 0.0397800809157091, 0.668367097910018, + -0.0314623158714253, 0.123035666698712, 84, 84, 0.0457866754136436, + "Total indirect", 0.245356916457753, 0.0394134748874975, 1.16170105641124, + -0.047328012460704, 0.18080785239487, 16, 84, 0.0667399199670828, + "Total indirect", 0.251483371997121, 0.058198994128229, 1.14675383942265, + -0.0233146980654664, 0.042013588762177, 50, 84, 0.00934944534835531, + "Total indirect", 0.574797710344034, 0.0166656855286486, 0.560999745992052, + -0.02479963103894, 0.057000992116496, 84, 84, 0.016100680538778, + "Total indirect", 0.440379279956897, 0.020867889359363, 0.771552899361813, + -0.0364926395478355, 0.0834302309263707, 16, 84, 0.0234687956892676, + "Total indirect", 0.443006422878388, 0.0305931311544861, 0.767126305926557, + -0.0426362628895676, 0.023708431565575, 84, 84, -0.00946391566199631, + "Total indirect", 0.576046683392307, 0.0169249779532841, -0.559168566607198, + -0.0579549659047121, 0.0253593461556656, 84, 84, -0.0162978098745233, + "Total indirect", 0.443194538935376, 0.0212540415838123, -0.766809917551686, + -0.0848228528849707, 0.0373105792010729, 16, 84, -0.0237561368419489, + "Total indirect", 0.445783120939371, 0.0311570602953464, -0.762464000671369, + 16, 16, 50, 50, 16, 50, 84, 16, 50, 16, 50, 50, 50, 50, 50, + 84, 50, 50, 16, 84, 50, 50, 84, 50, 84, 84, 50, 16, 16, 84, + 50, 16, 84, 84, 16, 84, 16, 50, 84, 50, 50, 84, 84, 50, 84, + 16, 84, 84, 50, 84, 84, 84, 84, 84, 16, 16, 16, 50, 16, 16, + 84, 16, 16, 16, 50, 16, 50, 50, 16, 84, 50, 16, 16, 84, 16, + 50, 84, 16, 84, 84, 16, 16, 16, 50, 50, 16, 50, 84, 16, 50, + 16, 50, 50, 50, 50, 50, 84, 50, 50, 16, 84, 50, 50, 84, 50, + 84, 84, 50, 16, 16, 84, 50, 16, 84, 84, 16, 84, 16, 50, 84, + 50, 50, 84, 84, 50, 84, 16, 84, 84, 50, 84, 84, 84, 84, 84, + 16, 16, 50, 16, 84, 16, 16, 50, 50, 50, 84, 50, 16, 84, 50, + 84, 84, 84, 16, 16, 50, 16, 84, 16, 16, 50, 50, 50, 84, 50, + 16, 84, 50, 84, 84, 84, 16, 16, 50, 16, 84, 16, 16, 50, 50, + 50, 84, 50, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-65") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-65") +}) + + +context('Model number 65 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(22995.7910522019, 23153.722795289, 24948.191600871, 15, 1, 2564, + 0, 0, 24948.191600871, 15)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 65)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.067866342041088, 0.0881399908335741, 0.0780031664373311, "facExperimexperimental", + "", 0, "facGenderm", 0.00517194421744532, 15.0819813899425, + -0.0939553337611478, -0.0542198520724305, -0.0740875929167892, + "contcor2", "", 2.69562150378988e-13, "facGenderm", + 0.0101367887374834, -7.30878336675117, -0.0997950273455898, + -0.0599921769329827, -0.0798936021392863, "contcor2", "", + 3.5527136788005e-15, "facExperimexperimental", 0.0101539749522356, + -7.86820949579911, 0.960812782331933, 1.07209378580905, 1.01645328407049, + "contNormal", "", 0, "contNormal", 0.0283885327370513, + 35.80506585125, 0.00607839625461783, 0.00678239482461987, 0.00643039553961885, + "debCollin1", "", 0, "debCollin1", 0.000179594772035376, + 35.805026319765, 0.103586133144156, 0.115583458595462, 0.109584795869809, + "debCollin1:facExperimexperimental", "", 0, "debCollin1:facExperimexperimental", + 0.00306059844618061, 35.8050223826528, 0.426154063128636, 0.475511168642682, + 0.450832615885659, "debCollin1:contcor2", "", 0, "debCollin1:contcor2", + 0.0125913297140581, 35.8050044057149, 0.236314956811027, 0.263684895616961, + 0.249999926213994, "facGenderm", "", 0, "facGenderm", + 0.00698225554699586, 35.8050381472441, 0.236315004017891, 0.263684954430618, + 0.249999979224255, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.00698225850796689, 35.8050305555143, + 0.975408558765377, 1.08838020147385, 1.03189438011961, "contcor2", + "", 0, "contcor2", 0.0288198261803726, 35.8050174786402 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.495423380095877, 0.72795672362702, "", 0.611690051861448, 0, + "facGenderm", "contNormal", "", "", "", 0, 0.0593208205266362, + 10.3115575009079, 0.21436231866983, 0.451352092245648, "", 0.332857205457739, + 1, "facGenderm", "contNormal", "", "", "", 3.67865704564707e-08, + 0.0604576858159545, 5.50562266757983, -0.00803077580560515, + 0.00373630765429913, 16, -0.00214723407565301, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.474423262760572, + 0.00300186216499934, -0.715300689248496, -0.0083348707178276, + 0.0235968938355408, 16, 0.00763101155885659, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.348872101779747, + 0.00814600798923911, 0.936779287343834, -0.00832803944414416, + 0.00386053500472265, 16, -0.00223375221971076, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.47251696203032, + 0.00310938735226992, -0.718389819808094, -0.00854802054217614, + 0.0244249938088661, 16, 0.007938486633345, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.345297207561434, + 0.00841163781863576, 0.943750409195876, -0.00417114803467272, + 0.00295229646039645, 50, -0.000609425787138134, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.737354931155402, + 0.00181723862052007, -0.335358152890084, -0.00989812519657992, + 0.0142297770445528, 50, 0.00216582592398645, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.724935862737343, + 0.00615519020539422, 0.351869861322626, -0.00448093826546886, + 0.0030890504030771, 50, -0.000695943931195879, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.718565197001241, + 0.00193115504372965, -0.360377036248627, -0.0102464037634032, + 0.015193005760353, 50, 0.00247330099847487, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.703123132590193, + 0.00648976453761881, 0.381107971504673, -0.00345571644487196, + 0.00554653760320837, 84, 0.00104541057916821, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.648956720334752, + 0.00229653557899251, 0.455212010966025, -0.0182987007907651, + 0.0108681739526909, 84, -0.00371526341903708, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.617554907284116, + 0.00744066599527353, -0.499318666016873, -0.00361814097944257, + 0.00553592584966349, 84, 0.00095889243511046, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.681355493931447, + 0.00233526404089875, 0.410614139693351, -0.0185152730560521, + 0.0116996963669548, 84, -0.00340778834454867, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.658410932456481, + 0.00770804200009254, -0.442108170208174)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.495423380095877, 0.72795672362702, 0.611690051861448, "facGenderm", + "", 0, "contNormal", 0.0593208205266362, 10.3115575009079, + -0.794782525579688, 0.553691720324327, -0.120545402627681, "debCollin1", + "", 0.726025216102357, "contNormal", 0.344004853288277, + -0.350417738224941, -0.507026648858311, 0.813085853843327, 0.153029602492508, + "facExperimexperimental", "", 0.649537737422605, "contNormal", + 0.33676958176643, 0.454404467558603, -0.461031447709239, 0.142415089571199, + -0.15930817906902, "contcor2", "", 0.300739016385481, + "contNormal", 0.153943271927532, -1.03484989681143, -0.992893423145288, + 0.95836642290698, -0.0172635001191538, "debCollin1:facExperimexperimental", + "", 0.972334097623437, "contNormal", 0.497779515706298, + -0.0346810175478166, -0.445168716708819, -0.1124969760986, -0.27883284640371, + "facGenderm:facExperimexperimental", "", 0.00101788867199559, + "contNormal", 0.0848667993989407, -3.28553507824628, -0.167913275288494, + 0.745559182584747, 0.288822953648127, "debCollin1:contcor2", + "", 0.215194398914501, "contNormal", 0.233032970268483, + 1.23940811171641, -0.00422883893930822, 0.014252083757635, 0.00501162240916337, + "facGenderm", "", 0.287782490562304, "debCollin1", + 0.00471460772818234, 1.06299881095209, -0.0125866642389563, + 0.00589425845815316, -0.00334620289040156, "facExperimexperimental", + "", 0.47785785725643, "debCollin1", 0.00471460772822475, + -0.709752132795477, -0.035890311235972, -0.00975433971276905, + -0.0228223254743705, "facGenderm:facExperimexperimental", "", + 0.000619476659389662, "debCollin1", 0.00666746219046886, -3.42294036657532 + )) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.493174670357171, 0.72591096521442, 16, 0.609542817785795, 0, + "Total", 0, 0.0593725947754763, 10.2664001816132, 0.212192575199523, + 0.449227367564648, 16, 0.330709971382086, 0, "Total", 4.5240958312931e-08, + 0.0604691704120142, 5.46906744591917, 0.501796708264602, 0.736845418576008, + 16, 0.619321063420305, 0, "Total", 0, 0.0599625075168321, 10.3284717245431, + 0.220488179695854, 0.460488254337337, 16, 0.340488217016595, + 1, "Total", 2.67920368113295e-08, 0.061225633872503, 5.56120362470452, + 0.492975913151289, 0.725936686132186, 16, 0.609456299641737, + 0, "Total", 0, 0.0594298606552115, 10.2550518026209, 0.211755160237163, + 0.449491746238893, 16, 0.330623453238028, 0, "Total", 4.99477581517027e-08, + 0.060648202690704, 5.45149631101443, 0.50238963301514, 0.736867443974446, + 16, 0.619628538494793, 0, "Total", 0, 0.0598168672508366, 10.358759443159, + 0.221926668418318, 0.459664715763849, 16, 0.340795692091084, + 1, "Total", 1.91858018361302e-08, 0.0606485754893401, 5.61918708463291, + 0.494851692961977, 0.727309559186643, 50, 0.61108062607431, + 0, "Total", 0, 0.0593015657579076, 10.3046288620604, 0.213706167765891, + 0.45078939157531, 50, 0.3322477796706, 1, "Total", 3.94321324481695e-08, + 0.0604815255993226, 5.49337630587681, 0.496639224054325, 0.731072531516544, + 50, 0.613855877785435, 1, "Total", 0, 0.0598055141092897, 10.2642020042443, + 0.215891591577416, 0.454154471186034, 50, 0.335023031381725, + 0, "Total", 3.55107754312911e-08, 0.0607824637309677, 5.51183698088625, + 0.494656600493135, 0.72733161536737, 50, 0.610994107930252, + 0, "Total", 0, 0.0593569618394893, 10.2935542688738, 0.213272541795578, + 0.451049981257507, 50, 0.332161261526543, 0, "Total", 4.35265157250342e-08, + 0.0606586246832816, 5.47591151729642, 0.497235651839864, 0.731091053879983, + 50, 0.614163352859923, 1, "Total", 0, 0.059658086547697, 10.2947209406204, + 0.217341133068611, 0.453319879843816, 50, 0.335330506456213, + 1, "Total", 2.54307155334033e-08, 0.0601997660764624, 5.57029583853026, + 0.496522325378124, 0.728948599503109, 84, 0.612735462440616, + 0, "Total", 0, 0.059293506400713, 10.3339387335212, 0.215203565724867, + 0.452601666348947, 84, 0.333902616036907, 1, "Total", 3.51937428089144e-08, + 0.0605618527933794, 5.5134148087591, 0.490302156199996, 0.725647420684826, + 84, 0.607974788442411, 0, "Total", 0, 0.0600381604818259, 10.1264726227988, + 0.210172973250434, 0.448110910826969, 84, 0.329141942038702, + 1, "Total", 5.87791797457271e-08, 0.0606995688322231, 5.42247578312241, + 0.496331307010524, 0.728966581582593, 84, 0.612648944296559, + 1, "Total", 0, 0.0593468238210157, 10.3231968427535, 0.214774394087289, + 0.452857801698409, 84, 0.333816097892849, 1, "Total", 3.88237628712318e-08, + 0.0607366792168356, 5.49612033777965, 0.490900411389241, 0.725664115644558, + 84, 0.6082822635169, 1, "Total", 0, 0.059889800554271, 10.1566920892596, + 0.211627028352656, 0.447271805873724, 84, 0.32944941711319, + 1, "Total", 4.24463599824065e-08, 0.0601145682726326, 5.48035903076049, + -0.00803077580560515, 0.00373630765429913, 16, -0.00214723407565301, + 0, "Total indirect", 0.474423262760572, 0.00300186216499934, + -0.715300689248496, -0.0083348707178276, 0.0235968938355408, + 16, 0.00763101155885659, 0, "Total indirect", 0.348872101779747, + 0.00814600798923911, 0.936779287343834, -0.00832803944414416, + 0.00386053500472265, 16, -0.00223375221971076, 0, "Total indirect", + 0.47251696203032, 0.00310938735226992, -0.718389819808094, -0.00854802054217614, + 0.0244249938088661, 16, 0.007938486633345, 1, "Total indirect", + 0.345297207561434, 0.00841163781863576, 0.943750409195876, -0.00417114803467272, + 0.00295229646039645, 50, -0.000609425787138134, 0, "Total indirect", + 0.737354931155402, 0.00181723862052007, -0.335358152890084, + -0.00989812519657992, 0.0142297770445528, 50, 0.00216582592398645, + 0, "Total indirect", 0.724935862737343, 0.00615519020539422, + 0.351869861322626, -0.00448093826546886, 0.0030890504030771, + 50, -0.000695943931195879, 0, "Total indirect", 0.718565197001241, + 0.00193115504372965, -0.360377036248627, -0.0102464037634032, + 0.015193005760353, 50, 0.00247330099847487, 1, "Total indirect", + 0.703123132590193, 0.00648976453761881, 0.381107971504673, -0.00345571644487196, + 0.00554653760320837, 84, 0.00104541057916821, 0, "Total indirect", + 0.648956720334752, 0.00229653557899251, 0.455212010966025, -0.0182987007907651, + 0.0108681739526909, 84, -0.00371526341903708, 1, "Total indirect", + 0.617554907284116, 0.00744066599527353, -0.499318666016873, + -0.00361814097944257, 0.00553592584966349, 84, 0.00095889243511046, + 1, "Total indirect", 0.681355493931447, 0.00233526404089875, + 0.410614139693351, -0.0185152730560521, 0.0116996963669548, + 84, -0.00340778834454867, 0, "Total indirect", 0.658410932456481, + 0.00770804200009254, -0.442108170208174, 0, 0, 1, 1, 0, 1, 0, + 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, + 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, + 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-65") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-65") +}) + + +context('Model number 66 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1403.06364229419, 1473.40323731586, 1154.52691555447, 22, 1, 100, + 2.28675230277991e-230, 0, 1154.52691555447, 22)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 66)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.54484841110559, 0.06420849504809, -0.24031995802875, "contcor1", + "", 0.121932193421174, "contGamma", 0.155374514776252, + -1.54671413374854, -0.403934414614431, 0.194627777306554, -0.104653318653939, + "contcor2", "", 0.493113735803735, "contGamma", 0.152697242562202, + -0.685364823214195, 0.424979226688996, 0.896763274863071, 0.660871250776033, + "contcor2", "", 3.99657200667036e-08, "contcor1", 0.120355285070401, + 5.49100316109476, 0.744513052044023, 1.31551055826124, 1.03001180515263, + "contNormal", "", 1.53721479989599e-12, "contNormal", + 0.14566530577122, 7.07108531917923, 0.00465468566722176, 0.00822456656049926, + 0.00643962611386051, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910700635684194, 7.07106799044071, 0.323891859205332, + 0.572298730579343, 0.448095294892337, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.063370264283786, + 7.07106558504581, 0.318532898124743, 0.562829699359363, 0.440681298742053, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623217577367753, 7.07106658646139, 1.68041077561667, 2.96919072640351, + 2.32480075101009, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776436953071, 7.0710686342219, 0.73263465288892, + 1.29452416200175, 1.01357940744533, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341794427077, 7.07106682664685, + 0.721541869346242, 1.27492381445019, 0.998232841898218, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171457605588, + 7.07106704732858)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.178874223275719, 0.175985466504954, "", 16, -0.00144437838538211, + "contGamma", "contNormal", "", "", "", 0.987270128071047, + 0.0905270945231037, -0.0159552053779157, -0.148743971686685, + 0.122082455508015, "", 50, -0.0133307580893349, "contGamma", + "contNormal", "", "", "", 0.846999131680445, 0.0690896438227804, + -0.192948716359419, -0.241085346631805, 0.186558507515372, "", + 84, -0.0272634195582165, "contGamma", "contNormal", "", "", + "", 0.802660267617895, 0.109094824578507, -0.249905709675506, + -0.0196391691693253, 0.0330744824679985, 16, 16, 0.00671765664933659, + "contGamma", "debCollin1", "contNormal", "", "", + 0.61739697531287, 0.0134476072145005, 0.499542895786916, -0.0243517869773553, + 0.0474887135837958, 16, 16, 0.0115684633032202, "contGamma", + "debCollin1", "contNormal", "", "", 0.52789320948087, + 0.0183269950692512, 0.631225318690112, -0.0356982337329782, + 0.0694232382216047, 50, 16, 0.0168625022443133, "contGamma", + "debCollin1", "contNormal", "", "", 0.529483658658197, + 0.0268171948014779, 0.628794412284463, -0.043478890856325, 0.0243719866861212, + 16, 16, -0.00955345208510195, "contGamma", "debCollin1", "contNormal", + "", "", 0.580997230480488, 0.0173092153931514, + -0.55192866158924, -0.0595347833571868, 0.0266308212660344, + 84, 16, -0.0164519810455762, "contGamma", "debCollin1", "contNormal", + "", "", 0.454189236030561, 0.0219814255014083, + -0.748449232490502, -0.0871205530633357, 0.0391588558122921, + 16, 16, -0.0239808486255218, "contGamma", "debCollin1", "contNormal", + "", "", 0.456630652614496, 0.032214726870418, + -0.744406392827215, -0.108340695155387, 0.0537180966270453, + 16, 16, -0.027311299264171, "contGamma", "debCollin1", "contNormal", + "", "", 0.508859812511266, 0.0413422881901738, + -0.660614118370505, -0.129165621377276, 0.0351001518859087, + 50, 16, -0.0470327347456839, "contGamma", "debCollin1", "contNormal", + "", "", 0.261710441825525, 0.0419053040155056, + -1.12235755951755, -0.189732476182599, 0.0526201260946635, 50, + 16, -0.0685561750439679, "contGamma", "debCollin1", "contNormal", + "", "", 0.267490294504848, 0.061825779501284, + -1.10886066616506, -0.0302741577491082, 0.0613297274274929, + 50, 50, 0.0155277848391924, "contGamma", "debCollin1", "contNormal", + "", "", 0.506391188539308, 0.0233687674618413, + 0.664467429210699, -0.0191701247061601, 0.0726508601677547, + 84, 50, 0.0267403677307973, "contGamma", "debCollin1", "contNormal", + "", "", 0.253631741608427, 0.0234241510553732, + 1.14157254483139, -0.0287853869705217, 0.106740340719446, 50, + 50, 0.0389774768744623, "contGamma", "debCollin1", "contNormal", + "", "", 0.259582141737597, 0.0345735250134639, + 1.1273793129073, -0.0145239944165484, 0.013037346626056, 16, + 50, -0.000743323895246172, "contGamma", "debCollin1", "contNormal", + "", "", 0.9158047662887, 0.00703108354541328, + -0.105719678971967, -0.0248122960500687, 0.0222521428140705, + 84, 50, -0.00128007661799912, "contGamma", "debCollin1", "contNormal", + "", "", 0.915093862058967, 0.0120064550255457, + -0.106615700910513, -0.0361708580601471, 0.0324391100694015, + 50, 50, -0.00186587399537279, "contGamma", "debCollin1", "contNormal", + "", "", 0.915103207355895, 0.0175028645094337, + -0.106603921567645, -0.0734970776772677, 0.0364947355286372, + 84, 50, -0.0185011710743152, "contGamma", "debCollin1", "contNormal", + "", "", 0.509670131680549, 0.0280596516245978, + -0.659351417538507, -0.0878061457219071, 0.0240844850856934, + 84, 50, -0.0318608303181068, "contGamma", "debCollin1", "contNormal", + "", "", 0.264337154980462, 0.028544052770913, + -1.11619855014329, -0.128970375916178, 0.0360879750885399, 84, + 50, -0.0464412004138189, "contGamma", "debCollin1", "contNormal", + "", "", 0.270061897701098, 0.0421074959302, + -1.1029200238077, -0.0501712353711706, 0.1018804500826, 16, + 84, 0.0258546073557144, "contGamma", "debCollin1", "contNormal", + "", "", 0.505067400126621, 0.0387894080332941, + 0.666537817063943, -0.0312163045935102, 0.120264641543952, 16, + 84, 0.0445241684752208, "contGamma", "debCollin1", "contNormal", + "", "", 0.249251950800748, 0.0386438085935059, + 1.15216822812602, -0.0469173858917602, 0.176716629086075, 50, + 84, 0.0648996215971574, "contGamma", "debCollin1", "contNormal", + "", "", 0.255295417786602, 0.0570505419338906, + 1.13758115869192, -0.0235956271079706, 0.0427626243505224, 16, + 84, 0.0095834986212759, "contGamma", "debCollin1", "contNormal", + "", "", 0.571313325165466, 0.0169284364360566, + 0.566118356971445, -0.0247006031669681, 0.057708051419817, 84, + 84, 0.0165037241264244, "contGamma", "debCollin1", "contNormal", + "", "", 0.43243495719142, 0.0210230022686167, + 0.785031743589797, -0.0363630163182645, 0.0844755577729091, + 16, 84, 0.0240562707273223, "contGamma", "debCollin1", "contNormal", + "", "", 0.435172875485777, 0.0308267333084518, + 0.780370417021344, -0.0383591907222274, 0.0220104936066411, + 16, 84, -0.00817434855779315, "contGamma", "debCollin1", "contNormal", + "", "", 0.595573118046291, 0.0154007126674411, + -0.53077729156487, -0.0535998091992549, 0.0254457500518884, + 50, 84, -0.0140770295736833, "contGamma", "debCollin1", "contNormal", + "", "", 0.485120694018236, 0.0201650540200342, + -0.698090347771822, -0.0784008023867149, 0.0373626910044672, + 50, 84, -0.0205190556911238, "contGamma", "debCollin1", "contNormal", + "", "", 0.487176614051744, 0.0295320460743947, + -0.694806436351681)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.148008002642096, 0.12209172184432, -0.0129581403988881, "contGamma", + "", 0.85082955081102, "contNormal", 0.0689042570723053, + -0.188060084376069, -2.36011807638748, 2.71485113596502, 0.17736652978877, + "debCollin1", "", 0.89103184817483, "contNormal", 1.29465879281028, + 0.136998667736822, -3.92591753430651, 0.389056395938546, -1.76843056918398, + "contcor1", "", 0.108158252597555, "contNormal", 1.10077888274505, + -1.60652661211486, -1.07354593935414, 3.07545050036445, 1.00095228050516, + "contcor2", "", 0.34430716752218, "contNormal", 1.05843690813845, + 0.945689131594632, -0.183425906927635, 6.3637524271581, 3.09016326011523, + "debCollin1:contcor1", "", 0.0642929147418327, "contNormal", + 1.67022924546804, 1.8501431875295, -4.81088469927101, 1.39313259620557, + -1.70887605153272, "debCollin1:contcor2", "", 0.280261896731674, + "contNormal", 1.58268655557272, -1.0797311985217, -0.14838084881486, + 0.123456588584303, -0.0124621301152787, "contGamma:contcor2", + "", 0.857383862626856, "contNormal", 0.0693475593284831, + -0.179705388855122, -0.0197475142094881, 0.00116000406064732, + -0.00929375507442039, "contGamma", "", 0.0814251736663876, + "debCollin1", 0.00533364858616058, -1.74247607885815, -0.0185476116818519, + 0.0350787473552227, 0.00826556783668541, "contcor1", "", + 0.545718311935942, "debCollin1", 0.0136804450132943, 0.604188520815892, + -0.0145563035653726, 0.00654286102882646, -0.00400672126827309, + "contGamma:contcor1", "", 0.456639087004098, "debCollin1", + 0.00538253885291429, -0.744392447089111)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.17149978408389, 0.182046340611799, 16, 16, 0.00527327826395448, + "Total", 0.953376445645003, 0.0901919952316511, 0.0584672536671406, + -0.143299317353775, 0.130073114473778, 16, 16, -0.00661310143999835, + "Total", 0.924452840012995, 0.0697391467353174, -0.0948262453668555, + -0.236751445244016, 0.195659919426256, 16, 50, -0.0205457629088799, + "Total", 0.852246368894357, 0.110311048590963, -0.186252992527197, + -0.166439456694875, 0.186687626530552, 16, 16, 0.0101240849178381, + "Total", 0.910519278994582, 0.0900850949330826, 0.112383573834923, + -0.139701403329214, 0.136176813756984, 16, 84, -0.00176229478611472, + "Total", 0.980022832506238, 0.0703783894148797, -0.0250402829727464, + -0.233821202166823, 0.202431289656831, 16, 16, -0.0156949562549963, + "Total", 0.887849123549635, 0.111290945972671, -0.141026353202627, + -0.163233080529267, 0.19406932824713, 50, 16, 0.0154181238589312, + "Total", 0.86567814537562, 0.0911502485746557, 0.169150650711644, + -0.138683154305538, 0.145746642615495, 16, 16, 0.00353174415497832, + "Total", 0.96117952567161, 0.0725599549697288, 0.0486734612287414, + -0.232463533381621, 0.211661698753815, 50, 50, -0.0104009173139033, + "Total", 0.926856675049946, 0.113299334997643, -0.0918003385820373, + -0.189952926670684, 0.167957265729716, 16, 16, -0.0109978304704841, + "Total", 0.904125754575239, 0.0913052982665882, -0.120451175115525, + -0.159639657700567, 0.113871237351694, 50, 84, -0.0228842101744369, + "Total", 0.742931340018655, 0.0697744696355851, -0.327973975208346, + -0.251004124754158, 0.177370381467521, 16, 16, -0.0368168716433185, + "Total", 0.736192085151867, 0.109281218838878, -0.336900265521386, + -0.197594846682145, 0.161802127820229, 84, 16, -0.0178963594309583, + "Total", 0.845240407683699, 0.0916845863845589, -0.1951948537554, + -0.167041433687444, 0.107475955417621, 16, 16, -0.0297827391349111, + "Total", 0.670634066601692, 0.0700312330406127, -0.425277948735237, + -0.257872336075544, 0.170441534867959, 84, 50, -0.0437154006037927, + "Total", 0.689095173310246, 0.109265750371432, -0.400083287353895, + -0.209662558992476, 0.158812104970668, 16, 16, -0.0254252270109039, + "Total", 0.786790935900352, 0.094000366044893, -0.27048008513883, + -0.179969633280249, 0.105346419850535, 84, 84, -0.0373116067148567, + "Total", 0.608216925848504, 0.0727860448919778, -0.512620334986344, + -0.268522629974287, 0.166034093606811, 16, 16, -0.0512442681837383, + "Total", 0.643902059885726, 0.110858344084082, -0.462249987649749, + -0.223149472003585, 0.165638116704479, 16, 16, -0.0287556776495531, + "Total", 0.771871758951971, 0.0991823298220711, -0.28992742660048, + -0.19439379978018, 0.113109685073168, 50, 16, -0.0406420573535059, + "Total", 0.604396709264449, 0.0784462080117023, -0.518088233754309, + -0.277834589289495, 0.16868515164472, 16, 50, -0.0545747188223875, + "Total", 0.631865324924691, 0.113910190303573, -0.479103043168874, + -0.242854515351635, 0.145900289089503, 50, 16, -0.048477113131066, + "Total", 0.624977026899166, 0.0991739663349904, -0.488808857027254, + -0.211716413222276, 0.0909894275522386, 16, 84, -0.0603634928350188, + "Total", 0.434399857573975, 0.0772222967264246, -0.781684764555354, + -0.293983792423297, 0.145391483815496, 50, 16, -0.0742961543039004, + "Total", 0.507432937395795, 0.11208758928851, -0.662840148276048, + -0.283347699444885, 0.143346592586184, 50, 16, -0.07000055342935, + "Total", 0.520174378034127, 0.108852584893595, -0.64307662971694, + -0.254659398969545, 0.090885532702939, 50, 16, -0.0818869331333029, + "Total", 0.352919625806523, 0.0881508370557057, -0.928941072692884, + -0.328794167988057, 0.137154978783688, 50, 50, -0.0958195946021845, + "Total", 0.420179868866982, 0.118866762462753, -0.806109232025309, + -0.167261118166645, 0.195427931074265, 50, 16, 0.0140834064538103, + "Total", 0.879019048331003, 0.0925244168009604, 0.15221286381201, + -0.139896204691655, 0.144290258191369, 50, 84, 0.00219702674985742, + "Total", 0.975824045140081, 0.0724978788193688, 0.0303047038842529, + -0.231053138918011, 0.207581869479963, 50, 16, -0.0117356347190242, + "Total", 0.916473194378866, 0.111898741981453, -0.10487727128308, + -0.154690507072581, 0.205282485763411, 84, 16, 0.0252959893454152, + "Total", 0.782962222201592, 0.0918315325371826, 0.275460820989488, + -0.12809727842214, 0.154916497705064, 50, 16, 0.0134096096414624, + "Total", 0.852654962421006, 0.0721987185375804, 0.185731961911242, + -0.220327828139397, 0.219281724484558, 84, 50, -0.00052305182741923, + "Total", 0.996278704340062, 0.112147354770684, -0.00466396936859323, + -0.147757948459712, 0.222824145437873, 50, 16, 0.0375330984890802, + "Total", 0.691355618239167, 0.0945379856009318, 0.39701605921155, + -0.123738305783124, 0.175031743353379, 84, 84, 0.0256467187851273, + "Total", 0.736500996444954, 0.076218249797742, 0.336490523636862, + -0.214163852972205, 0.237591967604696, 50, 16, 0.0117140573162457, + "Total", 0.919039266904693, 0.115245949451187, 0.101643982908113, + -0.17909978016277, 0.174724375601513, 16, 16, -0.00218770228062828, + "Total", 0.980663566649246, 0.090262922827971, -0.0242369980063436, + -0.147660207893322, 0.119512043924159, 84, 16, -0.0140740819845811, + "Total", 0.836405283051971, 0.0681574390970706, -0.206493702976966, + -0.239825736406899, 0.183812249499974, 16, 50, -0.0280067434534627, + "Total", 0.795521997418925, 0.108072900637072, -0.259146773042711, + -0.179902697310835, 0.174453787304073, 84, 16, -0.00272445500338122, + "Total", 0.975956833644933, 0.0903987234995201, -0.030138202154986, + -0.147716354858973, 0.118494685444305, 16, 84, -0.0146108347073341, + "Total", 0.829655894701614, 0.0679122275723218, -0.215142916520807, + -0.239442529140847, 0.182355536788415, 84, 16, -0.0285434961762156, + "Total", 0.790804986992725, 0.107603524670951, -0.265265438688008, + -0.181414010485137, 0.174793505723628, 50, 16, -0.0033102523807549, + "Total", 0.970941035634962, 0.0908709341137093, -0.0364280659491481, + -0.148625098574602, 0.118231834405186, 84, 16, -0.0151966320847077, + "Total", 0.823358749964793, 0.0680769991399643, -0.223227114542225, + -0.239557300978965, 0.181298713871786, 50, 50, -0.0291292935535893, + "Total", 0.786148436537433, 0.107363201102267, -0.271315434474076, + -0.205638089396821, 0.165746990477426, 84, 16, -0.0199455494596973, + "Total", 0.833259468811502, 0.0947428327264391, -0.210523043123359, + -0.173967829508568, 0.110303971181268, 50, 84, -0.0318319291636502, + "Total", 0.660703469427839, 0.0725196490680787, -0.438942129101694, + -0.260836419103903, 0.16930723783884, 84, 16, -0.0457645906325318, + "Total", 0.676637607518576, 0.109732541091485, -0.417055781059308, + -0.219234193731713, 0.152623776324735, 84, 16, -0.0333052087034889, + "Total", 0.725524048860086, 0.0948634701937425, -0.351085709129855, + -0.184731068581116, 0.0943478917662326, 84, 16, -0.0451915884074417, + "Total", 0.525585865351242, 0.0711949205568796, -0.634758604321173, + -0.27022682491997, 0.151978325167323, 84, 50, -0.0591242498763233, + "Total", 0.583050680913455, 0.107707374578715, -0.548934092095189, + -0.243414906687523, 0.147643749089121, 84, 16, -0.047885578799201, + "Total", 0.631227638726256, 0.0997616943120552, -0.47999965447073, + -0.208900518054023, 0.089356601047715, 84, 84, -0.0597719585031539, + "Total", 0.432119589478423, 0.0760873978946429, -0.785569754743344, + -0.288842647403793, 0.141433407459722, 84, 16, -0.0737046199720355, + "Total", 0.501922143410982, 0.109766316691908, -0.671468463125255, + -0.167533028750134, 0.216353486690798, 16, 16, 0.0244102289703323, + "Total", 0.803162115504975, 0.0979320330549387, 0.249256838736703, + -0.142378603165546, 0.167426301698305, 16, 50, 0.0125238492663795, + "Total", 0.874092044215204, 0.0790333157413994, 0.158462910848358, + -0.228842699777111, 0.226025075372107, 16, 50, -0.0014088122025021, + "Total", 0.990313309733816, 0.116039830001254, -0.0121407641021783, + -0.147960255666038, 0.234119835845715, 16, 50, 0.0430797900898387, + "Total", 0.658507627056735, 0.0974712021561499, 0.441974543628019, + -0.123284543993432, 0.185671364765204, 16, 84, 0.0311934103858859, + "Total", 0.692273655077525, 0.078816731122521, 0.395771430020304, + -0.210437224055302, 0.24495872188931, 16, 50, 0.0172607489170043, + "Total", 0.881888239072881, 0.116174569924937, 0.148575965705377, + -0.143746270858424, 0.270656757281975, 50, 16, 0.0634552432117752, + "Total", 0.548348375052885, 0.105717000773779, 0.600236884770895, + -0.123170363911715, 0.22630809092736, 16, 50, 0.0515688635078224, + "Total", 0.562978851162215, 0.0891543052820656, 0.57842258256255, + -0.204832834621641, 0.280105238699523, 50, 50, 0.0376362020389408, + "Total", 0.760955041255853, 0.123710965391786, 0.30422688821277, + -0.172091558511573, 0.188369798983361, 16, 50, 0.00813912023589379, + "Total", 0.929470608409408, 0.0919561176476219, 0.0885109163381941, + -0.141145851418301, 0.133651332482183, 50, 84, -0.00374725946805904, + "Total", 0.957370243152954, 0.0701026105755127, -0.053453921862476, + -0.231507253220969, 0.196147411347088, 16, 50, -0.0176799209369406, + "Total", 0.871261732457491, 0.109097582389611, -0.162056028646005, + -0.166623000754625, 0.19674169223671, 84, 16, 0.0150593457410423, + "Total", 0.870945093221426, 0.0926967780677372, 0.162458135600332, + -0.134926649480271, 0.14127258155445, 16, 50, 0.00317296603708949, + "Total", 0.964081818258274, 0.0704602822330783, 0.0450319802380795, + -0.224127487291261, 0.202608096427677, 84, 50, -0.0107596954317921, + "Total", 0.921267753493831, 0.108863118681, -0.0988369207327333, + -0.164158193251598, 0.209381977935478, 16, 50, 0.0226118923419402, + "Total", 0.812432562894669, 0.0952926110207927, 0.237289041613167, + -0.132743956490028, 0.154194981766002, 84, 84, 0.0107255126379874, + "Total", 0.883508306363757, 0.0732000538069494, 0.146523288989292, + -0.219107057492192, 0.212692759830404, 16, 50, -0.00320714883089423, + "Total", 0.976772982087986, 0.110155038747798, -0.0291148627185095, + -0.190291251414293, 0.171053797527943, 16, 16, -0.00961872694317526, + "Total", 0.916895199803212, 0.0921815532817132, -0.104345463932244, + -0.156454584788891, 0.113444371494635, 50, 50, -0.0215051066471281, + "Total", 0.754787130087454, 0.0688530397528871, -0.312333438353771, + -0.245405292050513, 0.174529755818493, 16, 50, -0.0354377681160097, + "Total", 0.740797387505415, 0.107128256228533, -0.330797581922846, + -0.198480620659703, 0.167437804741573, 50, 50, -0.0155214079590654, + "Total", 0.867941152196033, 0.0933482523882056, -0.166274221123249, + -0.161995422294669, 0.107179846968633, 16, 84, -0.0274077876630182, + "Total", 0.689795698695021, 0.0686684223247269, -0.399132333831833, + -0.248463239391751, 0.165782341127951, 50, 50, -0.0413404491318998, + "Total", 0.695651706916188, 0.105676834826359, -0.39119689002635, + -0.21027011946551, 0.166343251312498, 50, 16, -0.0219634340765059, + "Total", 0.819177217868458, 0.0960766049143468, -0.228603353501995, + -0.171999130288965, 0.104299502728048, 50, 50, -0.0338498137804588, + "Total", 0.631058866917656, 0.0704856403475832, -0.48023701868262, + -0.254380559882745, 0.158815609384064, 50, 50, -0.0477824752493404, + "Total", 0.650329182324414, 0.105409122954822, -0.453304931394031, + -0.0196391691693253, 0.0330744824679985, 50, 50, 0.00671765664933659, + "Total indirect", 0.61739697531287, 0.0134476072145005, 0.499542895786916, + -0.0243517869773553, 0.0474887135837958, 50, 84, 0.0115684633032202, + "Total indirect", 0.52789320948087, 0.0183269950692512, 0.631225318690112, + -0.0356982337329782, 0.0694232382216047, 50, 50, 0.0168625022443133, + "Total indirect", 0.529483658658197, 0.0268171948014779, 0.628794412284463, + -0.043478890856325, 0.0243719866861212, 84, 16, -0.00955345208510195, + "Total indirect", 0.580997230480488, 0.0173092153931514, -0.55192866158924, + -0.0595347833571868, 0.0266308212660344, 50, 50, -0.0164519810455762, + "Total indirect", 0.454189236030561, 0.0219814255014083, -0.748449232490502, + -0.0871205530633357, 0.0391588558122921, 84, 50, -0.0239808486255218, + "Total indirect", 0.456630652614496, 0.032214726870418, -0.744406392827215, + -0.108340695155387, 0.0537180966270453, 50, 50, -0.027311299264171, + "Total indirect", 0.508859812511266, 0.0413422881901738, -0.660614118370505, + -0.129165621377276, 0.0351001518859087, 84, 84, -0.0470327347456839, + "Total indirect", 0.261710441825525, 0.0419053040155056, -1.12235755951755, + -0.189732476182599, 0.0526201260946635, 50, 50, -0.0685561750439679, + "Total indirect", 0.267490294504848, 0.061825779501284, -1.10886066616506, + -0.0302741577491082, 0.0613297274274929, 16, 16, 0.0155277848391924, + "Total indirect", 0.506391188539308, 0.0233687674618413, 0.664467429210699, + -0.0191701247061601, 0.0726508601677547, 84, 50, 0.0267403677307973, + "Total indirect", 0.253631741608427, 0.0234241510553732, 1.14157254483139, + -0.0287853869705217, 0.106740340719446, 16, 50, 0.0389774768744623, + "Total indirect", 0.259582141737597, 0.0345735250134639, 1.1273793129073, + -0.0145239944165484, 0.013037346626056, 84, 50, -0.000743323895246172, + "Total indirect", 0.9158047662887, 0.00703108354541328, -0.105719678971967, + -0.0248122960500687, 0.0222521428140705, 16, 84, -0.00128007661799912, + "Total indirect", 0.915093862058967, 0.0120064550255457, -0.106615700910513, + -0.0361708580601471, 0.0324391100694015, 84, 50, -0.00186587399537279, + "Total indirect", 0.915103207355895, 0.0175028645094337, -0.106603921567645, + -0.0734970776772677, 0.0364947355286372, 50, 16, -0.0185011710743152, + "Total indirect", 0.509670131680549, 0.0280596516245978, -0.659351417538507, + -0.0878061457219071, 0.0240844850856934, 84, 50, -0.0318608303181068, + "Total indirect", 0.264337154980462, 0.028544052770913, -1.11619855014329, + -0.128970375916178, 0.0360879750885399, 50, 50, -0.0464412004138189, + "Total indirect", 0.270061897701098, 0.0421074959302, -1.1029200238077, + -0.0501712353711706, 0.1018804500826, 84, 50, 0.0258546073557144, + "Total indirect", 0.505067400126621, 0.0387894080332941, 0.666537817063943, + -0.0312163045935102, 0.120264641543952, 50, 84, 0.0445241684752208, + "Total indirect", 0.249251950800748, 0.0386438085935059, 1.15216822812602, + -0.0469173858917602, 0.176716629086075, 84, 50, 0.0648996215971574, + "Total indirect", 0.255295417786602, 0.0570505419338906, 1.13758115869192, + -0.0235956271079706, 0.0427626243505224, 84, 16, 0.0095834986212759, + "Total indirect", 0.571313325165466, 0.0169284364360566, 0.566118356971445, + -0.0247006031669681, 0.057708051419817, 84, 50, 0.0165037241264244, + "Total indirect", 0.43243495719142, 0.0210230022686167, 0.785031743589797, + -0.0363630163182645, 0.0844755577729091, 84, 50, 0.0240562707273223, + "Total indirect", 0.435172875485777, 0.0308267333084518, 0.780370417021344, + -0.0383591907222274, 0.0220104936066411, 84, 50, -0.00817434855779315, + "Total indirect", 0.595573118046291, 0.0154007126674411, -0.53077729156487, + -0.0535998091992549, 0.0254457500518884, 84, 84, -0.0140770295736833, + "Total indirect", 0.485120694018236, 0.0201650540200342, -0.698090347771822, + -0.0784008023867149, 0.0373626910044672, 84, 50, -0.0205190556911238, + "Total indirect", 0.487176614051744, 0.0295320460743947, -0.694806436351681, + 16, 16, 16, 84, 16, 50, 16, 84, 16, 84, 16, 84, 50, 16, 16, + 84, 50, 50, 16, 84, 50, 84, 16, 84, 84, 16, 16, 84, 84, 50, + 16, 84, 84, 84, 16, 84, 16, 16, 50, 84, 16, 50, 50, 84, 16, + 84, 50, 84, 50, 16, 50, 84, 50, 50, 50, 84, 50, 84, 50, 84, + 84, 16, 50, 84, 84, 50, 50, 84, 84, 84, 50, 84, 16, 16, 84, + 84, 16, 50, 84, 84, 16, 84, 84, 84, 50, 16, 84, 84, 50, 50, + 84, 84, 50, 84, 84, 84, 84, 16, 84, 84, 84, 50, 84, 84, 84, + 84, 84, 84, 16, 16, 16, 16, 50, 16, 16, 16, 84, 16, 16, 16, + 16, 16, 50, 16, 50, 16, 50, 50, 84, 50, 50, 50, 16, 50, 84, + 50, 50, 50, 84, 50, 84, 50, 84, 50, 16, 84, 16, 84, 50, 84, + 16, 84, 84, 84, 16, 84, 16, 84, 50, 84, 50, 84, 50, 84, 50, + 16, 84, 50, 84, 84, 84, 16, 16, 50, 16, 84, 16, 16, 50, 50, + 50, 84, 50, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-66") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-66") +}) + + +context('Model number 66 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(23006.5352862862, 23164.4670293733, 26480.1434639015, 22, 1, 2564, + 0, 0, 26480.1434639015, 22)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 66)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0678662968657216, 0.0881399484078947, 0.0780031226368081, "facExperimexperimental", + "", 0, "facGenderm", 0.00517194491890901, 15.0819708755256, + -0.0939554932471513, -0.0542199657715124, -0.0740877295093318, + "contcor2", "", 2.69562150378988e-13, "facGenderm", + 0.0101368004180351, -7.30878841981705, -0.0997951509107294, + -0.0599922534937779, -0.0798937022022536, "contcor2", "", + 3.5527136788005e-15, "facExperimexperimental", 0.0101539869433601, + -7.86821005856205, 0.964846927293417, 1.07659509763134, 1.02072101246238, + "contNormal", "", 0, "contNormal", 0.0285077101465581, + 35.8050859649847, 0.00607839654336269, 0.00678239518436085, + 0.00643039586386177, "debCollin1", "", 0, "debCollin1", + 0.000179594790146963, 35.8050245143511, 0.103586142038512, 0.115583469676749, + 0.109584805857631, "debCollin1:facExperimexperimental", "", + 0, "debCollin1:facExperimexperimental", 0.0030605990040813, + 35.8050191192964, 0.426154041124129, 0.475511141227779, 0.450832591175954, + "debCollin1:contcor2", "", 0, "debCollin1:contcor2", + 0.0125913283338298, 35.8050063681271, 0.236314980003653, 0.263684924511835, + 0.249999952257744, "facGenderm", "", 0, "facGenderm", + 0.00698225700167781, 35.8050344176203, 0.236315038299626, 0.263684997141831, + 0.250000017720729, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.00698226065838339, 35.8050250416477, + 0.975409472346691, 1.08838133968411, 1.0318954060154, "contcor2", + "", 0, "contcor2", 0.0288198834847284, 35.8049818821162 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.344152075088694, 0.590207602843805, 16, 0.467179838966249, "", + "facGenderm", "contNormal", "", "", "", 9.85878045867139e-14, + 0.0627704207056776, 7.44267496878498, 0.391172613516158, 0.557612460109718, + 50, 0.474392536812938, "", "facGenderm", "contNormal", "", "", + "", 0, 0.0424599247502547, 11.1727126132057, 0.363240272591031, + 0.601067977473706, 84, 0.482154125032368, "", "facGenderm", + "contNormal", "", "", "", 1.99840144432528e-15, 0.0606714477303228, + 7.94696917692626, -0.00833581808978172, 0.00378889730642738, + 16, -0.00227346039167717, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.462332705124027, 0.00309309647826371, + -0.735011147454851, -0.00803952499022529, 0.0241988451078852, + 16, 0.00807966005882997, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.325891970736059, 0.00822422512668668, + 0.982422043945804, -0.00794606265224241, 0.00383221355547198, + 16, -0.00205692454838521, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.493618437111375, 0.00300471751027568, + -0.684565035265657, -0.00914453337855243, 0.023764758281925, + 16, 0.00731011245168629, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.383901482359804, 0.00839538173151694, + 0.870730204469862, -0.00403877578831303, 0.0030019071632695, + 50, -0.000518434312521766, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.772856617467165, 0.0017961255939187, + -0.288640345796015, -0.0102363188701551, 0.0139212504602049, + 50, 0.0018424657950249, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.76496468243977, 0.00616275847946999, + 0.298967710833178, -0.0039066224984577, 0.00330282555999809, + 50, -0.000301898469229809, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.869614223685199, 0.00183917870821173, + -0.164148523404422, -0.0115964955146051, 0.0137423318903676, + 50, 0.00107291818788122, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.8681719615199, 0.00646410536235414, + 0.165980925083572, -0.00342643807624777, 0.00616673855777365, + 84, 0.00137015024076294, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.575571067431947, 0.00244728390666644, + 0.559865668642133, -0.0195785849150491, 0.00983981997732185, + 84, -0.00486938246886361, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.516446398949246, 0.00750483302867286, + -0.648832885456573, -0.00355950232392942, 0.00673287449203921, + 84, 0.0015866860840549, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.545643441077488, 0.00262565457762326, + 0.604301151254696, -0.0209669500381234, 0.00968908988610879, + 84, -0.00563893007600728, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.470885533024593, 0.00782056205268135, + -0.721038978787199)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.391218190722187, 0.557616578358587, 0.474417384540387, "facGenderm", + "", 0, "contNormal", 0.0424493482913282, 11.1760816982272, + -0.778117548893681, 0.573636827050946, -0.102240360921368, "debCollin1", + "", 0.76685974645167, "contNormal", 0.344841636531868, + -0.296484966112609, -0.676155678599228, 0.630304824824631, -0.0229254268872985, + "facExperimexperimental", "", 0.945160065729317, "contNormal", + 0.333286864893706, -0.0687858697780067, -0.491131416385661, + 0.129886043773975, -0.180622686305843, "contcor2", "", + 0.254240675238548, "contNormal", 0.158425732579308, -1.14010952239355, + -0.934522643855416, 1.02093642362493, 0.0432068898847589, "debCollin1:facExperimexperimental", + "", 0.930979246089331, "contNormal", 0.498850765346905, + 0.0866128567623074, -0.130931094089105, 0.790172733285635, 0.329620819598265, + "debCollin1:contcor2", "", 0.16068768510575, "contNormal", + 0.234979783975698, 1.40276245905629, -0.0729912098248237, 0.0865692029662447, + 0.00678899657071051, "facGenderm:contcor2", "", 0.867538757619886, + "contNormal", 0.0407049348992279, 0.166785589696135, -0.0042288570925252, + 0.0142520660700517, 0.00501160448876326, "facGenderm", "", + 0.287784226456858, "debCollin1", 0.00471460784696864, 1.06299498313218, + -0.0125866302145704, 0.00589429294808539, -0.00334616863324251, + "facExperimexperimental", "", 0.47786237505388, "debCollin1", + 0.00471460784698877, -0.709744848742768, -0.0358903519927724, + -0.00975437981114639, -0.0228223659019594, "facGenderm:facExperimexperimental", + "", 0.000619463037980772, "debCollin1", 0.006667462358437, + -3.42294634375851)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.341513643929465, 0.58829911321968, 16, 0.464906378574572, 0, + "Total", 1.52988732793347e-13, 0.0629566337026669, 7.38454951022705, + 0.388769610156777, 0.555468542685744, 16, 0.472119076421261, + 0, "Total", 0, 0.042526019315627, 11.1018873625863, 0.361185585979504, + 0.598575743301879, 50, 0.479880664640691, 0, "Total", 2.22044604925031e-15, + 0.0605598264036682, 7.92407596154576, 0.351944262203647, 0.598574735846512, + 16, 0.475259499025079, 0, "Total", 4.21884749357559e-14, 0.0629170932701454, + 7.55374214419714, 0.397388051915665, 0.567556341827871, 84, + 0.482472196871768, 0, "Total", 0, 0.0434110757275318, 11.1140345818654, + 0.368925552315078, 0.611542017867319, 16, 0.490233785091198, + 0, "Total", 2.44249065417534e-15, 0.0618930927981248, 7.92065419464789, + 0.341660644404667, 0.588585184431062, 16, 0.465122914417864, + 1, "Total", 1.53876911213047e-13, 0.0629921115831986, 7.38382795445014, + 0.388700951892216, 0.55597027263689, 16, 0.472335612264553, + 0, "Total", 0, 0.0426715291872894, 11.0691044183448, 0.361063927095185, + 0.599130473872782, 50, 0.480097200483983, 1, "Total", 2.66453525910038e-15, + 0.0607323779047563, 7.90512766084833, 0.351407807481169, 0.597572095354703, + 16, 0.474489951417936, 0, "Total", 4.15223411209809e-14, 0.0627981661436757, + 7.55579311555614, 0.397597748230839, 0.565807550298409, 84, + 0.481702649264624, 1, "Total", 0, 0.0429114523007532, 11.2255032966146, + 0.369324615768062, 0.609603859200048, 16, 0.489464237484055, + 0, "Total", 1.33226762955019e-15, 0.0612968517093371, 7.98514481306544, + 0.343551933428118, 0.589770875879338, 16, 0.466661404653728, + 0, "Total", 1.0902390101819e-13, 0.0628121088941847, 7.42948155808429, + 0.390642644181079, 0.557105560819754, 16, 0.473874102500416, + 1, "Total", 0, 0.0424658100739895, 11.1589559147646, 0.362796098150759, + 0.600475283288934, 50, 0.481635690719847, 0, "Total", 1.99840144432528e-15, + 0.0606335593441915, 7.94338475143445, 0.345514016732838, 0.59253059278971, + 16, 0.469022304761274, 1, "Total", 9.83657599817889e-14, 0.0630155905938343, + 7.44295658171877, 0.391922062078953, 0.560547943136973, 84, + 0.476235002607963, 0, "Total", 0, 0.0430175968507891, 11.0707021654378, + 0.364024968039306, 0.60396821361548, 16, 0.483996590827393, + 1, "Total", 2.66453525910038e-15, 0.0612111363955706, 7.90700221116001, + 0.343687930660437, 0.590067950333602, 16, 0.46687794049702, + 1, "Total", 1.10134124042816e-13, 0.0628532007773048, 7.42806944949733, + 0.390557590946527, 0.557623685740889, 16, 0.474090638343708, + 1, "Total", 0, 0.0426196848799667, 11.1237480914964, 0.362663641951491, + 0.601040811174786, 50, 0.481852226563139, 1, "Total", 2.22044604925031e-15, + 0.0608116197806653, 7.92368676087034, 0.344962232387285, 0.591543281920977, + 16, 0.468252757154131, 1, "Total", 9.76996261670138e-14, 0.0629044848473472, + 7.44386919772824, 0.392118683272911, 0.558812226728727, 84, + 0.475465455000819, 1, "Total", 0, 0.042524644526806, 11.1809389659002, + 0.364421650232272, 0.602032436208227, 16, 0.48322704322025, + 1, "Total", 1.55431223447522e-15, 0.060616110257688, 7.97192431460845, + 0.345596214495241, 0.591503763918784, 16, 0.468549989207012, + 0, "Total", 8.08242361927114e-14, 0.0627326704376282, 7.46899479869691, + 0.392437124345734, 0.559088249761668, 50, 0.475762687053701, + 0, "Total", 0, 0.0425138233994238, 11.1907762937207, 0.364374723327195, + 0.602673827219068, 50, 0.483524275273131, 0, "Total", 1.77635683940025e-15, + 0.0607917047893598, 7.95378706599065, 0.337816931138671, 0.5868039818561, + 50, 0.462310456497386, 0, "Total", 3.37729844090973e-13, 0.0635182719380067, + 7.2783852959444, 0.384899544739079, 0.554146763949069, 84, 0.469523154344074, + 0, "Total", 0, 0.043176104394007, 10.874606705121, 0.357956556847117, + 0.596612928279893, 50, 0.477284742563505, 0, "Total", 4.44089209850063e-15, + 0.0608828461429054, 7.83939603354306, 0.345720427597407, 0.591812622503202, + 16, 0.468766525050304, 1, "Total", 8.21565038222616e-14, 0.0627797747425307, + 7.46683986957242, 0.392335224197013, 0.559623221596973, 50, + 0.475979222896993, 0, "Total", 0, 0.042676293727718, 11.1532464823169, + 0.364231144423367, 0.603250477809479, 50, 0.483740811116423, + 1, "Total", 2.22044604925031e-15, 0.0609754401793774, 7.93337136547692, + 0.337247446887653, 0.585834370892832, 50, 0.461540908890242, + 0, "Total", 3.38840067115598e-13, 0.0634161969214744, 7.27796574527717, + 0.38506885140973, 0.552438362064131, 84, 0.468753606736931, + 1, "Total", 0, 0.0426970883073849, 10.9785848478069, 0.358342788745077, + 0.594687601167645, 50, 0.476515194956361, 0, "Total", 2.66453525910038e-15, + 0.0602931518861635, 7.90330543435589, -0.00833581808978172, + 0.00378889730642738, 16, -0.00227346039167717, 0, "Total indirect", + 0.462332705124027, 0.00309309647826371, -0.735011147454851, + -0.00803952499022529, 0.0241988451078852, 50, 0.00807966005882997, + 1, "Total indirect", 0.325891970736059, 0.00822422512668668, + 0.982422043945804, -0.00794606265224241, 0.00383221355547198, + 50, -0.00205692454838521, 0, "Total indirect", 0.493618437111375, + 0.00300471751027568, -0.684565035265657, -0.00914453337855243, + 0.023764758281925, 50, 0.00731011245168629, 1, "Total indirect", + 0.383901482359804, 0.00839538173151694, 0.870730204469862, -0.00403877578831303, + 0.0030019071632695, 84, -0.000518434312521766, 0, "Total indirect", + 0.772856617467165, 0.0017961255939187, -0.288640345796015, -0.0102363188701551, + 0.0139212504602049, 50, 0.0018424657950249, 1, "Total indirect", + 0.76496468243977, 0.00616275847946999, 0.298967710833178, -0.0039066224984577, + 0.00330282555999809, 16, -0.000301898469229809, 1, "Total indirect", + 0.869614223685199, 0.00183917870821173, -0.164148523404422, + -0.0115964955146051, 0.0137423318903676, 50, 0.00107291818788122, + 1, "Total indirect", 0.8681719615199, 0.00646410536235414, 0.165980925083572, + -0.00342643807624777, 0.00616673855777365, 50, 0.00137015024076294, + 1, "Total indirect", 0.575571067431947, 0.00244728390666644, + 0.559865668642133, -0.0195785849150491, 0.00983981997732185, + 50, -0.00486938246886361, 1, "Total indirect", 0.516446398949246, + 0.00750483302867286, -0.648832885456573, -0.00355950232392942, + 0.00673287449203921, 84, 0.0015866860840549, 1, "Total indirect", + 0.545643441077488, 0.00262565457762326, 0.604301151254696, -0.0209669500381234, + 0.00968908988610879, 50, -0.00563893007600728, 1, "Total indirect", + 0.470885533024593, 0.00782056205268135, -0.721038978787199, + 16, 0, 84, 0, 50, 0, 84, 0, 84, 0, 84, 0, 16, 1, 84, 0, 50, + 1, 84, 0, 84, 1, 84, 0, 16, 0, 84, 1, 50, 0, 84, 1, 84, 0, 84, + 1, 16, 1, 84, 1, 50, 1, 84, 1, 84, 1, 84, 1, 16, 0, 16, 0, 16, + 1, 16, 0, 50, 0, 50, 1, 50, 1, 50, 1, 84, 0, 84, 0, 84, 1, 84, + 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-66") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-66") +}) + + +context('Model number 67 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1404.67194735804, 1477.6167125657, 1154.13522061832, 21, 1, 100, + 3.69176904119739e-231, 0, 1154.13522061832, 21)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 67)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848860916294, 0.0642093684717094, -0.240319746222292, "contcor1", + "", 0.121933332950832, "contGamma", 0.155374852342231, + -1.54670941017508, -0.403935733520993, 0.194628043444686, -0.104653845038154, + "contcor2", "", 0.493112706013839, "contGamma", 0.152697646917768, + -0.685366455545399, 0.424979349846266, 0.896764066050831, 0.660871707948548, + "contcor2", "", 3.99666200134874e-08, "contcor1", 0.120355455489474, + 5.49099918454753, 0.741603641372532, 1.3103717032357, 1.02598767230412, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.145096559515772, 7.07106823020563, 0.00465468580403819, 0.00822456703770702, + 0.0064396264208726, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910700722520312, 7.07106765332447, 0.323892297857626, + 0.572300260648292, 0.448096279252959, "debCollin1:contcor1", + "", 1.53765888910584e-12, "debCollin1:contcor1", 0.0633705427115182, + 7.07105005069671, 0.318533492660619, 0.562831773140725, 0.440682632900672, + "debCollin1:contcor2", "", 1.53765888910584e-12, "debCollin1:contcor2", + 0.0623221351022518, 7.07104517805183, 1.6804125635208, 2.96919696240388, + 2.32480476296234, "contGamma", "", 1.53765888910584e-12, + "contGamma", 0.328777571692348, 7.07105643184739, 0.732634898555313, + 1.29452501837396, 1.01357995846464, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341950222241, 7.07106298535187, + 0.721542264165417, 1.27492519136533, 0.998233727765375, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171708144876, + 7.07106077331688)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.209489329391528, 0.166371001960185, 16, 16, -0.0215591637156716, + "contGamma", "contNormal", "", "", "", 0.822099748360652, + 0.0958844994899019, -0.224845140042079, -0.19851145054299, 0.314040546303428, + 50, 16, 0.0577645478802186, "contGamma", "contNormal", "", "", + "", 0.658651736727854, 0.130755463082323, 0.44177540669066, + -0.344941916220578, 0.633614510827528, 84, 16, 0.144336297303475, + "contGamma", "contNormal", "", "", "", 0.56313836867462, + 0.249636328720026, 0.57818626817474, -0.366989702679814, 0.186093520660221, + 16, 50, -0.0904480910097962, "contGamma", "contNormal", "", + "", "", 0.521494895121849, 0.141095251673675, -0.64104277030516, + -0.146449339417743, 0.124200580589932, 50, 50, -0.011124379413906, + "contGamma", "contNormal", "", "", "", 0.871999904228371, + 0.0690446156517485, -0.161118710110804, -0.233450755269977, + 0.384345495288677, 84, 50, 0.0754473700093501, "contGamma", + "contNormal", "", "", "", 0.632141480977797, 0.15760398033631, + 0.478714876669697, -0.669518035607754, 0.327125060309001, 16, + 84, -0.171196487649376, "contGamma", "contNormal", "", "", + "", 0.500732135129403, 0.254250359643889, -0.67333823200549, + -0.385812407926144, 0.202066855819173, 50, 84, -0.0918727760534858, + "contGamma", "contNormal", "", "", "", 0.540141052332609, + 0.149971955704909, -0.612599706536189, -0.229495786594333, 0.218893733333874, + 84, 84, -0.00530102663022973, "contGamma", "contNormal", "", + "", "", 0.963036996768748, 0.114387183505678, -0.0463428372634648, + -0.0204602738531293, 0.0355990966029121, 16, 16, 0.0075694113748914, + "contGamma", "debCollin1", "contNormal", "", "", + 0.596605737037486, 0.0143011225966983, 0.529287915945769, -0.0237405476880486, + 0.0498110769636611, 16, 16, 0.0130352646378063, "contGamma", + "debCollin1", "contNormal", "", "", 0.487234935508194, + 0.0187635143379867, 0.694713389133954, -0.034855776140694, 0.0728568737051931, + 50, 16, 0.0190005487822495, "contGamma", "debCollin1", "contNormal", + "", "", 0.489266047713783, 0.0274782217161924, + 0.691476652983438, -0.0473513425957422, 0.0258006651128386, + 16, 16, -0.0107753387414518, "contGamma", "debCollin1", "contNormal", + "", "", 0.563663896680991, 0.018661569366987, + -0.577407962296772, -0.0631265618780968, 0.0260141933991551, + 84, 16, -0.0185561842394708, "contGamma", "debCollin1", "contNormal", + "", "", 0.414499819438352, 0.0227404064514406, + -0.81600055298463, -0.0924341448046571, 0.0383381684434421, + 16, 16, -0.0270479881806075, "contGamma", "debCollin1", "contNormal", + "", "", 0.417498218219687, 0.0333608970061732, + -0.810769212098897, -0.120796242825534, 0.0592036389538352, + 16, 16, -0.0307963019358492, "contGamma", "debCollin1", "contNormal", + "", "", 0.502435151590635, 0.0459191809643404, + -0.670663136604392, -0.141582369776893, 0.0355138987379968, + 50, 16, -0.0530342355194482, "contGamma", "debCollin1", "contNormal", + "", "", 0.240441702230363, 0.0451784496837194, + -1.17388347521273, -0.208091860102846, 0.0534836327878434, 50, + 16, -0.0773041136575014, "contGamma", "debCollin1", "contNormal", + "", "", 0.246673541069772, 0.0667296682372645, + -1.15846692632486, -0.0327768113439692, 0.0670633569458819, + 50, 50, 0.0171432728009563, "contGamma", "debCollin1", "contNormal", + "", "", 0.50089656225561, 0.0254698987015521, + 0.673079740199818, -0.0192251764951287, 0.0782699520135629, + 84, 50, 0.0295223877592171, "contGamma", "debCollin1", "contNormal", + "", "", 0.235232006369421, 0.0248716632748665, + 1.18698888099898, -0.0289898075566746, 0.115055044339147, 50, + 50, 0.043032618391236, "contGamma", "debCollin1", "contNormal", + "", "", 0.241575776312593, 0.0367468109189834, + 1.17105722415235, -0.0152543884556725, 0.0128514338248987, 16, + 50, -0.00120147731538687, "contGamma", "debCollin1", "contNormal", + "", "", 0.866921241035064, 0.0071699843727401, + -0.167570423159473, -0.0257552439095281, 0.0216171216734081, + 84, 50, -0.00206906111806, "contGamma", "debCollin1", "contNormal", + "", "", 0.864059510554421, 0.0120850092033842, + -0.171208898829849, -0.0375513662945377, 0.0315195291512957, + 50, 50, -0.00301591857162103, "contGamma", "debCollin1", "contNormal", + "", "", 0.86409785512837, 0.01762045016915, + -0.17116013170318, -0.083294090233803, 0.0408492092142345, 84, + 50, -0.0212224405097843, "contGamma", "debCollin1", "contNormal", + "", "", 0.502783708063711, 0.0316697909827078, + -0.670116216471779, -0.097720119376938, 0.0246258945808634, + 84, 50, -0.0365471123980373, "contGamma", "debCollin1", "contNormal", + "", "", 0.241615645715406, 0.0312112913611809, + -1.17095803486981, -0.143620193788541, 0.0370761056915109, 84, + 50, -0.053272044048515, "contGamma", "debCollin1", "contNormal", + "", "", 0.247822316334707, 0.0460968418056049, + -1.1556549638079, -0.0540501821056784, 0.110780797899121, 16, + 84, 0.0283653078967213, "contGamma", "debCollin1", "contNormal", + "", "", 0.49994926982061, 0.0420494920582636, + 0.674569572859963, -0.0312547217603113, 0.128950375135188, 16, + 84, 0.0488478266874382, "contGamma", "debCollin1", "contNormal", + "", "", 0.232001997932186, 0.0408693981520008, + 1.19521766642523, -0.0471681214244751, 0.189571906797526, 50, + 84, 0.0712018926865253, "contGamma", "debCollin1", "contNormal", + "", "", 0.23841533713089, 0.0603939740957936, + 1.17895690344187, -0.0240535791504038, 0.04409469471116, 16, + 84, 0.0100205577803781, "contGamma", "debCollin1", "contNormal", + "", "", 0.564352780744235, 0.0173850831951783, + 0.576388255832866, -0.0243382942542883, 0.0588510498746104, + 84, 84, 0.0172563778101611, "contGamma", "debCollin1", "contNormal", + "", "", 0.416143482166887, 0.02122216142365, + 0.813130079716128, -0.0358646078058579, 0.0861713192531943, + 16, 84, 0.0251533557236682, "contGamma", "debCollin1", "contNormal", + "", "", 0.419117406779356, 0.031132186106902, + 0.807953403506467, -0.0442761880066315, 0.0242753771785929, + 16, 84, -0.0100004054140193, "contGamma", "debCollin1", "contNormal", + "", "", 0.567426996838763, 0.0174879655253745, + -0.57184498674297, -0.0593865146754074, 0.0249431677357749, + 50, 84, -0.0172216734698162, "contGamma", "debCollin1", "contNormal", + "", "", 0.423408741781754, 0.0215130693921838, + -0.800521448421177, -0.0869450716723647, 0.0367395321659133, + 50, 84, -0.0251027697532257, "contGamma", "debCollin1", "contNormal", + "", "", 0.42627595001448, 0.0315527746463421, + -0.795580421518837)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.144542976963823, 0.126020511822314, -0.00926123257075455, "contGamma", + "", 0.893262708205559, "contNormal", 0.0690225664655848, + -0.134176879316307, -2.28224173678209, 2.81248993269915, 0.265124097958531, + "debCollin1", "", 0.83836237892781, "contNormal", 1.29970032859477, + 0.203988636553768, -4.64754865737601, 0.319616683957145, -2.16396598670943, + "contcor1", "", 0.0876859473629927, "contNormal", 1.26715729995896, + -1.70773272330082, -0.962560372566427, 3.35435357322343, 1.1958966003285, + "contcor2", "", 0.277513840309305, "contNormal", 1.10127379376385, + 1.08592123693533, -0.00786556798763627, 6.97584842601596, 3.48399142901416, + "debCollin1:contcor1", "", 0.050518296812152, "contNormal", + 1.78159242952683, 1.95554907580039, -0.173336426701177, 0.336195382489647, + 0.0814294778942351, "contGamma:contcor1", "", 0.531017910305725, + "contNormal", 0.129984992890162, 0.626452916476625, -4.98750247225609, + 1.27346339464886, -1.85701953880362, "debCollin1:contcor2", + "", 0.244966941604291, "contNormal", 1.59721451932042, + -1.16266131840183, -0.303232826284894, 0.158781311723928, -0.0722257572804829, + "contGamma:contcor2", "", 0.540012165953346, "contNormal", + 0.117862915250773, -0.612794593844983, -0.0197474903508699, + 0.00116002841766447, -0.0092937309666027, "contGamma", "", + 0.0814259711848111, "debCollin1", 0.0053336487133055, -1.74247151737201, + -0.0185476369680962, 0.0350787233471872, 0.0082655431895455, + "contcor1", "", 0.545719519182625, "debCollin1", 0.0136804453393739, + 0.604186704781921, -0.0145562918021331, 0.00654287329503566, + -0.00400670925354872, "contGamma:contcor1", "", 0.456640447760129, + "debCollin1", 0.00538253898122524, -0.744390197177293)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.200656392468983, 0.172676887787422, 16, 16, -0.0139897523407802, + "Total", 0.88321906514728, 0.0952398317523205, -0.146889721279242, + -0.19259330112759, 0.32326121963781, 16, 16, 0.06533395925511, + "Total", 0.619565418589702, 0.131597959154963, 0.496466356124688, + -0.339709468742267, 0.643520886098999, 16, 16, 0.151905708678366, + "Total", 0.5447701794209, 0.250828679148408, 0.605615391326475, + -0.357884880223003, 0.192127520953194, 50, 16, -0.0828786796349048, + "Total", 0.554738348916388, 0.140311864277769, -0.590674780507755, + -0.140625712881985, 0.133515776803956, 16, 16, -0.00355496803901457, + "Total", 0.959459221643351, 0.0699353385695694, -0.0508322131804397, + -0.228971718809544, 0.395005281578027, 16, 16, 0.0830167813842415, + "Total", 0.602000873541452, 0.15918073120461, 0.521525317518064, + -0.660657926759947, 0.333403774210977, 84, 50, -0.163627076274485, + "Total", 0.518772984404004, 0.253591828424388, -0.645237968790749, + -0.378307115122391, 0.209700385765202, 16, 16, -0.0843033646785944, + "Total", 0.574112657027381, 0.150004669862743, -0.562004934617927, + -0.225205166784444, 0.229741936273767, 16, 50, 0.00226838474466167, + "Total", 0.984406402772897, 0.116060067084593, 0.0195449201576654, + -0.194271384314688, 0.177223586158957, 16, 16, -0.00852389907786534, + "Total", 0.928333155972859, 0.0947708665577404, -0.0899421877995813, + -0.188312257711425, 0.329911882747475, 16, 50, 0.0707998125180249, + "Total", 0.592275959871638, 0.132202465082671, 0.53554078945314, + -0.335923712169552, 0.650666836052114, 16, 16, 0.157371561941281, + "Total", 0.531794055619889, 0.251685887088683, 0.625269711232678, + -0.351303994155281, 0.196478341411301, 50, 84, -0.0774128263719899, + "Total", 0.57960222220253, 0.139742959535843, -0.553965842924158, + -0.136404876982055, 0.140226647429856, 16, 16, 0.00191088522390031, + "Total", 0.978397798524229, 0.0705705631822689, 0.0270776530288542, + -0.225717678426639, 0.402682947720951, 16, 84, 0.0884826346471564, + "Total", 0.580982797095212, 0.16030922790019, 0.551949727449544, + -0.654257443614415, 0.337934997591275, 84, 16, -0.15816122301157, + "Total", 0.53206345466241, 0.253114967681033, -0.624859226858837, + -0.372886654574024, 0.215211631742665, 16, 84, -0.0788375114156795, + "Total", 0.599245442288881, 0.150027829836552, -0.525485914857059, + -0.222076687455289, 0.237545163470442, 16, 16, 0.00773423800757655, + "Total", 0.94740794168609, 0.117252626719463, 0.0659621726520584, + -0.189796433856542, 0.184679203989698, 16, 16, -0.00255861493342208, + "Total", 0.978632801247469, 0.0955312548597976, -0.0267830139693771, + -0.185412493916075, 0.338942687241011, 16, 16, 0.0767650966624682, + "Total", 0.566053269424092, 0.133766534817255, 0.573873702920844, + -0.33272325856989, 0.659396950741339, 16, 16, 0.163336846085724, + "Total", 0.518697854431069, 0.253096540838747, 0.645353925203544, + -0.345815663228689, 0.202920578773596, 50, 16, -0.0714475422275467, + "Total", 0.60977860781204, 0.139986307485915, -0.510389505307407, + -0.135074506063123, 0.15082684479981, 16, 16, 0.00787616936834358, + "Total", 0.914004929485356, 0.0729353582816029, 0.1079883550847, + -0.223613173099955, 0.412509010683154, 16, 16, 0.0944479187915997, + "Total", 0.560560404351458, 0.16227904920722, 0.582009318226875, + -0.648207931973367, 0.343816054239114, 84, 50, -0.152195938867127, + "Total", 0.547577698478371, 0.253071993678823, -0.601393843130191, + -0.368546858074508, 0.222802403532036, 16, 16, -0.0728722272712363, + "Total", 0.629057087699781, 0.150857175507058, -0.483054432288683, + -0.220627228515658, 0.248026272819697, 16, 50, 0.0136995221520198, + "Total", 0.908773260175104, 0.119556661508077, 0.114586021215508, + -0.22346757374339, 0.158798568829143, 16, 16, -0.0323345024571234, + "Total", 0.740212127248399, 0.0975186650335925, -0.331572447653842, + -0.207948539273439, 0.301926957550972, 50, 50, 0.0469892091387668, + "Total", 0.717909940610213, 0.130072669917979, 0.361253514426952, + -0.352892899024764, 0.62001481614881, 16, 16, 0.133560958562023, + "Total", 0.590488360811826, 0.248195304313688, 0.53812846673851, + -0.382071967297947, 0.179625107795451, 50, 84, -0.101223429751248, + "Total", 0.479933068181567, 0.143292703213935, -0.706410218251813, + -0.159068400027042, 0.115268963716327, 50, 16, -0.0218997181553578, + "Total", 0.754342356635225, 0.0699853073595502, -0.312918796553222, + -0.24167543717531, 0.371019499711107, 16, 84, 0.0646720312678983, + "Total", 0.679048629139419, 0.156302600894526, 0.413761709004059, + -0.684083172135724, 0.320139519354068, 84, 16, -0.181971826390828, + "Total", 0.477507578661113, 0.256183965473593, -0.710317002293358, + -0.399790689968636, 0.194494460378761, 50, 84, -0.102648114794938, + "Total", 0.498360934208453, 0.151606140478866, -0.677070958146623, + -0.239872724423587, 0.207719993680224, 16, 16, -0.0160763653716815, + "Total", 0.888032991844416, 0.114183913999024, -0.140793609262851, + -0.232706214236359, 0.152475518326074, 16, 16, -0.0401153479551424, + "Total", 0.683092369133234, 0.0982624516574531, -0.408246967977007, + -0.214133174941516, 0.292549902223012, 50, 16, 0.0392083636407478, + "Total", 0.761635703613552, 0.129258262182667, 0.303333519874642, + -0.35829640782117, 0.609856633949177, 16, 16, 0.125780113064004, + "Total", 0.610564659966235, 0.246982355136884, 0.509267607373383, + -0.392362856137318, 0.174354305638784, 50, 16, -0.109004275249267, + "Total", 0.450865997459269, 0.144573361104157, -0.753972062465476, + -0.167014901592951, 0.107653774286198, 50, 16, -0.0296805636533768, + "Total", 0.671868123413061, 0.0700698273146089, -0.423585511637028, + -0.247079680297796, 0.360862051837554, 16, 16, 0.0568911857698793, + "Total", 0.713748178648652, 0.15509002638077, 0.366826849524178, + -0.69426855996518, 0.314763216187487, 84, 50, -0.189752671888847, + "Total", 0.461025692983591, 0.257410795328838, -0.737158951109417, + -0.409332751748792, 0.188474831162879, 50, 16, -0.110428960292957, + "Total", 0.469003215780562, 0.152504736726568, -0.724101838823207, + -0.246654472513982, 0.198940050774581, 16, 50, -0.0238572108697005, + "Total", 0.833766289989859, 0.113674161056875, -0.209873648047105, + -0.246805505214108, 0.14959120142155, 16, 16, -0.0486071518962791, + "Total", 0.630750107027906, 0.101123467003063, -0.480671335119539, + -0.223993714061897, 0.285426833461119, 50, 50, 0.0307165596996111, + "Total", 0.81315323956095, 0.129956609290084, 0.236360119484549, + -0.365819152445783, 0.600395770691518, 16, 16, 0.117288309122867, + "Total", 0.634189834593928, 0.246487928033036, 0.475837944920157, + -0.406318709950581, 0.171326551569773, 50, 84, -0.117496079190404, + "Total", 0.425257119142809, 0.147361192878223, -0.797333930972591, + -0.181319808923812, 0.104975073734785, 50, 16, -0.0381723675945135, + "Total", 0.601215624276932, 0.0730357508905403, -0.522653181887907, + -0.255567902533134, 0.352366666190619, 16, 84, 0.0483993818287426, + "Total", 0.754982387968336, 0.155088198946272, 0.312076496842353, + -0.706927841670926, 0.310438890010959, 84, 16, -0.198244475829984, + "Total", 0.444963380838004, 0.259537098565776, -0.763838684047481, + -0.422351159570448, 0.184509631102261, 50, 84, -0.118920764234093, + "Total", 0.442397376256943, 0.154814270940576, -0.76815117567385, + -0.257587779294375, 0.192889749672701, 16, 16, -0.0323490148108372, + "Total", 0.778333084748394, 0.114919848660584, -0.281491971908005, + -0.263384007009288, 0.158673075706246, 16, 16, -0.0523554656515208, + "Total", 0.626782538202424, 0.107669601595914, -0.486260419612326, + -0.236621470978611, 0.29055796286735, 84, 16, 0.0269682459443694, + "Total", 0.841068634884754, 0.134487020681065, 0.200526755725554, + -0.373581714486978, 0.600661705222229, 16, 16, 0.113539995367625, + "Total", 0.647789565030805, 0.248536051527966, 0.456835113737412, + -0.418867843238315, 0.176379057347024, 50, 16, -0.121244392945645, + "Total", 0.424614855921486, 0.151851489435666, -0.798440590844598, + -0.200047697960439, 0.116206335260928, 84, 16, -0.0419206813497552, + "Total", 0.603341393701522, 0.080678531778119, -0.519601440753097, + -0.26551275777648, 0.354814893923482, 16, 16, 0.0446510680735009, + "Total", 0.777824140122863, 0.158249757799895, 0.282155680326296, + -0.715622379756757, 0.311636800586307, 84, 50, -0.201992789585225, + "Total", 0.440833676691365, 0.262060728780211, -0.770786185802894, + -0.433278722605643, 0.187940566626973, 84, 16, -0.122669077989335, + "Total", 0.438902024422778, 0.158477220533825, -0.774048646083827, + -0.26940693621492, 0.197212279082762, 16, 50, -0.0360973285660789, + "Total", 0.761704816816065, 0.11903770145225, -0.303242822447801, + -0.286912003424843, 0.137725204954603, 16, 16, -0.0745933992351198, + "Total", 0.4910815875924, 0.108327809013056, -0.688589568225547, + -0.252401683821981, 0.261862308543522, 84, 50, 0.00473031236077045, + "Total", 0.971237425432915, 0.131192204658339, 0.0360563523807646, + -0.387925342237535, 0.570529465805588, 16, 16, 0.0913020617840265, + "Total", 0.708842622488723, 0.244508270458869, 0.373410934577714, + -0.445495762971089, 0.1585311099126, 50, 84, -0.143482326529244, + "Total", 0.351775325056329, 0.154091319444688, -0.93115126177337, + -0.218196698488681, 0.0898794686219732, 84, 16, -0.0641586149333541, + "Total", 0.414301525171251, 0.0785923031088123, -0.816347306230809, + -0.278683522132656, 0.32350979111246, 16, 84, 0.022413134489902, + "Total", 0.884003126036789, 0.153623566043851, 0.145896460205228, + -0.742779816804796, 0.294318370467148, 84, 16, -0.224230723168824, + "Total", 0.396701676290931, 0.264570725649156, -0.847526583368767, + -0.457392752232384, 0.167578729086516, 84, 84, -0.144907011572934, + "Total", 0.363412654612948, 0.159434429981519, -0.908881548293746, + -0.284910591275016, 0.16824006697566, 16, 16, -0.0583352621496779, + "Total", 0.613823991714586, 0.11560178192688, -0.504622516862032, + -0.333858601068064, 0.136132046321717, 16, 16, -0.0988632773731731, + "Total", 0.409619701060659, 0.119897776463498, -0.824563059376428, + -0.287857466586199, 0.248778335031633, 84, 16, -0.0195395657772828, + "Total", 0.886503919531609, 0.136899403726483, -0.142729370949794, + -0.413468349316725, 0.547532716608671, 16, 16, 0.0670321836459732, + "Total", 0.784526845358668, 0.245157837977037, 0.273424599429907, + -0.489672394291021, 0.154167984956426, 50, 16, -0.167752204667298, + "Total", 0.307095863365429, 0.16424801280176, -1.0213347595856, + -0.266984489446614, 0.0901275033037996, 84, 16, -0.0884284930714074, + "Total", 0.331719016899586, 0.0911016721652204, -0.970657189596203, + -0.308708392273416, 0.304994904977113, 16, 16, -0.00185674364815133, + "Total", 0.990537596622681, 0.156559840408125, -0.0118596419318716, + -0.781400693546315, 0.28439949093256, 84, 50, -0.248500601306878, + "Total", 0.360735043780864, 0.27189279825695, -0.91396536760063, + -0.498525798732682, 0.160172019310708, 84, 16, -0.169176889710987, + "Total", 0.314042381338476, 0.168038245406322, -1.00677610208266, + -0.322404995386032, 0.15719471481057, 16, 50, -0.0826051402877312, + "Total", 0.499574567995118, 0.122349113039735, -0.675159289964804, + -0.195421067195811, 0.18658928536638, 16, 16, -0.00441589091471529, + "Total", 0.963857952441637, 0.0974534112808806, -0.0453128408403046, + -0.18843931593361, 0.33825495729596, 16, 50, 0.0749078206811749, + "Total", 0.57718429758563, 0.134363252943439, 0.557502286080466, + -0.334308547425727, 0.65726768763459, 50, 16, 0.161479570104431, + "Total", 0.523235636291476, 0.252957769347229, 0.638365726109689, + -0.349502074188502, 0.202892437770823, 50, 84, -0.0733048182088399, + "Total", 0.602931777739563, 0.140919556766487, -0.520189105691772, + -0.137618159025831, 0.149655945799932, 16, 16, 0.00601889338705037, + "Total", 0.934543873326743, 0.0732855570540442, 0.0821293257361987, + -0.22438754269513, 0.409568828315743, 50, 84, 0.0925906428103065, + "Total", 0.56697406822448, 0.161726535796433, 0.57251360980644, + -0.650586286742829, 0.342479857045989, 84, 16, -0.15405321484842, + "Total", 0.543125170182166, 0.253337855088664, -0.608093941564728, + -0.369907975216314, 0.220448968711255, 16, 84, -0.0747295032525295, + "Total", 0.619754321558223, 0.15060402859038, -0.496198567541526, + -0.219958258100119, 0.243642750441573, 50, 16, 0.0118422461707266, + "Total", 0.920240462592111, 0.118267736600906, 0.100130826132981, + -0.18021015263661, 0.196136600723701, 16, 16, 0.00796322404354547, + "Total", 0.933896998212852, 0.0960085890171671, 0.0829428296474764, + -0.177457789162358, 0.35203166044123, 16, 16, 0.0872869356394357, + "Total", 0.518146882443827, 0.13507632124369, 0.646204566690578, + -0.324660397453598, 0.672377767578982, 50, 16, 0.173858685062692, + "Total", 0.494266915752756, 0.254351144433543, 0.683538049140241, + -0.333381779567277, 0.211530373066119, 50, 16, -0.0609257032505791, + "Total", 0.661182963133363, 0.13901075655767, -0.43828049540399, + -0.124398366815925, 0.161194383506547, 16, 16, 0.0183980083453111, + "Total", 0.800636488426381, 0.0728566322073241, 0.252523453087386, + -0.214735943183512, 0.424675458720646, 50, 16, 0.104969757768567, + "Total", 0.519886879461688, 0.16311815088128, 0.643519787353192, + -0.634974327762039, 0.351626127981721, 84, 50, -0.141674099890159, + "Total", 0.573506521022119, 0.251688414564231, -0.562894800443838, + -0.355168021415223, 0.230467244826685, 16, 16, -0.0623503882942687, + "Total", 0.676429723526177, 0.149399496843137, -0.417340015272835, + -0.208846596637658, 0.257289318895633, 50, 50, 0.0242213611289874, + "Total", 0.83859782558089, 0.11891440843049, 0.203687353355046, + -0.171333482881603, 0.214280392232732, 16, 16, 0.0214734546755644, + "Total", 0.827205705556618, 0.0983726941300986, 0.218286739683734, + -0.170924065859848, 0.372518398402757, 16, 50, 0.100797166271455, + "Total", 0.467186548500788, 0.138635829165538, 0.727064330181901, + -0.317033676419605, 0.691771507809026, 50, 16, 0.187368915694711, + "Total", 0.466575674631249, 0.257352990204401, 0.728061933711724, + -0.321147669017249, 0.226316723780129, 50, 84, -0.0474154726185602, + "Total", 0.73423161681617, 0.139661850196153, -0.339501965296648, + -0.119963976335946, 0.183780454290606, 16, 16, 0.0319082389773301, + "Total", 0.680495573472461, 0.0774872479857918, 0.411786968911076, + -0.208696020598264, 0.445655997399436, 50, 84, 0.118479988400586, + "Total", 0.477852852667305, 0.166929602574115, 0.709760201747215, + -0.620901032970867, 0.364573294454587, 84, 16, -0.12816386925814, + "Total", 0.610192777577259, 0.25140113165312, -0.509798298899382, + -0.344076210937228, 0.246395895612728, 16, 84, -0.0488401576622498, + "Total", 0.745762463733312, 0.150633407350218, -0.324231911907151, + -0.20289441357201, 0.278357597094022, 50, 16, 0.0377315917610063, + "Total", 0.758589132915146, 0.122770626006928, 0.307334034110708, + -0.210706703706643, 0.165185421644526, 16, 16, -0.0227606410310585, + "Total", 0.81238098854512, 0.0958926103530877, -0.237355526638092, + -0.198332647301669, 0.311458788431333, 50, 16, 0.0565630705648317, + "Total", 0.663613845856524, 0.130051225367959, 0.43492916275718, + -0.344626452645726, 0.630896092621901, 50, 16, 0.143134819988088, + "Total", 0.565185423614508, 0.248862365064467, 0.575156552703376, + -0.3685714771685, 0.185272340518134, 50, 16, -0.0916495683251831, + "Total", 0.516554224152077, 0.141289284409123, -0.648666094590719, + -0.145786673926636, 0.12113496046805, 50, 16, -0.0123258567292928, + "Total", 0.856356828827873, 0.0680935049062458, -0.181013692073328, + -0.232577258259851, 0.381069043647778, 50, 16, 0.0742458926939633, + "Total", 0.635302130114136, 0.156545300512661, 0.474277365406818, + -0.671171016946182, 0.326375087016656, 84, 50, -0.172397964964763, + "Total", 0.498120485867459, 0.2544807230723, -0.67744999653975, + -0.38656899561007, 0.200420488872324, 50, 16, -0.0930742533688727, + "Total", 0.534236625206546, 0.149744967028091, -0.621551797139281, + -0.228370474068293, 0.21536546617706, 50, 50, -0.0065025039456166, + "Total", 0.954192627380096, 0.113200024017146, -0.0574426021732262, + -0.212172610160459, 0.164916160492996, 16, 16, -0.0236282248337316, + "Total", 0.805975593622283, 0.0961978826212835, -0.245621048924251, + -0.19863361418166, 0.310024587705977, 50, 50, 0.0556954867621586, + "Total", 0.667768819045926, 0.129762129789085, 0.429212181186344, + -0.344622667477592, 0.629157139848421, 50, 16, 0.142267236185415, + "Total", 0.566852272590614, 0.248417780889614, 0.572693450830848, + -0.370111602971099, 0.185077298715387, 50, 84, -0.0925171521278562, + "Total", 0.513614367917683, 0.141632424387832, -0.653220140287343, + -0.146125479957198, 0.119738598893266, 50, 16, -0.013193440531966, + "Total", 0.845764449565427, 0.0678237153711919, -0.194525476225531, + -0.232299361126325, 0.379055978908905, 50, 84, 0.0733783088912901, + "Total", 0.63800367853317, 0.155960860724361, 0.470491817950248, + -0.672585674625938, 0.326054577091065, 84, 16, -0.173265548767436, + "Total", 0.496432753145983, 0.254759847526319, -0.680113253520204, + -0.387491485893785, 0.199607811550694, 50, 84, -0.0939418371715458, + "Total", 0.530509661219611, 0.149772981053592, -0.627228199043001, + -0.228043791019619, 0.213303615523039, 50, 16, -0.00737008774828973, + "Total", 0.947808453552709, 0.11259069299843, -0.0654591205721817, + -0.214390053138188, 0.165239888563603, 16, 16, -0.0245750822872926, + "Total", 0.799685742978774, 0.096846152453888, -0.253753831872606, + -0.199423131741261, 0.308920390358456, 50, 16, 0.0547486293085976, + "Total", 0.672896201173182, 0.129681852857875, 0.422176488861547, + -0.344858383134754, 0.627499140598461, 50, 16, 0.141320378731854, + "Total", 0.568871685393884, 0.24805494677531, 0.569714011226161, + -0.372212252856462, 0.185284233693627, 50, 16, -0.0934640095814172, + "Total", 0.511069053895966, 0.142221104813035, -0.657173980642928, + -0.147377251204652, 0.119096655233598, 50, 16, -0.014140297985527, + "Total", 0.835222002305057, 0.0679792864920381, -0.208008920293436, + -0.232376708258894, 0.377239611134353, 50, 16, 0.0724314514377291, + "Total", 0.641397662309716, 0.155517224857656, 0.465745524356064, + -0.674363786752781, 0.325938974310786, 84, 50, -0.174212406220997, + "Total", 0.494800606948323, 0.255183964846759, -0.682693390729364, + -0.38889799079251, 0.199120601542296, 50, 16, -0.0948886946251068, + "Total", 0.527021229273544, 0.150007499365555, -0.632559672192598, + -0.228214582652243, 0.211580692248542, 50, 50, -0.00831694520185076, + "Total", 0.940907301909557, 0.112194733773129, -0.0741295506674012, + -0.243326204973687, 0.157762996522775, 16, 16, -0.0427816042254559, + "Total", 0.675864140313565, 0.102320554015329, -0.418113492808556, + -0.221045412464044, 0.294129627204913, 84, 50, 0.0365421073704344, + "Total", 0.780976943719236, 0.131424618955397, 0.278046135198125, + -0.362122666788068, 0.608350380375449, 50, 16, 0.12311385679369, + "Total", 0.618991167515133, 0.24757420412275, 0.497280632406472, + -0.40025809328406, 0.176917030244899, 50, 84, -0.11167053151958, + "Total", 0.448200332370009, 0.147241257513312, -0.758418757116933, + -0.176894099069683, 0.112200459222303, 84, 16, -0.0323468199236902, + "Total", 0.660950567608147, 0.07374996698213, -0.438601144479536, + -0.251367108176988, 0.35981696717612, 50, 84, 0.0542249294995659, + "Total", 0.728005140454737, 0.155917169951604, 0.347780360023191, + -0.699732765781033, 0.314894909462713, 84, 16, -0.19241892815916, + "Total", 0.457243049195826, 0.258838346838768, -0.743394209201231, + -0.415116780622504, 0.188926347495963, 84, 84, -0.11309521656327, + "Total", 0.462991674804536, 0.154095466264452, -0.733929552276253, + -0.251172479932125, 0.198125545652097, 50, 16, -0.026523467140014, + "Total", 0.816999712474089, 0.114618949411374, -0.231405603316252, + -0.260254195119425, 0.144041642892007, 16, 16, -0.058106276113709, + "Total", 0.573175769647358, 0.103138588566031, -0.563380563197336, + -0.231656184902734, 0.274091055867096, 84, 16, 0.0212174354821813, + "Total", 0.869375838780191, 0.12901952402164, 0.164451354499049, + -0.371499301282065, 0.58707767109294, 50, 16, 0.107789184905437, + "Total", 0.659369039068478, 0.24453943540191, 0.440784467864178, + -0.419066354974483, 0.165075948158816, 50, 16, -0.126995203407834, + "Total", 0.394097416634714, 0.149018631908785, -0.852210235600392, + -0.18861398336021, 0.0932709997363233, 84, 16, -0.0476714918119433, + "Total", 0.507378108493902, 0.071910755840415, -0.662925750881222, + -0.259472990466884, 0.337273505689509, 50, 16, 0.0389002576113128, + "Total", 0.798314324992465, 0.152234046355814, 0.255529288897648, + -0.71862941633768, 0.303142216242853, 84, 50, -0.207743600047413, + "Total", 0.42545787653417, 0.26066081842323, -0.796988213664333, + -0.431408511742476, 0.17456873483943, 84, 16, -0.128419888451523, + "Total", 0.406132483337166, 0.154588872898119, -0.83071883534695, + -0.260300631111861, 0.176604353055326, 50, 50, -0.0418481390282671, + "Total", 0.707316099921545, 0.111457401159776, -0.375463079102994, + -0.289563468799948, 0.139901053271575, 16, 16, -0.0748312077641866, + "Total", 0.494594077635119, 0.109559289216303, -0.683020201203087, + -0.252140429206642, 0.261125436870049, 84, 50, 0.00449250383170365, + "Total", 0.972629733903195, 0.130937575926208, 0.0343102718980797, + -0.386426832645202, 0.568555339155122, 50, 16, 0.0910642532549597, + "Total", 0.708558590866649, 0.243622377587829, 0.373792646458062, + -0.447125285718125, 0.159685015601503, 50, 84, -0.143720135058311, + "Total", 0.353191664501016, 0.154801390766889, -0.928416303925427, + -0.216984579802846, 0.0881917328780043, 84, 16, -0.0643964234624209, + "Total", 0.408146932325691, 0.0778525307322079, -0.82715902561893, + -0.275834479899959, 0.320185131821629, 50, 84, 0.0221753259608352, + "Total", 0.884044810195244, 0.152048613245681, 0.145843658074041, + -0.743617018109261, 0.294679954713479, 84, 16, -0.224468531697891, + "Total", 0.396746649478269, 0.264876543909147, -0.847445864345331, + -0.456564426360972, 0.166274786156971, 84, 84, -0.145144820102001, + "Total", 0.360985019171185, 0.158890473863505, -0.913489755381358, + -0.280533531809092, 0.163387390451602, 50, 16, -0.0585730706787447, + "Total", 0.605006619563042, 0.113247214173905, -0.517214230001267, + -0.194945667043426, 0.208557955405525, 16, 16, 0.00680614418104965, + "Total", 0.947282415415577, 0.10293648904565, 0.0661198399532676, + -0.187664820473387, 0.359924532027266, 16, 50, 0.0861298557769399, + "Total", 0.53752361211413, 0.139693728257246, 0.616562080856859, + -0.33022558781641, 0.675628798216802, 84, 16, 0.172701605200196, + "Total", 0.500923351072601, 0.256600221730415, 0.673037630425888, + -0.343782359752235, 0.219616793526085, 50, 50, -0.0620827831130749, + "Total", 0.665778045565783, 0.143726914811277, -0.431949598268311, + -0.141164641202971, 0.175646498168601, 16, 16, 0.0172409284828153, + "Total", 0.831074800912837, 0.0808206533055041, 0.213323300142652, + -0.222460191605915, 0.430085547418058, 84, 50, 0.103812677906071, + "Total", 0.532879542556197, 0.166468808654437, 0.623616392435235, + -0.641093727127529, 0.35543136762222, 84, 50, -0.142831179752655, + "Total", 0.574224846787615, 0.254220256752219, -0.561840278101317, + -0.363910196766387, 0.236895260452858, 16, 50, -0.0635074681567645, + "Total", 0.678616631628188, 0.153269514633514, -0.41435159698012, + -0.218516008569205, 0.264644571102188, 84, 50, 0.0230642812664915, + "Total", 0.851564415836584, 0.123257514801931, 0.187122718672, + -0.170984978216688, 0.225562304160221, 16, 50, 0.0272886629717666, + "Total", 0.787350721467727, 0.1011618798878, 0.269752430481056, + -0.169772166364513, 0.382996915499826, 16, 50, 0.106612374567657, + "Total", 0.449628150526675, 0.141015112069536, 0.756035101508024, + -0.314195641137681, 0.700563889119506, 84, 50, 0.193184123990913, + "Total", 0.455514295525113, 0.258871983939879, 0.74625349970578, + -0.317559035899986, 0.23435850725527, 50, 84, -0.041600264322358, + "Total", 0.767641836938364, 0.140797878815303, -0.2954608739307, + -0.119461675765907, 0.194908570312971, 16, 50, 0.0377234472735322, + "Total", 0.638084187458712, 0.0801979650030791, 0.470379108398622, + -0.20607186982188, 0.454662263215457, 84, 84, 0.124295196696788, + "Total", 0.460876496383073, 0.168557723062547, 0.737404341008248, + -0.615240637227998, 0.370543315304122, 84, 50, -0.122348660961938, + "Total", 0.626602606088128, 0.251480119101131, -0.486514247723639, + -0.339225860526974, 0.253175961794879, 16, 84, -0.0430249493660476, + "Total", 0.775876702104187, 0.151125690827649, -0.284696461140518, + -0.199203672067308, 0.286297272181725, 84, 50, 0.0435468000572085, + "Total", 0.725141065354869, 0.123854557552741, 0.351596266763658, + -0.164364820547316, 0.263650278489023, 16, 16, 0.0496427289708536, + "Total", 0.64936297895955, 0.109189531647639, 0.454647329480755, + -0.164203789487485, 0.422136670620973, 16, 50, 0.128966440566744, + "Total", 0.388580835816954, 0.149579396543364, 0.862193881958572, + -0.304412780494254, 0.735489160474254, 84, 16, 0.21553818999, + "Total", 0.41651920886979, 0.2652859820821, 0.812474855619381, + -0.303261333660692, 0.26476893701415, 50, 50, -0.0192461983232709, + "Total", 0.89433861810722, 0.144908344019429, -0.132816356804757, + -0.119622490228058, 0.239777516773296, 16, 16, 0.0600775132726193, + "Total", 0.512302024715575, 0.0916853599954529, 0.655257429055182, + -0.199878865044396, 0.493177390436147, 84, 50, 0.146649262695875, + "Total", 0.406850605848337, 0.176803313975992, 0.829448608162338, + -0.595109060240413, 0.395119870314712, 84, 50, -0.0999945949628508, + "Total", 0.692223520879629, 0.252614062902667, -0.395839383658459, + -0.325637091487315, 0.284295324753394, 16, 50, -0.0206708833669606, + "Total", 0.894313498601365, 0.155597863290289, -0.132848118411473, + -0.194006071829608, 0.3258078039422, 84, 50, 0.0659008660562955, + "Total", 0.61921733450025, 0.132608017257468, 0.496959892917666, + -0.201822085896641, 0.178744874026054, 16, 50, -0.0115386059352936, + "Total", 0.905393943324974, 0.0970851921067322, -0.118850317797264, + -0.191534970059074, 0.327105181380267, 50, 50, 0.0677851056605967, + "Total", 0.608423010111141, 0.132308592282896, 0.512325802058733, + -0.337277386377808, 0.645991096545514, 84, 50, 0.154356855083853, + "Total", 0.538314543855664, 0.250838405878684, 0.615363722086904, + -0.356866921107077, 0.196011854648241, 50, 84, -0.0804275332294181, + "Total", 0.568519168780145, 0.141043095719196, -0.570233748907087, + -0.138711145978426, 0.13650350271137, 50, 50, -0.0011038216335279, + "Total", 0.987456243571412, 0.0702091086521623, -0.0157219149298216, + -0.225630972174986, 0.396566827754442, 84, 84, 0.0854679277897282, + "Total", 0.590260075313585, 0.158726845196454, 0.538459185552045, + -0.658326104684639, 0.335974244946643, 84, 50, -0.161175929868998, + "Total", 0.52515471944573, 0.253652709303384, -0.635419705595266, + -0.374962943210324, 0.211258506664108, 50, 84, -0.0818522182731077, + "Total", 0.584154130092794, 0.149549036231908, -0.547326952653697, + -0.2200430616628, 0.229482123963096, 84, 50, 0.00471953115014834, + "Total", 0.967172304745857, 0.114676899466443, 0.0411550292352419, + -0.195564885075668, 0.186959313264647, 16, 16, -0.00430278590551053, + "Total", 0.964830332275655, 0.0975844967962723, -0.0440929250728574, + -0.185959772800189, 0.336001624180949, 50, 50, 0.0750209256903797, + "Total", 0.573157875892994, 0.133155864367484, 0.563406846906395, + -0.331462815637518, 0.654648165864789, 84, 16, 0.161592675113636, + "Total", 0.52064381189737, 0.251563546391828, 0.642353303693469, + -0.349069580143561, 0.20268615374429, 50, 50, -0.0731917131996351, + "Total", 0.603072086581478, 0.14075660018246, -0.519987788173046, + -0.132129614111744, 0.144393610904254, 50, 16, 0.00613199839625513, + "Total", 0.930730521981076, 0.0705429352776833, 0.0869257619082237, + -0.2195437335284, 0.404951229167422, 84, 50, 0.0927037478195112, + "Total", 0.560635771621675, 0.159312866874534, 0.581897430121068, + -0.649971320327213, 0.342091100648783, 84, 50, -0.153940109839215, + "Total", 0.54301353937002, 0.253081798645602, -0.608262271973109, + -0.366666390561047, 0.217433594074398, 50, 50, -0.0746163982433247, + "Total", 0.616543657255835, 0.149007836175244, -0.500754860674378, + -0.212617555325882, 0.236528257685745, 84, 50, 0.0119553511799314, + "Total", 0.916899109320493, 0.114580118959948, 0.10434053733275, + -0.192264694852867, 0.19945307886886, 16, 50, 0.00359419200799659, + "Total", 0.971308548727432, 0.099929839734696, 0.0359671547311476, + -0.182460890268071, 0.348296697475844, 50, 50, 0.0829179036038868, + "Total", 0.540277799396323, 0.135399831815907, 0.612392958631029, + -0.326497332274565, 0.665476638328851, 84, 50, 0.169489653027143, + "Total", 0.503009032126038, 0.253059234360422, 0.669762767027682, + -0.343039454780592, 0.212449984208336, 50, 84, -0.065294735286128, + "Total", 0.644966481678426, 0.141709093475839, -0.460766022028506, + -0.129794775204891, 0.157852727824416, 50, 50, 0.0140289763097622, + "Total", 0.848384226443801, 0.0733808134481637, 0.19118044146066, + -0.215076135932605, 0.416277587398641, 84, 84, 0.100600725733018, + "Total", 0.532229395042296, 0.161062582861543, 0.624606435248212, + -0.642234716894583, 0.350148453043167, 84, 50, -0.146043131925708, + "Total", 0.564025590744377, 0.253163623863893, -0.576872497307213, + -0.359956170239213, 0.226517329579578, 50, 84, -0.0667194203298176, + "Total", 0.655636486577045, 0.149613335868623, -0.445945676850656, + -0.207550347226826, 0.247255005413703, 84, 50, 0.0198523290934385, + "Total", 0.86414080643833, 0.11602390559928, 0.171105506153222, + -0.225106964454523, 0.161987826195141, 16, 16, -0.0315595691296909, + "Total", 0.749279912804994, 0.0987504856474452, -0.319589001742873, + -0.207156986779433, 0.302685271711831, 84, 50, 0.0477641424661993, + "Total", 0.713443622738939, 0.13006419059555, 0.367235149409628, + -0.351056762763198, 0.619728546542109, 84, 16, 0.134335891889455, + "Total", 0.587519519137024, 0.247653864296165, 0.542434063248879, + -0.382182678685623, 0.181285685837992, 50, 50, -0.100448496423816, + "Total", 0.484677940962469, 0.143744571065637, -0.698798540210247, + -0.156683919421292, 0.114434349765442, 84, 16, -0.0211247848279253, + "Total", 0.760038726753602, 0.0691640946785963, -0.305429933350413, + -0.238505252317378, 0.36939918150804, 84, 50, 0.0654469645953308, + "Total", 0.673010950190603, 0.155080511330946, 0.422019272658093, + -0.683301907832028, 0.320908121705237, 84, 50, -0.181196893063395, + "Total", 0.479379437478746, 0.256180735324309, -0.70730101088207, + -0.397423744964841, 0.193677382029831, 84, 50, -0.101873181467505, + "Total", 0.499307951314556, 0.150793874698005, -0.675579042394967, + -0.234660459638115, 0.204057595549617, 84, 50, -0.015301432044249, + "Total", 0.89125395998219, 0.111919927776297, -0.13671767260995, + -0.235663142284796, 0.158101467913821, 16, 50, -0.0387808371854879, + "Total", 0.699449744931817, 0.100452001492013, -0.38606335970888, + -0.212911967418358, 0.293997716239163, 84, 50, 0.0405428744104024, + "Total", 0.753887391546586, 0.129316071023743, 0.313517678734288, + -0.355198601389257, 0.609427849056574, 84, 50, 0.127114623833658, + "Total", 0.605468606841614, 0.246082697961463, 0.516552463406285, + -0.392664731926708, 0.177325202967483, 50, 84, -0.107669764479612, + "Total", 0.459017758815961, 0.145408267547312, -0.740465217664323, + -0.163167371203667, 0.106475265436222, 84, 50, -0.0283460528837222, + "Total", 0.68028038558853, 0.0687876508871581, -0.412080548152781, + -0.241695797174376, 0.358147190253443, 84, 84, 0.0582256965395339, + "Total", 0.703573950520624, 0.15302398211378, 0.380500466235682, + -0.692994564193637, 0.316158241955253, 84, 50, -0.188418161119192, + "Total", 0.464237662595745, 0.25744167089522, -0.731886801635463, + -0.405389172989165, 0.187200273942561, 84, 84, -0.109094449523302, + "Total", 0.47050947257567, 0.151173555128053, -0.721650353667299, + -0.237753399305928, 0.192707999105836, 84, 50, -0.022522700100046, + "Total", 0.837494487843843, 0.109813599078143, -0.205099371017053, + -0.25055433586321, 0.157230468925415, 16, 16, -0.0466619334688973, + "Total", 0.653757116575444, 0.104028647466275, -0.448548881537893, + -0.221924690215211, 0.287248246469197, 84, 50, 0.0326617781269929, + "Total", 0.80146578553968, 0.129893442099115, 0.251450555156359, + -0.361143642633752, 0.59961069773425, 84, 16, 0.119233527550249, + "Total", 0.626627569739436, 0.245094896627262, 0.486479029922757, + -0.406458782529314, 0.175357061003271, 50, 50, -0.115550860763022, + "Total", 0.436266794521705, 0.148425136411147, -0.778512747618024, + -0.175322507369148, 0.102868209034884, 84, 16, -0.0362271491671317, + "Total", 0.609722729804195, 0.0709683235504235, -0.51046928199441, + -0.247455498105085, 0.348144698617334, 84, 50, 0.0503446002561244, + "Total", 0.740386364869698, 0.151941617657375, 0.331341741863315, + -0.704925862989289, 0.312327348184086, 84, 50, -0.196299257402602, + "Total", 0.449392544631682, 0.259508138720236, -0.756428135050604, + -0.416407815023659, 0.182456723410235, 84, 50, -0.116975545806712, + "Total", 0.44386959842466, 0.152774373191972, -0.765675180743325, + -0.244307138965788, 0.183499546198877, 84, 50, -0.0304037963834555, + "Total", 0.780563026844741, 0.10913636386667, -0.278585389014785, + -0.0204602738531293, 0.0355990966029121, 16, 50, 0.0075694113748914, + "Total indirect", 0.596605737037486, 0.0143011225966983, 0.529287915945769, + -0.0237405476880486, 0.0498110769636611, 16, 50, 0.0130352646378063, + "Total indirect", 0.487234935508194, 0.0187635143379867, 0.694713389133954, + -0.034855776140694, 0.0728568737051931, 16, 50, 0.0190005487822495, + "Total indirect", 0.489266047713783, 0.0274782217161924, 0.691476652983438, + -0.0473513425957422, 0.0258006651128386, 50, 84, -0.0107753387414518, + "Total indirect", 0.563663896680991, 0.018661569366987, -0.577407962296772, + -0.0631265618780968, 0.0260141933991551, 16, 50, -0.0185561842394708, + "Total indirect", 0.414499819438352, 0.0227404064514406, -0.81600055298463, + -0.0924341448046571, 0.0383381684434421, 16, 84, -0.0270479881806075, + "Total indirect", 0.417498218219687, 0.0333608970061732, -0.810769212098897, + -0.120796242825534, 0.0592036389538352, 84, 50, -0.0307963019358492, + "Total indirect", 0.502435151590635, 0.0459191809643404, -0.670663136604392, + -0.141582369776893, 0.0355138987379968, 16, 84, -0.0530342355194482, + "Total indirect", 0.240441702230363, 0.0451784496837194, -1.17388347521273, + -0.208091860102846, 0.0534836327878434, 16, 50, -0.0773041136575014, + "Total indirect", 0.246673541069772, 0.0667296682372645, -1.15846692632486, + -0.0327768113439692, 0.0670633569458819, 16, 16, 0.0171432728009563, + "Total indirect", 0.50089656225561, 0.0254698987015521, 0.673079740199818, + -0.0192251764951287, 0.0782699520135629, 16, 50, 0.0295223877592171, + "Total indirect", 0.235232006369421, 0.0248716632748665, 1.18698888099898, + -0.0289898075566746, 0.115055044339147, 16, 16, 0.043032618391236, + "Total indirect", 0.241575776312593, 0.0367468109189834, 1.17105722415235, + -0.0152543884556725, 0.0128514338248987, 50, 50, -0.00120147731538687, + "Total indirect", 0.866921241035064, 0.0071699843727401, -0.167570423159473, + -0.0257552439095281, 0.0216171216734081, 16, 16, -0.00206906111806, + "Total indirect", 0.864059510554421, 0.0120850092033842, -0.171208898829849, + -0.0375513662945377, 0.0315195291512957, 16, 50, -0.00301591857162103, + "Total indirect", 0.86409785512837, 0.01762045016915, -0.17116013170318, + -0.083294090233803, 0.0408492092142345, 84, 50, -0.0212224405097843, + "Total indirect", 0.502783708063711, 0.0316697909827078, -0.670116216471779, + -0.097720119376938, 0.0246258945808634, 16, 50, -0.0365471123980373, + "Total indirect", 0.241615645715406, 0.0312112913611809, -1.17095803486981, + -0.143620193788541, 0.0370761056915109, 16, 50, -0.053272044048515, + "Total indirect", 0.247822316334707, 0.0460968418056049, -1.1556549638079, + -0.0540501821056784, 0.110780797899121, 16, 50, 0.0283653078967213, + "Total indirect", 0.49994926982061, 0.0420494920582636, 0.674569572859963, + -0.0312547217603113, 0.128950375135188, 16, 50, 0.0488478266874382, + "Total indirect", 0.232001997932186, 0.0408693981520008, 1.19521766642523, + -0.0471681214244751, 0.189571906797526, 16, 50, 0.0712018926865253, + "Total indirect", 0.23841533713089, 0.0603939740957936, 1.17895690344187, + -0.0240535791504038, 0.04409469471116, 50, 84, 0.0100205577803781, + "Total indirect", 0.564352780744235, 0.0173850831951783, 0.576388255832866, + -0.0243382942542883, 0.0588510498746104, 16, 50, 0.0172563778101611, + "Total indirect", 0.416143482166887, 0.02122216142365, 0.813130079716128, + -0.0358646078058579, 0.0861713192531943, 16, 84, 0.0251533557236682, + "Total indirect", 0.419117406779356, 0.031132186106902, 0.807953403506467, + -0.0442761880066315, 0.0242753771785929, 84, 50, -0.0100004054140193, + "Total indirect", 0.567426996838763, 0.0174879655253745, -0.57184498674297, + -0.0593865146754074, 0.0249431677357749, 16, 84, -0.0172216734698162, + "Total indirect", 0.423408741781754, 0.0215130693921838, -0.800521448421177, + -0.0869450716723647, 0.0367395321659133, 16, 50, -0.0251027697532257, + "Total indirect", 0.42627595001448, 0.0315527746463421, -0.795580421518837, + 16, 16, 50, 50, 16, 16, 50, 50, 50, 16, 16, 50, 84, 50, 50, + 50, 16, 50, 16, 50, 50, 50, 16, 50, 50, 84, 50, 50, 16, 84, + 84, 50, 50, 84, 16, 50, 16, 16, 50, 50, 16, 16, 50, 50, 50, + 16, 16, 50, 84, 50, 50, 50, 16, 50, 16, 50, 84, 50, 16, 50, + 50, 84, 84, 50, 16, 84, 84, 50, 84, 84, 16, 50, 16, 16, 84, + 50, 16, 16, 50, 50, 84, 16, 16, 50, 84, 50, 84, 50, 16, 50, + 16, 50, 84, 50, 16, 50, 50, 84, 84, 50, 16, 84, 84, 50, 84, + 84, 16, 50, 16, 16, 16, 84, 50, 16, 50, 84, 16, 16, 50, 84, + 84, 50, 16, 84, 50, 50, 16, 84, 16, 50, 50, 84, 50, 84, 16, + 84, 50, 84, 84, 84, 16, 84, 50, 84, 16, 16, 16, 84, 50, 16, + 50, 84, 16, 16, 50, 84, 84, 50, 16, 84, 50, 50, 16, 84, 50, + 50, 50, 84, 50, 84, 50, 84, 50, 84, 84, 84, 50, 84, 50, 84, + 16, 16, 50, 84, 50, 16, 50, 84, 50, 16, 50, 84, 84, 50, 50, + 84, 50, 50, 16, 84, 50, 50, 50, 84, 50, 84, 50, 84, 50, 84, + 84, 84, 50, 84, 50, 84, 16, 16, 84, 84, 50, 16, 50, 84, 84, + 16, 50, 84, 84, 50, 84, 84, 50, 50, 16, 84, 84, 50, 50, 84, + 50, 84, 84, 84, 50, 84, 84, 84, 84, 84, 50, 84, 16, 16, 84, + 84, 50, 16, 50, 84, 84, 16, 50, 84, 84, 50, 84, 84, 50, 50, + 16, 84, 16, 50, 84, 84, 50, 84, 16, 84, 84, 84, 84, 84, 16, + 84, 84, 84, 16, 16, 16, 84, 84, 16, 50, 84, 16, 16, 84, 84, + 84, 50, 16, 84, 84, 50, 16, 84, 16, 50, 84, 84, 50, 84, 16, + 84, 84, 84, 84, 84, 16, 84, 84, 84, 16, 16, 50, 84, 84, 16, + 50, 84, 50, 16, 84, 84, 84, 50, 50, 84, 84, 50, 16, 84, 50, + 50, 84, 84, 50, 84, 50, 84, 84, 84, 84, 84, 50, 84, 84, 84, + 16, 16, 50, 84, 84, 16, 50, 84, 50, 16, 84, 84, 84, 50, 50, + 84, 84, 50, 16, 84, 84, 50, 84, 84, 50, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 16, 16, 84, 84, 84, 16, 50, 84, 84, + 16, 84, 84, 84, 50, 84, 84, 84, 50, 16, 84, 84, 50, 84, 84, + 50, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 16, 16, 16, + 16, 16, 16, 50, 16, 16, 16, 16, 16, 84, 16, 16, 16, 16, 16, + 16, 50, 16, 50, 16, 50, 50, 50, 16, 50, 16, 50, 84, 50, 16, + 50, 16, 50, 16, 84, 16, 84, 16, 84, 50, 84, 16, 84, 16, 84, + 84, 84, 16, 84, 16, 84, 16, 50, 16, 50, 50, 16, 84, 50, 16, + 16, 50, 16, 50, 50, 16, 84, 50, 16, 16, 50, 16, 50, 50, 16, + 84, 50, 16, 16, 84, 16, 50, 84, 16, 84, 84, 16, 16, 84, 16, + 50, 84, 16, 84, 84, 16, 16, 84, 16, 50, 84, 16, 84, 84, 16, + 16, 16, 50, 50, 16, 50, 84, 16, 50, 16, 16, 50, 50, 16, 50, + 84, 16, 50, 16, 16, 50, 50, 16, 50, 84, 16, 50, 16, 50, 50, + 50, 50, 50, 84, 50, 50, 16, 50, 50, 50, 50, 50, 84, 50, 50, + 16, 50, 50, 50, 50, 50, 84, 50, 50, 16, 84, 50, 50, 84, 50, + 84, 84, 50, 16, 84, 50, 50, 84, 50, 84, 84, 50, 16, 84, 50, + 50, 84, 50, 84, 84, 50, 16, 16, 84, 50, 16, 84, 84, 16, 84, + 16, 16, 84, 50, 16, 84, 84, 16, 84, 16, 16, 84, 50, 16, 84, + 84, 16, 84, 16, 50, 84, 50, 50, 84, 84, 50, 84, 16, 50, 84, + 50, 50, 84, 84, 50, 84, 16, 50, 84, 50, 50, 84, 84, 50, 84, + 16, 84, 84, 50, 84, 84, 84, 84, 84, 16, 84, 84, 50, 84, 84, + 84, 84, 84, 16, 84, 84, 50, 84, 84, 84, 84, 84, 16, 16, 50, + 16, 84, 16, 16, 50, 50, 50, 84, 50, 16, 84, 50, 84, 84, 84, + 16, 16, 50, 16, 84, 16, 16, 50, 50, 50, 84, 50, 16, 84, 50, + 84, 84, 84, 16, 16, 50, 16, 84, 16, 16, 50, 50, 50, 84, 50, + 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-67") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-67") +}) + + +context('Model number 67 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(22997.686492965, 23161.4675598702, 26469.2946705803, 21, 1, 2564, + 0, 0, 26469.2946705803, 21)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 67)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0678662301075313, 0.0881398860499555, 0.0780030580787434, "facExperimexperimental", + "", 0, "facGenderm", 0.00517194604144264, 15.0819551197378, + -0.0939551844882529, -0.0542197060460528, -0.0740874452671529, + "contcor2", "", 2.69562150378988e-13, "facGenderm", + 0.010136787909275, -7.30876939818026, -0.0997948846898048, -0.0599920422927528, + -0.0798934634912788, "contcor2", "", 3.5527136788005e-15, + "facExperimexperimental", 0.0101539729074135, -7.86819742575318, + 0.960777942182155, 1.0720554750424, 1.01641670861228, "contNormal", + "", 0, "contNormal", 0.0283876473593362, 35.804894140972, + 0.00607839647216775, 0.0067823950956606, 0.00643039578391418, + "debCollin1", "", 0, "debCollin1", 0.000179594785681244, + 35.8050249595066, 0.103586111102855, 0.115583431134683, 0.109584771118769, + "debCollin1:facExperimexperimental", "", 0, "debCollin1:facExperimexperimental", + 0.0030605970636351, 35.8050304696476, 0.426153611340415, 0.475510605769074, + 0.450832108554744, "debCollin1:contcor2", "", 0, "debCollin1:contcor2", + 0.0125913013754286, 35.8050446981218, 0.236315043563538, 0.263685003699998, + 0.250000023631768, "facGenderm", "", 0, "facGenderm", + 0.0069822609885566, 35.8050241950994, 0.236315063640062, 0.263685028712888, + 0.250000046176475, "facExperimexperimental", "", 0, + "facExperimexperimental", 0.00698226224785686, 35.8050209662649, + 0.975408201952714, 1.08837975692829, 1.0318939794405, "contcor2", + "", 0, "contcor2", 0.0288198037991199, 35.8050313816506 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.472927236742854, 0.78472312944944, 16, 0.628825183096147, 0, + "facGenderm", "contNormal", "", "", "", 2.66453525910038e-15, + 0.0795412301363677, 7.90565071747158, 0.20350240531535, 0.488256637495504, + 16, 0.345879521405427, 1, "facGenderm", "contNormal", "", "", + "", 1.92274606125586e-06, 0.0726427205872808, 4.76137896005492, + 0.497013252303378, 0.732415919240993, 50, 0.614714585772186, + 0, "facGenderm", "contNormal", "", "", "", 0, 0.0600528042337618, + 10.2362344875577, 0.213093067399085, 0.450444780763847, 50, + 0.331768924081466, 1, "facGenderm", "contNormal", "", "", + "", 4.27123245660965e-08, 0.0605500190914124, 5.47925383112752, + 0.461874956111963, 0.737185371960318, 84, 0.59953016403614, + 0, "facGenderm", "contNormal", "", "", "", 0, 0.0702335394986766, + 8.53623736345279, 0.162418906289538, 0.470750098401303, 84, + 0.316584502345421, 1, "facGenderm", "contNormal", "", "", + "", 5.70103496155827e-05, 0.0786573617025215, 4.02485534084818, + -0.00789265451706687, 0.00373533266855622, 16, -0.00207866092425532, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.483465000898288, 0.00296637776952617, -0.700740460506941, + -0.00861553858997563, 0.0233902117874418, 16, 0.00738733659873307, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.36558750327493, 0.00816488227076484, 0.904769518255536, -0.00825470225934628, + 0.00385578914913403, 16, -0.00219945655510612, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.4765137937946, + 0.00308946784328853, -0.711920844194626, -0.00867050304930117, + 0.0243037655186764, 16, 0.00781663123468763, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.352770660345602, + 0.0084119577778149, 0.929228538842962, -0.00414656787028758, + 0.00296061297770512, 50, -0.000592977446291234, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.743627367265812, + 0.00181308965472153, -0.327053571094536, -0.00995873138546722, + 0.0141734870871744, 50, 0.00210737785085358, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.732115438215943, + 0.00615629130509373, 0.342312887161453, -0.0045114940588291, + 0.00308394790454503, 50, -0.000713773077142034, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.712596765657882, + 0.00193764835050185, -0.368370802141249, -0.010191914788845, + 0.0152652597624613, 50, 0.00253667248680815, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.696092895156049, + 0.00649429651567814, 0.39060004123376, -0.00347093134417146, + 0.00548246610815703, 84, 0.00100576738199278, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.659691144418211, + 0.00228407193268645, 0.440339626611422, -0.0181731174074175, + 0.0110243399381253, 84, -0.00357438873464608, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.631311005234563, + 0.00744846782283977, -0.479882416043428, -0.00366314607070404, + 0.005433089572988, 84, 0.000884971751141983, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.702929197147478, + 0.00232051091638469, 0.381369354866364, -0.0183205304702259, + 0.0120303422728429, 84, -0.00314509409869151, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.684595222847686, + 0.00774271185146071, -0.406200586955612)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.497010176490887, 0.732321773103003, 0.614665974796945, "facGenderm", + "", 0, "contNormal", 0.0600295715809635, 10.2393863325832, + -0.791809618181373, 0.557210295571748, -0.117299661304812, "debCollin1", + "", 0.733220533559263, "contNormal", 0.344144056828089, + -0.340844652050485, -0.502993979536317, 0.818267884381327, 0.157636952422505, + "facExperimexperimental", "", 0.640014663440232, "contNormal", + 0.337062791546066, 0.467678297267531, -0.457705010545425, 0.163273248624127, + -0.147215880960649, "contcor2", "", 0.352733173821709, + "contNormal", 0.158415732142976, -0.929300890569262, -1.00058985274722, + 0.952383462865415, -0.0241031949409049, "debCollin1:facExperimexperimental", + "", 0.961414239365982, "contNormal", 0.498216633320164, + -0.0483789446776975, -0.45113557085145, -0.11475575252999, -0.28294566169072, + "facGenderm:facExperimexperimental", "", 0.000976383535086445, + "contNormal", 0.0858127549727398, -3.29724481844923, -0.181528442764859, + 0.739596964452796, 0.279034260843968, "debCollin1:contcor2", + "", 0.235048524820474, "contNormal", 0.234985289138825, + 1.18745416730798, -0.0937823323610038, 0.0672189579124176, -0.0132816872242931, + "facGenderm:contcor2", "", 0.746413776765485, "contNormal", + 0.041072512439866, -0.323371676951557, -0.00422885907263138, + 0.0142520639752977, 0.00501160245133317, "facGenderm", "", + 0.287784419445537, "debCollin1", 0.00471460781772121, 1.06299455757393, + -0.0125866475542042, 0.0058942754938186, -0.00334618603019281, + "facExperimexperimental", "", 0.477860083660739, "debCollin1", + 0.00471460781774512, -0.70974854315522, -0.0358902827282901, + -0.00975431070872531, -0.0228222967185077, "facGenderm:facExperimexperimental", + "", 0.000619486636302513, "debCollin1", 0.00666746231709408, + -3.42293598870379)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.470499308974727, 0.782993735369057, 16, 0.626746522171892, 0, + "Total", 3.77475828372553e-15, 0.079719430780169, 7.86190413100392, + 0.201177927865824, 0.48642379309652, 16, 0.343800860481172, + 0, "Total", 2.3056080620254e-06, 0.0727681394864089, 4.72460699019774, + 0.494773209800239, 0.730498639895622, 16, 0.612635924847931, + 0, "Total", 0, 0.0601351432870081, 10.1876522007105, 0.211018402868667, + 0.448362123445754, 16, 0.329690263157211, 1, "Total", 5.17740947891809e-08, + 0.0605479800774975, 5.44510754504491, 0.459935823664288, 0.734967182559483, + 50, 0.597451503111885, 0, "Total", 0, 0.0701623501923013, 8.5152721006977, + 0.160591343730012, 0.468420339112319, 16, 0.314505841421165, + 0, "Total", 6.20301662774825e-05, 0.0785292479378251, 4.00495165406617, + 0.480350593801178, 0.792074445588583, 50, 0.63621251969488, + 0, "Total", 1.33226762955019e-15, 0.0795228520131602, 8.00037352268998, + 0.210443582130621, 0.4960901338777, 16, 0.35326685800416, 0, + "Total", 1.24786892063966e-06, 0.072870357312742, 4.84788151220426, + 0.503380724854748, 0.740823119887089, 84, 0.622101922370919, + 0, "Total", 0, 0.06057315259496, 10.2702582863861, 0.218891750214155, + 0.459420771146243, 16, 0.339156260680199, 1, "Total", 3.25257827338277e-08, + 0.0613605716302315, 5.52726696752449, 0.467412563267395, 0.746422438002352, + 84, 0.606917500634873, 0, "Total", 0, 0.0711772963523185, 8.52684116618745, + 0.167708673202757, 0.48023500468555, 16, 0.323971838944154, + 0, "Total", 4.83452895432279e-05, 0.079727569982908, 4.06348568021836, + 0.470431430165231, 0.78282002291685, 16, 0.626625726541041, + 0, "Total", 3.77475828372553e-15, 0.0796924319058158, 7.86305188027913, + 0.20087863234983, 0.486481497350812, 16, 0.343680064850321, + 0, "Total", 2.3929670318612e-06, 0.0728592125298683, 4.71704336235354, + 0.494572344050063, 0.730457914384097, 16, 0.61251512921708, + 0, "Total", 0, 0.0601759961393855, 10.1787285381751, 0.210534291940234, + 0.448604643112485, 16, 0.32956946752636, 1, "Total", 5.74700782518534e-08, + 0.0607333484314303, 5.42649921399367, 0.459607969673117, 0.735053445288951, + 50, 0.597330707481034, 0, "Total", 0, 0.0702679941541052, 8.50075079944683, + 0.160066723343399, 0.46870336823723, 16, 0.314385045790314, + 0, "Total", 6.52598625048295e-05, 0.0787352847624544, 3.99293717853208, + 0.480508512368239, 0.792775116293431, 50, 0.636641814330835, + 0, "Total", 1.33226762955019e-15, 0.079661311735397, 7.99185703149735, + 0.211417082687719, 0.495975222592511, 16, 0.353696152640115, + 1, "Total", 1.10285273113853e-06, 0.0725926961284368, 4.872338010622, + 0.50398362372955, 0.741078810284197, 84, 0.622531217006874, + 0, "Total", 0, 0.060484577376121, 10.292395913353, 0.220495088919259, + 0.458676021713048, 16, 0.339585555316154, 1, "Total", 2.28614704944619e-08, + 0.0607615585471288, 5.58882233168458, 0.468476352619879, 0.746217237921777, + 84, 0.607346795270828, 1, "Total", 0, 0.0708535686095976, 8.57185893652446, + 0.16947622649119, 0.479326040669027, 16, 0.324401133580108, + 0, "Total", 4.06036633147089e-05, 0.079044772409568, 4.10401755475028, + 0.472296407392122, 0.784168003907589, 16, 0.628232205649856, + 0, "Total", 2.88657986402541e-15, 0.0795605426873837, 7.89627853744489, + 0.202815692174302, 0.48775739574397, 16, 0.345286543959136, + 1, "Total", 2.03327391878894e-06, 0.0726905458001404, 4.75008875168563, + 0.496442317525989, 0.7318008991258, 16, 0.614121608325895, 0, + "Total", 0, 0.0600415577674615, 10.2282757336904, 0.212459193549534, + 0.449892699720815, 16, 0.331175946635175, 1, "Total", 4.56230355716514e-08, + 0.0605708849866952, 5.4675764884056, 0.461367266772136, 0.736507106407563, + 50, 0.598937186589849, 1, "Total", 0, 0.0701900243590431, 8.53308133255668, + 0.161853747250898, 0.470129302547361, 16, 0.315991524899129, + 0, "Total", 5.86838297200742e-05, 0.0786431683765879, 4.01804163568262, + 0.474558999029516, 0.787306122864486, 50, 0.630932560947001, + 0, "Total", 2.66453525910038e-15, 0.0797838955975415, 7.90801898330022, + 0.205274523038122, 0.490699275474439, 16, 0.347986899256281, + 1, "Total", 1.76050484834711e-06, 0.0728137748161984, 4.7791355431674, + 0.498236498519918, 0.73540742872616, 84, 0.616821963623039, + 0, "Total", 0, 0.0605039000912813, 10.1947471599756, 0.214545142787678, + 0.45320746107696, 16, 0.333876301932319, 1, "Total", 4.16338332698274e-08, + 0.0608843632260133, 5.48377751267452, 0.462991056665198, 0.74028402710879, + 84, 0.601637541886994, 1, "Total", 0, 0.0707393025154654, 8.50499680507114, + 0.163811343804211, 0.473572416588337, 16, 0.318691880196274, + 0, "Total", 5.50822923057748e-05, 0.0790221338829391, 4.03294449968124, + 0.472232062549745, 0.783990757488265, 16, 0.628111410019005, + 0, "Total", 2.88657986402541e-15, 0.0795317407354504, 7.89761929275907, + 0.202519952647521, 0.487811544009049, 16, 0.345165748328285, + 0, "Total", 2.10989077387147e-06, 0.0727798045300503, 4.74260339880095, + 0.496245865204841, 0.731755760185246, 16, 0.614000812695044, + 1, "Total", 0, 0.0600801588289573, 10.2196935671067, 0.21197970741336, + 0.450130594595288, 16, 0.331055151004324, 1, "Total", 5.06201502936676e-08, + 0.0607538937093822, 5.44911825055913, 0.461043373082718, 0.736589408835279, + 50, 0.598816390958998, 0, "Total", 0, 0.0702936477215991, 8.518783849867, + 0.161333168324805, 0.470408290211752, 16, 0.315870729268279, + 1, "Total", 6.17255845991593e-05, 0.0788471431936738, 4.00611507879745, + 0.474715594010746, 0.788008117155164, 50, 0.631361855582955, + 0, "Total", 2.88657986402541e-15, 0.0799230306310804, 7.89962355778626, + 0.206246013121298, 0.490586374663173, 16, 0.348416193892235, + 0, "Total", 1.56087340519306e-06, 0.0725371394027432, 4.80328004055615, + 0.498836672902148, 0.73566584361584, 84, 0.617251258258994, + 1, "Total", 0, 0.060416714945216, 10.2165643865063, 0.216154825893113, + 0.452456367243435, 16, 0.334305596568274, 1, "Total", 2.92805946155994e-08, + 0.0602821131444859, 5.54568476667367, 0.464056284332682, 0.740077388713215, + 84, 0.602066836522949, 0, "Total", 0, 0.0704148409250763, 8.55028327286243, + 0.165588693638775, 0.472653656025683, 16, 0.319121174832229, + 1, "Total", 4.62452331670971e-05, 0.0783343379799317, 4.07383509022549, + 0.474133952814823, 0.785527948141457, 16, 0.62983095047814, + 0, "Total", 2.22044604925031e-15, 0.0794387034105909, 7.92851498623742, + 0.204472208174427, 0.489298369400413, 50, 0.34688528878742, + 0, "Total", 1.80585837039615e-06, 0.0726610701708448, 4.77401843892202, + 0.49811031001914, 0.733330396289217, 16, 0.615720353154179, + 1, "Total", 0, 0.0600062266769855, 10.2609410264807, 0.213882579679094, + 0.451666803247824, 50, 0.332774691463459, 1, "Total", 4.11444471826172e-08, + 0.0606603553545733, 5.48586782122057, 0.462797999836866, 0.738273862999401, + 50, 0.600535931418133, 0, "Total", 0, 0.0702757462217299, 8.54542233565699, + 0.163114804121183, 0.472065735333644, 50, 0.317590269727413, + 1, "Total", 5.5885455306548e-05, 0.0788154613170003, 4.02954273718004, + 0.467735585493827, 0.782766003229175, 50, 0.625250794361501, + 0, "Total", 7.32747196252603e-15, 0.0803663792345848, 7.78000452821733, + 0.199059927397362, 0.4855503379442, 50, 0.342305132670781, 1, + "Total", 2.81855936479225e-06, 0.0730856313704328, 4.68361737118772, + 0.491916486258213, 0.730363907816866, 84, 0.61114019703754, + 1, "Total", 0, 0.0608295416241054, 10.0467664348692, 0.209090704295094, + 0.447298366398545, 50, 0.32819453534682, 1, "Total", 6.63645531862045e-08, + 0.0607683773738709, 5.40074541282612, 0.457563799344915, 0.734347751258074, + 84, 0.595955775301494, 1, "Total", 0, 0.0706094484634402, 8.44017037762398, + 0.159024763502307, 0.466995463719242, 50, 0.313010113610774, + 1, "Total", 6.7744651759627e-05, 0.0785653977945945, 3.98407088104008, + 0.474073389476699, 0.785346920217879, 16, 0.629710154847289, + 0, "Total", 2.22044604925031e-15, 0.0794079720842999, 7.93006216276101, + 0.204180430894098, 0.48934855541904, 50, 0.346764493156569, + 1, "Total", 1.87329947709536e-06, 0.0727483073092955, 4.76663314903357, + 0.497918699751299, 0.733280415295356, 16, 0.615599557523328, + 1, "Total", 0, 0.0600423572577253, 10.2527546492043, 0.213408443457194, + 0.451899348208022, 50, 0.332653895832608, 1, "Total", 4.56100399670589e-08, + 0.0608406344790042, 5.46762700095452, 0.462478522530124, 0.738351749044441, + 50, 0.600415135787282, 1, "Total", 0, 0.0703771162864139, 8.53139724202071, + 0.162598810048245, 0.472340138144881, 50, 0.317469474096563, + 1, "Total", 5.87611127937926e-05, 0.0790170968803091, 4.01773143573534, + 0.467891792629542, 0.783468385365369, 50, 0.625680088997456, + 0, "Total", 7.7715611723761e-15, 0.0805057121521251, 7.77187198611645, + 0.200026782603636, 0.485442072009835, 50, 0.342734427306736, + 1, "Total", 2.5119678241925e-06, 0.0728113607335437, 4.70715591432204, + 0.492512615552134, 0.730626367794855, 84, 0.611569491673494, + 1, "Total", 0, 0.0607444203365297, 10.0679122178686, 0.210699503875719, + 0.446548156089829, 50, 0.328623829982774, 1, "Total", 4.71065548790506e-08, + 0.0601665780785907, 5.46189995305233, 0.458627497699313, 0.734142642175585, + 84, 0.596385069937449, 1, "Total", 0, 0.0702857671491674, 8.48514705220108, + 0.160807578916714, 0.466071237576744, 50, 0.313439408246729, + 1, "Total", 5.69961967302746e-05, 0.0778748132792007, 4.02491376926928, + -0.00789265451706687, 0.00373533266855622, 16, -0.00207866092425532, + 0, "Total indirect", 0.483465000898288, 0.00296637776952617, + -0.700740460506941, -0.00861553858997563, 0.0233902117874418, + 50, 0.00738733659873307, 0, "Total indirect", 0.36558750327493, + 0.00816488227076484, 0.904769518255536, -0.00825470225934628, + 0.00385578914913403, 16, -0.00219945655510612, 0, "Total indirect", + 0.4765137937946, 0.00308946784328853, -0.711920844194626, -0.00867050304930117, + 0.0243037655186764, 50, 0.00781663123468763, 1, "Total indirect", + 0.352770660345602, 0.0084119577778149, 0.929228538842962, -0.00414656787028758, + 0.00296061297770512, 50, -0.000592977446291234, 0, "Total indirect", + 0.743627367265812, 0.00181308965472153, -0.327053571094536, + -0.00995873138546722, 0.0141734870871744, 50, 0.00210737785085358, + 0, "Total indirect", 0.732115438215943, 0.00615629130509373, + 0.342312887161453, -0.0045114940588291, 0.00308394790454503, + 50, -0.000713773077142034, 0, "Total indirect", 0.712596765657882, + 0.00193764835050185, -0.368370802141249, -0.010191914788845, + 0.0152652597624613, 50, 0.00253667248680815, 0, "Total indirect", + 0.696092895156049, 0.00649429651567814, 0.39060004123376, -0.00347093134417146, + 0.00548246610815703, 84, 0.00100576738199278, 0, "Total indirect", + 0.659691144418211, 0.00228407193268645, 0.440339626611422, -0.0181731174074175, + 0.0110243399381253, 50, -0.00357438873464608, 1, "Total indirect", + 0.631311005234563, 0.00744846782283977, -0.479882416043428, + -0.00366314607070404, 0.005433089572988, 84, 0.000884971751141983, + 0, "Total indirect", 0.702929197147478, 0.00232051091638469, + 0.381369354866364, -0.0183205304702259, 0.0120303422728429, + 50, -0.00314509409869151, 0, "Total indirect", 0.684595222847686, + 0.00774271185146071, -0.406200586955612, 16, 0, 50, 0, 16, 0, + 50, 1, 50, 0, 50, 0, 50, 0, 50, 1, 84, 0, 50, 1, 84, 1, 50, + 0, 16, 0, 84, 1, 16, 0, 84, 1, 50, 1, 84, 0, 50, 0, 84, 1, 84, + 0, 84, 1, 84, 1, 84, 0, 16, 0, 84, 0, 16, 1, 84, 1, 50, 0, 84, + 1, 50, 0, 84, 0, 84, 1, 84, 1, 84, 0, 84, 1, 16, 0, 84, 0, 16, + 1, 84, 1, 50, 0, 84, 1, 50, 0, 84, 1, 84, 1, 84, 1, 84, 1, 84, + 1, 16, 0, 84, 1, 16, 1, 84, 1, 50, 1, 84, 1, 50, 0, 84, 1, 84, + 1, 84, 1, 84, 1, 84, 1, 16, 0, 16, 0, 16, 0, 16, 1, 50, 0, 50, + 0, 50, 0, 50, 0, 84, 0, 84, 1, 84, 0, 84, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, + 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, + 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-67") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-67") +}) + + +context('Model number 68 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1685.03952202897, 1765.7997977946, 834.975491859132, 25, 1, 100, + 5.01944290966448e-160, 0, 834.975491859132, 25)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 68)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544847892439149, 0.0642095161742869, -0.240319188132431, "contcor1", + "", 0.121933696633842, "contGamma", 0.155374642957116, + -1.54670790264509, -0.403934943301373, 0.194627702097343, -0.104653620602015, + "contcor2", "", 0.49311281587546, "contGamma", 0.152697358247422, + -0.685366281402458, 1.37709037288375, 3.45911023031829, 2.41810030160102, + "contGamma__contcor1__contcor2", "", 5.29657390169191e-06, + "contGamma", 0.531137274423725, 4.55268424575288, 0.424979507282836, + 0.896764108479315, 0.660871807881075, "contcor2", "", + 3.99661290728659e-08, "contcor1", 0.120355426150137, 5.4910013534136, + -0.374370932952087, 0.853228674584222, 0.239428870816068, "contGamma__contcor1__contcor2", + "", 0.444547972514762, "contcor1", 0.313168919740224, + 0.76453586458923, -0.16489323183997, 1.0624846364869, 0.448795702323465, + "contGamma__contcor1__contcor2", "", 0.15176138675862, + "contcor2", 0.313112352575933, 1.4333375819615, 0.761630839501704, + 1.34575584054752, 1.05369334002461, "contNormal", "", + 1.53721479989599e-12, "contNormal", 0.149014218029851, 7.07109263770744, + 0.00458999101681651, 0.00811025559738023, 0.00635012330709837, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000898043180469417, 7.07106678743341, 0.3238917822812, 0.57229846259229, + 0.448095122436745, "debCollin1:contcor1", "", 1.53743684450092e-12, + "debCollin1:contcor1", 0.0633702155423492, 7.07106830238397, + 1.6804111825082, 2.96919214552767, 2.32480166401793, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.328776695180423, + 7.07106585745731, 0.732634928388939, 1.29452512246284, 1.01358002542589, + "contcor1", "", 1.53743684450092e-12, "contcor1", 0.143341969165256, + 7.07106251803585, 0.721542021170974, 1.27492434392203, 0.998233182546504, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171553945906, + 7.07106463479892, 6.95315827514575, 12.2858443377842, 9.61950130646498, + "contGamma__contcor1__contcor2", "", 1.53743684450092e-12, + "contGamma__contcor1__contcor2", 1.36040409535634, 7.07106170828254 + )) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.154213539119798, 0.117650560305438, "", "", -0.01828148940718, + "contGamma", "contNormal", "", "", "", 0.792091715916162, + 0.0693543609907289, -0.263595383852269, -0.026243030580487, + 0.0392904223360679, 16, 16, 0.00652369587779046, "contGamma", + "debCollin1", "contNormal", "", "", 0.696374393451522, + 0.0167180247783823, 0.390219297092209, -0.032180850026863, 0.0645483869451425, + 16, 16, 0.0161837684591398, "contGamma", "debCollin1", "contNormal", + "", "", 0.511925055278961, 0.0246762791905855, + 0.65584314126719, -0.0594507013767476, 0.112903721213009, 50, + 16, 0.0267265099181308, "contGamma", "debCollin1", "contNormal", + "", "", 0.543285586296136, 0.0439687728828862, + 0.607852076957404, -0.0467654008582603, 0.0504001172406841, + 16, 50, 0.00181735819121191, "contGamma", "debCollin1", "contNormal", + "", "", 0.941553627277025, 0.0247875774415687, + 0.073317297565522, -0.0235997817922321, 0.0465546433373545, + 84, 50, 0.0114774307725612, "contGamma", "debCollin1", "contNormal", + "", "", 0.521321594168142, 0.0178968658819641, + 0.641309537002667, -0.0388367455593705, 0.0828770900224751, + 16, 50, 0.0220201722315523, "contGamma", "debCollin1", "contNormal", + "", "", 0.478210381456742, 0.0310500184038862, + 0.709183870525379, -0.0905153918399793, 0.0831170079213027, + 16, 84, -0.00369919195933832, "contGamma", "debCollin1", "contNormal", + "", "", 0.933443625321306, 0.0442947934581636, + -0.0835130197148839, -0.0540346124780715, 0.0659563737220935, + 16, 84, 0.00596088062201099, "contGamma", "debCollin1", "contNormal", + "", "", 0.845601859018269, 0.0306105079344923, + 0.194733149635005, -0.0383447466868336, 0.0713519908488377, + 50, 84, 0.016503622081002, "contGamma", "debCollin1", "contNormal", + "", "", 0.555362187679949, 0.0279843758357157, + 0.589744155020207, -0.00790090489602552, 0.00884500071278561, + 16, 16, 0.000472047908380044, "contGamma", "debCollin1", "contNormal", + "", "", 0.912014212364166, 0.00427199319500274, + 0.110498281910241, -0.0190551864331213, 0.0213972680365425, + 84, 16, 0.0011710408017106, "contGamma", "debCollin1", "contNormal", + "", "", 0.909652937208582, 0.0103196933180272, + 0.113476318105785, -0.0315504479119581, 0.0354182533221101, + 16, 16, 0.001933902705076, "contGamma", "debCollin1", "contNormal", + "", "", 0.909873151983387, 0.0170841662811942, + 0.113198541459105, -0.00403532137411798, 0.00429832570448829, + 16, 50, 0.000131502165185156, "contGamma", "debCollin1", "contNormal", + "", "", 0.95067818177107, 0.00212596944238288, + 0.0618551530250421, -0.0135236618086762, 0.0151846519257076, + 16, 50, 0.000830495058515708, "contGamma", "debCollin1", "contNormal", + "", "", 0.909714598684286, 0.00732368399644872, + 0.113398538074338, -0.0258674165896889, 0.0290541305134512, + 50, 50, 0.00159335696188111, "contGamma", "debCollin1", "contNormal", + "", "", 0.909457358965738, 0.0140108562035717, + 0.113723025825855, -0.00802632293023898, 0.0074909834969442, + 16, 84, -0.000267669716647392, "contGamma", "debCollin1", "contNormal", + "", "", 0.946089891314529, 0.00395856927718614, + -0.067617792668178, -0.00809419154325005, 0.00895683789661638, + 84, 84, 0.000431323176683161, "contGamma", "debCollin1", "contNormal", + "", "", 0.921012364952301, 0.00434983233731915, + 0.0991585751438387, -0.0195047477283011, 0.0218931178883982, + 16, 84, 0.00119418508004857, "contGamma", "debCollin1", "contNormal", + "", "", 0.909970025569053, 0.0105608740627992, + 0.113076348884331, -0.0375813014855688, 0.0253161880743356, + 16, 16, -0.0061325567056166, "contGamma", "debCollin1", "contNormal", + "", "", 0.702315851409816, 0.0160455727901206, + -0.382196184943455, -0.0633254773242657, 0.0328985905884424, + 50, 16, -0.0152134433679117, "contGamma", "debCollin1", "contNormal", + "", "", 0.535417354657703, 0.0245474071645478, + -0.619757649593374, -0.110202015810298, 0.0599538617925254, + 50, 16, -0.0251240770088863, "contGamma", "debCollin1", "contNormal", + "", "", 0.5627306741496, 0.0434079092638924, + -0.578790304231146, -0.0474124797933652, 0.0439956889524657, + 50, 50, -0.00170839542044971, "contGamma", "debCollin1", "contNormal", + "", "", 0.941597266718132, 0.0233188388834813, + -0.0732624565479508, -0.0456013736466333, 0.0240228094811437, + 84, 50, -0.0107892820827448, "contGamma", "debCollin1", "contNormal", + "", "", 0.543552328762825, 0.0177615975795891, + -0.60744997933876, -0.0817848913538839, 0.0403850599064451, + 50, 50, -0.0206999157237194, "contGamma", "debCollin1", "contNormal", + "", "", 0.506578567742889, 0.0311663765824245, + -0.664174600758453, -0.0782128415001593, 0.0851676428522072, + 16, 84, 0.00347740067602395, "contGamma", "debCollin1", "contNormal", + "", "", 0.933508046833482, 0.0416794608577226, + 0.0834319975465719, -0.0622989993508218, 0.0510920273782796, + 50, 84, -0.00560348598627112, "contGamma", "debCollin1", "contNormal", + "", "", 0.846400988624798, 0.0289268138658453, + -0.193712519196153, -0.0695143255947718, 0.0384860863402803, + 50, 84, -0.0155141196272457, "contGamma", "debCollin1", "contNormal", + "", "", 0.573371838501566, 0.0275516317613348, + -0.563092587823339)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.154213539119798, 0.117650560305438, -0.01828148940718, "contGamma", + "", 0.792091715916162, "contNormal", 0.0693543609907289, + -0.263595383852269, -2.65747765588088, 2.35039410979275, -0.153541773044063, + "debCollin1", "", 0.904336343274345, "contNormal", + 1.27754178269986, -0.120185323973968, -2.74313548277661, 0.527122603206253, + -1.10800643978518, "contcor1", "", 0.184137430617361, + "contNormal", 0.834264841542558, -1.32812313861443, -0.533844187573133, + 4.39041618053995, 1.92828599648341, "debCollin1:contcor1", "", + 0.124783701089064, "contNormal", 1.25621195260602, 1.53500051681817, + -0.0201068377608076, 0.00866071962033224, -0.00572305907023767, + "contGamma", "", 0.435487363459295, "debCollin1", 0.00733879744935485, + -0.779836084826238, -0.03502833325319, 0.0413280286196308, 0.00314984768322042, + "contcor1", "", 0.871538470828937, "debCollin1", 0.0194790216746609, + 0.161704614114059, -0.0390764115980916, 0.0457717687760973, + 0.00334767858900286, "contcor2", "", 0.877089000159111, + "debCollin1", 0.0216453417112408, 0.154660463838478, -0.0169077189779413, + 0.00681511226745191, -0.00504630335524468, "contGamma:contcor1:contcor2", + "", 0.404368774478245, "debCollin1", 0.00605185386887612, + -0.833844217752372, -0.0236340632604175, 0.0138397016465825, + -0.00489718080691748, "contGamma:contcor1", "", 0.608463730165861, + "debCollin1", 0.00955980956859113, -0.512267610748987, -0.0167951933126649, + 0.0216687148386525, 0.00243676076299384, "contGamma:contcor2", + "", 0.803875381033198, "debCollin1", 0.00981240177235801, + 0.248334793002291, -0.0164773612732829, 0.04268981477185, 0.0131062267492835, + "contcor1:contcor2", "", 0.385224518147373, "debCollin1", + 0.0150939447132284, 0.868310239522552)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.150808214783453, 0.127292627724674, 16, 16, -0.0117577935293895, + "Total", 0.868369291381825, 0.070945396114865, -0.165730183680318, + -0.144507038718441, 0.140311596822361, 16, 16, -0.00209772094804021, + "Total", 0.976967709312984, 0.0726591503179179, -0.0288707057385298, + -0.149727222323933, 0.166617263345835, 50, 16, 0.00844502051095082, + "Total", 0.916657497347194, 0.080701606806312, 0.104645010739616, + -0.160608464979752, 0.127680202547816, 16, 50, -0.0164641312159681, + "Total", 0.82286109301543, 0.0735443788257212, -0.223866616033066, + -0.145827910901254, 0.132219793632017, 84, 50, -0.00680405863461876, + "Total", 0.923581013963227, 0.0709318402599426, -0.0959238983464133, + -0.142724467118102, 0.150201832766846, 16, 50, 0.00373868282437227, + "Total", 0.96009776191347, 0.0747274700442237, 0.0500309032563222, + -0.183650549916835, 0.139689187183798, 16, 84, -0.0219806813665183, + "Total", 0.789871669213513, 0.0824861425136116, -0.266477261473236, + -0.160237711265163, 0.135596493694825, 16, 84, -0.012320608785169, + "Total", 0.870319031641353, 0.075469296194596, -0.163253262007381, + -0.146481090374486, 0.14292535572213, 50, 84, -0.00177786732617797, + "Total", 0.980788232375711, 0.0738295316596164, -0.0240807070858128, + -0.15260693104321, 0.11698804804561, 16, 16, -0.0178094414987999, + "Total", 0.795673509966681, 0.0687754931252183, -0.258950400637253, + -0.151090727685319, 0.116869830474381, 84, 16, -0.0171104486054694, + "Total", 0.802351898296759, 0.0683585413490602, -0.250304472093664, + -0.150709523203073, 0.118014349798865, 16, 16, -0.016347586702104, + "Total", 0.811520100612666, 0.0685532681012504, -0.238465461310455, + -0.153758935121626, 0.117458960637636, 16, 50, -0.0181499872419948, + "Total", 0.793072571825369, 0.0691895100875819, -0.262322817707773, + -0.151688933141428, 0.116786944444099, 16, 50, -0.0174509943486643, + "Total", 0.798880489002094, 0.068490002801896, -0.254796227693849, + -0.150696303113729, 0.117320038223131, 50, 50, -0.0166881324452989, + "Total", 0.807172189191963, 0.0683727720128886, -0.244075703734128, + -0.155485798069091, 0.118387479821436, 16, 84, -0.0185491591238274, + "Total", 0.790629899949336, 0.069866915935906, -0.265492742528436, + -0.152777883370176, 0.117077550909183, 84, 84, -0.0178501662304968, + "Total", 0.795409921180968, 0.0688419369967878, -0.259292039259873, + -0.151070749575329, 0.116896140921066, 16, 84, -0.0170873043271314, + "Total", 0.802618287433976, 0.068360156770758, -0.249959993281361, + -0.161940244989091, 0.113112152763497, 16, 16, -0.0244140461127966, + "Total", 0.727886415829603, 0.0701677173463815, -0.347938440013335, + -0.172851317076133, 0.105861451525949, 50, 16, -0.0334949327750917, + "Total", 0.637579218534315, 0.0711015025787548, -0.471086145303207, + -0.196539030111425, 0.109727897279292, 50, 16, -0.0434055664160663, + "Total", 0.578518291925561, 0.0781307538828548, -0.555550334009912, + -0.162861528873575, 0.122881759218316, 50, 50, -0.0199898848276297, + "Total", 0.78390914753603, 0.0728950354051906, -0.274228343761889, + -0.165878400180696, 0.107736857200847, 84, 50, -0.0290707714899248, + "Total", 0.67705867140018, 0.0698010931679831, -0.416480174887278, + -0.181606745780014, 0.103643935518216, 50, 50, -0.0389814051308994, + "Total", 0.592176783382784, 0.0727693680976414, -0.535684260423897, + -0.174379906921392, 0.14477172945908, 16, 84, -0.014804088731156, + "Total", 0.855717076194852, 0.0814177298404206, -0.18182880756037, + -0.169440908027145, 0.121670957240243, 50, 84, -0.0238849753934511, + "Total", 0.747740629539968, 0.0742645955649292, -0.321619948398811, + -0.175196947544104, 0.107605729475253, 50, 84, -0.0337956090344257, + "Total", 0.639469293637317, 0.0721448657347962, -0.468440944344647, + -0.026243030580487, 0.0392904223360679, 50, 16, 0.00652369587779046, + "Total indirect", 0.696374393451522, 0.0167180247783823, 0.390219297092209, + -0.032180850026863, 0.0645483869451425, 84, 16, 0.0161837684591398, + "Total indirect", 0.511925055278961, 0.0246762791905855, 0.65584314126719, + -0.0594507013767476, 0.112903721213009, 50, 16, 0.0267265099181308, + "Total indirect", 0.543285586296136, 0.0439687728828862, 0.607852076957404, + -0.0467654008582603, 0.0504001172406841, 16, 50, 0.00181735819121191, + "Total indirect", 0.941553627277025, 0.0247875774415687, 0.073317297565522, + -0.0235997817922321, 0.0465546433373545, 50, 50, 0.0114774307725612, + "Total indirect", 0.521321594168142, 0.0178968658819641, 0.641309537002667, + -0.0388367455593705, 0.0828770900224751, 50, 50, 0.0220201722315523, + "Total indirect", 0.478210381456742, 0.0310500184038862, 0.709183870525379, + -0.0905153918399793, 0.0831170079213027, 50, 84, -0.00369919195933832, + "Total indirect", 0.933443625321306, 0.0442947934581636, -0.0835130197148839, + -0.0540346124780715, 0.0659563737220935, 84, 84, 0.00596088062201099, + "Total indirect", 0.845601859018269, 0.0306105079344923, 0.194733149635005, + -0.0383447466868336, 0.0713519908488377, 50, 84, 0.016503622081002, + "Total indirect", 0.555362187679949, 0.0279843758357157, 0.589744155020207, + -0.00790090489602552, 0.00884500071278561, 16, 16, 0.000472047908380044, + "Total indirect", 0.912014212364166, 0.00427199319500274, 0.110498281910241, + -0.0190551864331213, 0.0213972680365425, 84, 16, 0.0011710408017106, + "Total indirect", 0.909652937208582, 0.0103196933180272, 0.113476318105785, + -0.0315504479119581, 0.0354182533221101, 50, 16, 0.001933902705076, + "Total indirect", 0.909873151983387, 0.0170841662811942, 0.113198541459105, + -0.00403532137411798, 0.00429832570448829, 84, 50, 0.000131502165185156, + "Total indirect", 0.95067818177107, 0.00212596944238288, 0.0618551530250421, + -0.0135236618086762, 0.0151846519257076, 84, 50, 0.000830495058515708, + "Total indirect", 0.909714598684286, 0.00732368399644872, 0.113398538074338, + -0.0258674165896889, 0.0290541305134512, 84, 50, 0.00159335696188111, + "Total indirect", 0.909457358965738, 0.0140108562035717, 0.113723025825855, + -0.00802632293023898, 0.0074909834969442, 16, 84, -0.000267669716647392, + "Total indirect", 0.946089891314529, 0.00395856927718614, -0.067617792668178, + -0.00809419154325005, 0.00895683789661638, 84, 84, 0.000431323176683161, + "Total indirect", 0.921012364952301, 0.00434983233731915, 0.0991585751438387, + -0.0195047477283011, 0.0218931178883982, 50, 84, 0.00119418508004857, + "Total indirect", 0.909970025569053, 0.0105608740627992, 0.113076348884331, + -0.0375813014855688, 0.0253161880743356, 84, 16, -0.0061325567056166, + "Total indirect", 0.702315851409816, 0.0160455727901206, -0.382196184943455, + -0.0633254773242657, 0.0328985905884424, 84, 16, -0.0152134433679117, + "Total indirect", 0.535417354657703, 0.0245474071645478, -0.619757649593374, + -0.110202015810298, 0.0599538617925254, 84, 16, -0.0251240770088863, + "Total indirect", 0.5627306741496, 0.0434079092638924, -0.578790304231146, + -0.0474124797933652, 0.0439956889524657, 16, 50, -0.00170839542044971, + "Total indirect", 0.941597266718132, 0.0233188388834813, -0.0732624565479508, + -0.0456013736466333, 0.0240228094811437, 84, 50, -0.0107892820827448, + "Total indirect", 0.543552328762825, 0.0177615975795891, -0.60744997933876, + -0.0817848913538839, 0.0403850599064451, 50, 50, -0.0206999157237194, + "Total indirect", 0.506578567742889, 0.0311663765824245, -0.664174600758453, + -0.0782128415001593, 0.0851676428522072, 84, 84, 0.00347740067602395, + "Total indirect", 0.933508046833482, 0.0416794608577226, 0.0834319975465719, + -0.0622989993508218, 0.0510920273782796, 84, 84, -0.00560348598627112, + "Total indirect", 0.846400988624798, 0.0289268138658453, -0.193712519196153, + -0.0695143255947718, 0.0384860863402803, 84, 84, -0.0155141196272457, + "Total indirect", 0.573371838501566, 0.0275516317613348, -0.563092587823339, + 16, 16, 50, 16, 84, 16, 16, 16, 50, 16, 84, 16, 16, 16, 50, + 16, 84, 16, 16, 50, 50, 50, 84, 50, 16, 50, 50, 50, 84, 50, + 16, 50, 50, 50, 84, 50, 16, 84, 50, 84, 84, 84, 16, 84, 50, + 84, 84, 84, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-68") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-68") +}) + + +context('Model number 70 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1611.08362736544, 1697.05424350305, 1454.07834720767, 27, 1, 100, + 6.23388561588962e-290, 0, 1454.07834720767, 27)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 70)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544851682952745, 0.0642059981598438, -0.24032284239645, "contcor1", + "", 0.121928189834991, "contGamma", 0.155374712473484, + -1.54673072967047, -0.403937567185276, 0.194624934093589, -0.104656316545843, + "contcor2", "", 0.493101573520804, "contGamma", 0.152697321481479, + -0.685384101898196, -0.0667374991085896, 0.346853779329425, + 0.140058140110418, "debCollin1__contcor1__contcor2", "", + 0.184363004156661, "contGamma", 0.105509917962873, 1.3274405175796, + 0.424979014198326, 0.896762713860964, 0.660870864029645, "contcor2", + "", 3.9965529330388e-08, "contcor1", 0.120355196162789, + 5.49100400397979, 0.00070996889443678, 0.276794605100369, 0.138752286997403, + "debCollin1__contcor1__contcor2", "", 0.0488332908852898, + "contcor1", 0.070431048321207, 1.97004432426748, -0.00478860909883425, + 0.268765735342816, 0.131988563121991, "debCollin1__contcor1__contcor2", + "", 0.058578296276675, "contcor2", 0.069785553867166, + 1.89134506796673, 0.710358193732164, 1.25516306301326, 0.982760628372712, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.138983387852646, 7.07106542412579, 0.00465468749181075, 0.00822457292456589, + 0.00643963020818832, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910701793735482, 7.0710634946424, 0.323891947109819, + 0.5722990373985, 0.448095492254159, "debCollin1:contcor1", "", + 1.53743684450092e-12, "debCollin1:contcor1", 0.0633703201303914, + 7.07106246792116, 0.318533154107177, 0.562830592109997, 0.440681873108587, + "debCollin1:contcor2", "", 1.53765888910584e-12, "debCollin1:contcor2", + 0.0623219201806276, 7.07105737164963, 1.68041156051494, 2.9691934644098, + 2.32480251246237, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776935204065, 7.07106327583294, 0.73263463393549, + 1.2945240949169, 1.0135793644262, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341782148428, 7.07106713223818, 0.721541643112855, + 1.27492302485583, 0.99823233398434, "contcor2", "", + 1.53743684450092e-12, "contcor2", 0.141171313888411, 7.07107064805951, + 0.340023851348459, 0.600802775630168, 0.470413313489313, "debCollin1__contcor1__contcor2", + "", 1.53743684450092e-12, "debCollin1__contcor1__contcor2", + 0.0665264582254318, 7.07107106010768)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.149832247413628, 0.120438704659535, "", "", -0.0146967713770465, + "contGamma", "contNormal", "", "", "", 0.831204102933096, + 0.068947938381783, -0.2131575174252, -0.0260578364085365, 0.0512134143504335, + 16, 16, 0.0125777889709485, "contGamma", "debCollin1", "contNormal", + "", "", 0.523431822369562, 0.0197124159853129, + 0.638064303245215, -0.0199063237031809, 0.0632267444564854, + 16, 16, 0.0216602103766522, "contGamma", "debCollin1", "contNormal", + "", "", 0.3070971606611, 0.0212078050452481, + 1.0213320204726, -0.0296273161105058, 0.0927723541004989, 50, + 16, 0.0315725189949965, "contGamma", "debCollin1", "contNormal", + "", "", 0.311954128571366, 0.0312249794323971, + 1.01113017747063, -0.0234834662641536, 0.0241046176999426, 16, + 16, 0.0003105757178945, "contGamma", "debCollin1", "contNormal", + "", "", 0.979590138569244, 0.0121400404138711, + 0.0255827581545477, -0.0404207915155631, 0.0414904764026307, + 84, 16, 0.000534842443533806, "contGamma", "debCollin1", "contNormal", + "", "", 0.979580131222089, 0.0208961155828116, + 0.0255953046112431, -0.0589188387710884, 0.0604780409130957, + 16, 16, 0.000779601071003603, "contGamma", "debCollin1", "contNormal", + "", "", 0.979580261238055, 0.0304589473648423, + 0.02559514160701, -0.0644033607379069, 0.0382483038874446, 16, + 16, -0.0130775284252311, "contGamma", "debCollin1", "contNormal", + "", "", 0.617506346150941, 0.0261871303337854, + -0.499387609812256, -0.0924828588706916, 0.047441235489759, + 50, 16, -0.0225208116904663, "contGamma", "debCollin1", "contNormal", + "", "", 0.528097273462711, 0.0356955779453485, + -0.630913210732899, -0.135199413827109, 0.0695455034988489, + 50, 16, -0.03282695516413, "contGamma", "debCollin1", "contNormal", + "", "", 0.529685661197215, 0.0522318060283147, + -0.628485929556689, -0.0370044228811172, 0.0774538210726869, + 50, 50, 0.0202246990957849, "contGamma", "debCollin1", "contNormal", + "", "", 0.488529986602095, 0.0291990681605979, + 0.692648785384072, -0.0174622625346895, 0.0871201711275305, + 84, 50, 0.0348289542964205, "contGamma", "debCollin1", "contNormal", + "", "", 0.191740137118213, 0.0266796825061973, + 1.30544860450758, -0.0267059361293827, 0.128241221519308, 50, + 50, 0.0507676426949626, "contGamma", "debCollin1", "contNormal", + "", "", 0.199021504289293, 0.0395280624722939, + 1.28434432450482, -0.0184726824482761, 0.0343876541337378, 16, + 50, 0.00795748584273083, "contGamma", "debCollin1", "contNormal", + "", "", 0.555125045724031, 0.013485027530855, + 0.590097856643105, -0.0177817507977164, 0.0451889235243206, + 84, 50, 0.0137035863633021, "contGamma", "debCollin1", "contNormal", + "", "", 0.393632125568782, 0.0160642427153615, + 0.853049011155561, -0.0262426871294147, 0.0661921366713541, + 50, 50, 0.0199747247709697, "contGamma", "debCollin1", "contNormal", + "", "", 0.396951787634407, 0.0235807454958058, + 0.84707774716124, -0.0365096118662491, 0.0256483752654595, 84, + 50, -0.00543061830039478, "contGamma", "debCollin1", "contNormal", + "", "", 0.73199253581972, 0.0158569207449736, + -0.342476221438907, -0.0579458712913491, 0.0392417357499531, + 84, 50, -0.00935206777069801, "contGamma", "debCollin1", "contNormal", + "", "", 0.706022941512946, 0.0247932124793888, + -0.377202743632863, -0.0845614013222354, 0.0572977383939076, + 84, 50, -0.0136318314641639, "contGamma", "debCollin1", "contNormal", + "", "", 0.706409873235418, 0.0361892210354654, + -0.376682091355454, -0.0548455386419398, 0.113221641634447, + 16, 84, 0.0291880514962535, "contGamma", "debCollin1", "contNormal", + "", "", 0.496017166887983, 0.0428750685221972, + 0.680769792382778, -0.0297808140517239, 0.130310300967695, 16, + 84, 0.0502647434579858, "contGamma", "debCollin1", "contNormal", + "", "", 0.218411628093388, 0.0408403206084902, + 1.23076270482403, -0.045114995324921, 0.191649543236469, 50, + 84, 0.0732672739557742, "contGamma", "debCollin1", "contNormal", + "", "", 0.225118434541185, 0.0604002268482888, + 1.21302978115967, -0.0335855770172039, 0.0674272535036029, 16, + 84, 0.0169208382431995, "contGamma", "debCollin1", "contNormal", + "", "", 0.51141622972094, 0.0257690527268825, + 0.65663408052045, -0.0226314826005529, 0.0809102336502876, 84, + 84, 0.0291393755248673, "contGamma", "debCollin1", "contNormal", + "", "", 0.269952767991819, 0.0264141884921265, + 1.10317133284459, -0.0338758254475953, 0.118824537511158, 16, + 84, 0.0424743560317813, "contGamma", "debCollin1", "contNormal", + "", "", 0.275560222259154, 0.0389548900294174, + 1.09034721955847, -0.0230641357016547, 0.0301296039018025, 16, + 84, 0.00353273410007389, "contGamma", "debCollin1", "contNormal", + "", "", 0.794607247379546, 0.0135700808849149, + 0.260332575025477, -0.0373322010446466, 0.0494996438263811, + 50, 84, 0.00608372139086725, "contGamma", "debCollin1", "contNormal", + "", "", 0.783590604242556, 0.0221513878713962, + 0.274642899406005, -0.0544628310694718, 0.0721984306627671, + 50, 84, 0.00886779979664769, "contGamma", "debCollin1", "contNormal", + "", "", 0.783745173711587, 0.032312140103422, + 0.274441735157881)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.149832247413628, 0.120438704659535, -0.0146967713770465, "contGamma", + "", 0.831204102933096, "contNormal", 0.068947938381783, + -0.2131575174252, -4.3951610544028, 1.52252776166994, -1.43631664636643, + "debCollin1", "", 0.341386898361785, "contNormal", + 1.50964223392642, -0.951428500135903, -3.43497565985234, 0.849247250530748, + -1.2928642046608, "contcor1", "", 0.236837006657588, + "contNormal", 1.09293409067118, -1.1829297079267, -1.18789910551063, + 2.91804231916707, 0.865071606828221, "contcor2", "", + 0.408871685682165, "contNormal", 1.04745328410747, 0.825880848295149, + -0.133634292263736, 4.63690205021742, 2.25163387897684, "debCollin1:contcor1:contcor2", + "", 0.0642908819033268, "contNormal", 1.216995919341, + 1.85015729567614, -0.924284116675343, 5.58380458465691, 2.32976023399078, + "debCollin1:contcor1", "", 0.160541531409169, "contNormal", + 1.66025721713951, 1.40325258637019, -4.58911915267354, 1.62261231878532, + -1.48325341694411, "debCollin1:contcor2", "", 0.349267725744213, + "contNormal", 1.58465449377035, -0.936010608479725, -2.95950984261154, + 0.22491241174634, -1.3672987154326, "contcor1:contcor2", "", + 0.0923550427874251, "contNormal", 0.812367543351868, -1.68310357377285, + -0.0197475059582628, 0.0011600189584068, -0.00929374349992802, + "contGamma", "", 0.081425649926957, "debCollin1", 0.00533365028173618, + -1.74247335483398, -0.0185476063041267, 0.0350787697805722, + 0.00826558173822275, "contcor1", "", 0.545717764104197, + "debCollin1", 0.0136804493622579, 0.604189344907495, -0.0145563082737085, + 0.00654286302788965, -0.00400672262290944, "contGamma:contcor1", + "", 0.45663907791335, "debCollin1", 0.00538254056401693, + -0.744392462120019)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.140899162854753, 0.136661198042557, 16, 16, -0.00211898240609802, + "Total", 0.976126107371345, 0.0708075156193354, -0.0299259533054339, + -0.131376790704861, 0.145303668704072, 16, 16, 0.0069634389996057, + "Total", 0.921411428546369, 0.0705830468292667, 0.0986559706957615, + -0.127228585991295, 0.160980081227195, 50, 16, 0.01687574761795, + "Total", 0.818459218214223, 0.0735239702085965, 0.22952715379857, + -0.148908762673193, 0.120136371354889, 16, 16, -0.014386195659152, + "Total", 0.83397700561222, 0.0686352239506124, -0.209603682061326, + -0.150834388871065, 0.122510531004039, 84, 16, -0.0141619289335127, + "Total", 0.839064340161647, 0.0697321282511346, -0.20309044465859, + -0.15530130536767, 0.127466964755584, 16, 16, -0.0139171703060429, + "Total", 0.847014280635717, 0.0721360883040947, -0.192929373261468, + -0.168862152774531, 0.113313553169975, 16, 16, -0.0277742998022777, + "Total", 0.699618895663837, 0.0719849211950505, -0.38583496850709, + -0.183679652614446, 0.10924448647942, 50, 16, -0.0372175830675128, + "Total", 0.61845029916336, 0.0747269188118799, -0.498047874303578, + -0.209561523975729, 0.114514070893376, 50, 16, -0.0475237265411766, + "Total", 0.565403748530719, 0.08267386478154, -0.574833735748954, + -0.140657723244378, 0.151713578681855, 50, 50, 0.00552792771873831, + "Total", 0.940918935785895, 0.0745858863306726, 0.0741149296561354, + -0.123774717506998, 0.164039083345746, 84, 50, 0.020132182919374, + "Total", 0.783935833583312, 0.0734232371418511, 0.274193616395302, + -0.118349804666695, 0.190491547302527, 50, 50, 0.0360708713179161, + "Total", 0.647078346863498, 0.0787875069147505, 0.4578247583966, + -0.142961763879339, 0.129483192810708, 16, 50, -0.00673928553431571, + "Total", 0.922754514011321, 0.0695025415872583, -0.096964591228002, + -0.137220590633561, 0.135234220606072, 84, 50, -0.000993185013744449, + "Total", 0.988599102393461, 0.0695050555491636, -0.0142893924175333, + -0.133950526803135, 0.144506433590981, 50, 50, 0.00527795339392317, + "Total", 0.940772120025319, 0.0710362441837067, 0.0742994432570768, + -0.156381528121612, 0.11612674876673, 84, 50, -0.0201273896774413, + "Total", 0.772179766928662, 0.0695186949958909, -0.289524849087444, + -0.16362817051274, 0.115530492217251, 84, 50, -0.0240488391477445, + "Total", 0.735595114902587, 0.0712152531709659, -0.337692250984641, + -0.175400292818096, 0.118743087135676, 84, 50, -0.0283286028412104, + "Total", 0.705784491801318, 0.075037955358858, -0.377523650607657, + -0.145324242663682, 0.174306802902096, 16, 84, 0.014491280119207, + "Total", 0.858943013120087, 0.0815400303492786, 0.177719827391936, + -0.122684651738259, 0.193820595900137, 16, 84, 0.0355679720809392, + "Total", 0.659567400739848, 0.0807426182661897, 0.44051051160714, + -0.122599516639916, 0.239740521797371, 50, 84, 0.0585705025787277, + "Total", 0.526317574811687, 0.09243538179665, 0.633637265734217, + -0.141974382149837, 0.146422515882143, 16, 84, 0.00222406686615296, + "Total", 0.975883778647333, 0.0735719891556216, 0.0302298047351765, + -0.130155384679058, 0.1590405929747, 84, 84, 0.0144426041478208, + "Total", 0.84479541218161, 0.0737758397437143, 0.195763331166303, + -0.127278841123402, 0.182834010432871, 16, 84, 0.0277775846547348, + "Total", 0.725500001647413, 0.0791118750146441, 0.351117763920941, + -0.147878940601147, 0.125550866047201, 16, 84, -0.0111640372769726, + "Total", 0.87284231726302, 0.0697537834381467, -0.160049200583825, + -0.148854810387975, 0.131628710415617, 50, 84, -0.00861304998617929, + "Total", 0.904187981798259, 0.0715532333797994, -0.120372617411457, + -0.15271148022677, 0.141053537065972, 50, 84, -0.00582897158039885, + "Total", 0.938002769755131, 0.0749414324982302, -0.0777803597567541, + -0.0260578364085365, 0.0512134143504335, 50, 16, 0.0125777889709485, + "Total indirect", 0.523431822369562, 0.0197124159853129, 0.638064303245215, + -0.0199063237031809, 0.0632267444564854, 84, 16, 0.0216602103766522, + "Total indirect", 0.3070971606611, 0.0212078050452481, 1.0213320204726, + -0.0296273161105058, 0.0927723541004989, 50, 16, 0.0315725189949965, + "Total indirect", 0.311954128571366, 0.0312249794323971, 1.01113017747063, + -0.0234834662641536, 0.0241046176999426, 16, 16, 0.0003105757178945, + "Total indirect", 0.979590138569244, 0.0121400404138711, 0.0255827581545477, + -0.0404207915155631, 0.0414904764026307, 84, 16, 0.000534842443533806, + "Total indirect", 0.979580131222089, 0.0208961155828116, 0.0255953046112431, + -0.0589188387710884, 0.0604780409130957, 50, 16, 0.000779601071003603, + "Total indirect", 0.979580261238055, 0.0304589473648423, 0.02559514160701, + -0.0644033607379069, 0.0382483038874446, 84, 16, -0.0130775284252311, + "Total indirect", 0.617506346150941, 0.0261871303337854, -0.499387609812256, + -0.0924828588706916, 0.047441235489759, 84, 16, -0.0225208116904663, + "Total indirect", 0.528097273462711, 0.0356955779453485, -0.630913210732899, + -0.135199413827109, 0.0695455034988489, 84, 16, -0.03282695516413, + "Total indirect", 0.529685661197215, 0.0522318060283147, -0.628485929556689, + -0.0370044228811172, 0.0774538210726869, 16, 50, 0.0202246990957849, + "Total indirect", 0.488529986602095, 0.0291990681605979, 0.692648785384072, + -0.0174622625346895, 0.0871201711275305, 16, 50, 0.0348289542964205, + "Total indirect", 0.191740137118213, 0.0266796825061973, 1.30544860450758, + -0.0267059361293827, 0.128241221519308, 50, 50, 0.0507676426949626, + "Total indirect", 0.199021504289293, 0.0395280624722939, 1.28434432450482, + -0.0184726824482761, 0.0343876541337378, 16, 50, 0.00795748584273083, + "Total indirect", 0.555125045724031, 0.013485027530855, 0.590097856643105, + -0.0177817507977164, 0.0451889235243206, 84, 50, 0.0137035863633021, + "Total indirect", 0.393632125568782, 0.0160642427153615, 0.853049011155561, + -0.0262426871294147, 0.0661921366713541, 16, 50, 0.0199747247709697, + "Total indirect", 0.396951787634407, 0.0235807454958058, 0.84707774716124, + -0.0365096118662491, 0.0256483752654595, 16, 50, -0.00543061830039478, + "Total indirect", 0.73199253581972, 0.0158569207449736, -0.342476221438907, + -0.0579458712913491, 0.0392417357499531, 50, 50, -0.00935206777069801, + "Total indirect", 0.706022941512946, 0.0247932124793888, -0.377202743632863, + -0.0845614013222354, 0.0572977383939076, 50, 50, -0.0136318314641639, + "Total indirect", 0.706409873235418, 0.0361892210354654, -0.376682091355454, + -0.0548455386419398, 0.113221641634447, 50, 84, 0.0291880514962535, + "Total indirect", 0.496017166887983, 0.0428750685221972, 0.680769792382778, + -0.0297808140517239, 0.130310300967695, 84, 84, 0.0502647434579858, + "Total indirect", 0.218411628093388, 0.0408403206084902, 1.23076270482403, + -0.045114995324921, 0.191649543236469, 50, 84, 0.0732672739557742, + "Total indirect", 0.225118434541185, 0.0604002268482888, 1.21302978115967, + -0.0335855770172039, 0.0674272535036029, 16, 84, 0.0169208382431995, + "Total indirect", 0.51141622972094, 0.0257690527268825, 0.65663408052045, + -0.0226314826005529, 0.0809102336502876, 84, 84, 0.0291393755248673, + "Total indirect", 0.269952767991819, 0.0264141884921265, 1.10317133284459, + -0.0338758254475953, 0.118824537511158, 50, 84, 0.0424743560317813, + "Total indirect", 0.275560222259154, 0.0389548900294174, 1.09034721955847, + -0.0230641357016547, 0.0301296039018025, 84, 84, 0.00353273410007389, + "Total indirect", 0.794607247379546, 0.0135700808849149, 0.260332575025477, + -0.0373322010446466, 0.0494996438263811, 84, 84, 0.00608372139086725, + "Total indirect", 0.783590604242556, 0.0221513878713962, 0.274642899406005, + -0.0544628310694718, 0.0721984306627671, 84, 84, 0.00886779979664769, + "Total indirect", 0.783745173711587, 0.032312140103422, 0.274441735157881, + 16, 16, 50, 16, 84, 16, 16, 50, 50, 50, 84, 50, 16, 84, 50, + 84, 84, 84, 16, 16, 50, 16, 84, 16, 16, 50, 50, 50, 84, 50, + 16, 84, 50, 84, 84, 84, 16, 16, 50, 16, 84, 16, 16, 50, 50, + 50, 84, 50, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-70") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-70") +}) + + +context('Model number 72 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "debCollin1", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(2016.14038395437, 2128.16270195186, 1650.01212730983, 38, 1, 100, + 2.51973479379036e-322, 0, 1650.01212730983, 38)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 72)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848569537456, 0.0642082213461905, -0.240320174095633, "contcor1", + "", 0.121931787326298, "contGamma", 0.155374485370091, + -1.54671581709962, -0.403935050747025, 0.194627065832268, -0.104653992457379, + "contcor2", "", 0.493110897554608, "contGamma", 0.152697223342029, + -0.685369322158284, -0.0667363097922632, 0.346854054497006, + 0.140058872352371, "debCollin1__contcor1__contcor2", "", + 0.184359739797431, "contGamma", 0.105509684757377, 1.3274503916341, + 1.37708976926876, 3.45910739623447, 2.41809858275162, "contGamma__contcor1__contcor2", + "", 5.29653256986506e-06, "contGamma", 0.53113670541612, + 4.55268588687945, 0.424979430984177, 0.896763690747406, 0.660871560865792, + "contcor2", "", 3.99656943095295e-08, "contcor1", 0.120355339048218, + 5.49100327490272, 0.000710041692378871, 0.276794342331982, 0.13875219201218, + "debCollin1__contcor1__contcor2", "", 0.0488331710324872, + "contcor1", 0.0704309627159787, 1.97004537012671, -0.374371649544572, + 0.853226946091402, 0.239427648273415, "contGamma__contcor1__contcor2", + "", 0.444549922530115, "contcor1", 0.31316866159764, + 0.764532591006925, -0.00478903648191376, 0.268765042526713, + 0.1319880030224, "debCollin1__contcor1__contcor2", "", + 0.058579122152618, "contcor2", 0.0697854861534156, 1.89133887714472, + -0.164892799987897, 1.06248454682261, 0.448795873417357, "contGamma__contcor1__contcor2", + "", 0.151761056712359, "contcor2", 0.3131122195336, + 1.43333873742094, 1.03656542934065, 2.06894127227457, 1.55275335080761, + "contGamma__contcor1__contcor2", "", 3.72870845311013e-09, + "debCollin1__contcor1__contcor2", 0.263366023834409, 5.89579980059958, + 0.710357937890189, 1.25516216956353, 0.982760053726857, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.138983225194616, + 7.07106956505514, 0.0045899882053011, 0.00811024579098345, 0.00635011699814227, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000898041396028113, 7.07107381266363, 0.323891678638459, 0.572298100979267, + 0.448094889808863, "debCollin1:contcor1", "", 1.53743684450092e-12, + "debCollin1:contcor1", 0.0633701497323945, 7.07107197475657, + 0.31853292209582, 0.562829782880554, 0.440681352488187, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.06232177292841, + 7.07106572520658, 1.68041043274443, 2.96918952965641, 2.32479998120042, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776219123846, 7.0710709776874, 0.732634694947451, 1.29452430845113, + 1.01357950169929, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341821057884, 7.07106617049318, 0.721541933520394, + 1.27492403830961, 0.998232985914999, "contcor2", "", + 1.53743684450092e-12, "contcor2", 0.141171498342372, 7.07106602703941, + 0.340023569108509, 0.600801791219098, 0.470412680163803, "debCollin1__contcor1__contcor2", + "", 1.53721479989599e-12, "debCollin1__contcor1__contcor2", + 0.0665262790968544, 7.07108057973508, 6.95315720396369, 12.2858405468819, + 9.61949887542278, "contGamma__contcor1__contcor2", "", + 1.53743684450092e-12, "contGamma__contcor1__contcor2", 1.3604034015374, + 7.07106352759167)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.149831425249931, 0.120439448129287, "", "", -0.0146959885603216, + "contGamma", "contNormal", "", "", "", 0.831212910027244, + 0.0689479183064281, -0.213146225749814, -0.0299010327264696, + 0.0448939202340274, 16, 16, 0.00749644375377891, "contGamma", + "debCollin1", "contNormal", "", "", 0.694407339542437, + 0.019080695755246, 0.392881048465847, -0.0347209635972974, 0.0356378352431436, + 50, 16, 0.000458435822923102, "contGamma", "debCollin1", "contNormal", + "", "", 0.979623430873015, 0.0179490029907239, + 0.0255410188053355, -0.159764868042175, 0.095895186010347, 84, + 16, -0.0319348410159142, "contGamma", "debCollin1", "contNormal", + "", "", 0.624386208988987, 0.0652205999878407, + -0.489643471876492, -0.0863015150333169, 0.0930176609468909, + 16, 50, 0.00335807295678703, "contGamma", "debCollin1", "contNormal", + "", "", 0.941481708915646, 0.0457455283348711, + 0.0734076767504994, -0.0188167588318372, 0.0355049314455464, + 50, 50, 0.00834408630685462, "contGamma", "debCollin1", "contNormal", + "", "", 0.547093758350915, 0.0138578286912071, + 0.60212075735566, -0.0713774574741195, 0.0495244584390488, 84, + 50, -0.0109264995175354, "contGamma", "debCollin1", "contNormal", + "", "", 0.723141696851674, 0.0308428922334357, + -0.354263129243448, -0.241068242674808, 0.221338829957007, 16, + 84, -0.00986470635890039, "contGamma", "debCollin1", "contNormal", + "", "", 0.93335433681177, 0.117963155516944, + -0.083625317716119, -0.0831368414565053, 0.10156745248659, 50, + 84, 0.00921530551504261, "contGamma", "debCollin1", "contNormal", + "", "", 0.844943712914741, 0.0471193081607672, + 0.195573871407465, -0.0352231483054438, 0.0458762038623667, + 84, 84, 0.00532652777846147, "contGamma", "debCollin1", "contNormal", + "", "", 0.796825917151161, 0.0206889904119443, + 0.257457114745741)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.149831425249931, 0.120439448129287, -0.0146959885603216, "contGamma", + "", 0.831212910027244, "contNormal", 0.0689479183064281, + -0.213146225749814, -4.39510611526958, 1.52258123128326, -1.43626244199316, + "debCollin1", "", 0.341404998231186, "contNormal", + 1.509641859042, -0.951392830949051, -3.43499430113463, 0.849227648402239, + -1.2928833263662, "contcor1", "", 0.236829967100935, + "contNormal", 1.09293384555284, -1.1829474689863, -1.18786778116693, + 2.91807264918581, 0.865102434009438, "contcor2", "", + 0.408854875835813, "contNormal", 1.04745303044849, 0.825910478906178, + -0.133633123029673, 4.63690211307734, 2.25163449502384, "debCollin1:contcor1:contcor2", + "", 0.064290747139792, "contNormal", 1.21699563709752, + 1.85015823096448, -0.92425286257067, 5.58383439287837, 2.32979076515385, + "debCollin1:contcor1", "", 0.160535956794809, "contNormal", + 1.66025684828497, 1.40327128754837, -4.58916568635079, 1.62256430003412, + -1.48330069315834, "debCollin1:contcor2", "", 0.349252250360611, + "contNormal", 1.58465411491799, -0.936040666032095, -2.95951060942816, + 0.22491090081128, -1.36729985430844, "contcor1:contcor2", "", + 0.0923546953197616, "contNormal", 0.812367353522247, -1.68310536899363, + -0.0201068302205464, 0.00866071287090692, -0.00572305867481973, + "contGamma", "", 0.435487167140387, "debCollin1", 0.00733879380395967, + -0.779836418313298, -0.0350283246541205, 0.0413279992885996, + 0.00314983731723952, "contcor1", "", 0.871538826658048, + "debCollin1", 0.019479011998437, 0.161704162279497, -0.0390763347769535, + 0.0457718034514002, 0.00334773433722333, "contcor2", "", + 0.877086909046908, "debCollin1", 0.0216453309595546, 0.154663116192529, + -0.0169077127719759, 0.00681510668987102, -0.00504630304105244, + "contGamma:contcor1:contcor2", "", 0.404368570309641, + "debCollin1", 0.00605185086281419, -0.833844580020903, -0.0236340618852427, + 0.0138396844069883, -0.00489718873912718, "contGamma:contcor1", + "", 0.608462971465601, "debCollin1", 0.0095598048198383, + -0.512268694959613, -0.0167952055185835, 0.0216686835269855, + 0.00243673900420097, "contGamma:contcor2", "", 0.803877001170189, + "debCollin1", 0.00981239689835304, 0.248332698875028, -0.0164773378933479, + 0.0426898087619959, 0.013106235434324, "contcor1:contcor2", + "", 0.385223967182951, "debCollin1", 0.0150939372156955, + 0.868311246233051)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.146359529484595, 0.131960439871509, 16, 16, -0.00719954480654274, + "Total", 0.91923278771274, 0.0710012968481708, -0.101400187406974, + -0.149949295135178, 0.121474189660381, 50, 16, -0.0142375527373985, + "Total", 0.837087511140893, 0.0692419572340394, -0.205620310374464, + -0.226030689885438, 0.132769030732967, 84, 16, -0.0466308295762359, + "Total", 0.610438838044148, 0.0915322229001582, -0.509447144390888, + -0.173426713336406, 0.150750882129337, 16, 50, -0.0113379156035346, + "Total", 0.890954034298806, 0.0826998858200493, -0.137097113147234, + -0.14264602592035, 0.129942221413416, 50, 50, -0.00635190225346702, + "Total", 0.927220136179742, 0.0695390959945966, -0.0913428937005535, + -0.169091781098506, 0.117846804942792, 84, 50, -0.025622488077857, + "Total", 0.726313059505566, 0.0731999639546014, -0.350034162499699, + -0.292222917307159, 0.243101527468714, 16, 84, -0.024560694919222, + "Total", 0.857273183798436, 0.136564867772685, -0.1798463640012, + -0.169126621365298, 0.15816525527474, 50, 84, -0.00548068304527904, + "Total", 0.94766336235951, 0.0834943599019355, -0.0656413565145733, + -0.148964034494359, 0.130225112930639, 84, 84, -0.00936946078186018, + "Total", 0.89533944535991, 0.0712230300217776, -0.131550999430877, + -0.0299010327264696, 0.0448939202340274, 16, 16, 0.00749644375377891, + "Total indirect", 0.694407339542437, 0.019080695755246, 0.392881048465847, + -0.0347209635972974, 0.0356378352431436, 50, 16, 0.000458435822923102, + "Total indirect", 0.979623430873015, 0.0179490029907239, 0.0255410188053355, + -0.159764868042175, 0.095895186010347, 84, 16, -0.0319348410159142, + "Total indirect", 0.624386208988987, 0.0652205999878407, -0.489643471876492, + -0.0863015150333169, 0.0930176609468909, 16, 50, 0.00335807295678703, + "Total indirect", 0.941481708915646, 0.0457455283348711, 0.0734076767504994, + -0.0188167588318372, 0.0355049314455464, 50, 50, 0.00834408630685462, + "Total indirect", 0.547093758350915, 0.0138578286912071, 0.60212075735566, + -0.0713774574741195, 0.0495244584390488, 84, 50, -0.0109264995175354, + "Total indirect", 0.723141696851674, 0.0308428922334357, -0.354263129243448, + -0.241068242674808, 0.221338829957007, 16, 84, -0.00986470635890039, + "Total indirect", 0.93335433681177, 0.117963155516944, -0.083625317716119, + -0.0831368414565053, 0.10156745248659, 50, 84, 0.00921530551504261, + "Total indirect", 0.844943712914741, 0.0471193081607672, 0.195573871407465, + -0.0352231483054438, 0.0458762038623667, 84, 84, 0.00532652777846147, + "Total indirect", 0.796825917151161, 0.0206889904119443, 0.257457114745741 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-72") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-72") +}) + + +context('Model number 75 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1404.48233882082, 1477.42710402849, 1153.9456120811, 21, 1, 100, + 4.05257272314195e-231, 0, 1153.9456120811, 21)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 75)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848252272753, 0.0642086308051047, -0.240319810733824, "contcor1", + "", 0.121932407981628, "contGamma", 0.155374508889454, + -1.54671324435083, -0.403934290103677, 0.194627909249791, -0.104653190426943, + "contcor2", "", 0.493114270944633, "contGamma", 0.152697244458279, + -0.685363974957238, 0.424979172089065, 0.896763094985054, 0.66087113353706, + "contcor2", "", 3.99656103766688e-08, "contcor1", 0.120355253111119, + 5.49100364507485, 0.744755272115744, 1.31594164780159, 1.03034845995867, + "contNormal", "", 1.53765888910584e-12, "contNormal", + 0.14571348764347, 7.07105757072889, 0.00462621254132252, 0.0081742563851971, + 0.00640023446325981, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000905129857451742, 7.07106766014627, 0.32389179067925, + 0.572298491699076, 0.448095141189163, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702208252872, + 7.07106800881394, 0.31853285686897, 0.562829555413277, 0.440681206141123, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623217315397854, 7.07106807293693, 1.68041090070078, 2.96919116257019, + 2.32480103163548, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776516312327, 7.07106778096948, 0.732634594908978, + 1.29452395837974, 1.01357927664436, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341757272805, 7.07106774696042, + 0.721541826526441, 1.27492366446166, 0.99823274549405, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171430266123, + 7.07106773383449)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.146732278130572, 0.122661218664468, "", "", -0.0120355297330522, + "contGamma", "contNormal", "", "", "", 0.860978866919563, + 0.0687240936364091, -0.175128242457838, -0.0189658871546049, + 0.0308820490073409, 16, 16, 0.00595808092636799, "contGamma", + "debCollin1", "contNormal", "", "", 0.639405700909277, + 0.0127165439148729, 0.468529890373719, -0.068509510312739, 0.0356529599909045, + 50, 16, -0.0164282751609172, "contGamma", "debCollin1", "contNormal", + "", "", 0.536415566681465, 0.0265725470277168, + -0.618242396702942, -0.282917093333042, 0.13719882485285, 84, + 16, -0.0728591342400961, "contGamma", "debCollin1", "contNormal", + "", "", 0.496619414160948, 0.10717439746335, + -0.679818463780135, -0.0492002234999701, 0.0780847165281558, + 16, 50, 0.0144422465140929, "contGamma", "debCollin1", "contNormal", + "", "", 0.656485730823402, 0.0324712446330987, + 0.444770339950922, -0.0255943715217378, 0.0225802366761147, + 50, 50, -0.00150706742281155, "contGamma", "debCollin1", "contNormal", + "", "", 0.902401025296378, 0.0122896666923086, + -0.122628827985607, -0.153641535090046, 0.0518161088464437, + 84, 50, -0.0509127131218013, "contGamma", "debCollin1", "contNormal", + "", "", 0.331367026339517, 0.0524136273822157, + -0.971364045280262, -0.160199336158948, 0.211650322799126, 16, + 84, 0.025725493320089, "contGamma", "debCollin1", "contNormal", + "", "", 0.786244548479843, 0.0948613499766261, + 0.271190461936582, -0.0386520697786196, 0.0732948314053909, + 50, 84, 0.0173213808133857, "contGamma", "debCollin1", "contNormal", + "", "", 0.544166359169068, 0.0285584077225483, + 0.606524739812772, -0.0861987851722026, 0.038499512182398, 84, + 84, -0.0238496364949023, "contGamma", "debCollin1", "contNormal", + "", "", 0.45342311953965, 0.0318113746829546, + -0.749720398209687)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.146732278130572, 0.122661218664468, -0.0120355297330522, "contGamma", + "", 0.860978866919563, "contNormal", 0.0687240936364091, + -0.175128242457838, -2.33171502247253, 2.72585420968113, 0.1970695936043, + "debCollin1", "", 0.878602459767695, "contNormal", + 1.29021994078644, 0.152741084968954, -3.92785416587613, 0.322219355600546, + -1.80281740513779, "contcor1", "", 0.096357559535486, + "contNormal", 1.08422235178828, -1.66277461644679, -1.07377644816153, + 3.00632822525935, 0.966275888548911, "contcor2", "", + 0.353230276952237, "contNormal", 1.04086215502025, 0.928341840356477, + -0.0857168589320256, 6.36784016906162, 3.14106165506479, "debCollin1:contcor1", + "", 0.0564042628718799, "contNormal", 1.64634582035652, + 1.90789906727166, -4.80098183814759, 1.4010099916984, -1.69998592322459, + "debCollin1:contcor2", "", 0.28261438005788, "contNormal", + 1.58216984566209, -1.07446487359465, -0.0199697909319945, 0.000908050923116435, + -0.00953087000443905, "contGamma", "", 0.073538752140816, + "debCollin1", 0.0053260779330112, -1.78947250196367, -0.0336994318832736, + 0.0420651657332771, 0.00418286692500175, "contcor1", "", + 0.828664875189072, "debCollin1", 0.0193280586312228, 0.216414229944682, + -0.0310213845638338, 0.0494312410177326, 0.00920492822694938, + "contcor2", "", 0.6537954979177, "debCollin1", 0.0205240061083179, + 0.448495687360901, -0.0233913095676798, 0.0139844968341469, + -0.00470340636676644, "contGamma:contcor1", "", 0.621809533730419, + "debCollin1", 0.0095348196948113, -0.493287394760696, -0.0182406539160091, + 0.0175608021623657, -0.00033992587682168, "contGamma:contcor2", + "", 0.970310599576224, "debCollin1", 0.00913319233434188, + -0.0372187362729151)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.14176178934633, 0.129606891732961, 16, 16, -0.00607744880668426, + "Total", 0.930044449816067, 0.0692279764372746, -0.087788913087628, + -0.168271938487113, 0.111344328699174, 50, 16, -0.0284638048939695, + "Total", 0.689869028634563, 0.0713319911467414, -0.399032810333513, + -0.328264814454841, 0.158475486508544, 84, 16, -0.0848946639731483, + "Total", 0.494169004208467, 0.124170725789538, -0.68369306399191, + -0.145659908678194, 0.150473342240275, 16, 50, 0.00240671678104061, + "Total", 0.974585445417551, 0.0755455848307239, 0.0318578085858145, + -0.146122602239468, 0.11903740792774, 50, 50, -0.0135425971558638, + "Total", 0.841321302366942, 0.0676441027127937, -0.200203663183523, + -0.223906608148646, 0.0980101224389389, 84, 50, -0.0629482428548536, + "Total", 0.443372562936278, 0.0821231239774871, -0.766510573466615, + -0.215566070247681, 0.242945997421754, 16, 84, 0.0136899635870368, + "Total", 0.906829360418747, 0.116969513543647, 0.1170387323354, + -0.137332169605149, 0.147903871765816, 50, 84, 0.00528585108033345, + "Total", 0.942090895088777, 0.0727656333536918, 0.0726421366339315, + -0.175715674331539, 0.10394534187563, 84, 84, -0.0358851662279545, + "Total", 0.614969864295561, 0.0713434069230607, -0.502992046155777, + -0.0189658871546049, 0.0308820490073409, 16, 16, 0.00595808092636799, + "Total indirect", 0.639405700909277, 0.0127165439148729, 0.468529890373719, + -0.068509510312739, 0.0356529599909045, 50, 16, -0.0164282751609172, + "Total indirect", 0.536415566681465, 0.0265725470277168, -0.618242396702942, + -0.282917093333042, 0.13719882485285, 84, 16, -0.0728591342400961, + "Total indirect", 0.496619414160948, 0.10717439746335, -0.679818463780135, + -0.0492002234999701, 0.0780847165281558, 16, 50, 0.0144422465140929, + "Total indirect", 0.656485730823402, 0.0324712446330987, 0.444770339950922, + -0.0255943715217378, 0.0225802366761147, 50, 50, -0.00150706742281155, + "Total indirect", 0.902401025296378, 0.0122896666923086, -0.122628827985607, + -0.153641535090046, 0.0518161088464437, 84, 50, -0.0509127131218013, + "Total indirect", 0.331367026339517, 0.0524136273822157, -0.971364045280262, + -0.160199336158948, 0.211650322799126, 16, 84, 0.025725493320089, + "Total indirect", 0.786244548479843, 0.0948613499766261, 0.271190461936582, + -0.0386520697786196, 0.0732948314053909, 50, 84, 0.0173213808133857, + "Total indirect", 0.544166359169068, 0.0285584077225483, 0.606524739812772, + -0.0861987851722026, 0.038499512182398, 84, 84, -0.0238496364949023, + "Total indirect", 0.45342311953965, 0.0318113746829546, -0.749720398209687 + )) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-75") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-75") +}) + + +context('Model number 75 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(958.80118593457, 1031.74595114224, 1017.25258718756, 21, 1, 100, + 5.9024357694093e-202, 0, 1017.25258718756, 21)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 75)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.00962232373915393, 0.0896223345475429, 0.0400000054041945, + "facExperimexperimental", "", 0.114128605333979, "facGenderm", + 0.0253179800928808, 1.57990508158438, -0.163250737554454, 0.0341991691067366, + -0.0645257842238587, "contcor2", "", 0.200188158884217, + "facGenderm", 0.0503707997235282, -1.28101567928291, -0.170527285112606, + 0.0272978065523825, -0.0716147392801117, "contcor2", "", + 0.155883079075216, "facExperimexperimental", 0.0504665119424152, + -1.41905466662383, 0.758591426205619, 1.34038867068759, 1.0494900484466, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.148420391668191, 7.07106373087091, 0.00473838117423867, 0.0083724515720366, + 0.00655541637313764, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000927075810184015, 7.07106830005245, 0.0796446892036767, + 0.140727668572491, 0.110186178888084, "debCollin1:facExperimexperimental", + "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", + 0.0155826790315099, 7.07106773265846, 0.318532869806059, 0.562829600577426, + 0.440681235191743, "debCollin1:contcor2", "", 1.53743684450092e-12, + "debCollin1:contcor2", 0.0623217397611255, 7.07106760627736, + 0.180704809740975, 0.319295194563236, 0.250000002152105, "facGenderm", + "", 1.53743684450092e-12, "facGenderm", 0.035355339668342, + 7.07106775093329, 0.180704817389583, 0.319295221241209, 0.250000019315396, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.035355344522861, 7.07106726548074, + 0.721541804987358, 1.27492358979244, 0.998232697389899, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171416712268, + 7.07106807197715)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0715437360104232, 0.892289718741686, "", 0.481916727376054, + "", "facGenderm", "contNormal", "", "", "", 0.0213543082558016, + 0.20937782255317, 2.30166080389758, -0.0560652397312252, 0.0459994075738143, + 16, -0.00503291607870542, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.846727308893882, 0.0260373782656499, + -0.193295808332022, -0.0555859911524919, 0.064288842691856, + 16, 0.00435142576968203, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.886849064042619, 0.0305808766869966, + 0.142292381419278, -0.0213442491855201, 0.0198258403977903, + 50, -0.000759204393864924, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.942374200735774, 0.0105027668640992, + -0.0722861321867527, -0.061537995421582, 0.0595925656744224, + 50, -0.000972714873579779, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.974888176021673, 0.0309012211580077, + -0.031478201738565, -0.0179138475710038, 0.0185923801389658, + 84, 0.000339266283981009, 0, "facGenderm", "debCollin1", "contNormal", + "", "", 0.970939984507444, 0.00931298431959108, + 0.0364293842165414, -0.108167742978772, 0.0859189423566096, + 84, -0.0111244003110813, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.822230423361087, 0.0495128193340063, + -0.224677173724196)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0715437360104232, 0.892289718741686, 0.481916727376054, "facGenderm", + "", 0.0213543082558016, "contNormal", 0.20937782255317, + 2.30166080389758, -3.61764096867326, 3.32517458639054, -0.146233191141358, + "debCollin1", "", 0.93419857637938, "contNormal", 1.77115896256968, + -0.0825635610533772, -3.43286460407973, 3.20125264100156, -0.115805981539083, + "facExperimexperimental", "", 0.945445925450839, "contNormal", + 1.69240794662819, -0.068426753590826, -1.77567610747931, 1.36743998349363, + -0.204118061992841, "contcor2", "", 0.799058909745113, + "contNormal", 0.801830063145407, -0.254565239412612, -4.77224910034677, + 5.15463081122176, 0.191190855437493, "debCollin1:facExperimexperimental", + "", 0.939818905364266, "contNormal", 2.53241385807864, + 0.0754974763811121, -1.95652983145021, 2.7744609533664, 0.408965560958097, + "debCollin1:contcor2", "", 0.734719657062793, "contNormal", + 1.20690758149998, 0.338854082306635, -0.0402674801176339, 0.0518453496003315, + 0.00578893474134877, "facGenderm", "", 0.805409529725959, + "debCollin1", 0.0234986026387576, 0.246352297212804, -0.0489096577715635, + 0.0420350349817879, -0.00343731139488781, "facExperimexperimental", + "", 0.882219558452691, "debCollin1", 0.023200603039319, + -0.148156122884498, -0.017410054573903, 0.025880663839868, 0.0042353046329825, + "contcor2", "", 0.70134738220939, "debCollin1", 0.011043753547321, + 0.383502277086753, -0.0882812997114291, 0.0429308299864423, + -0.0226752348624934, "facGenderm:facExperimexperimental", "", + 0.498141608215563, "debCollin1", 0.0334730971417985, -0.677416695755303, + -0.0370220610161852, 0.0287647487336274, -0.00412865614127891, + "facGenderm:contcor2", "", 0.805676590483224, "debCollin1", + 0.0167826578112482, -0.24600728845891)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.064379947182058, 0.88938767541264, 16, 0.476883811297349, 0, + "Total", 0.0234600915664449, 0.21046502250504, 2.26585779252668, + 0.0742141721101385, 0.898322134181334, 16, 0.486268153145736, + 1, "Total", 0.0207243459304456, 0.210235486103738, 2.31296895760877, + 0.0706761919800934, 0.891638853984285, 50, 0.481157522982189, + 0, "Total", 0.0215943503739422, 0.209433098893613, 2.29742827434649, + 0.0702171543451302, 0.891670870659819, 50, 0.480944012502475, + 1, "Total", 0.0217310588366115, 0.209558370152261, 2.29503604247843, + 0.0715085833855294, 0.893003403934541, 84, 0.482255993660035, + 0, "Total", 0.0213813690172577, 0.209568856119005, 2.30118159058035, + 0.0551224862530997, 0.886462167876847, 84, 0.470792327064973, + 1, "Total", 0.0264271041286821, 0.212080346419947, 2.21987720697487, + -0.0560652397312252, 0.0459994075738143, 16, -0.00503291607870542, + 0, "Total indirect", 0.846727308893882, 0.0260373782656499, + -0.193295808332022, -0.0555859911524919, 0.064288842691856, + 16, 0.00435142576968203, 1, "Total indirect", 0.886849064042619, + 0.0305808766869966, 0.142292381419278, -0.0213442491855201, + 0.0198258403977903, 50, -0.000759204393864924, 0, "Total indirect", + 0.942374200735774, 0.0105027668640992, -0.0722861321867527, + -0.061537995421582, 0.0595925656744224, 50, -0.000972714873579779, + 1, "Total indirect", 0.974888176021673, 0.0309012211580077, + -0.031478201738565, -0.0179138475710038, 0.0185923801389658, + 84, 0.000339266283981009, 0, "Total indirect", 0.970939984507444, + 0.00931298431959108, 0.0364293842165414, -0.108167742978772, + 0.0859189423566096, 84, -0.0111244003110813, 1, "Total indirect", + 0.822230423361087, 0.0495128193340063, -0.224677173724196)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-75") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-75") +}) + + +context('Model number 76 - continuous') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1408.05835697098, 1486.21346255062, 1153.52163023126, 19, 1, 100, + 8.20820341448241e-233, 0, 1153.52163023126, 19)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 76)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544847911667467, 0.0642086821807235, -0.240319614743372, "contcor1", + "", 0.121932535092864, "contGamma", 0.15537443510502, + -1.54671271744889, -0.403933954346406, 0.194627962116526, -0.10465299611494, + "contcor2", "", 0.493114869400227, "contGamma", 0.152697172290999, + -0.685363026340134, 0.42497900191946, 0.896762573939042, 0.660870787929251, + "contcor2", "", 3.99653361515817e-08, "contcor1", 0.120355163600186, + 5.49100485729579, 0.741602482105986, 1.31036766044854, 1.02598507127726, + "contNormal", "", 1.53721479989599e-12, "contNormal", + 0.145095823910261, 7.07108615277458, 0.00462621280405318, 0.00817425730158656, + 0.00640023505281987, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000905130024204502, 7.07106700879234, 0.323891782426219, + 0.572298463420239, 0.448095122923229, "debCollin1:contcor1", + "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702157165695, + 7.07106829062071, 0.318532821779077, 0.562829432993612, 0.440681127386345, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623217092613728, 7.0710693369811, 1.6804107493685, 2.96919063498615, + 2.32480069217732, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776420327971, 7.07106881283705, 0.732634458801521, + 1.29452348417391, 1.01357897148772, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341671021636, 7.07106987286849, + 0.721541688075756, 1.27492318124754, 0.998232434661647, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171342314651, + 7.07106993738666)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.209487054747554, 0.166372800300655, 16, 16, -0.0215571272234493, + "contGamma", "contNormal", "", "", "", 0.822116050039272, + 0.0958843779816731, -0.224824185933287, -0.198506883125099, + 0.314044460410353, 50, 16, 0.0577687886426274, "contGamma", + "contNormal", "", "", "", 0.658627857658163, 0.130755296418299, + 0.441808402604352, -0.344934644241239, 0.633620531734511, 84, + 16, 0.144342943746636, "contGamma", "contNormal", "", "", + "", 0.563119896419075, 0.24963600956305, 0.578213631916672, + -0.36698900370105, 0.186093513794537, 16, 50, -0.0904477449532567, + "contGamma", "contNormal", "", "", "", 0.52149595707298, + 0.141095071608007, -0.641041135756608, -0.146446617538574, 0.124202959364214, + 50, 50, -0.0111218290871801, "contGamma", "contNormal", "", + "", "", 0.872028835182556, 0.0690445281233832, -0.161081976942551, + -0.233445404744294, 0.384350056777952, 84, 50, 0.075452326016829, + "contGamma", "contNormal", "", "", "", 0.632118672209609, + 0.157603779047813, 0.478746934069001, -0.669519034315951, 0.327122788230103, + 16, 84, -0.171198123042924, "contGamma", "contNormal", "", "", + "", 0.500727496756329, 0.254250034798455, -0.673345524529166, + -0.385811464689258, 0.202067050335563, 50, 84, -0.0918722071768475, + "contGamma", "contNormal", "", "", "", 0.540143045077709, + 0.149971764701273, -0.612596693516588, -0.229492527915891, 0.218896423770215, + 84, 84, -0.00529805207283844, "contGamma", "contNormal", "", + "", "", 0.963057676150353, 0.114387038543295, -0.0463168916715433, + -0.0198744560479169, 0.0329039328814558, 16, 16, 0.00651473841676941, + "contGamma", "debCollin1", "contNormal", "", "", + 0.628485847582432, 0.0134641221332846, 0.483859129639382, -0.0737509809135414, + 0.0369338010967597, 50, 16, -0.0184085899083908, "contGamma", + "debCollin1", "contNormal", "", "", 0.514436908791028, + 0.0282364326292137, -0.651944604692913, -0.312135896898696, + 0.149931026227078, 84, 16, -0.0811024353358089, "contGamma", + "debCollin1", "contNormal", "", "", 0.491434162874842, + 0.11787638108927, -0.688029566112898, -0.0534537856874135, 0.0850204279777879, + 16, 50, 0.0157833211451872, "contGamma", "debCollin1", "contNormal", + "", "", 0.65502362559638, 0.0353257036245228, + 0.446794246844966, -0.0264404722545267, 0.0221910068503342, + 50, 50, -0.00212473270209625, "contGamma", "debCollin1", "contNormal", + "", "", 0.864016549682028, 0.0124062175347251, + -0.17126353750844, -0.170325784939505, 0.0560011896289124, 84, + 50, -0.0571622976552963, "contGamma", "debCollin1", "contNormal", + "", "", 0.322156011931905, 0.0577375340449252, + -0.990037046106241, -0.174676962120583, 0.230896347908933, 16, + 84, 0.0281096928941753, "contGamma", "debCollin1", "contNormal", + "", "", 0.78586464041188, 0.103464480273267, + 0.271684473936688, -0.0394866990494173, 0.0763359340865148, + 50, 84, 0.0184246175185488, "contGamma", "debCollin1", "contNormal", + "", "", 0.53291197902843, 0.0295471330212, + 0.623567014279497, -0.0950844113155688, 0.0398071882226885, + 84, 84, -0.0276386115464402, "contGamma", "debCollin1", "contNormal", + "", "", 0.421874424414676, 0.0344117546552552, + -0.803173561573076)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.144540210372712, 0.126022935396113, -0.0092586374882993, "contGamma", + "", 0.893292303520633, "contNormal", 0.0690224789595607, + -0.134139451782423, -2.28222244953423, 2.81250273070353, 0.265140140584652, + "debCollin1", "", 0.838352530126159, "contNormal", + 1.2996986731451, 0.204001239720472, -4.64758618097525, 0.319572436778295, + -2.16400687209848, "contcor1", "", 0.0876795287970182, + "contNormal", 1.26715558472856, -1.70776730038406, -0.962513470994124, + 3.35439454437291, 1.19594053668939, "contcor2", "", + 0.2774955282476, "contNormal", 1.10127228087308, 1.08596262473914, + -0.00780318857770324, 6.97590133226966, 3.48404907184598, "debCollin1:contcor1", + "", 0.050514169417841, "contNormal", 1.78159001286093, + 1.95558408314783, -0.173333838024465, 0.336197319384592, 0.0814317406800631, + "contGamma:contcor1", "", 0.531005969990757, "contNormal", + 0.129984826616247, 0.626471125898971, -4.98756037302755, 1.27339688960143, + -1.85708174171306, "debCollin1:contcor2", "", 0.24495048634873, + "contNormal", 1.59721232431173, -1.16270186088961, -0.303234303806334, + 0.158779244611938, -0.072227529597198, "contGamma:contcor2", + "", 0.540001704838076, "contNormal", 0.117862764842257, + -0.612810412973638, -0.0199697897992659, 0.000908053017407776, + -0.00953086839092908, "contGamma", "", 0.0735388141502746, + "debCollin1", 0.00532607817831233, -1.7894721166014, -0.0336994204220246, + 0.0420651806844113, 0.00418288013119333, "contcor1", "", + 0.8286643504101, "debCollin1", 0.0193280595215161, 0.216414903241421, + -0.0310213914281104, 0.0494312378588058, 0.00920492321534769, + "contcor2", "", 0.653795689009625, "debCollin1", 0.0205240070535776, + 0.448495422522434, -0.0233913212166956, 0.0139844869065424, + -0.00470341715507658, "contGamma:contcor1", "", 0.621808750422121, + "debCollin1", 0.00953482013395493, -0.493288503505903, -0.0182406492873267, + 0.0175608084397694, -0.000339920423778627, "contGamma:contcor2", + "", 0.970311076996131, "debCollin1", 0.00913319275494179, + -0.0372181375012262)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.201939360466459, 0.171854582853099, 16, 16, -0.0150423888066798, + "Total", 0.874655726182991, 0.095357349999285, -0.157747554926732, + -0.193453149432277, 0.322020203551071, 16, 16, 0.0642835270593968, + "Total", 0.62495112828267, 0.131500720689088, 0.488845435390309, + -0.340452487825418, 0.64216785215223, 50, 16, 0.150857682163406, + "Total", 0.547300278532022, 0.250673060252238, 0.601810509719739, + -0.359189962152831, 0.191323949079857, 16, 16, -0.0839330065364873, + "Total", 0.550077493971289, 0.140439802867571, -0.59764400705997, + -0.141509524203829, 0.132295342863007, 84, 16, -0.00460709067041068, + "Total", 0.947411722722679, 0.0698494638744829, -0.0659574235056329, + -0.22962471428588, 0.393558843153077, 16, 16, 0.0819670644335984, + "Total", 0.606143286867038, 0.158978318569767, 0.515586434496271, + -0.661913925880482, 0.332547156628173, 16, 50, -0.164683384626155, + "Total", 0.516246239617459, 0.253693713341887, -0.649142552477133, + -0.379386245861287, 0.208671308341131, 16, 16, -0.0853574687600781, + "Total", 0.569367240798628, 0.150017438800136, -0.56898364245371, + -0.225847067288098, 0.22828043997596, 50, 50, 0.00121668634393097, + "Total", 0.991620637290954, 0.115850982682885, 0.0105021667987173, + -0.235334896766562, 0.155403462502882, 16, 16, -0.0399657171318401, + "Total", 0.688464120863957, 0.0996799845179652, -0.400940242167043, + -0.216150783503798, 0.294871180972271, 84, 50, 0.0393601987342366, + "Total", 0.762710971894121, 0.130365141529882, 0.301922724681848, + -0.359309994977254, 0.611178702653746, 16, 16, 0.125934353838246, + "Total", 0.610987086388224, 0.247578196662309, 0.508664961357713, + -0.394081721107595, 0.1763690513843, 16, 84, -0.108856334861648, + "Total", 0.454447666064728, 0.145525830319215, -0.74802070960783, + -0.170769347592001, 0.111708509600859, 16, 16, -0.0295304189955709, + "Total", 0.681958666882823, 0.0720620020115191, -0.409791820533247, + -0.248757379809938, 0.362844852026814, 50, 84, 0.0570437361084381, + "Total", 0.714656789743324, 0.156023844484131, 0.365609091975937, + -0.695154072191624, 0.315940646288994, 16, 16, -0.189606712951315, + "Total", 0.462285261952107, 0.257937065797128, -0.735089051142591, + -0.410966467415792, 0.190404873245315, 84, 84, -0.110280797085238, + "Total", 0.472236428025768, 0.153413875307059, -0.718844999283871, + -0.248952343559813, 0.201539059597355, 16, 16, -0.0237066419812293, + "Total", 0.836570531754914, 0.114923388059828, -0.206282136138275, + -0.405366052920192, 0.200046927801676, 16, 16, -0.102659562559258, + "Total", 0.506242306885884, 0.154444924880582, -0.664700135913404, + -0.351564619723135, 0.304897326336772, 50, 16, -0.0233336466931815, + "Total", 0.889187733829463, 0.167467859419355, -0.139332088999549, + -0.452407782553013, 0.578888799374668, 50, 16, 0.0632405084108275, + "Total", 0.810039315340698, 0.263090697089951, 0.240375312051439, + -0.546246133940246, 0.203145773362114, 50, 16, -0.171550180289066, + "Total", 0.36953394798771, 0.191174917808048, -0.897346693049518, + -0.352953200927818, 0.16850467208184, 84, 16, -0.092224264422989, + "Total", 0.488138472973522, 0.133027412014417, -0.693272634763382, + -0.365548481337251, 0.354248262699291, 50, 16, -0.00565010931897995, + "Total", 0.975453103300295, 0.183624992528997, -0.0307698273593542, + -0.819013860001159, 0.314412743243693, 16, 50, -0.252300558378733, + "Total", 0.382894629097749, 0.289144752705962, -0.872575262105147, + -0.553744012078447, 0.207794727053134, 50, 16, -0.172974642512656, + "Total", 0.373269436241156, 0.194273656337183, -0.890365918745257, + -0.391835323080072, 0.219034348262778, 50, 50, -0.0864004874086474, + "Total", 0.579285478534127, 0.155836963373131, -0.554428715360505, + -0.202979082867909, 0.191431470711384, 50, 16, -0.00577380607826209, + "Total", 0.954239209736448, 0.100616785994629, -0.0573841235454521, + -0.193953965729442, 0.341058185305072, 84, 50, 0.0735521097878146, + "Total", 0.589954665285614, 0.136485199538007, 0.538901727343208, + -0.33766478417063, 0.657917313954277, 50, 16, 0.160126264891824, + "Total", 0.528387926978894, 0.253979691968304, 0.630468773510469, + -0.355376585492128, 0.206047737875988, 16, 84, -0.0746644238080696, + "Total", 0.602147053059684, 0.143223122413616, -0.521315431124629, + -0.146821395626102, 0.156144379742116, 50, 16, 0.00466149205800707, + "Total", 0.951906510526251, 0.0772886077902385, 0.060312796300567, + -0.229034808674754, 0.411506102998786, 50, 84, 0.0912356471620161, + "Total", 0.576614844365511, 0.163406296423313, 0.558336178953992, + -0.654599253811993, 0.343769650016519, 50, 16, -0.155414801897737, + "Total", 0.541722613455947, 0.254690624854212, -0.610210140191452, + -0.375374185523772, 0.223196413460451, 84, 84, -0.0760888860316603, + "Total", 0.618278232066189, 0.152699387260601, -0.498292019350445, + -0.226064210539205, 0.247034748683903, 50, 16, 0.0104852690723487, + "Total", 0.930769145262804, 0.120690727726339, 0.0868771716757199, + -0.21228266752184, 0.164918947670749, 16, 16, -0.0236818599255455, + "Total", 0.80560099046763, 0.0962266700224872, -0.246104951153472, + -0.198662074897697, 0.309950186778759, 84, 16, 0.0556440559405311, + "Total", 0.66802906544117, 0.129750410132106, 0.428854566886355, + -0.344622379422653, 0.629058801511734, 50, 16, 0.14221821104454, + "Total", 0.566946651825043, 0.248392620633507, 0.57255409070456, + -0.370222084911525, 0.185077129600819, 84, 16, -0.092572477655353, + "Total", 0.513446282844603, 0.141660565931944, -0.653480924958511, + -0.146170661426093, 0.119677537847541, 84, 16, -0.0132465617892763, + "Total", 0.845142152966053, 0.0678196643842976, -0.195320367765538, + -0.23228758978571, 0.378942776415175, 84, 16, 0.0733275933147327, + "Total", 0.638167294339015, 0.155928979058338, 0.470262768072755, + -0.67268430068437, 0.326038589194329, 16, 50, -0.17332285574502, + "Total", 0.496325979882619, 0.254780929077396, -0.680281904821728, + -0.387561567281554, 0.199567687523667, 84, 16, -0.0939969398789437, + "Total", 0.53028954234648, 0.149780623377884, -0.62756408512066, + -0.228035296956202, 0.213189727406333, 50, 50, -0.00742278477493469, + "Total", 0.947421257491902, 0.112559472480837, -0.0659454474273448, + -0.30442940429369, 0.146990554536199, 84, 16, -0.0787194248787456, + "Total", 0.494250464225195, 0.115160268859691, -0.683564094268098, + -0.263819192312735, 0.265032174287397, 84, 50, 0.0006064909873311, + "Total", 0.996413197977664, 0.134913541976191, 0.00449540482332109, + -0.393664974763121, 0.568026266945802, 84, 16, 0.0871806460913402, + "Total", 0.722323608382845, 0.245333906463236, 0.355355064239375, + -0.459441904268871, 0.164221819051765, 16, 84, -0.147610042608553, + "Total", 0.353523359938646, 0.159100812116962, -0.927776801667353, + -0.234696943035479, 0.0981286895505264, 84, 16, -0.0682841267424764, + "Total", 0.421263288936446, 0.0849060582774204, -0.804231501589276, + -0.285641651569167, 0.322221708292233, 50, 84, 0.0182900283615327, + "Total", 0.906109738510631, 0.15507003308636, 0.117946891462561, + -0.752868551691558, 0.296147710295117, 84, 16, -0.22836042069822, + "Total", 0.393476669795378, 0.2676111066992, -0.853329383503136, + -0.468098324268819, 0.170029314604532, 84, 84, -0.149034504832144, + "Total", 0.359930295753982, 0.16279065429437, -0.915497916499856, + -0.293200089920599, 0.16827939046433, 84, 16, -0.0624603497281347, + "Total", 0.595727447358271, 0.117726520493494, -0.530554623259987, + -0.2673936410784, 0.280498772419852, 16, 16, 0.00655256567072609, + "Total", 0.962608302241811, 0.139771041156868, 0.046880710170657, + -0.244683069425298, 0.416440032498903, 16, 50, 0.0858784815368027, + "Total", 0.610618850963884, 0.168656951642749, 0.509190286557009, + -0.36346178977161, 0.708367063053234, 50, 16, 0.172452636640812, + "Total", 0.528237030851818, 0.273430752115675, 0.630699492673946, + -0.399561902571846, 0.274885798453683, 16, 50, -0.0623380520590814, + "Total", 0.717118694201463, 0.17205614652756, -0.362312264439189, + -0.226779460573665, 0.260755188187656, 84, 16, 0.0169878638069952, + "Total", 0.891356754273572, 0.12437336925753, 0.136587630522574, + -0.271598631252249, 0.478722669074258, 16, 50, 0.103562018911004, + "Total", 0.588478342330033, 0.191412012221894, 0.541042423141919, + -0.67474334491241, 0.388566484614912, 16, 50, -0.143088430148749, + "Total", 0.597846152448566, 0.27125749195255, -0.52750038024306, + -0.416747439440635, 0.289222410875291, 16, 50, -0.0637625142826722, + "Total", 0.723305830854204, 0.180097658907135, -0.354044104013315, + -0.281620993066062, 0.327244274708736, 50, 50, 0.0228116408213369, + "Total", 0.883239885892789, 0.155325626536368, 0.146863343351754, + -0.198511955663223, 0.192246936253422, 16, 50, -0.00313250970490048, + "Total", 0.974931391192158, 0.0996852225344194, -0.0314240127599543, + -0.187969341358459, 0.340356153680811, 84, 50, 0.0761934061611762, + "Total", 0.571856520146069, 0.134779388602708, 0.565319422732902, + -0.332066462918547, 0.657601585448918, 16, 50, 0.162767561265185, + "Total", 0.519122844268391, 0.25247097808272, 0.644698105506034, + -0.350573175643786, 0.206526920774371, 16, 84, -0.072023127434708, + "Total", 0.612311351414018, 0.142119983023283, -0.506776921180104, + -0.136492645885016, 0.151098222747754, 16, 50, 0.00730278843136869, + "Total", 0.920710608047896, 0.0733663656325448, 0.0995386423793252, + -0.220996924506581, 0.408750811577337, 50, 84, 0.0938769435353777, + "Total", 0.55898724408162, 0.160652884708925, 0.584346454192006, + -0.650165469746995, 0.344618458698244, 16, 50, -0.152773505524375, + "Total", 0.547173326188555, 0.253776073512566, -0.60200121867206, + -0.36793797924947, 0.221042799932873, 84, 84, -0.0734475896582987, + "Total", 0.624964717662744, 0.1502529597044, -0.488826242110611, + -0.214800794909875, 0.241053925801296, 16, 50, 0.0131265654457103, + "Total", 0.91012863162317, 0.116291606454735, 0.112876293017929, + -0.255452705394186, 0.157061227854407, 16, 16, -0.0491957387698894, + "Total", 0.640153482780925, 0.105235079956175, -0.467484215248154, + -0.224948371147782, 0.285208725340156, 50, 50, 0.0301301770961872, + "Total", 0.816916098346889, 0.130144507886878, 0.23151324312799, + -0.363116398426091, 0.596525062826483, 50, 16, 0.116704332200196, + "Total", 0.633567234729079, 0.244810993676951, 0.476711974602732, + -0.410983671718735, 0.174810958719341, 50, 50, -0.118086356499697, + "Total", 0.429415865684088, 0.149440151721855, -0.790191626139972, + -0.17943785550371, 0.101916974236469, 84, 16, -0.0387604406336202, + "Total", 0.589181033363991, 0.0717755101520921, -0.5400231994379, + -0.249411241332026, 0.345038670272803, 50, 50, 0.0478137144703888, + "Total", 0.752538662098255, 0.151648172184227, 0.315293707676892, + -0.70882369920764, 0.311150230028912, 16, 50, -0.198836734589364, + "Total", 0.444770498611914, 0.260202212204402, -0.764162352444445, + -0.420055038078677, 0.181033400632102, 50, 50, -0.119510818723288, + "Total", 0.435758357240575, 0.153341705116035, -0.77937583016214, + -0.246565391267959, 0.180692064029402, 50, 50, -0.0329366636192786, + "Total", 0.762513616719444, 0.108996251632049, -0.302181617496964, + -0.0198744560479169, 0.0329039328814558, 50, 50, 0.00651473841676941, + "Total indirect", 0.628485847582432, 0.0134641221332846, 0.483859129639382, + -0.0737509809135414, 0.0369338010967597, 84, 50, -0.0184085899083908, + "Total indirect", 0.514436908791028, 0.0282364326292137, -0.651944604692913, + -0.312135896898696, 0.149931026227078, 50, 50, -0.0811024353358089, + "Total indirect", 0.491434162874842, 0.11787638108927, -0.688029566112898, + -0.0534537856874135, 0.0850204279777879, 16, 84, 0.0157833211451872, + "Total indirect", 0.65502362559638, 0.0353257036245228, 0.446794246844966, + -0.0264404722545267, 0.0221910068503342, 50, 50, -0.00212473270209625, + "Total indirect", 0.864016549682028, 0.0124062175347251, -0.17126353750844, + -0.170325784939505, 0.0560011896289124, 50, 84, -0.0571622976552963, + "Total indirect", 0.322156011931905, 0.0577375340449252, -0.990037046106241, + -0.174676962120583, 0.230896347908933, 50, 50, 0.0281096928941753, + "Total indirect", 0.78586464041188, 0.103464480273267, 0.271684473936688, + -0.0394866990494173, 0.0763359340865148, 84, 84, 0.0184246175185488, + "Total indirect", 0.53291197902843, 0.0295471330212, 0.623567014279497, + -0.0950844113155688, 0.0398071882226885, 50, 50, -0.0276386115464402, + "Total indirect", 0.421874424414676, 0.0344117546552552, -0.803173561573076, + 16, 16, 84, 50, 50, 16, 84, 50, 84, 16, 84, 50, 16, 50, 84, + 50, 50, 50, 84, 50, 84, 50, 84, 50, 16, 84, 84, 50, 50, 84, + 84, 50, 84, 84, 84, 50, 16, 16, 16, 84, 50, 16, 16, 84, 84, + 16, 16, 84, 16, 50, 16, 84, 50, 50, 16, 84, 84, 50, 16, 84, + 16, 84, 16, 84, 50, 84, 16, 84, 84, 84, 16, 84, 16, 16, 50, + 84, 50, 16, 50, 84, 84, 16, 50, 84, 16, 50, 50, 84, 50, 50, + 50, 84, 84, 50, 50, 84, 16, 84, 50, 84, 50, 84, 50, 84, 84, + 84, 50, 84, 16, 16, 84, 84, 50, 16, 84, 84, 84, 16, 84, 84, + 16, 50, 84, 84, 50, 50, 84, 84, 84, 50, 84, 84, 16, 84, 84, + 84, 50, 84, 84, 84, 84, 84, 84, 84, 16, 16, 50, 16, 84, 16, + 16, 50, 50, 50, 84, 50, 16, 84, 50, 84, 84, 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-76") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-continuous-76") +}) + + +context('Model number 76 - factors') + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model fit table results match", { + table <- results[["results"]][["modelFitTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(962.391580919187, 1040.54668649883, 1016.84298217217, 19, 1, 100, + 1.34570377514122e-203, 0, 1016.84298217217, 19)) +}) + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 76)) +}) + +test_that("Residual covariances table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.00962232295738279, 0.0896223519552958, 0.0400000144989565, + "facExperimexperimental", "", 0.114128583678441, "facGenderm", + 0.0253179843342806, 1.57990517613191, -0.163250815381641, 0.034199105861257, + -0.0645258547601918, "contcor2", "", 0.200187700259975, + "facGenderm", 0.0503708034434197, -1.28101698502133, -0.170527298516099, + 0.027297841258114, -0.0716147286289927, "contcor2", "", + 0.155883241204841, "facExperimexperimental", 0.0504665242154021, + -1.41905411046985, 0.755490004031878, 1.33490768674174, 1.04519884538681, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.147813349449337, 7.07107206000399, 0.00473838233935267, 0.00837245563588892, + 0.00655541898762079, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000927076549671667, 7.07106547991367, 0.0796446817890198, + 0.140727642710586, 0.110186162249803, "debCollin1:facExperimexperimental", + "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", + 0.015582674325493, 7.07106880040098, 0.318532879421849, 0.562829634113458, + 0.440681256767654, "debCollin1:contcor2", "", 1.53743684450092e-12, + "debCollin1:contcor2", 0.0623217458633399, 7.07106726011794, + 0.180704806647194, 0.319295183773222, 0.249999995210208, "facGenderm", + "", 1.53743684450092e-12, "facGenderm", 0.0353553377049813, + 7.07106794725892, 0.180704838327822, 0.319295294272416, 0.250000066300119, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553578121275, 7.071065936557, + 0.721541834514344, 1.27492369276447, 0.998232763639408, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171435448593, + 7.07106760278646)) +}) + +test_that("Mediation effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.175783557975042, 1.32274320242523, 16, 0.573479822225095, 0, + "facGenderm", "contNormal", "", "", "", 0.13357820009285, + 0.382284259358963, 1.50013977344173, -0.362715902898252, 1.00606593689098, + 16, 0.321675016996366, 1, "facGenderm", "contNormal", "", "", + "", 0.356937984934968, 0.349185457127277, 0.921215389789605, + 0.0235479093555091, 1.1842249829942, 50, 0.603886446174857, + 0, "facGenderm", "contNormal", "", "", "", 0.0414009690975183, + 0.296096531057195, 2.0394917968769, -0.236088002664377, 0.940251284556632, + 50, 0.352081640946128, 1, "facGenderm", "contNormal", "", "", + "", 0.240697405887376, 0.300092067124657, 1.17324541204841, + -0.0534553335301411, 1.33251068672245, 84, 0.639527676596154, + 0, "facGenderm", "contNormal", "", "", "", 0.0704857707952362, + 0.35356925718659, 1.80877625414886, -0.392737227823313, 1.16818297055816, + 84, 0.387722871367425, 1, "facGenderm", "contNormal", "", "", + "", 0.330212603226929, 0.398201245199865, 0.973685733134308, + -0.056939847375967, 0.0465257505989674, 16, -0.0052070483884998, + 0, "facGenderm", "debCollin1", "contNormal", "", "", + 0.843611746252072, 0.0263947702077839, -0.197275761353824, -0.0557469268902914, + 0.0658037000344646, 16, 0.00502838657208661, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.871178151119894, + 0.0310083827773193, 0.162162167830454, -0.0219083823829012, + 0.0200650660097901, 50, -0.000921658186555548, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.931407381551486, + 0.0107077091017418, -0.0860742646067611, -0.0604760657213163, + 0.0606510968867787, 50, 8.75155827312151e-05, 1, "facGenderm", + "debCollin1", "contNormal", "", "", 0.99774024470621, + 0.0309003541808754, 0.00283218704287149, -0.0157889926262747, + 0.016381380236074, 84, 0.00029619380489967, 0, "facGenderm", + "debCollin1", "contNormal", "", "", 0.971209861740046, + 0.008206878574327, 0.0360909208314878, -0.105824869986258, 0.0868064166006128, + 84, -0.00950922669282238, 1, "facGenderm", "debCollin1", "contNormal", + "", "", 0.84656200045859, 0.0491415373206655, + -0.193506902943866)) +}) + +test_that("Path coefficients table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.0207105464066859, 1.1851559545484, 0.602933250477543, "facGenderm", + "", 0.0423887840011337, "contNormal", 0.297057858544012, + 2.02968288209151, -3.64056061909547, 3.29140653803259, -0.174577040531442, + "debCollin1", "", 0.921359944290985, "contNormal", + 1.76839146326324, -0.0987208116291701, -3.31782283283368, 3.38686704867436, + 0.0345221079203419, "facExperimexperimental", "", 0.98389698218789, + "contNormal", 1.71041150102598, 0.0201835101667838, -1.83177687483595, + 1.39297496148719, -0.219400956674383, "contcor2", "", + 0.789701435746062, "contNormal", 0.822655891067277, -0.266698335302434, + -4.80320674733298, 5.11827560140219, 0.157534427034606, "debCollin1:facExperimexperimental", + "", 0.950370862420789, "contNormal", 2.53103690348255, + 0.0622410628694699, -1.0843556577792, 0.580746047321746, -0.251804805228729, + "facGenderm:facExperimexperimental", "", 0.553321275254115, + "contNormal", 0.424778648545346, -0.592790635996029, -1.98257087223446, + 2.77839590770898, 0.397912517737259, "debCollin1:contcor2", + "", 0.7431989232073, "contNormal", 1.21455465954919, + 0.327620098946352, -0.387148615489749, 0.450907525009065, 0.0318794547596579, + "facGenderm:contcor2", "", 0.881464372892992, "contNormal", + 0.213793760270417, 0.14911312060434, -0.0402674909048508, 0.0518453571817994, + 0.00578893313847428, "facGenderm", "", 0.805409620549727, + "debCollin1", 0.0234986073247327, 0.246352179874989, -0.0489096647641541, + 0.0420350461249491, -0.00343730931960246, "facExperimexperimental", + "", 0.882219652359995, "debCollin1", 0.0232006076658713, + -0.148156003890313, -0.0174100576696947, 0.025880669376847, + 0.00423530585357613, "contcor2", "", 0.701347356969249, + "debCollin1", 0.0110437557495988, 0.383502311134505, -0.0882812988034641, + 0.0429308570602735, -0.0226752208715953, "facGenderm:facExperimexperimental", + "", 0.498141959021416, "debCollin1", 0.033473103816887, + -0.677416142692922, -0.0370220773112999, 0.0287647455572917, + -0.00412866587700411, "facGenderm:contcor2", "", 0.805676179396961, + "debCollin1", 0.016782661157937, -0.246007819507906)) +}) + +test_that("Total effects table results match", { + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.184490815183823, 1.32103636285701, 16, 0.568272773836595, 0, + "Total", 0.13897819475985, 0.384070113001117, 1.47960685978954, + -0.370826626049448, 1.00376256326518, 16, 0.316467968607866, + 0, "Total", 0.366804880660837, 0.350666951065737, 0.90247446372139, + 0.0161242899903569, 1.18123450558236, 16, 0.598679397786357, + 1, "Total", 0.0439871778100125, 0.297227455397712, 2.0142129770121, + -0.242401816720302, 0.936151001835558, 16, 0.346874592557628, + 0, "Total", 0.248613777828561, 0.30065675386184, 1.15372293521477, + -0.0582557104144749, 1.32689696682978, 50, 0.634320628207654, + 0, "Total", 0.0726373546611188, 0.353361767912616, 1.79510259968055, + -0.396765910086431, 1.16179755604428, 16, 0.382515822978925, + 0, "Total", 0.336018529283377, 0.397600026945511, 0.962061863822125, + -0.171604918214283, 1.32862133580865, 50, 0.578508208797182, + 1, "Total", 0.130640996111296, 0.382717811617081, 1.5115790047838, + -0.356853716672174, 1.01026052380908, 16, 0.326703403568453, + 0, "Total", 0.348883578163064, 0.348760041323431, 0.93675698147276, + 0.0263287613504195, 1.19150090414347, 84, 0.608914832746943, + 0, "Total", 0.0405070713261726, 0.297243253443374, 2.04854046540351, + -0.231228784667414, 0.945448839703843, 16, 0.357110027518214, + 0, "Total", 0.234180292848889, 0.300178379208174, 1.18965939006073, + -0.0514392020495615, 1.34055132838604, 84, 0.644556063168241, + 1, "Total", 0.0695072928373541, 0.355106150269966, 1.81510813788559, + -0.388841499385036, 1.17434401526406, 16, 0.392751257939512, + 0, "Total", 0.324680978476042, 0.39877914262183, 0.984884152559517, + -0.176824081894278, 1.32194040997136, 16, 0.57255816403854, + 0, "Total", 0.134265472208394, 0.382344906255344, 1.49749128253369, + -0.364183700011163, 1.00569041763078, 16, 0.32075335880981, + 1, "Total", 0.358700801876879, 0.349464104556854, 0.917843505605674, + 0.0227612094412968, 1.18316836653531, 16, 0.602964787988301, + 1, "Total", 0.0416647979125668, 0.296027673530522, 2.03685277392194, + -0.237360714079359, 0.939680679598503, 16, 0.351159982759572, + 1, "Total", 0.242211844682295, 0.300271179205897, 1.16947615048589, + -0.0539807521000302, 1.33119278891923, 50, 0.638606018409599, + 0, "Total", 0.070730654296763, 0.353367090402, 1.80720286567463, + -0.393672139658174, 1.16727456601991, 16, 0.38680121318087, + 1, "Total", 0.331371686370463, 0.398208007389584, 0.97135468399169, + -0.179608859039737, 1.32674353465539, 50, 0.573567337807826, + 1, "Total", 0.135548693061676, 0.384280631066959, 1.49257415398562, + -0.36172832472326, 1.00525338988145, 16, 0.321762532579097, + 1, "Total", 0.356174272704546, 0.348726233080631, 0.922679460437094, + 0.0203016342892126, 1.18764628922596, 84, 0.603973961757588, + 0, "Total", 0.0425463078786221, 0.297797475908899, 2.02813660496691, + -0.233248769736235, 0.937587082793953, 16, 0.352169156528859, + 1, "Total", 0.238377003398363, 0.298688103905376, 1.17905317260451, + -0.0544768920177313, 1.3337072763755, 84, 0.639615192178886, + 1, "Total", 0.0708975397587366, 0.354135121701994, 1.80613317624317, + -0.38907209170566, 1.16469286560597, 16, 0.387810386950156, + 1, "Total", 0.327881253905238, 0.396375895059178, 0.978390441457741, + -0.175368900788414, 1.3229209328484, 16, 0.573776016029995, + 0, "Total", 0.133316273679266, 0.382223817747453, 1.50115191515644, + -0.362576794823303, 1.00651921642583, 50, 0.321971210801266, + 0, "Total", 0.356605757132017, 0.349265604380589, 0.921852042580234, + 0.0238173158653371, 1.18454796409418, 16, 0.604182639979756, + 1, "Total", 0.0413107064642055, 0.296110198295615, 2.04039794460772, + -0.236151832356901, 0.940907501858956, 50, 0.352377834751027, + 0, "Total", 0.240589704254789, 0.300275755957852, 1.17351410415061, + -0.0533579629255193, 1.33300570372763, 50, 0.639823870401054, + 0, "Total", 0.0704362561221294, 0.35367069945892, 1.80909493316783, + -0.392868964857303, 1.16890709520195, 50, 0.388019065172325, + 0, "Total", 0.330108393594362, 0.3984195812725, 0.973895569924157, + -0.198570975590753, 1.3265121666553, 50, 0.563970595532273, + 1, "Total", 0.147176757897315, 0.389058971051436, 1.44957612468911, + -0.375956741458608, 1.00028832206569, 50, 0.312165790303544, + 0, "Total", 0.373930625304007, 0.351089375718112, 0.889134824046, + 0.0038259033451481, 1.18492853561892, 84, 0.594377219482034, + 0, "Total", 0.0485341221329121, 0.301307228497605, 1.97266166645172, + -0.243046251809354, 0.928191080315964, 50, 0.342572414253305, + 0, "Total", 0.251575762747406, 0.298790524051434, 1.1465303839232, + -0.0647263233734163, 1.32476322318008, 84, 0.630018449903332, + 1, "Total", 0.0755085776372038, 0.354468132453865, 1.77736273650871, + -0.394191991505759, 1.15061928085496, 50, 0.378213644674603, + 0, "Total", 0.337201378681206, 0.394091749783669, 0.959709623158104, + -0.056939847375967, 0.0465257505989674, 16, -0.0052070483884998, + 0, "Total indirect", 0.843611746252072, 0.0263947702077839, + -0.197275761353824, -0.0557469268902914, 0.0658037000344646, + 50, 0.00502838657208661, 1, "Total indirect", 0.871178151119894, + 0.0310083827773193, 0.162162167830454, -0.0219083823829012, + 0.0200650660097901, 16, -0.000921658186555548, 1, "Total indirect", + 0.931407381551486, 0.0107077091017418, -0.0860742646067611, + -0.0604760657213163, 0.0606510968867787, 50, 8.75155827312151e-05, + 1, "Total indirect", 0.99774024470621, 0.0309003541808754, 0.00283218704287149, + -0.0157889926262747, 0.016381380236074, 50, 0.00029619380489967, + 0, "Total indirect", 0.971209861740046, 0.008206878574327, 0.0360909208314878, + -0.105824869986258, 0.0868064166006128, 50, -0.00950922669282238, + 1, "Total indirect", 0.84656200045859, 0.0491415373206655, -0.193506902943866, + 50, 1, 50, 1, 84, 0, 50, 1, 84, 1, 50, 1, 16, 0, 84, 0, 16, + 1, 84, 0, 50, 0, 84, 0, 50, 1, 84, 0, 84, 0, 84, 0, 84, 1, 84, + 0, 16, 0, 84, 1, 16, 1, 84, 1, 50, 0, 84, 1, 50, 1, 84, 1, 84, + 0, 84, 1, 84, 1, 84, 1, 16, 0, 16, 1, 50, 0, 50, 1, 84, 0, 84, + 1)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-76") +}) + +test_that("Statistical path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_statPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "statistical-path-plot-factor-76") +}) + + +context('Model number 82 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded3"), + list(processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded4"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded3", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded4")), + residualCovariances = TRUE, statisticalPathPlot = TRUE, totalEffects = TRUE, + localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, + localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 82)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-82") +}) + + +context('Model number 82 - factors') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "facGender", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "facGender", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded3"), + list(processDependent = "contNormal", processIndependent = "facGender", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded4"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded3", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded4")), + residualCovariances = TRUE, statisticalPathPlot = TRUE, totalEffects = TRUE, + localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, + localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 82)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-factor-82") +}) + + +context('Model number 83 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "JaspProcess_Mediator_Encoded1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 83)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-83") +}) + + +context('Model number 84 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "JaspProcess_Mediator_Encoded1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "JaspProcess_Mediator_Encoded2", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 84)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-84") +}) + + +context('Model number 85 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "JaspProcess_Mediator_Encoded1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "JaspProcess_Mediator_Encoded2", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 85)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-85") +}) + + +context('Model number 86 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "JaspProcess_Mediator_Encoded1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 86)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-86") +}) + + +context('Model number 87 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded2", + processType = "moderators", processVariable = "contcor1")), + residualCovariances = TRUE, statisticalPathPlot = TRUE, totalEffects = TRUE, + localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, + localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 87)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-87") +}) + + +context('Model number 88 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "moderators", processVariable = "contcor1"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded2", + processType = "moderators", processVariable = "contcor1")), + residualCovariances = TRUE, statisticalPathPlot = TRUE, totalEffects = TRUE, + localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, + localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 88)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-88") +}) + + +context('Model number 89 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "moderators", processVariable = "contcor1"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded2", + processType = "moderators", processVariable = "contcor1"), + list(processDependent = "contNormal", processIndependent = "contGamma", + processType = "moderators", processVariable = "contcor1")), + residualCovariances = TRUE, statisticalPathPlot = TRUE, totalEffects = TRUE, + localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, + localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 89)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-89") +}) + + +context('Model number 90 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded2", + processType = "moderators", processVariable = "contcor1"), + list(processDependent = "contNormal", processIndependent = "contGamma", + processType = "moderators", processVariable = "contcor1")), + residualCovariances = TRUE, statisticalPathPlot = TRUE, totalEffects = TRUE, + localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, + localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 90)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-90") +}) + + +context('Model number 91 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "JaspProcess_Mediator_Encoded2", + processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "moderators", processVariable = "contcor1")), + residualCovariances = TRUE, statisticalPathPlot = TRUE, totalEffects = TRUE, + localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, + localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 91)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-91") +}) + + +context('Model number 92 - continuous') + + + + +options <- jaspTools::analysisOptions("ClassicProcess") +options$dependent <- "contNormal" +options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") +options$factors <- list("facGender", "facExperim") +options$pathPlotsLegend <- TRUE +options$errorCalculationMethod <- "standard" +options$naAction <- "fiml" +options$emulation <- "lavaan" +options$estimator <- "default" +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, + value = "50"), list(probePercentile = 84, value = "84")) +options$pathPlotsColorPalette <- "colorblind" +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "JaspProcess_Mediator_Encoded1"), list( + processDependent = "contNormal", processIndependent = "contGamma", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "mediators", processVariable = "JaspProcess_Mediator_Encoded2"), + list(processDependent = "JaspProcess_Mediator_Encoded1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "JaspProcess_Mediator_Encoded2", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "JaspProcess_Mediator_Encoded2", + processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "moderators", processVariable = "contcor1"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded1", + processType = "moderators", processVariable = "contcor1"), + list(processDependent = "contNormal", processIndependent = "JaspProcess_Mediator_Encoded2", + processType = "moderators", processVariable = "contcor1")), + residualCovariances = TRUE, statisticalPathPlot = TRUE, totalEffects = TRUE, + localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, + localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + + +test_that("Model numbers table results match", { + table <- results[["results"]][["modelNumberTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list("Model 1", 92)) +}) + +test_that("Conceptual path plot matches", { + plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] + testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] + jaspTools::expect_equal_plots(testPlot, "conceptual-path-plot-continuous-92") +})