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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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 @@
+
+
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",
+ "