diff --git a/R/classicProcess.R b/R/classicProcess.R index daf6d42..18a922d 100644 --- a/R/classicProcess.R +++ b/R/classicProcess.R @@ -751,8 +751,9 @@ ClassicProcess <- function(jaspResults, dataset = NULL, options) { # Add vertices and edges for first dependent var depVars <- igraph::V(graph)[isDep]$name resCovGraph <- .procCombVars(resCovGraph, depVars[1]) - - return(resCovGraph) + + # Remove edges that are in graph from resCovGraph + return(igraph::difference(resCovGraph, igraph::as.undirected(graph))) } .procModelSyntax <- function(jaspResults, options) { diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-m-y.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-m-y.svg index 067b587..ca64d54 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-m-y.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-m-y.svg @@ -65,15 +65,15 @@ - - - - - - + + + + + + statistical-path-plot-continuous-confounder_M_Y diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-moderator.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-moderator.svg index 4ad7e30..5482b19 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-moderator.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-moderator.svg @@ -64,18 +64,18 @@ - - - - - - + + + + + + statistical-path-plot-continuous-confounder_moderator diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-x-m.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-x-m.svg index 03a502d..6c9b4bb 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-x-m.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-x-m.svg @@ -59,21 +59,18 @@ cnN dC1 cn2 - - - - - - - - - + + + + + + statistical-path-plot-continuous-confounder_X_M diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-x-y.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-x-y.svg index 86eaabb..5d2e523 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-x-y.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-confounder-x-y.svg @@ -59,21 +59,18 @@ cnN dC1 cn2 - - - - - - - - - + + + + + + statistical-path-plot-continuous-confounder_X_Y diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-one-confounder.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-one-confounder.svg index ac92f3e..98ec2d5 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-one-confounder.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-one-confounder.svg @@ -51,15 +51,15 @@ cnG cnN cn1 - - - + + + statistical-path-plot-continuous-one_confounder diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-two-confounder.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-two-confounder.svg index 6a4b757..0e88c14 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-two-confounder.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-continuous-two-confounder.svg @@ -62,18 +62,18 @@ - - - - - - + + + + + + statistical-path-plot-continuous-two_confounder diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-m-y.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-m-y.svg index 5d18359..c95aff1 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-m-y.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-m-y.svg @@ -65,15 +65,15 @@ - - - - - - + + + + + + statistical-path-plot-factor-confounder_M_Y diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-moderator.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-moderator.svg index d4da998..419e381 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-moderator.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-moderator.svg @@ -64,18 +64,18 @@ - - - - - - + + + + + + statistical-path-plot-factor-confounder_moderator diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-x-m.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-x-m.svg index d42a994..96b21a9 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-x-m.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-x-m.svg @@ -59,21 +59,18 @@ cnN dC1 fcG - - - - - - - - - + + + + + + statistical-path-plot-factor-confounder_X_M diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-x-y.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-x-y.svg index 00b6a86..0529b50 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-x-y.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-confounder-x-y.svg @@ -59,21 +59,18 @@ cnN dC1 fcG - - - - - - - - - + + + + + + statistical-path-plot-factor-confounder_X_Y diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-one-confounder.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-one-confounder.svg index 4a30706..66521bf 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-one-confounder.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-one-confounder.svg @@ -51,15 +51,15 @@ cnG cnN fcE - - - + + + statistical-path-plot-factor-one_confounder diff --git a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-two-confounder.svg b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-two-confounder.svg index 8e7ba6d..748f642 100644 --- a/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-two-confounder.svg +++ b/tests/testthat/_snaps/classic-process-integration-custom-models/statistical-path-plot-factor-two-confounder.svg @@ -62,18 +62,18 @@ - - - - - - + + + + + + statistical-path-plot-factor-two_confounder diff --git a/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-error-hayes.svg b/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-error-hayes.svg index 0e66c25..635c34e 100644 --- a/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-error-hayes.svg +++ b/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-error-hayes.svg @@ -67,15 +67,15 @@ - - - - - - + + + + + + statistical-path-plot-error-hayes diff --git a/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-facthree-int-factwo.svg b/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-facthree-int-factwo.svg index aacfcd9..62040c3 100644 --- a/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-facthree-int-factwo.svg +++ b/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-facthree-int-factwo.svg @@ -63,12 +63,12 @@ fTE fTB: fTC: - - - + + + @@ -78,12 +78,12 @@ - - - + + + statistical-path-plot-facThree-int-facTwo diff --git a/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-facthree.svg b/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-facthree.svg index c433fba..5ed98ab 100644 --- a/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-facthree.svg +++ b/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-facthree.svg @@ -63,12 +63,12 @@ cn1 fTB: fTC: - - - + + + @@ -78,12 +78,12 @@ - - - + + + statistical-path-plot-facThree diff --git a/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-factwo-int-facthree.svg b/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-factwo-int-facthree.svg index 42c6909..517f012 100644 --- a/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-factwo-int-facthree.svg +++ b/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-factwo-int-facthree.svg @@ -63,27 +63,27 @@ fTC fTE:TB fTE:TC - - - + + + + + + - - - statistical-path-plot-facTwo-int-facThree diff --git a/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-missing.svg b/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-missing.svg index 4d2b802..73d375e 100644 --- a/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-missing.svg +++ b/tests/testthat/_snaps/classic-process-integration-general/statistical-path-plot-missing.svg @@ -67,15 +67,15 @@ - - - - - - + + + + + + statistical-path-plot-missing diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-1.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-1.svg index 923281e..789116a 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-1.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-1.svg @@ -59,12 +59,12 @@ - - - + + + statistical-path-plot-continuous-1 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-10.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-10.svg index 1a65038..7957762 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-10.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-10.svg @@ -83,30 +83,30 @@ cG:1 cn2 cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-10 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-11.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-11.svg index edaf3ec..4add19e 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-11.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-11.svg @@ -81,30 +81,30 @@ cG:2 cG:1: c1: - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-11 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-12.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-12.svg index 3fad8ad..f992aae 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-12.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-12.svg @@ -99,30 +99,30 @@ cG:2 cG:1: c1: - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-12 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-13.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-13.svg index e854824..08fb757 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-13.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-13.svg @@ -87,30 +87,30 @@ cG:2 cG:1: c1: - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-13 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-14.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-14.svg index 8fc3dba..1dca677 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-14.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-14.svg @@ -67,15 +67,15 @@ - - - - - - + + + + + + statistical-path-plot-continuous-14 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-15.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-15.svg index a21584f..a58d744 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-15.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-15.svg @@ -72,15 +72,15 @@ - - - - - - + + + + + + statistical-path-plot-continuous-15 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-16.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-16.svg index 6669ddc..679ac85 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-16.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-16.svg @@ -71,30 +71,30 @@ dC1:1 cn2 dC1:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-16 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-17.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-17.svg index 1794971..8a80ff7 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-17.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-17.svg @@ -81,30 +81,30 @@ cn2 dC1:2 cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-17 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-18.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-18.svg index 97d20c6..16af09b 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-18.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-18.svg @@ -81,30 +81,30 @@ dC1:2 dC1:1: c1: - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-18 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-2.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-2.svg index b67374b..b29a5f8 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-2.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-2.svg @@ -63,27 +63,27 @@ cG:1 cn2 cG:2 - - - + + + + + + - - - statistical-path-plot-continuous-2 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-21.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-21.svg index 200f32e..66c1cbb 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-21.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-21.svg @@ -71,30 +71,30 @@ cG: cn2 dC1: - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-21 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-22.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-22.svg index 9c91a55..22dcf9d 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-22.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-22.svg @@ -77,30 +77,30 @@ cG: cn2 dC1: - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-22 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-28.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-28.svg index 071ad56..0067459 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-28.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-28.svg @@ -76,30 +76,30 @@ cn2 dC1: cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-28 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-29.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-29.svg index a3624c2..6f2613c 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-29.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-29.svg @@ -82,30 +82,30 @@ cn2 dC1: cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-29 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-3.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-3.svg index 3b9969e..05fc402 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-3.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-3.svg @@ -73,27 +73,27 @@ cG:2 cG:1: c1: - - - + + + + + + - - - statistical-path-plot-continuous-3 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-4.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-4.svg index 4c8beef..72e778b 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-4.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-4.svg @@ -54,12 +54,12 @@ - - - + + + statistical-path-plot-continuous-4 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-5.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-5.svg index 111bdee..c03c0bf 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-5.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-5.svg @@ -67,15 +67,15 @@ - - - - - - + + + + + + statistical-path-plot-continuous-5 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-58.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-58.svg index 8e3e6a7..78f2ab6 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-58.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-58.svg @@ -75,15 +75,15 @@ - - - - - - + + + + + + statistical-path-plot-continuous-58 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-59.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-59.svg index abce8cb..5b092de 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-59.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-59.svg @@ -78,15 +78,15 @@ - - - - - - + + + + + + statistical-path-plot-continuous-59 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-60.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-60.svg index dc644b8..bd0424e 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-60.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-60.svg @@ -79,30 +79,30 @@ dC1: cn2 cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-60 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-61.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-61.svg index 8f6e603..80fb91e 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-61.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-61.svg @@ -82,30 +82,30 @@ dC1: cn2 cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-61 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-62.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-62.svg index 10fa100..66a9a70 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-62.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-62.svg @@ -85,30 +85,30 @@ dC1: cn2 cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-62 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-63.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-63.svg index db33cdc..2539d5f 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-63.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-63.svg @@ -88,30 +88,30 @@ dC1: cn2 cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-63 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-64.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-64.svg index feea961..66b3d98 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-64.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-64.svg @@ -79,30 +79,30 @@ dC1:1 cn2 dC1:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-64 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-65.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-65.svg index 3af846e..c1cbb54 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-65.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-65.svg @@ -82,30 +82,30 @@ dC1:1 cn2 dC1:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-65 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-66.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-66.svg index 4edb126..752a40b 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-66.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-66.svg @@ -84,30 +84,30 @@ cn2 dC1:2 cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-66 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-67.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-67.svg index 9365377..a21d50b 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-67.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-67.svg @@ -87,30 +87,30 @@ cn2 dC1:2 cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-67 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-68.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-68.svg index 30bcc83..901d07a 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-68.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-68.svg @@ -89,30 +89,30 @@ cG:2 cG:1: c1: - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-68 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-7.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-7.svg index 3f08882..033ec75 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-7.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-7.svg @@ -67,15 +67,15 @@ - - - - - - + + + + + + statistical-path-plot-continuous-7 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-70.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-70.svg index 7d6368c..8e7813c 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-70.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-70.svg @@ -89,30 +89,30 @@ dC1:2 dC1:1: c1: - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-70 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-72.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-72.svg index 8f65937..bf5ee4c 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-72.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-72.svg @@ -105,30 +105,30 @@ c1: cG:2 cG:1: - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-72 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-75.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-75.svg index d7db69e..0e8b541 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-75.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-75.svg @@ -87,30 +87,30 @@ cn2 cG:2 dC1:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-75 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-76.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-76.svg index 87c4375..59c6d92 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-76.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-76.svg @@ -93,30 +93,30 @@ cn2 cG:2 dC1:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-76 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-8.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-8.svg index 1812e4b..762abf4 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-8.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-8.svg @@ -73,15 +73,15 @@ - - - - - - + + + + + + statistical-path-plot-continuous-8 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-82.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-82.svg index 342ca30..7545e12 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-82.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-82.svg @@ -87,18 +87,15 @@ - - - - - - + + + @@ -111,9 +108,6 @@ - - - statistical-path-plot-continuous-82 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-83.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-83.svg index f7c979e..2448e68 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-83.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-83.svg @@ -75,24 +75,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-continuous-83 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-84.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-84.svg index caa6dae..c6a3967 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-84.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-84.svg @@ -81,24 +81,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-continuous-84 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-85.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-85.svg index 06683d5..8a80910 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-85.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-85.svg @@ -87,24 +87,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-continuous-85 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-86.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-86.svg index 5e0f322..b7ba15f 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-86.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-86.svg @@ -81,24 +81,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-continuous-86 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-87.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-87.svg index 9938df9..ef025d2 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-87.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-87.svg @@ -75,24 +75,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-continuous-87 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-88.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-88.svg index aac649e..d6ea202 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-88.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-88.svg @@ -80,24 +80,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-continuous-88 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-89.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-89.svg index 3912e0e..66131d3 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-89.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-89.svg @@ -85,24 +85,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-continuous-89 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-9.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-9.svg index baa1cd1..ba6f816 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-9.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-9.svg @@ -71,30 +71,30 @@ cG:1 cn2 cG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-continuous-9 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-90.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-90.svg index ac33da2..5e77f3f 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-90.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-90.svg @@ -80,24 +80,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-continuous-90 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-91.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-91.svg index 1f2d714..5fe0e50 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-91.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-91.svg @@ -75,24 +75,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-continuous-91 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-92.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-92.svg index d1feb8f..7938b2e 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-92.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-continuous-92.svg @@ -100,24 +100,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-continuous-92 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-1.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-1.svg index abbab04..b01eab5 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-1.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-1.svg @@ -59,12 +59,12 @@ - - - + + + statistical-path-plot-factor-1 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-10.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-10.svg index 91f26c1..82b835e 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-10.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-10.svg @@ -83,30 +83,30 @@ fG:E cn2 fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-10 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-11.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-11.svg index ac32305..b057745 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-11.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-11.svg @@ -81,30 +81,30 @@ fG:2 fG:E: fE: - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-11 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-12.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-12.svg index 3ebcccc..2924a89 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-12.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-12.svg @@ -99,30 +99,30 @@ fG:2 fG:E: fE: - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-12 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-13.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-13.svg index 322af78..da3c34b 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-13.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-13.svg @@ -87,30 +87,30 @@ fG:2 fG:E: fE: - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-13 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-14.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-14.svg index 94b8506..c9acf31 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-14.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-14.svg @@ -67,15 +67,15 @@ - - - - - - + + + + + + statistical-path-plot-factor-14 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-15.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-15.svg index cb63970..ab59a4c 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-15.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-15.svg @@ -72,15 +72,15 @@ - - - - - - + + + + + + statistical-path-plot-factor-15 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-16.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-16.svg index 6f8e7f1..9b7724c 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-16.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-16.svg @@ -71,30 +71,30 @@ dC1:E cn2 dC1:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-16 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-17.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-17.svg index e4271b4..8487cbd 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-17.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-17.svg @@ -81,30 +81,30 @@ cn2 dC1:2 fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-17 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-18.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-18.svg index 0571a72..12436dc 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-18.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-18.svg @@ -81,30 +81,30 @@ dC1:2 dC1:E: fE: - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-18 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-2.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-2.svg index 09ed35a..4b9cc4c 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-2.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-2.svg @@ -63,27 +63,27 @@ fG:E cn2 fG:2 - - - + + + + + + - - - statistical-path-plot-factor-2 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-21.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-21.svg index e8ad4b0..0c39138 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-21.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-21.svg @@ -71,30 +71,30 @@ fG: cn2 dC1: - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-21 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-22.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-22.svg index 1389aa1..220624f 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-22.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-22.svg @@ -77,30 +77,30 @@ fG: cn2 dC1: - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-22 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-28.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-28.svg index da727e5..ab8bd53 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-28.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-28.svg @@ -76,30 +76,30 @@ cn2 dC1: fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-28 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-29.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-29.svg index 20e5c2d..dd04594 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-29.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-29.svg @@ -82,30 +82,30 @@ cn2 dC1: fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-29 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-3.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-3.svg index 7721ce5..6e304db 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-3.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-3.svg @@ -73,27 +73,27 @@ fG:2 fG:E: fE: - - - + + + + + + - - - statistical-path-plot-factor-3 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-4.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-4.svg index 20a6fe2..fd1a0be 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-4.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-4.svg @@ -54,12 +54,12 @@ - - - + + + statistical-path-plot-factor-4 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-5.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-5.svg index 3c33e74..e6d76db 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-5.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-5.svg @@ -67,15 +67,15 @@ - - - - - - + + + + + + statistical-path-plot-factor-5 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-58.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-58.svg index 9aae4ce..87d4c65 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-58.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-58.svg @@ -75,15 +75,15 @@ - - - - - - + + + + + + statistical-path-plot-factor-58 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-59.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-59.svg index 696532e..e8b4c6e 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-59.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-59.svg @@ -78,15 +78,15 @@ - - - - - - + + + + + + statistical-path-plot-factor-59 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-60.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-60.svg index b2288b6..7589bdb 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-60.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-60.svg @@ -79,30 +79,30 @@ dC1: cn2 fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-60 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-61.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-61.svg index ae059c6..e222a40 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-61.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-61.svg @@ -82,30 +82,30 @@ dC1: cn2 fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-61 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-62.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-62.svg index 86b09b9..8e6be99 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-62.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-62.svg @@ -85,30 +85,30 @@ dC1: cn2 fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-62 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-63.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-63.svg index e1657c0..51ed689 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-63.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-63.svg @@ -88,30 +88,30 @@ dC1: cn2 fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-63 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-64.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-64.svg index d07b450..0f5a21e 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-64.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-64.svg @@ -79,30 +79,30 @@ dC1:E cn2 dC1:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-64 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-65.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-65.svg index c662ee6..6946374 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-65.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-65.svg @@ -82,30 +82,30 @@ dC1:E cn2 dC1:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-65 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-66.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-66.svg index e1fa3ba..ee650a5 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-66.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-66.svg @@ -84,30 +84,30 @@ cn2 dC1:2 fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-66 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-67.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-67.svg index d42ce69..b3d37ac 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-67.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-67.svg @@ -87,30 +87,30 @@ cn2 dC1:2 fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-67 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-68.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-68.svg index e13f186..91c65ef 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-68.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-68.svg @@ -89,30 +89,30 @@ fG:2 fG:E: fE: - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-68 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-7.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-7.svg index 0b96126..d6e4be8 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-7.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-7.svg @@ -67,15 +67,15 @@ - - - - - - + + + + + + statistical-path-plot-factor-7 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-70.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-70.svg index bf24845..6e452aa 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-70.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-70.svg @@ -89,30 +89,30 @@ dC1:2 dC1:E: fE: - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-70 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-72.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-72.svg index 5daf389..ca16354 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-72.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-72.svg @@ -105,30 +105,30 @@ fE: fG:2 fG:E: - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-72 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-75.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-75.svg index ce9bdfc..a1e6ff8 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-75.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-75.svg @@ -87,30 +87,30 @@ cn2 fG:2 dC1:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-75 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-76.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-76.svg index 583bdaf..6a2ad68 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-76.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-76.svg @@ -93,30 +93,30 @@ cn2 fG:2 dC1:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-76 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-8.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-8.svg index e2f1396..ad6db3d 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-8.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-8.svg @@ -73,15 +73,15 @@ - - - - - - + + + + + + statistical-path-plot-factor-8 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-82.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-82.svg index a8cbc3f..3d2daeb 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-82.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-82.svg @@ -87,18 +87,15 @@ - - - - - - + + + @@ -111,9 +108,6 @@ - - - statistical-path-plot-factor-82 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-83.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-83.svg index a7d8a9f..6db3ffa 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-83.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-83.svg @@ -75,24 +75,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-factor-83 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-84.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-84.svg index 032bf69..448e523 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-84.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-84.svg @@ -81,24 +81,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-factor-84 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-85.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-85.svg index 43d2369..60d5730 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-85.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-85.svg @@ -87,24 +87,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-factor-85 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-86.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-86.svg index 5ccbc86..ca21f80 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-86.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-86.svg @@ -81,24 +81,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-factor-86 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-87.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-87.svg index d97851c..00e3015 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-87.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-87.svg @@ -75,24 +75,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-factor-87 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-88.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-88.svg index 9cb7711..3a64075 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-88.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-88.svg @@ -80,24 +80,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-factor-88 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-89.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-89.svg index 191142a..3116515 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-89.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-89.svg @@ -85,24 +85,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-factor-89 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-9.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-9.svg index 6f0b21d..fc594ae 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-9.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-9.svg @@ -71,30 +71,30 @@ fG:E cn2 fG:2 - - - + + + + + + + + + - - - - - - statistical-path-plot-factor-9 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-90.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-90.svg index b4d8afd..b1912d7 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-90.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-90.svg @@ -80,24 +80,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-factor-90 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-91.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-91.svg index c07f79c..8ab67a4 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-91.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-91.svg @@ -75,24 +75,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-factor-91 diff --git a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-92.svg b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-92.svg index d1919f2..ef39361 100644 --- a/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-92.svg +++ b/tests/testthat/_snaps/classic-process-integration-hayes-models/statistical-path-plot-factor-92.svg @@ -100,24 +100,21 @@ - - - - - - + + + - - - + + + statistical-path-plot-factor-92 diff --git a/tests/testthat/test-classic-process-integration-custom-models.R b/tests/testthat/test-classic-process-integration-custom-models.R index 604163e..5450386 100644 --- a/tests/testthat/test-classic-process-integration-custom-models.R +++ b/tests/testthat/test-classic-process-integration-custom-models.R @@ -2,7 +2,7 @@ test_that("Test that model number one_confounder - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -13,19 +13,19 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "confounders", - processVariable = "contcor1")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "confounders", + 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) @@ -41,13 +41,13 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.732634590394826, 1.29452394334508, 1.01357926686995, "contcor1", - "", 1.53743684450092e-12, "contcor1", 0.143341754588952, - 7.07106781116569, 1.63922475925008, 2.89641756877381, 2.26782116401194, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.320718344683959, 7.07106781262134, 0.779896467881489, 1.37803301156572, - 1.0789647397236, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.152588656833048, 7.07106781144378)) + list(1.63922475925008, 2.89641756877381, 2.26782116401194, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.320718344683959, + 7.07106781262134, 0.779896467881489, 1.37803301156572, 1.0789647397236, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.152588656833048, 7.07106781144378, 0.732634590394826, 1.29452394334508, + 1.01357926686995, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.143341754588952, 7.07106781116569)) @@ -95,7 +95,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number one_confounder - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -106,19 +106,19 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "confounders", - processVariable = "facExperim")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "confounders", + 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) @@ -134,13 +134,13 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.180704818055353, 0.319295223563333, 0.250000020809343, "facExperimexperimental", - "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553449454082, 7.07106722322652, 1.67091881606353, 2.95241917713298, - 2.31166899659826, "contGamma", "", 1.53743684450092e-12, - "contGamma", 0.326919364635719, 7.07106781262135, 0.797583248451353, - 1.40928455391441, 1.10343390118288, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.156049118832815, 7.07106781144378 + list(1.67091881606353, 2.95241917713298, 2.31166899659826, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.326919364635719, + 7.07106781262135, 0.797583248451353, 1.40928455391441, 1.10343390118288, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.156049118832815, 7.07106781144378, 0.180704818055353, 0.319295223563333, + 0.250000020809343, "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553449454082, 7.07106722322652 )) @@ -190,7 +190,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number one_direct - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -201,19 +201,19 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "directs", - processVariable = "")), residualCovariances = TRUE, statisticalPathPlot = TRUE, - totalEffects = TRUE, localTests = FALSE, localTestType = "cis", +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 = "directs", + processVariable = "")), residualCovariances = TRUE, statisticalPathPlot = TRUE, + totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -272,7 +272,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number one_direct - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -283,19 +283,19 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "directs", - processVariable = "")), residualCovariances = TRUE, statisticalPathPlot = TRUE, - totalEffects = TRUE, localTests = FALSE, localTestType = "cis", +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 = "directs", + processVariable = "")), residualCovariances = TRUE, statisticalPathPlot = TRUE, + totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -354,7 +354,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number two_confounder - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -365,21 +365,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "confounders", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "confounders", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "confounders", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "confounders", + 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) @@ -395,17 +395,18 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.424979180919744, 0.896763104121614, 0.660871142520679, "contcor2", - "", 3.99655943894572e-08, "contcor1", 0.120355253189151, - 5.4910037161573, 0.732634592963226, 1.29452395230351, 1.01357927263337, - "contcor1", "", 1.53743684450092e-12, "contcor1", 0.143341756219093, - 7.07106777095817, 0.721541823114584, 1.27492365300028, 0.998232738057432, - "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171428212636, - 7.07106778401271, 1.63577445794209, 2.89032108123016, 2.26304776958613, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.320043284770477, 7.07106781262135, 0.772432177868598, 1.36484403268291, - 1.06863810527576, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.151128250183979, 7.07106781144378)) + list(1.63577445794209, 2.89032108123016, 2.26304776958613, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.320043284770477, + 7.07106781262135, 0.772432177868598, 1.36484403268291, 1.06863810527576, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.151128250183979, 7.07106781144378, 0.424979180919744, 0.896763104121614, + 0.660871142520679, "contcor2", "", 3.99655943894572e-08, + "contcor1", 0.120355253189151, 5.4910037161573, 0.732634592963226, + 1.29452395230351, 1.01357927263337, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341756219093, 7.07106777095817, + 0.721541823114584, 1.27492365300028, 0.998232738057432, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171428212636, + 7.07106778401271)) @@ -457,7 +458,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number two_confounder - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -468,21 +469,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "confounders", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "confounders", - processVariable = "facGender")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "confounders", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "confounders", + processVariable = "facGender")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -498,18 +499,18 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962232469041584, 0.0896223218018369, 0.0399999985557105, - "facGenderm", "", 0.114128624284983, "facExperimexperimental", - 0.0253179770840388, 1.57990499884478, 0.180704807310708, 0.319295186083387, - 0.249999996697048, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553381250528, 7.07106790529879, - 0.180704807218812, 0.319295185762859, 0.249999996490836, "facGenderm", - "", 1.53743684450092e-12, "facGenderm", 0.0353553380667272, - 7.07106791113135, 1.6436585661041, 2.90425185507047, 2.27395521058729, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.321585829869774, 7.07106781262135, 0.755960143301373, 1.33573887791417, - 1.04584951060777, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.147905456219098, 7.07106781144378)) + list(1.6436585661041, 2.90425185507047, 2.27395521058729, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.321585829869774, + 7.07106781262135, 0.755960143301373, 1.33573887791417, 1.04584951060777, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.147905456219098, 7.07106781144378, -0.00962232469041584, 0.0896223218018369, + 0.0399999985557105, "facGenderm", "", 0.114128624284983, + "facExperimexperimental", 0.0253179770840388, 1.57990499884478, + 0.180704807310708, 0.319295186083387, 0.249999996697048, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353553381250528, 7.07106790529879, 0.180704807218812, 0.319295185762859, + 0.249999996490836, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553380667272, 7.07106791113135)) @@ -563,7 +564,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number confounder_X_Y - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -574,21 +575,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "confounders", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "confounders", + 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) @@ -597,65 +598,63 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(752.56251014022, 789.034892744054, 0, "Model 1", 100, -362.28125507011 + list(750.763478122517, 784.630690540363, 1, "Model 1", 100, -362.381739061259 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.721541820201591, 1.27492364283993, 0.998232731520759, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171426363785, - 7.0710678303158, -0.337100829871576, 0.496772437940447, 0.0798358040344355, - "contGamma", "", 0.707439182019051, "debCollin1", 0.212726681303715, - 0.37529755809264, 1.67248036473138, 2.95517835937815, 2.31382936205476, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.327224889019525, 7.07106775706385, -0.0195801668451294, 0.0380140593879026, - 0.00921694627138661, "debCollin1", "", 0.530452278404126, - "debCollin1", 0.0146926746326279, 0.627315754404483, 0.797840916252579, - 1.40973983837224, 1.10379037731241, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.15609953217157, 7.07106781139628 + list(1.67248035662979, 2.95517833112014, 2.31382934387497, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.327224883877485, + 7.07106781262173, 0.797840916249275, 1.40973983836071, 1.10379037730499, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.156099532169474, 7.07106781144376, 0.00468047953048243, 0.00827014285615362, + 0.00647531119331802, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915747267293175, 7.07106799505738, 0.721541837469943, + 1.27492370307092, 0.998232770270433, "contcor2", "", + 1.53743684450092e-12, "contcor2", 0.141171437323845, 7.07106755582931 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.176275917662267, 0.23731320938853, 0.0305186458631314, "contcor2", - "contNormal", "", "", "", "", "", 0.772389630553604, - 0.105509369129519, 0.289250576654175, -0.0146865234869237, 0.0235011295591785, - 0.00440730303612741, "contcor2", "contGamma", "contNormal", - "", "", "", "", 0.650976769103064, 0.00974192723624556, - 0.452405661554288, -0.0137432740209935, 0.0112230747572484, - -0.00126009963187255, "contcor2", "contGamma", "debCollin1", - "contNormal", "", "", "", 0.843165318039053, - 0.0063690835584667, -0.197846302424066)) + list(-0.176275917663335, 0.237313209387059, 0.030518645861862, "contcor2", + "contNormal", "", "", "", "", "", 0.772389630562595, + 0.105509369129416, 0.289250576642425, -0.0146865201084523, 0.0235011252667924, + 0.00440730257917005, "contcor2", "contGamma", "contNormal", + "", "", "", "", 0.650976737432931, 0.00974192527935819, + 0.452405705523992, -0.00284650474713867, 0.0023172825914881, + -0.000264611077825287, "contcor2", "contGamma", "debCollin1", + "contNormal", "", "", "", 0.840799256633918, + 0.00131731689443226, -0.200871239823679)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.179344122869922, 0.0952661458587369, -0.0420389885055924, "contGamma", - "", 0.548448851692891, "contNormal", 0.0700549272575286, - -0.600086106021538, -2.83802376966792, 2.28501281096033, -0.276505479353799, - "debCollin1", "", 0.832442407469691, "contNormal", - 1.3069211018769, -0.211570139128294, -0.176275917662267, 0.23731320938853, - 0.0305186458631314, "contcor2", "", 0.772389630553604, - "contNormal", 0.105509369129519, 0.289250576654175, -0.223110070724047, - 0.13617190282424, -0.0434690839499035, "contGamma", "", - 0.635309333785758, "debCollin1", 0.0916552488673916, -0.47426726223607, - -0.403237897246725, 0.193560966721096, -0.104838465262814, "contcor2", - "", 0.491071293096679, "contGamma", 0.152247405736864, - -0.688605922415593)) + list(-0.179344122981311, 0.0952661457426463, -0.0420389886193323, "contGamma", + "", 0.548448850604066, "contNormal", 0.0700549272563292, + -0.600086107655393, -2.83802376961287, 2.28501281085489, -0.276505479378988, + "debCollin1", "", 0.832442407449482, "contNormal", + 1.30692110183596, -0.211570139154196, -0.176275917663335, 0.237313209387059, + 0.030518645861862, "contcor2", "", 0.772389630562595, + "contNormal", 0.105509369129416, 0.289250576642425, -0.0194720977150903, + 0.00121575974341409, -0.00912816898583811, "contGamma", "", + 0.0837013628652572, "debCollin1", 0.00527761163513401, -1.72960225513189, + -0.403237788228969, 0.193560880010331, -0.104838454109319, "contcor2", + "", 0.491071197053125, "contGamma", 0.152247355805201, + -0.688606074994554)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.172816800526246, 0.240148499061018, 0.0336658492673863, "Total", - 0.749300959047747, 0.105350226546172, 0.319561242259233, -0.0179628726375066, - 0.0242572794460163, 0.00314720340425485, "Total indirect", 0.770132222942081, - 0.0107706448732094, 0.292201947172458)) + list(-0.171980601989964, 0.241303276716377, 0.0346613373632068, "Total", + 0.742339407866267, 0.105431498222996, 0.32875694595457, -0.0143110559607141, + 0.0225964389634036, 0.00414269150134476, "Total indirect", 0.659941924671553, + 0.00941535028583161, 0.439993348689189)) @@ -671,7 +670,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number confounder_X_Y - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -682,21 +681,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "confounders", - processVariable = "facGender")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "confounders", + processVariable = "facGender")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -705,66 +704,64 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(607.365516379342, 643.837898983176, 0, "Model 1", 100, -289.682758189671 + list(605.461069409392, 639.328281827238, 1, "Model 1", 100, -289.730534704696 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.180704809305648, 0.319295193044861, 0.250000001175255, "facGenderm", - "", 1.53743684450092e-12, "facGenderm", 0.035355339392049, - 7.07106777856237, -0.149942240046712, 0.204469726295866, 0.0272637431245771, - "contGamma", "", 0.762997321314972, "debCollin1", 0.0904128772615553, - 0.301547124152523, 1.6485243332325, 2.91284938716785, 2.28068686020018, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.322537828222402, 7.07106782720555, 0.00219716761973208, 0.0113929176945557, - 0.0067950426571439, "debCollin1", "", 0.00377273792243105, - "debCollin1", 0.00234589771734546, 2.89656390681557, 0.755846181346825, - 1.33553751357751, 1.04569184746217, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.147883159283338, 7.07106781143798 + list(1.64852433532874, 2.91284939447953, 2.28068686490414, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.322537829552897, + 7.07106781262102, 0.755846181346441, 1.33553751357618, 1.04569184746131, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.147883159283097, 7.07106781144373, 0.0046804796044756, 0.0082701431142376, + 0.0064753113593566, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915747314255978, 7.07106781374252, 0.180704808778136, + 0.319295191204925, 0.24999999999153, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553390572408, 7.07106781204322 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0859003151554296, 0.895699802278834, 0.490800058717132, "m", - "facGender", "contNormal", "", "", "", "", "", 0.0175121668886125, - 0.206585297870522, 2.37577438363858, -0.0953627168761149, 0.0411095548346247, - -0.0271265810207451, "m", "facGender", "contGamma", "contNormal", - "", "", "", "", 0.435883275295673, 0.0348149947619486, - -0.779163725464449, -0.0210117568450086, 0.0239241658212091, - 0.00145620448810027, "m", "facGender", "contGamma", "debCollin1", - "contNormal", "", "", "", 0.898916540794359, - 0.0114634562218149, 0.127030143433454)) + list(0.0859003151311874, 0.895699802245711, 0.490800058688449, "m", + "facGender", "contNormal", "", "", "", "", "", 0.0175121668939648, + 0.206585297868256, 2.37577438352579, -0.0953627091989635, 0.0411095528715116, + -0.0271265781637259, "m", "facGender", "contGamma", "contNormal", + "", "", "", "", 0.43588329121238, 0.0348149923026522, + -0.779163698440899, -0.00898687888768311, 0.0102615994314883, + 0.000637360271902571, "m", "facGender", "contGamma", "debCollin1", + "contNormal", "", "", "", 0.896726559031952, + 0.00491041633188184, 0.129797603466815)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.199131680292892, 0.0699782265211687, -0.0645767268858618, "contGamma", - "", 0.346888280600299, "contNormal", 0.0686517479241368, - -0.940642137141533, -2.65809965637266, 2.32566023378808, -0.166219711292289, - "debCollin1", "", 0.895982174661907, "contNormal", - 1.27139068102067, -0.130738500583351, 0.0859003151554296, 0.895699802278834, - 0.490800058717132, "facGenderm", "", 0.0175121668886125, - "contNormal", 0.206585297870522, 2.37577438363858, -0.0977783152950906, - 0.0560672956625108, -0.0208555098162899, "contGamma", "", - 0.595148202837987, "debCollin1", 0.0392470504996816, -0.531390500706775, - -0.171917837733418, 1.01205273861469, 0.420067450440634, "facGenderm", - "", 0.164294314653492, "contGamma", 0.302038860327821, - 1.39077286275253)) + list(-0.199131680444033, 0.0699782263714942, -0.0645767270362695, "contGamma", + "", 0.346888279479809, "contNormal", 0.0686517479245109, + -0.940642139327286, -2.65809965640618, 2.32566023375436, -0.166219711325909, + "debCollin1", "", 0.895982174640983, "contNormal", + 1.27139068102062, -0.130738500609801, 0.0859003151311874, 0.895699802245711, + 0.490800058688449, "facGenderm", "", 0.0175121668939648, + "contNormal", 0.206585297868256, 2.37577438352579, -0.0194720938579656, + 0.00121576386577283, -0.0091281649960964, "contGamma", "", + 0.0837015019893399, "debCollin1", 0.00527761170279701, -1.72960147698223, + -0.171917887663247, 1.01205269810325, 0.42006740522, "facGenderm", + "", 0.164294363424204, "contGamma", 0.302038862730515, + 1.39077270197111)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0625107971036305, 0.867748567265343, 0.465129682184487, "m", - "Total", 0.0235575803680084, 0.205421573180254, 2.264268912868, - -0.0941334753506578, 0.0427927222853681, -0.0256703765326449, - "m", "Total indirect", 0.462405005295899, 0.0349307943197126, - -0.734892436103528)) + list(0.0615403730485783, 0.867081308544673, 0.464310840796626, "m", + "Total", 0.0238565192493443, 0.205498912696891, 2.25943210454587, + -0.0935866374626978, 0.040608201679051, -0.0264892178918234, + "m", "Total indirect", 0.439067321348252, 0.0342340063899798, + -0.773769146096109)) @@ -780,7 +777,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number confounder_X_M - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -791,21 +788,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "confounders", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "confounders", + 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) @@ -814,66 +811,64 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(752.646141055907, 789.118523659741, 0, "Model 1", 100, -362.323070527954 + list(750.646141055907, 784.513353473752, 1, "Model 1", 100, -362.323070527954 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.721541835093301, 1.27492369478134, 0.998232764937321, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171435815415, - 7.07106759360681, -607.579077577274, 607.579077577617, 1.71337620216989e-10, - "contGamma", "", 0.999999999999559, "debCollin1", 309.995021525881, - 5.5271087701221e-13, 1.67248030464117, 2.95517838310886, 2.31382934387501, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.327224910402804, 7.07106723943101, 0.00467108277854578, 0.00825353945337524, - 0.00646231111596051, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000913908802173771, 7.07106781397622, 0.798508437001226, - 1.41091930982897, 1.1047138734151, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.156230134241844, 7.07106781144413 + list(1.67248035662982, 2.95517833112011, 2.31382934387497, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.327224883877473, + 7.07106781262198, 0.798508437001207, 1.41091930982899, 1.1047138734151, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.156230134241854, 7.07106781144369, 0.00467108278239273, 0.00825353945668376, + 0.00646231111953824, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000913908802036415, 7.07106781895373, 0.721541820949962, + 1.27492364545022, 0.998232733200092, "contcor2", "", + 1.53743684450092e-12, "contcor2", 0.141171426838775, 7.07106781841997 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0147847276564638, 0.0238549732569569, 0.00453512280024657, + list(-0.0147847276314074, 0.0238549732318986, 0.00453512280024564, "contcor2", "contGamma", "contNormal", "", "", "", - "", 0.645458778461175, 0.00985724768878554, 0.460080028769706, - -7.14659929533556, 7.14472142012911, -0.000938937603223406, + "", 0.645458778032951, 0.00985724767600095, 0.460080029366323, + -0.0110675944813265, 0.00918971910876603, -0.000938937686280258, "contcor2", "debCollin1", "contNormal", "", "", "", - "", 0.999794513871296, 3.64581207312808, -0.000257538672973291, - -7.14589764683217, 7.14540970657504, -0.000243970128566898, + "", 0.855825363648231, 0.00516777699740395, -0.181690828909981, + -0.00276416611518341, 0.0022762259116187, -0.000243970101782358, "contcor2", "contGamma", "debCollin1", "contNormal", "", - "", "", 0.99994660718193, 3.64580866437731, - -6.69179737682606e-05)) + "", "", 0.849515790983618, 0.00128583792012508, + -0.189736278549496)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.180371895864293, 0.0938554961562729, -0.0432581998540102, "contGamma", - "", 0.536343400510011, "contNormal", 0.0699572528331227, - -0.618351894937886, -2.81958314195831, 2.3004487096865, -0.259567216135904, - "debCollin1", "", 0.842476879751126, "contNormal", - 1.30615457529602, -0.198726261841618, -262.594916041887, 262.576985384885, - -0.00896532850087182, "contGamma", "", 0.999946607178255, - "debCollin1", 133.974885653323, -6.69179783744747e-05, -27.5254923407673, - 27.5327269801582, 0.00361731969545721, "contcor2", "", - 0.999794513698742, "debCollin1", 14.0457222059226, 0.000257538889237886, - -0.403237789098099, 0.193560880879453, -0.104838454109323, "contcor2", - "", 0.491071198315604, "contGamma", 0.152247356248641, - -0.688606072988926)) + list(-0.180371895865524, 0.0938554961575184, -0.0432581998540029, "contGamma", + "", 0.53634340051376, "contNormal", 0.0699572528337545, + -0.618351894932198, -2.81958314194943, 2.30044870967762, -0.259567216135903, + "debCollin1", "", 0.842476879750588, "contNormal", + 1.30615457529149, -0.198726261842307, -0.019323338331808, 0.00139268329860133, + -0.00896532751660334, "contGamma", "", 0.0898030374720025, + "debCollin1", 0.00528479650488853, -1.69643760328525, -0.0121898218286524, + 0.019424461859531, 0.00361732001543929, "contcor2", "", + 0.653778060839133, "debCollin1", 0.00806501648437238, 0.448519853920768, + -0.403237788229239, 0.193560880010601, -0.104838454109319, "contcor2", + "", 0.491071197053518, "contGamma", 0.152247355805339, + -0.68860607499393)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0178966075516063, 0.0246010376885188, 0.00335221506845627, - "Total", 0.757166356594585, 0.0108414352445609, 0.309203993091049, - -0.0135662296914656, 0.011200414227885, -0.0011829077317903, - "Total indirect", 0.851484914508891, 0.0063181375052569, -0.187224119577342 + list(-0.0178966078683174, 0.0246010378926834, 0.00335221501218302, + "Total", 0.757166363425402, 0.0108414353774398, 0.309203984110695, + -0.0135662302663832, 0.0112004146902579, -0.00118290778806262, + "Total indirect", 0.851484913673871, 0.0063181377698767, -0.187224120642387 )) @@ -890,7 +885,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number confounder_X_M - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -901,21 +896,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "confounders", - processVariable = "facGender")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "confounders", + processVariable = "facGender")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -924,61 +919,65 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(612.856280580506, 649.32866318434, 0, "Model 1", 100, -292.428140290253 + list(610.856280580538, 644.723492998383, 1, "Model 1", 100, -292.428140290269 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.180704815524767, 0.319295214736841, 0.250000015130804, "facGenderm", - "", 1.53743684450092e-12, "facGenderm", 0.0353553433392801, - 7.07106738383875, 1.64852537738581, 2.91284834539771, 2.28068686139176, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.322537296089295, 7.07107949699046, 0.00467636180430558, 0.00826189220852088, - 0.00646912700641323, "debCollin1", "", 1.52211576676109e-12, - "debCollin1", 0.00091469293122157, 7.07245763643732, 0.798508437001174, - 1.41091930982902, 1.1047138734151, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.15623013424187, 7.07106781144295 + list(1.64852433532772, 2.91284939448055, 2.28068686490414, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.322537829553417, + 7.07106781260964, 0.798508437001258, 1.41091930982894, 1.1047138734151, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.156230134241827, 7.07106781144488, 0.00467600749098505, 0.00826223785611214, + 0.00646912267354859, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000914871495959829, 7.07107249719434, 0.180704819751814, + 0.319295229480489, 0.250000024616151, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553460221357, 7.07106711555384 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0812046417471832, 0.0448619220894113, -0.018171359828886, "m", + list(-0.0812046415361243, 0.044861922001809, -0.0181713597671576, "m", "facGender", "contGamma", "contNormal", "", "", "", - "", 0.572058586763452, 0.0321604286688407, -0.565022314099054, - "", "", 0.00130342699162342, "m", "facGender", "debCollin1", - "contNormal", "", "", "", "", "", "", "", - "", "", 0.000970569137243933, "m", "facGender", "contGamma", - "debCollin1", "contNormal", "", "", "", - "", "", "")) + "", 0.572058587158497, 0.0321604285926502, -0.565022313518248, + -0.0139781290115479, 0.016584988340512, 0.00130342966448204, + "m", "facGender", "debCollin1", "contNormal", "", "", + "", "", 0.867233352161147, 0.00779685687929416, 0.167173732269412, + -0.00876570770142378, 0.010706830067015, 0.000970561182795629, + "m", "facGender", "contGamma", "debCollin1", "contNormal", "", + "", "", 0.84509605560591, 0.00496757540496553, + 0.195379255204756)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.180371895864541, 0.0938554961564221, -0.0432581998540597, "contGamma", - "", 0.536343400510135, "contNormal", 0.0699572528332241, - -0.618351894937698, -2.81958314197502, 2.30044870970319, -0.259567216135916, - "debCollin1", "", 0.842476879752134, "contNormal", - 1.30615457530454, -0.19872626184033, "", "", -0.00890138637112046, - "contGamma", "", "", "debCollin1", "", "", "", "", - -0.00502153935703851, "facGenderm", "", "", "debCollin1", - "", "", -0.171917884556499, 1.01205269784927, 0.420067406646386, - "facGenderm", "", 0.164294360794206, "contGamma", 0.302038861873172, - 1.39077271064137)) + list(-0.180371895863627, 0.0938554961556288, -0.0432581998539992, "contGamma", + "", 0.536343400508167, "contNormal", 0.0699572528327885, + -0.618351894940683, -2.81958314187766, 2.30044870960586, -0.259567216135902, + "debCollin1", "", 0.84247687974623, "contNormal", 1.30615457525487, + -0.198726261847877, -0.0193398100393157, 0.00153718314197897, + -0.00890131344866836, "contGamma", "", 0.0946549770314036, + "debCollin1", 0.00532586143061039, -1.67133778537835, -0.0368533236902607, + 0.0268102243814512, -0.00502154965440475, "facGenderm", "", + 0.757177233186677, "debCollin1", 0.0162409994708785, -0.309189693861441, + -0.171917887658684, 1.01205269809868, 0.42006740522, "facGenderm", + "", 0.164294363420952, "contGamma", 0.302038862728187, + 1.39077270198183)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.079416444198823, 0.0476217167987858, -0.0158973637000186, "m", - "Total", 0.623756169473329, 0.0324082896419704, -0.490533868823201, - -0.0216391957105213, 0.0261871879682561, 0.00227399612886735, - "m", "Total indirect", 0.852146453356244, 0.0122008322744769, - 0.18638041059087)) + list(-0.0794164391530521, 0.0476217013132922, -0.01589736891988, "m", + "Total", 0.623755999445009, 0.0324082844043067, -0.490534109166464, + -0.021639151110671, 0.0261871328052263, 0.00227399084727767, + "m", "Total indirect", 0.852146487944709, 0.012200806824295, + 0.186380366481138)) @@ -994,7 +993,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number confounder_M_Y - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1005,21 +1004,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "confounders", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "confounders", + 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) @@ -1028,62 +1027,62 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(752.562510140221, 789.034892744054, 0, "Model 1", 100, -362.28125507011 + list(752.56251014022, 789.034892744054, 0, "Model 1", 100, -362.28125507011 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.40393421658602, 0.19462797334002, -0.104653121623, "contcor2", - "", 0.493114548399417, "contGamma", 0.152697242053278, - -0.6853635351612, 1.68041089751753, 2.96919115158277, 2.32480102455015, + list(-0.403934216602846, 0.194627973308215, -0.104653121647315, "contcor2", + "", 0.493114548288139, "contGamma", 0.152697242049457, + -0.685363535337588, 1.68041089749268, 2.96919115149608, 2.32480102449438, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.32877651432143, 7.07106780223754, 0.721541823493171, 1.27492365432077, - 0.998232738906971, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.141171428452922, 7.07106777799491, 0.00467108280296489, - 0.00825353952843831, 0.0064623111657016, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000913908815093384, 7.07106776844173, - 0.797840916249277, 1.40973983836072, 1.103790377305, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.156099532169474, - 7.07106781144376)) + 0.328776514305655, 7.07106780240718, 0.797840916249276, 1.40973983836072, + 1.103790377305, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.156099532169474, 7.07106781144376, 0.00467108280299761, + 0.00825353952855242, 0.00646231116577502, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000913908815114149, 7.0710677683614, + 0.721541823491683, 1.27492365431558, 0.998232738903633, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171428451978, + 7.07106777801856)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.179344124972709, 0.0952661437540926, -0.0420389906093081, "contGamma", - "contNormal", "", "", "", 0.548448831678073, 0.0700549272570547, - -0.600086136055114, -0.0206637960251635, 0.0256217211336616, - 0.00247896255424904, "contGamma", "debCollin1", "contNormal", - "", "", 0.833711582120974, 0.0118077468575748, - 0.20994374152413)) + list(-0.179344124936921, 0.0952661437880555, -0.0420389905744326, "contGamma", + "contNormal", "", "", "", 0.548448832007176, 0.0700549272565891, + -0.600086135561272, -0.020663796033847, 0.0256217211442374, + 0.00247896255519518, "contGamma", "debCollin1", "contNormal", + "", "", 0.833711582126616, 0.011807746862488, + 0.209943741516902)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.179344124972709, 0.0952661437540926, -0.0420389906093081, "contGamma", - "", 0.548448831678073, "contNormal", 0.0700549272570547, - -0.600086136055114, -2.83802377006717, 2.28501281042778, -0.276505479819698, - "debCollin1", "", 0.832442407187256, "contNormal", - 1.30692110184289, -0.211570139490285, -0.176275917685606, 0.237313209364911, - 0.0305186458396525, "contcor2", "", 0.772389630723732, - "contNormal", 0.105509369129447, 0.289250576431842, -0.0193233396980085, - 0.00139268200641049, -0.00896532884579901, "contGamma", "", - 0.0898029910226996, "debCollin1", 0.00528479652376889, -1.69643784873771, - -0.0121898224606108, 0.0194244613404918, 0.00361731943994051, - "contcor2", "", 0.653778113481815, "debCollin1", 0.00806501651317884, - 0.448519780961333)) + list(-0.179344124936921, 0.0952661437880555, -0.0420389905744326, "contGamma", + "", 0.548448832007176, "contNormal", 0.0700549272565891, + -0.600086135561272, -2.83802377009357, 2.28501281046962, -0.276505479811975, + "debCollin1", "", 0.832442407194066, "contNormal", + 1.3069211018603, -0.211570139481558, -0.176275917684869, 0.237313209364953, + 0.0305186458400417, "contcor2", "", 0.772389630720537, + "contNormal", 0.10550936912927, 0.289250576436017, -0.0193233397017338, + 0.00139268200279131, -0.00896532884947124, "contGamma", "", + 0.0898029908928475, "debCollin1", 0.00528479652379596, -1.69643784942389, + -0.012189822462367, 0.0194244613389091, 0.00361731943827106, + "contcor2", "", 0.653778113632947, "debCollin1", 0.0080650165132231, + 0.448519780751873)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.174961351145321, 0.0958412950352028, -0.039560028055059, "Total", - 0.566888387519272, 0.0690835771260545, -0.572640122309752, -0.0206637960251635, - 0.0256217211336616, 0.00247896255424904, "Total indirect", 0.833711582120974, - 0.0118077468575748, 0.20994374152413)) + list(-0.174961351109489, 0.0958412950710138, -0.0395600280192374, "Total", + 0.566888387870401, 0.069083577126049, -0.572640121791271, -0.020663796033847, + 0.0256217211442374, 0.00247896255519518, "Total indirect", 0.833711582126616, + 0.011807746862488, 0.209943741516902)) @@ -1099,7 +1098,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number confounder_M_Y - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1110,21 +1109,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "confounders", - processVariable = "facGender")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "confounders", + processVariable = "facGender")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -1133,61 +1132,62 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(607.365516379343, 643.837898983176, 0, "Model 1", 100, -289.682758189671 + list(607.365516379342, 643.837898983176, 0, "Model 1", 100, -289.682758189671 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0458149245495941, 0.255848631149535, 0.105016853299971, "facGenderm", - "", 0.172370035376217, "contGamma", 0.0769564027907179, - 1.36462788659136, 1.68041089310599, 2.96919113619555, 2.32480101465077, + list(-0.0458149245496739, 0.255848631149462, 0.105016853299894, "facGenderm", + "", 0.172370035376538, "contGamma", 0.0769564027907196, + 1.36462788659033, 1.68041089310602, 2.96919113619567, 2.32480101465085, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776511521461, 7.07106783234731, 0.180704808888483, 0.319295191589812, - 0.250000000239148, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553391272779, 7.07106780503948, 0.0046760093957327, - 0.00826224449975787, 0.00646912694774529, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000914872704884614, 7.07106782528963, - 0.755846181346482, 1.33553751357631, 1.0456918474614, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.14788315928312, - 7.0710678114432)) + 0.328776511521484, 7.07106783234707, 0.755846181346482, 1.33553751357631, + 1.0456918474614, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.14788315928312, 7.07106781144319, 0.00467600939573319, + 0.00826224449975957, 0.00646912694774638, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000914872704884922, 7.07106782528844, + 0.180704808888485, 0.319295191589819, 0.250000000239152, "facGenderm", + "", 1.53743684450092e-12, "facGenderm", 0.0353553391272791, + 7.07106780503936)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.199131680435585, 0.0699782263826541, -0.0645767270264656, "contGamma", - "contNormal", "", "", "", 0.346888279557876, 0.0686517479252027, - -0.940642139175, -0.0207692258850074, 0.0237283785711593, 0.00147957634307592, - "contGamma", "debCollin1", "contNormal", "", "", - 0.89629716920239, 0.0113516382972234, 0.130340335406725)) + list(-0.199131680433643, 0.0699782263807102, -0.0645767270264666, "contGamma", + "contNormal", "", "", "", 0.346888279550906, 0.0686517479242114, + -0.940642139188598, -0.0207692258847186, 0.0237283785708711, + 0.00147957634307626, "contGamma", "debCollin1", "contNormal", + "", "", 0.896297169201029, 0.0113516382970762, + 0.130340335408445)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.199131680435585, 0.0699782263826541, -0.0645767270264656, "contGamma", - "", 0.346888279557876, "contNormal", 0.0686517479252027, - -0.940642139175, -2.65809965637566, 2.32566023372822, -0.166219711323718, - "debCollin1", "", 0.895982174641171, "contNormal", - 1.27139068100617, -0.130738500609564, 0.0859003151350918, 0.895699802245546, - 0.490800058690319, "facGenderm", "", 0.017512166892969, - "contNormal", 0.206585297867218, 2.37577438354678, -0.0193398290769331, - 0.00153717100114809, -0.00890132903789248, "contGamma", "", - 0.0946545081957866, "debCollin1", 0.00532586319002703, -1.67134016032569, - -0.0368533470074327, 0.0268102220957272, -0.00502156245585276, - "facGenderm", "", 0.757176711327476, "debCollin1", - 0.0162410048361424, -0.309190379937446)) + list(-0.199131680433643, 0.0699782263807102, -0.0645767270264666, "contGamma", + "", 0.346888279550906, "contNormal", 0.0686517479242114, + -0.940642139188598, -2.65809965634259, 2.32566023369516, -0.166219711323718, + "debCollin1", "", 0.895982174639798, "contNormal", + 1.2713906809893, -0.130738500611298, 0.0859003151283558, 0.895699802252282, + 0.490800058690319, "facGenderm", "", 0.0175121668948446, + "contNormal", 0.206585297870655, 2.37577438350726, -0.0193398290769307, + 0.0015371710011417, -0.00890132903789453, "contGamma", "", + 0.0946545081955734, "debCollin1", 0.00532586319002481, -1.67134016032677, + -0.0368533470074346, 0.0268102220957298, -0.00502156245585243, + "facGenderm", "", 0.757176711327508, "debCollin1", + 0.0162410048361436, -0.309190379937403)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.19582260917386, 0.0696283078070808, -0.0630971506833897, "Total", - 0.351461078413813, 0.0677183149983326, -0.931759017998946, -0.0207692258850074, - 0.0237283785711593, 0.00147957634307592, "Total indirect", 0.89629716920239, - 0.0113516382972234, 0.130340335406725)) + list(-0.195822609174617, 0.0696283078078361, -0.0630971506833903, "Total", + 0.351461078416551, 0.0677183149987183, -0.931759017993648, -0.0207692258847186, + 0.0237283785708711, 0.00147957634307626, "Total indirect", 0.896297169201029, + 0.0113516382970762, 0.130340335408445)) @@ -1203,7 +1203,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number confounder_moderator - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1214,21 +1214,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "confounders", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "confounders", + 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) @@ -1244,20 +1244,20 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.424979979846172, 0.896765717657169, 0.660872848751671, "contcor2", - "", 3.99671657991263e-08, "contcor1", 0.120355716108149, - 5.4909967729146, 0.732635391767718, 1.29452673849026, 1.01358106512899, - "contcor1", "", 1.53765888910584e-12, "contcor1", 0.14334226321368, - 7.071055265941, 0.721542494460771, 1.27492599462207, 0.998234244541421, - "contcor2", "", 1.53765888910584e-12, "contcor2", 0.141171854311181, - 7.07105711270919, 1.67248035663196, 2.95517833111797, 2.31382934387497, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.32722488387638, 7.0710678126456, 0.770797942061193, 1.36195643032467, - 1.06637718619293, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.150808507943631, 7.07106781131685, 4.72565231396662, - 8.3499493673052, 6.53780084063591, "contGamma:contcor1", "", - 1.53721479989599e-12, "contGamma:contcor1", 0.924582564252856, - 7.07108385276444)) + list(1.67248035663196, 2.95517833111797, 2.31382934387497, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.32722488387638, + 7.0710678126456, 0.770797942061193, 1.36195643032467, 1.06637718619293, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.150808507943631, 7.07106781131685, 0.424979979846172, 0.896765717657169, + 0.660872848751671, "contcor2", "", 3.99671657991263e-08, + "contcor1", 0.120355716108149, 5.4909967729146, 0.732635391767718, + 1.29452673849026, 1.01358106512899, "contcor1", "", + 1.53765888910584e-12, "contcor1", 0.14334226321368, 7.071055265941, + 0.721542494460771, 1.27492599462207, 0.998234244541421, "contcor2", + "", 1.53765888910584e-12, "contcor2", 0.141171854311181, + 7.07105711270919, 4.72565231396662, 8.3499493673052, 6.53780084063591, + "contGamma:contcor1", "", 1.53721479989599e-12, "contGamma:contcor1", + 0.924582564252856, 7.07108385276444)) @@ -1325,7 +1325,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number confounder_moderator - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1336,21 +1336,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "confounders", - processVariable = "facGender")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "facExperim"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "confounders", + processVariable = "facGender")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -1366,18 +1366,18 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962232505003103, 0.0896223044751036, 0.0399999897125363, - "facGenderm", "", 0.114128642420644, "facExperimexperimental", - 0.0253179727556128, 1.57990491966497, 0.180704798230636, 0.319295154415572, - 0.249999976323104, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553323627676, 7.07106848149382, - 0.180704798024821, 0.319295153694623, 0.249999975859722, "facGenderm", - "", 1.53743684450092e-12, "facGenderm", 0.0353553322313535, - 7.07106849467021, 1.64852433533026, 2.91284939447801, 2.28068686490414, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.322537829552119, 7.07106781263808, 0.728706145775116, 1.2875826035478, - 1.00814437466146, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.142573144757003, 7.07106781140099, 1.54316182261394, + list(1.64852433533026, 2.91284939447801, 2.28068686490414, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.322537829552119, + 7.07106781263808, 0.728706145775116, 1.2875826035478, 1.00814437466146, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.142573144757003, 7.07106781140099, -0.00962232505003103, 0.0896223044751036, + 0.0399999897125363, "facGenderm", "", 0.114128642420644, + "facExperimexperimental", 0.0253179727556128, 1.57990491966497, + 0.180704798230636, 0.319295154415572, 0.249999976323104, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353553323627676, 7.07106848149382, 0.180704798024821, 0.319295153694623, + 0.249999975859722, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553322313535, 7.07106849467021, 1.54316182261394, 2.72667971047313, 2.13492076654354, "contGamma:facExperimexperimental", "", 1.53743684450092e-12, "contGamma:facExperimexperimental", 0.301923376448401, 7.07106813542274)) diff --git a/tests/testthat/test-classic-process-integration-general.R b/tests/testthat/test-classic-process-integration-general.R index 91b607e..08b6620 100644 --- a/tests/testthat/test-classic-process-integration-general.R +++ b/tests/testthat/test-classic-process-integration-general.R @@ -91,69 +91,69 @@ test_that("Factors with more than two levels work", { table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.18855287140525, -0.093047091209467, -0.140799981307359, "facThreeC", - "", 7.51558348888182e-09, "facThreeB", 0.0243641671349884, - -5.7789778130836, -0.0429566774419793, 0.137322520212358, 0.0471829213851896, - "contcor1", "", 0.304925061828328, "facThreeB", 0.0459904363234113, - 1.02592897909019, -0.111386692251663, 0.0439392202030715, -0.0337237360242957, - "contcor1", "", 0.394725492097922, "facThreeC", 0.0396246853717531, - -0.851078960196263, 0.166537554341246, 0.294262457180447, 0.230400005760847, - "facThreeB", "", 1.53743684450092e-12, "facThreeB", - 0.0325834821064772, 7.0710676350655, 0.124035773561631, 0.219164194184828, - 0.17159998387323, "facThreeC", "", 1.53743684450092e-12, - "facThreeC", 0.0242679001689719, 7.0710684763996, 0.656578232571939, - 1.1601372201591, 0.90835772636552, "contcor1", "", - 1.53743684450092e-12, "contcor1", 0.128461285911162, 7.07106207074478, - 0.562065668856282, 0.993138292339328, 0.777601980597805, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.109969526706432, - 7.07106781202798)) + list(-0.0429566774419572, 0.137322520212336, 0.0471829213851896, "contcor1", + "", 0.30492506182821, "facThreeB", 0.0459904363234001, + 1.02592897909044, -0.188552871405244, -0.0930470912094735, -0.140799981307359, + "facThreeC", "", 7.51558348888182e-09, "facThreeB", + 0.0243641671349851, -5.77897781308439, 0.16653755434125, 0.294262457180443, + 0.230400005760847, "facThreeB", "", 1.53743684450092e-12, + "facThreeB", 0.032583482106475, 7.07106763506597, -0.111386692251649, + 0.0439392202030574, -0.0337237360242957, "contcor1", "", + 0.394725492097836, "facThreeC", 0.0396246853717459, -0.851078960196418, + 0.124035773561638, 0.219164194184822, 0.17159998387323, "facThreeC", + "", 1.53743684450092e-12, "facThreeC", 0.0242679001689687, + 7.07106847640052, 0.562065668856824, 0.993138292338785, 0.777601980597805, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.109969526706156, 7.07106781204577, 0.656578232571228, 1.16013722015981, + 0.90835772636552, "contcor1", "", 1.53743684450092e-12, + "contcor1", 0.128461285911525, 7.0710620707248)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.830256392676731, 0.671610737591095, 16, -0.0793228275428182, - "B", "facThree", "contNormal", "", 0.835982155918959, - 0.383136410187729, -0.207035472050155, -0.525905203875692, 1.15334878334855, + list(-0.830256392443183, 0.671610737357546, 16, -0.0793228275428181, + "B", "facThree", "contNormal", "", 0.835982155868673, + 0.383136410068569, -0.207035472114545, -0.525905203599432, 1.15334878307229, 16, 0.313721789736431, "C", "facThree", "contNormal", "", - 0.463967628519699, 0.428388990938096, 0.732329253021736, -0.419840075271681, - 0.605570327467686, 50, 0.0928651260980023, "B", "facThree", - "contNormal", "", 0.722586733024018, 0.261589093174077, - 0.355003815224835, -0.343080242598669, 0.839989902178562, 50, + 0.463967628372663, 0.428388990797144, 0.732329253262693, -0.419840075280424, + 0.605570327476428, 50, 0.0928651260980024, "B", "facThree", + "contNormal", "", 0.722586733028552, 0.261589093178538, + 0.355003815218782, -0.343080242602794, 0.839989902182687, 50, 0.248454829789947, "C", "facThree", "contNormal", "", - 0.410383843368507, 0.301809154175571, 0.823218336331221, -0.539700679220641, - 1.2482888689735, 84, 0.354294094876428, "B", "facThree", "contNormal", - "", 0.437310753173408, 0.456128164164641, 0.776742421782455, - -0.891019364021505, 1.18974240632265, 84, 0.149361521150572, - "C", "facThree", "contNormal", "", 0.778418345536092, - 0.530816327941977, 0.281380796498216)) + 0.410383843371771, 0.301809154177676, 0.823218336325481, -0.539700678828145, + 1.248288868581, 84, 0.354294094876428, "B", "facThree", "contNormal", + "", 0.437310752972172, 0.456128163964384, 0.776742422123473, + -0.891019363658371, 1.18974240595951, 84, 0.149361521150572, + "C", "facThree", "contNormal", "", 0.778418345460771, + 0.530816327756701, 0.281380796596429)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.384277115427941, 0.649582479358737, 0.132652681965398, "facThreeB", - "", 0.61499311862582, "contNormal", 0.263744538915416, - 0.502958971248843, -0.36868442105099, 0.835431543005484, 0.233373560977247, - "facThreeC", "", 0.44741374451908, "contNormal", 0.307178084279708, - 0.759733760058037, -0.772565531217873, 0.487083275478801, -0.142741127869536, - "contcor1", "", 0.656898600865411, "contNormal", 0.321344886087863, - -0.444199158129772, -0.440651907510927, 0.890228809967378, 0.224788451228225, - "facThreeB:contcor1", "", 0.507917529817297, "contNormal", - 0.339516625809485, 0.662083780705226, -0.838061139155147, 0.667651322062499, - -0.0852049085463242, "facThreeC:contcor1", "", 0.824454027131575, - "contNormal", 0.384117379986192, -0.22181997739698)) + list(-0.38427711542656, 0.649582479357356, 0.132652681965398, "facThreeB", + "", 0.614993118624875, "contNormal", 0.263744538914712, + 0.502958971250186, -0.368684421054037, 0.835431543008531, 0.233373560977247, + "facThreeC", "", 0.447413744521379, "contNormal", 0.307178084281263, + 0.759733760054192, -0.772565530832362, 0.48708327509329, -0.142741127869536, + "contcor1", "", 0.656898600668854, "contNormal", 0.32134488589117, + -0.444199158401663, -0.440651907089957, 0.890228809546408, 0.224788451228225, + "facThreeB:contcor1", "", 0.507917529548882, "contNormal", + 0.3395166255947, 0.662083781124072, -0.838061138719313, 0.667651321626665, + -0.0852049085463242, "facThreeC:contcor1", "", 0.824454027031606, + "contNormal", 0.384117379763824, -0.221819977525393)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.830256392676731, 0.671610737591095, 16, -0.0793228275428182, - "B", "Total", 0.835982155918959, 0.383136410187729, -0.207035472050155, - -0.525905203875692, 1.15334878334855, 16, 0.313721789736431, - "C", "Total", 0.463967628519699, 0.428388990938096, 0.732329253021736, - -0.419840075271681, 0.605570327467686, 50, 0.0928651260980023, - "B", "Total", 0.722586733024018, 0.261589093174077, 0.355003815224835, - -0.343080242598669, 0.839989902178562, 50, 0.248454829789947, - "C", "Total", 0.410383843368507, 0.301809154175571, 0.823218336331221, - -0.539700679220641, 1.2482888689735, 84, 0.354294094876428, - "B", "Total", 0.437310753173408, 0.456128164164641, 0.776742421782455, - -0.891019364021505, 1.18974240632265, 84, 0.149361521150572, - "C", "Total", 0.778418345536092, 0.530816327941977, 0.281380796498216 + list(-0.830256392443183, 0.671610737357546, 16, -0.0793228275428181, + "B", "Total", 0.835982155868673, 0.383136410068569, -0.207035472114545, + -0.525905203599432, 1.15334878307229, 16, 0.313721789736431, + "C", "Total", 0.463967628372663, 0.428388990797144, 0.732329253262693, + -0.419840075280424, 0.605570327476428, 50, 0.0928651260980024, + "B", "Total", 0.722586733028552, 0.261589093178538, 0.355003815218782, + -0.343080242602794, 0.839989902182687, 50, 0.248454829789947, + "C", "Total", 0.410383843371771, 0.301809154177676, 0.823218336325481, + -0.539700678828145, 1.248288868581, 84, 0.354294094876428, "B", + "Total", 0.437310752972172, 0.456128163964384, 0.776742422123473, + -0.891019363658371, 1.18974240595951, 84, 0.149361521150572, + "C", "Total", 0.778418345460771, 0.530816327756701, 0.281380796596429 )) plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] @@ -203,62 +203,62 @@ test_that("Interactions between three-level and two-level factors work", { table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.188552899318699, -0.0930470981392201, -0.140799998728959, "facThreeC", - "", 7.51560835787757e-09, "facThreeB", 0.0243641724880702, - -5.77897725842736, -0.0625879470174146, 0.0313879697933625, - -0.015599988612026, "facTwoE", "", 0.515235336014761, - "facThreeB", 0.0239738886918451, -0.650707476477626, -0.00972474511250287, - 0.0721247068049682, 0.0311999808462327, "facTwoE", "", - 0.135116244943659, "facThreeC", 0.0208803459051006, 1.49422720236695, - 0.166537561194698, 0.294262481084964, 0.230400021139831, "facThreeB", - "", 1.53743684450092e-12, "facThreeB", 0.0325834864563185, - 7.07106716307678, 0.124035784194595, 0.219164231272074, 0.171600007733335, + list(-0.0625879470174504, 0.0313879697933983, -0.015599988612026, "facTwoE", + "", 0.515235336015082, "facThreeB", 0.0239738886918634, + -0.65070747647713, -0.188552899318745, -0.0930470981391739, + -0.140799998728959, "facThreeC", "", 7.51560835787757e-09, + "facThreeB", 0.0243641724880938, -5.77897725842177, 0.166537561194689, + 0.294262481084972, 0.230400021139831, "facThreeB", "", + 1.53743684450092e-12, "facThreeB", 0.0325834864563229, 7.07106716307582, + -0.00972474511266434, 0.0721247068051297, 0.0311999808462327, + "facTwoE", "", 0.135116244945199, "facThreeC", 0.020880345905183, + 1.49422720236106, 0.124035784194556, 0.219164231272113, 0.171600007733335, "facThreeC", "", 1.53743684450092e-12, "facThreeC", - 0.0242679069176374, 7.07106749320103, 0.179548301980595, 0.317251715854165, - 0.24840000891738, "facTwoE", "", 1.53743684450092e-12, - "facTwoE", 0.0351290674113803, 7.0710675580562, 0.564294089241247, - 0.99707578530309, 0.780684937272169, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.110405522620714, 7.0710678120163 + 0.0242679069176572, 7.07106749319528, 0.564294089241596, 0.997075785302741, + 0.780684937272168, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.110405522620536, 7.07106781202772, 0.179548301980658, + 0.317251715854103, 0.24840000891738, "facTwoE", "", + 1.53743684450092e-12, "facTwoE", 0.0351290674113485, 7.07106755806259 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.79179509702597, 0.581685251376472, -0.105054922824749, "B", - 0, "facThree", "contNormal", "", 0.76430843174253, - 0.350384078288244, -0.299827901250483, -0.835536962301828, 0.956997866716982, + list(-0.791795096924544, 0.581685251275046, -0.105054922824749, "B", + 0, "facThree", "contNormal", "", 0.764308431708751, + 0.350384078236495, -0.299827901294765, -0.835536962519563, 0.956997866934718, 0.0607304522075771, "C", 0, "facThree", "contNormal", "", - 0.894346977764828, 0.457287695885765, 0.132805786715827, -0.346979683280772, - 1.19016835503621, 0.421594335877721, "B", 1, "facThree", "contNormal", - "", 0.282320764613395, 0.39213680721733, 1.07512053986828, - -0.273316897248801, 1.39971560986316, 0.563199356307179, "C", - 1, "facThree", "contNormal", "", 0.186975149551964, - 0.426801849500457, 1.31958040239602)) + 0.894346977790344, 0.457287695996857, 0.132805786683564, -0.346979683149472, + 1.19016835490491, 0.42159433587772, "B", 1, "facThree", "contNormal", + "", 0.282320764531175, 0.392136807150339, 1.07512054005195, + -0.273316897247542, 1.3997156098619, 0.563199356307179, "C", + 1, "facThree", "contNormal", "", 0.1869751495513, 0.426801849499815, + 1.31958040239801)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.79179509702597, 0.581685251376472, -0.105054922824749, "facThreeB", - "", 0.76430843174253, "contNormal", 0.350384078288244, - -0.299827901250483, -0.835536962301828, 0.956997866716982, 0.0607304522075771, - "facThreeC", "", 0.894346977764828, "contNormal", 0.457287695885765, - 0.132805786715827, -1.5098265891821, 0.360680618984523, -0.574572985098788, - "facTwoE", "", 0.228549486740747, "contNormal", 0.477178974440588, - -1.20410373439521, -0.504038904791374, 1.55733742219631, 0.52664925870247, - "facThreeB:facTwoE", "", 0.31659480567209, "contNormal", - 0.525870970907517, 1.00147999763822, -0.723522417690523, 1.72846022588973, - 0.502468904099602, "facThreeC:facTwoE", "", 0.421809782363961, - "contNormal", 0.625517270450166, 0.803285421261016)) + list(-0.791795096924544, 0.581685251275046, -0.105054922824749, "facThreeB", + "", 0.764308431708751, "contNormal", 0.350384078236495, + -0.299827901294765, -0.835536962519563, 0.956997866934718, 0.0607304522075771, + "facThreeC", "", 0.894346977790344, "contNormal", 0.457287695996857, + 0.132805786683564, -1.50982658881481, 0.360680618617237, -0.574572985098788, + "facTwoE", "", 0.228549486558002, "contNormal", 0.477178974253193, + -1.20410373486808, -0.504038904409244, 1.55733742181418, 0.526649258702469, + "facThreeB:facTwoE", "", 0.316594805492668, "contNormal", + 0.525870970712549, 1.00147999800952, -0.723522417834018, 1.72846022603322, + 0.502468904099602, "facThreeC:facTwoE", "", 0.421809782418291, + "contNormal", 0.625517270523379, 0.803285421166996)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.79179509702597, 0.581685251376472, -0.105054922824749, "B", - 0, "Total", 0.76430843174253, 0.350384078288244, -0.299827901250483, - -0.835536962301828, 0.956997866716982, 0.0607304522075771, "C", - 0, "Total", 0.894346977764828, 0.457287695885765, 0.132805786715827, - -0.346979683280772, 1.19016835503621, 0.421594335877721, "B", - 1, "Total", 0.282320764613395, 0.39213680721733, 1.07512053986828, - -0.273316897248801, 1.39971560986316, 0.563199356307179, "C", - 1, "Total", 0.186975149551964, 0.426801849500457, 1.31958040239602 - )) + list(-0.791795096924544, 0.581685251275046, -0.105054922824749, "B", + 0, "Total", 0.764308431708751, 0.350384078236495, -0.299827901294765, + -0.835536962519563, 0.956997866934718, 0.0607304522075771, "C", + 0, "Total", 0.894346977790344, 0.457287695996857, 0.132805786683564, + -0.346979683149472, 1.19016835490491, 0.42159433587772, "B", + 1, "Total", 0.282320764531175, 0.392136807150339, 1.07512054005195, + -0.273316897247542, 1.3997156098619, 0.563199356307179, "C", + 1, "Total", 0.1869751495513, 0.426801849499815, 1.31958040239801 + )) plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] @@ -306,57 +306,56 @@ test_that("Interactions between two-level and three-level factors work", { table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0625879470174092, 0.0313879697933571, -0.015599988612026, "facThreeB", - "", 0.515235336014713, "facTwoE", 0.0239738886918424, - -0.650707476477701, -0.00972474511269001, 0.0721247068051553, - 0.0311999808462326, "facThreeC", "", 0.135116244945445, - "facTwoE", 0.020880345905196, 1.49422720236012, -0.188552899318718, - -0.0930470981392011, -0.140799998728959, "facThreeC", "", - 7.51560835787757e-09, "facThreeB", 0.0243641724880799, -5.77897725842506, - 0.17954830198084, 0.317251715853921, 0.24840000891738, "facTwoE", - "", 1.53743684450092e-12, "facTwoE", 0.0351290674112554, - 7.07106755808134, 0.16653756119465, 0.294262481085012, 0.230400021139831, - "facThreeB", "", 1.53743684450092e-12, "facThreeB", - 0.0325834864563429, 7.07106716307149, 0.124035784194594, 0.219164231272075, - 0.171600007733335, "facThreeC", "", 1.53743684450092e-12, - "facThreeC", 0.024267906917638, 7.07106749320088, 0.564294089243091, - 0.997075785301246, 0.780684937272169, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.110405522619773, 7.07106781207657 - )) + list(-0.00972474511259642, 0.0721247068050616, 0.0311999808462326, + "facThreeC", "", 0.135116244944552, "facTwoE", 0.0208803459051483, + 1.49422720236353, -0.0625879470174193, 0.0313879697933672, -0.0155999886120261, + "facThreeB", "", 0.515235336014803, "facTwoE", 0.0239738886918475, + -0.650707476477561, 0.179548301980438, 0.317251715854323, 0.24840000891738, + "facTwoE", "", 1.53743684450092e-12, "facTwoE", 0.0351290674114607, + 7.07106755804, 0.5642940892409, 0.997075785303437, 0.780684937272168, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.110405522620891, 7.07106781200496, -0.188552899318674, -0.0930470981392449, + -0.140799998728959, "facThreeC", "", 7.51560835787757e-09, + "facThreeB", 0.0243641724880576, -5.77897725843036, 0.166537561194737, + 0.294262481084924, 0.230400021139831, "facThreeB", "", + 1.53743684450092e-12, "facThreeB", 0.0325834864562984, 7.07106716308114, + 0.124035784194623, 0.219164231272046, 0.171600007733335, "facThreeC", + "", 1.53743684450092e-12, "facThreeC", 0.0242679069176231, + 7.07106749320521)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-1.50982658901334, 0.360680618815769, -0.574572985098788, 0, 0, - "E", "facTwo", "contNormal", "", 0.228549486656783, - 0.477178974354487, -1.20410373461247, -0.481073569262345, 0.385226116469709, - -0.0479237263963183, 1, 0, "E", "facTwo", "contNormal", "", - 0.828324822977639, 0.220998878695046, -0.216850540958842, -0.864792807812527, - 0.720584645814155, -0.0721040809991859, 0, 1, "E", "facTwo", - "contNormal", "", 0.858502237173678, 0.404440455572637, - -0.178281079465939)) + list(-1.50982658998053, 0.360680619782956, -0.574572985098788, 0, 0, + "E", "facTwo", "contNormal", "", 0.22854948713801, + 0.477178974847959, -1.20410373336726, -0.481073569295704, 0.385226116503068, + -0.0479237263963181, 1, 0, "E", "facTwo", "contNormal", "", + 0.828324822990655, 0.220998878712067, -0.216850540942141, -0.864792807836215, + 0.720584645837844, -0.0721040809991859, 0, 1, "E", "facTwo", + "contNormal", "", 0.858502237177862, 0.404440455584724, + -0.178281079460611)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-1.50982658901334, 0.360680618815769, -0.574572985098788, "facTwoE", - "", 0.228549486656783, "contNormal", 0.477178974354487, - -1.20410373461247, -0.791795097032169, 0.581685251382671, -0.105054922824749, - "facThreeB", "", 0.764308431744595, "contNormal", 0.350384078291407, - -0.299827901247776, -0.835536962619522, 0.956997867034676, 0.0607304522075774, - "facThreeC", "", 0.894346977802058, "contNormal", 0.457287696047857, - 0.132805786668753, -0.504038904576221, 1.55733742198116, 0.526649258702469, - "facTwoE:facThreeB", "", 0.316594805571069, "contNormal", - 0.525870970797743, 1.00147999784728, -0.723522417887957, 1.72846022608716, - 0.502468904099602, "facTwoE:facThreeC", "", 0.421809782438714, - "contNormal", 0.625517270550899, 0.803285421131654)) + list(-1.50982658998053, 0.360680619782956, -0.574572985098788, "facTwoE", + "", 0.22854948713801, "contNormal", 0.477178974847959, + -1.20410373336726, -0.791795097147449, 0.581685251497951, -0.105054922824749, + "facThreeB", "", 0.764308431782987, "contNormal", 0.350384078350224, + -0.299827901197445, -0.835536962531635, 0.956997866946789, 0.0607304522075774, + "facThreeC", "", 0.894346977791758, "contNormal", 0.457287696003016, + 0.132805786681776, -0.504038905718019, 1.55733742312296, 0.526649258702469, + "facTwoE:facThreeB", "", 0.316594806107179, "contNormal", + 0.525870971380304, 1.00147999673784, -0.72352241865697, 1.72846022685617, + 0.502468904099602, "facTwoE:facThreeC", "", 0.421809782729878, + "contNormal", 0.62551727094326, 0.803285420627787)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-1.50982658901334, 0.360680618815769, -0.574572985098788, 0, 0, - "E", "Total", 0.228549486656783, 0.477178974354487, -1.20410373461247, - -0.481073569262345, 0.385226116469709, -0.0479237263963183, - 1, 0, "E", "Total", 0.828324822977639, 0.220998878695046, -0.216850540958842, - -0.864792807812527, 0.720584645814155, -0.0721040809991859, - 0, 1, "E", "Total", 0.858502237173678, 0.404440455572637, -0.178281079465939 + list(-1.50982658998053, 0.360680619782956, -0.574572985098788, 0, 0, + "E", "Total", 0.22854948713801, 0.477178974847959, -1.20410373336726, + -0.481073569295704, 0.385226116503068, -0.0479237263963181, + 1, 0, "E", "Total", 0.828324822990655, 0.220998878712067, -0.216850540942141, + -0.864792807836215, 0.720584645837844, -0.0721040809991859, + 0, 1, "E", "Total", 0.858502237177862, 0.404440455584724, -0.178281079460611 )) plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] @@ -609,58 +608,57 @@ test_that("Bootstrapping works", { table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.50454708821106, 0.104510217479924, -0.240321179428066, "contcor1", - "", 0.121930541797918, "contGamma", 0.155374616700906, - -1.54672098011145, 1.77329997335402, 3.06208155476696, 2.32480222173537, + list(-0.504547088211434, 0.104510217482129, -0.240321179427596, "contcor1", + "", 0.121930541800229, "contGamma", 0.155374616701564, + -1.54672098010187, 1.77329997335421, 3.06208155476733, 2.32480222173548, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776852936759, 7.07106416090231, 0.748768133802888, 1.31065740716119, - 1.01357919508512, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341734284509, 7.07106831199164, 0.00500047485323911, - 0.00859013710131692, 0.00647531022139492, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000915746992391851, 7.07106905640168, - 0.777105932363479, 1.37218432850775, 1.07344821779, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.151808502818974, - 7.07106781146542)) + 0.328776852936806, 7.07106416090163, 0.777105932360688, 1.37218432851018, + 1.07344821779, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.151808502820305, 7.07106781140341, 0.00500047485324554, + 0.00859013710132828, 0.00647531022139937, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000915746992393108, 7.07106905639682, + 0.748768133799764, 1.31065740716131, 1.01357919508438, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341734285338, + 7.07106831194561)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.190956789517269, 0.179714799846874, 16, 0.017432373509147, - "contGamma", "contNormal", "", "", "", 0.853738170072067, - 0.0945608164966175, 0.184350919915867, -0.176161478237461, 0.0978993045402136, - 50, -0.0292524384924568, "contGamma", "contNormal", "", "", - "", 0.675653565492472, 0.069914749694237, -0.418401533587526, - -0.281099611060772, 0.12969342454386, 84, -0.0802029773056715, - "contGamma", "contNormal", "", "", "", 0.444078455368951, - 0.104796067388206, -0.765324303712353, -0.0178703105636702, - 0.0288190536884062, "", 0.00298071207887824, "contGamma", "debCollin1", - "contNormal", "", "", 0.802391316946556, 0.0119107709683332, - 0.250253496335626)) + list(-0.190956789788724, 0.179714799601129, 16, 0.0174323733798352, + "contGamma", "contNormal", "", "", "", 0.85373817115482, + 0.0945608165031762, 0.184350918535582, -0.176161478356171, 0.0978993044200254, + 50, -0.0292524385521792, "contGamma", "contNormal", "", "", + "", 0.675653564866377, 0.06991474969386, -0.418401534444, -0.281099611020402, + 0.129693424568323, 84, -0.080202977289446, "contGamma", "contNormal", + "", "", "", 0.444078455443482, 0.104796067384148, -0.765324303587158, + -0.0178703105626821, 0.0288190536878919, "", 0.00298071207899204, + "contGamma", "debCollin1", "contNormal", "", "", + 0.80239131693294, 0.0119107709679499, 0.250253496353234)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.176008115486518, 0.0979963713680356, -0.0290779946592441, "contGamma", - "", 0.677415937181174, "contNormal", 0.069900388225464, - -0.415991890709575, -3.13474368037813, 1.92627924320551, -0.326538590430326, - "debCollin1", "", 0.800334029083245, "contNormal", - 1.29110100070826, -0.252914830250458, -0.0987648269136903, 0.594868218283032, - 0.261103818809805, "contcor1", "", 0.140057795350511, - "contNormal", 0.176950456913497, 1.4755758383684, -0.170982282402329, - 0.102182947576892, -0.0479241300034941, "contGamma:contcor1", - "", 0.491633859762656, "contNormal", 0.0696862881496583, - -0.687712479398705, -0.0186289446313068, 0.00205891127462217, - -0.00912820771030503, "contGamma", "", 0.0837000278083639, - "debCollin1", 0.00527761123906158, -1.72960972243347)) + list(-0.176008115605802, 0.097996371247381, -0.0290779947192265, "contGamma", + "", 0.677415936551726, "contNormal", 0.0699003882251143, + -0.415991891569769, -3.13474368031614, 1.92627924309315, -0.326538590442452, + "debCollin1", "", 0.800334029069255, "contNormal", + 1.29110100066379, -0.252914830268562, -0.0987648268858987, 0.594868218345105, + 0.261103818832221, "contcor1", "", 0.140057795336072, + "contNormal", 0.176950456922243, 1.47557583842215, -0.170982282263468, + 0.10218294772372, -0.0479241299320574, "contGamma:contcor1", + "", 0.491633860420964, "contNormal", 0.0696862881516905, + -0.68771247835353, -0.018628944631329, 0.00205891127460755, + -0.00912820771031456, "contGamma", "", 0.0837000278081541, + "debCollin1", 0.00527761123906351, -1.72960972243464)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.185247767847583, 0.184954521301923, 16, 0.0204130855880252, - "Total", 0.828873773424247, 0.0944410948541949, 0.216146219180754, - -0.16869046361089, 0.101377033038379, 50, -0.0262717264135785, - "Total", 0.702962690371781, 0.0688960355342054, -0.381324211326139, - -0.273074796149483, 0.132617352757307, 84, -0.0772222652267933, - "Total", 0.455579011080368, 0.103494796870462, -0.746146352878466, - -0.0178703105636702, 0.0288190536884062, 0.00298071207887824, - "Total indirect", 0.802391316946556, 0.0119107709683332, 0.250253496335626 + list(-0.185247768110493, 0.184954521048108, 16, 0.0204130854588272, + "Total", 0.828873774494712, 0.0944410948565151, 0.216146217807417, + -0.168690463730101, 0.101377032919165, 50, -0.0262717264731872, + "Total", 0.70296268972986, 0.0688960355342047, -0.38132421219134, + -0.273074796118108, 0.132617352791238, 84, -0.0772222652104539, + "Total", 0.455579011178567, 0.103494796871115, -0.746146352715889, + -0.0178703105626821, 0.0288190536878919, 0.00298071207899204, + "Total indirect", 0.80239131693294, 0.0119107709679499, 0.250253496353234 )) }) @@ -702,58 +700,59 @@ test_that("Missing values work", { table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-110.494463632206, 193.953814337481, 41.7296753526376, "debMiss30", - "", 0.591066617050381, "debMiss1", 77.6668041788361, - 0.537291006033293, 479.941575046104, 960.646126274836, 720.29385066047, - "debMiss1", "", 4.26250901242042e-09, "debMiss1", 122.630965420913, - 5.87367022829973, 383.414148911908, 767.437819796141, 575.425984354025, - "debMiss30", "", 4.26250834628661e-09, "debMiss30", - 97.9670223313699, 5.87367024801129, 115.541023077736, 819.391923859025, - 467.466473468381, "debMiss80", "", 0.00922929177619203, - "debMiss80", 179.557100623577, 2.60344186804607, 0.575040607190625, - 1.50092716961641, 1.03798388840352, "contNormal", "", - 1.11020509905302e-05, "contNormal", 0.236199891867671, 4.39451466381296 + list(-110.494461910264, 193.953812615562, 41.7296753526491, "debMiss30", + "", 0.591066612852734, "debMiss1", 77.6668033002837, + 0.537291012111176, 479.941573546073, 960.646127774613, 720.293850660343, + "debMiss1", "", 4.26250990059884e-09, "debMiss1", 122.630966186184, + 5.87367019164442, 0.575040606573285, 1.50092717023376, 1.03798388840352, + "contNormal", "", 1.11020512898463e-05, "contNormal", + 0.236199892182649, 4.39451465795279, 115.541023544714, 819.391923391939, + 467.466473468326, "debMiss80", "", 0.00922929168317954, + "debMiss80", 179.557100385291, 2.60344187150074, 383.414147929555, + 767.437820778683, 575.425984354119, "debMiss30", "", + 4.26250923446503e-09, "debMiss30", 97.9670228326279, 5.87367021795903 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00240725924854762, 0.0318799753335926, 16, 0.0147363580425225, - "debMiss1", "contNormal", "", "", "", 0.0920365699284971, - 0.00874690424227016, 1.68475127134784, -0.00531454395872133, - 0.0204294107367177, 50, 0.0075574333889982, "debMiss1", "contNormal", - "", "", "", 0.249839277779795, 0.00656745606003582, - 1.15073984811053, -0.0143974276252919, 0.01619299815196, 84, - 0.000897785263334051, "debMiss1", "contNormal", "", "", - "", 0.908410023217562, 0.00780382344230435, 0.115044281815395, - -0.00561727350119405, 0.013735725309603, "", 0.0040592259042045, + list(-0.00240725924760687, 0.0318799753326526, 16, 0.0147363580425228, + "debMiss1", "contNormal", "", "", "", 0.0920365699106518, + 0.00874690424179035, 1.6847512714403, -0.00531454395846721, + 0.0204294107364655, 50, 0.00755743338899916, "debMiss1", "contNormal", + "", "", "", 0.249839277770421, 0.00656745605990665, + 1.15073984813331, -0.0143974276249338, 0.016192998151605, 84, + 0.000897785263335586, "debMiss1", "contNormal", "", "", + "", 0.908410023215281, 0.00780382344212247, 0.115044281818273, + -0.00561727350073337, 0.0137357253091405, "", 0.00405922590420357, "debMiss1", "debMiss80", "contNormal", "", "", - 0.41096785589033, 0.00493708021255775, 0.82219160504616)) + 0.410967855868118, 0.00493708021232223, 0.822191605085194)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00353329548037963, 0.0239230729764131, 0.0101948887480167, - "debMiss1", "", 0.145526000994699, "contNormal", 0.00700430433246862, - 1.4555176737193, -0.0392651628833341, 0.0050660029411319, -0.0170995799711011, - "debMiss80", "", 0.130531572527147, "contNormal", 0.0113091786824004, - -1.51200900183068, -0.0187559411088868, 0.00250596857881399, - -0.00812498626503641, "debMiss30", "", 0.134145223719248, - "contNormal", 0.00542405622129081, -1.49795391742876, -0.000711499389746557, - 0.000124746250921522, -0.000293376569412517, "debMiss1:debMiss30", - "", 0.169065736523859, "contNormal", 0.000213331889581716, - -1.37521197598609, -0.669874147279466, 0.195099221688927, -0.23738746279527, - "debMiss1", "", 0.282014951584179, "debMiss80", 0.220660526364564, - -1.07580393605638)) + list(-0.00353329547993103, 0.023923072975966, 0.0101948887480175, "debMiss1", + "", 0.145526000981534, "contNormal", 0.00700430433224012, + 1.45551767376689, -0.0392651628589268, 0.00506600291672997, + -0.0170995799710984, "debMiss80", "", 0.130531572103709, + "contNormal", 0.0113091786699489, -1.51200900349519, -0.018755941108979, + 0.00250596857890688, -0.00812498626503604, "debMiss30", "", + 0.134145223722653, "contNormal", 0.00542405622133801, -1.49795391741566, + -0.000711499389714979, 0.000124746250889994, -0.000293376569412492, + "debMiss1:debMiss30", "", 0.169065736491731, "contNormal", + 0.000213331889565618, -1.37521197608975, -0.669874147126378, + 0.195099221535874, -0.237387462795252, "debMiss1", "", + 0.282014951413891, "debMiss80", 0.220660526286465, -1.07580393643706 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.00390635118894364, 0.0336848167045104, 16, 0.018795583946727, - "Total", 0.0133541749576855, 0.00759668691630445, 2.47418172603465, - 0.00199406108787663, 0.0212392574985288, 50, 0.0116166592932027, - "Total", 0.0179755575692619, 0.00490957909493638, 2.36612122313781, - -0.0076934700091281, 0.0176074923442052, 84, 0.00495701116753855, - "Total", 0.44248747532871, 0.00645444573290735, 0.767999511137837, - -0.00561727350119405, 0.013735725309603, 0.0040592259042045, - "Total indirect", 0.41096785589033, 0.00493708021255775, 0.82219160504616 + list(0.00390635118951979, 0.0336848167039331, 16, 0.0187955839467264, + "Total", 0.0133541749541057, 0.00759668691601019, 2.47418172613041, + 0.00199406108792504, 0.0212392574984804, 50, 0.0116166592932027, + "Total", 0.0179755575686842, 0.0049095790949117, 2.36612122314971, + -0.00769347000856958, 0.0176074923436479, 84, 0.00495701116753915, + "Total", 0.442487475308531, 0.0064544457326227, 0.767999511171801, + -0.00561727350073337, 0.0137357253091405, 0.00405922590420357, + "Total indirect", 0.410967855868118, 0.00493708021232223, 0.822191605085194 )) plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 1"]][["collection"]][["pathPlotContainer_Model 1_conceptPathPlot"]][["data"]] @@ -826,58 +825,57 @@ test_that("Not implemented Hayes models error message work", { table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 2"]][["collection"]][["parEstContainer_Model 2_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544849832273558, 0.0642074734174259, -0.240321179428066, "contcor1", - "", 0.121930541797918, "contGamma", 0.155374616700906, - -1.54672098011145, 1.6804114310289, 2.96919301244183, 2.32480222173537, + list(-0.544849832274378, 0.064207473419186, -0.240321179427596, "contcor1", + "", 0.121930541800229, "contGamma", 0.155374616701564, + -1.54672098010187, 1.68041143102892, 2.96919301244204, 2.32480222173548, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776852936759, 7.07106416090231, 0.732634558405971, 1.29452383176427, - 1.01357919508512, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341734284509, 7.07106831199164, 0.00468047909735602, - 0.00827014134543383, 0.00647531022139492, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000915746992391851, 7.07106905640168, - 0.775909019717868, 1.37098741586214, 1.07344821779, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.151808502818974, - 7.07106781146542)) + 0.328776852936806, 7.07106416090163, 0.775909019715258, 1.37098741586475, + 1.07344821779, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.151808502820305, 7.07106781140341, 0.004680479097358, + 0.00827014134544073, 0.00647531022139937, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000915746992393108, 7.07106905639682, + 0.73263455840361, 1.29452383176516, 1.01357919508438, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341734285338, + 7.07106831194561)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 2"]][["collection"]][["parEstContainer_Model 2_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.167903421172924, 0.202768168191218, 16, 0.017432373509147, - "contGamma", "contNormal", "", "", "", 0.853738170072067, - 0.0945608164966175, 0.184350919915867, -0.166282829881294, 0.10777795289638, - 50, -0.0292524384924568, "contGamma", "contNormal", "", "", - "", 0.675653565492472, 0.069914749694237, -0.418401533587526, - -0.285599495107988, 0.125193540496644, 84, -0.0802029773056715, - "contGamma", "contNormal", "", "", "", 0.444078455368951, - 0.104796067388206, -0.765324303712353, -0.02036397004716, 0.0263253942049165, - "", 0.00298071207887824, "contGamma", "debCollin1", "contNormal", - "", "", 0.802391316946556, 0.0119107709683332, - 0.250253496335626)) + list(-0.167903421315091, 0.202768168074761, 16, 0.0174323733798352, + "contGamma", "contNormal", "", "", "", 0.85373817115482, + 0.0945608165031762, 0.184350918535582, -0.166282829940277, 0.107777952835919, + 50, -0.0292524385521792, "contGamma", "contNormal", "", "", + "", 0.675653564866377, 0.06991474969386, -0.418401534444, -0.285599495083809, + 0.125193540504917, 84, -0.080202977289446, "contGamma", "contNormal", + "", "", "", 0.444078455443482, 0.104796067384148, -0.765324303587158, + -0.0203639700462949, 0.026325394204279, "", 0.00298071207899204, + "contGamma", "debCollin1", "contNormal", "", "", + 0.80239131693294, 0.0119107709679499, 0.250253496353234)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 2"]][["collection"]][["parEstContainer_Model 2_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.166080238086521, 0.107924248768033, -0.0290779946592441, "contGamma", - "", 0.677415937181174, "contNormal", 0.069900388225464, - -0.415991890709575, -2.85705005222214, 2.20397287136149, -0.326538590430326, - "debCollin1", "", 0.800334029083245, "contNormal", - 1.29110100070826, -0.252914830250458, -0.085712703788556, 0.607920341408166, - 0.261103818809805, "contcor1", "", 0.140057795350511, - "contNormal", 0.176950456913497, 1.4755758383684, -0.184506744993105, - 0.0886584849861165, -0.0479241300034941, "contGamma:contcor1", - "", 0.491633859762656, "contNormal", 0.0696862881496583, - -0.687712479398705, -0.0194721356632695, 0.00121572024265946, - -0.00912820771030503, "contGamma", "", 0.0837000278083639, - "debCollin1", 0.00527761123906158, -1.72960972243347)) + list(-0.166080238145818, 0.107924248707365, -0.0290779947192265, "contGamma", + "", 0.677415936551726, "contNormal", 0.0699003882251143, + -0.415991891569769, -2.8570500521471, 2.20397287126219, -0.326538590442452, + "debCollin1", "", 0.800334029069255, "contNormal", + 1.29110100066379, -0.252914830268562, -0.085712703783281, 0.607920341447722, + 0.261103818832221, "contcor1", "", 0.140057795336072, + "contNormal", 0.176950456922243, 1.47557583842215, -0.184506744925651, + 0.0886584850615364, -0.0479241299320574, "contGamma:contcor1", + "", 0.491633860420964, "contNormal", 0.0696862881516905, + -0.68771247835353, -0.0194721356632828, 0.00121572024265372, + -0.00912820771031456, "contGamma", "", 0.0837000278081541, + "debCollin1", 0.00527761123906351, -1.72960972243464)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 2"]][["collection"]][["parEstContainer_Model 2_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.164688058986728, 0.205514230162778, 16, 0.0204130855880252, - "Total", 0.828873773424247, 0.0944410948541949, 0.216146219180754, - -0.161305474738213, 0.108762021911056, 50, -0.0262717264135785, - "Total", 0.702962690371781, 0.0688960355342054, -0.381324211326139, - -0.280068339680188, 0.125623809226602, 84, -0.0772222652267933, - "Total", 0.455579011080368, 0.103494796870462, -0.746146352878466, - -0.02036397004716, 0.0263253942049165, 0.00298071207887824, - "Total indirect", 0.802391316946556, 0.0119107709683332, 0.250253496335626 + list(-0.164688059120473, 0.205514230038128, 16, 0.0204130854588272, + "Total", 0.828873774494712, 0.0944410948565151, 0.216146217807417, + -0.16130547479782, 0.108762021851446, 50, -0.0262717264731872, + "Total", 0.70296268972986, 0.0688960355342047, -0.38132421219134, + -0.280068339665127, 0.125623809244219, 84, -0.0772222652104539, + "Total", 0.455579011178567, 0.103494796871115, -0.746146352715889, + -0.0203639700462949, 0.026325394204279, 0.00298071207899204, + "Total indirect", 0.80239131693294, 0.0119107709679499, 0.250253496353234 )) plotName <- results[["results"]][["pathPlotContainer"]][["collection"]][["pathPlotContainer_Model 2"]][["collection"]][["pathPlotContainer_Model 2_conceptPathPlot"]][["data"]] @@ -918,7 +916,7 @@ test_that("No implied conditional independencies error message works", { set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) - refMsg <- gettext("The specified model does not imply any (conditional) independencies that can be tested.") + refMsg <- "The specified model does not imply any (conditional) independencies that can be tested." msg <- results[["results"]][["localTestContainer"]][["collection"]][["localTestContainer_Model 1"]][["collection"]][["localTestContainer_Model 1_localTestTable"]][["error"]][["errorMessage"]] expect_equal(msg, refMsg) diff --git a/tests/testthat/test-classic-process-integration-hayes-models.R b/tests/testthat/test-classic-process-integration-hayes-models.R index d23edb0..0dfc476 100644 --- a/tests/testthat/test-classic-process-integration-hayes-models.R +++ b/tests/testthat/test-classic-process-integration-hayes-models.R @@ -2,7 +2,7 @@ test_that("Test that model number 1 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -13,19 +13,19 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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) @@ -45,11 +45,11 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) "", 0.121930585104781, "contGamma", 0.155374696049386, -1.54672080059349, 1.68041145454125, 2.96919309445352, 2.32480227449739, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776867860332, 7.07106400041802, 0.732634775738868, 1.29452458982638, - 1.01357968278263, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341872228171, 7.07106490955563, 0.776405337504771, - 1.37186438136396, 1.07413485943436, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.151905608612222, 7.07106781143526 + 0.328776867860332, 7.07106400041802, 0.776405337504771, 1.37186438136396, + 1.07413485943436, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.151905608612222, 7.07106781143526, 0.732634775738868, + 1.29452458982638, 1.01357968278263, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341872228171, 7.07106490955563 )) @@ -104,7 +104,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 1 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -115,19 +115,19 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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) @@ -147,12 +147,12 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) "facExperimexperimental", "", 0.114129593712154, "facGenderm", 0.0253179610128038, 1.57990076636531, 0.180704780462425, 0.319295092441708, 0.249999936452067, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553210856081, 7.07106960920326, 0.180704780436992, - 0.319295092352504, 0.249999936394748, "facExperimexperimental", + "facGenderm", 0.0353553210856081, 7.07106960920326, 0.758630464114515, + 1.34045718397417, 1.04954382404434, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.148427911035364, 7.07106781145954, + 0.180704780436992, 0.319295092352504, 0.249999936394748, "facExperimexperimental", "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553210693398, 7.07106961083572, 0.758630464114515, 1.34045718397417, - 1.04954382404434, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.148427911035364, 7.07106781145954)) + 0.0353553210693398, 7.07106961083572)) @@ -201,7 +201,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 2 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -212,21 +212,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -235,97 +235,96 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1199.86016487285, 1241.54288784866, 6, "Model 1", 100, -583.930082436427, + list(1199.86016487143, 1241.54288784724, 6, "Model 1", 100, -583.930082435716, 2)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544853796965787, 0.0642071296681098, -0.240323333648839, "contcor1", - "", 0.121929415415651, "contGamma", 0.155375540427807, - -1.54672564926976, -0.403938925257485, 0.194627066443455, -0.104655929407015, - "contcor2", "", 0.493105694328393, "contGamma", 0.152698211911635, - -0.685377569893077, 0.424979592249894, 0.896765813928323, 0.660872703089109, - "contcor2", "", 3.9968714338201e-08, "contcor1", 0.120355839545986, - 5.49098993104192, 1.68041467003346, 2.96920430997164, 2.32480949000255, - "contGamma", "", 1.53765888910584e-12, "contGamma", - 0.328778908720772, 7.07104205390798, 0.732635698935344, 1.29452780988501, - 1.01358175441018, "contcor1", "", 1.53765888910584e-12, - "contcor1", 0.143342458173159, 7.0710504572606, 0.721542929772355, - 1.27492751296992, 0.998235221371138, "contcor2", "", - 1.53765888910584e-12, "contcor2", 0.141172130601019, 7.07105019327329, - 0.770361877065444, 1.36118593011507, 1.06577390359025, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.150723191270341, - 7.07106779393128)) + list(-0.403938892429879, 0.194627164487928, -0.104655863970976, "contcor2", + "", 0.493106011784507, "contGamma", 0.152698228548897, + -0.685377066685898, -0.544853906416774, 0.0642071273354463, + -0.240323389540664, "contcor1", "", 0.121929394261216, + "contGamma", 0.155375567754412, -1.54672573696092, 1.6804147319274, + 2.96920452585506, 2.32480962889123, "contGamma", "", + 1.53765888910584e-12, "contGamma", 0.328778948004521, 7.07104163147106, + 0.770361877035362, 1.36118593001358, 1.06577390352447, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.150723191252126, + 7.07106779434939, 0.424979599250991, 0.896765893922282, 0.660872746586637, + "contcor2", "", 3.99688246943697e-08, "contcor1", 0.120355858166957, + 5.49098944290589, 0.732635748188917, 1.29452798168317, 1.01358186493604, + "contcor1", "", 1.53765888910584e-12, "contcor1", 0.143342489435109, + 7.07104968617761, 0.721542954515916, 1.27492759928265, 0.998235276899282, + "contcor2", "", 1.53765888910584e-12, "contcor2", 0.141172146307728, + 7.07104979988987)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.175158263608998, 0.198978920146411, 16, 16, 0.0119103282687069, - "contGamma", "contNormal", "", 0.900691815153884, 0.0954449129439508, - 0.124787460131072, -0.250368731200256, 0.256904817333493, 50, - 16, 0.00326804306661823, "contGamma", "contNormal", "", - 0.979852668013464, 0.12940889540192, 0.0252536199808235, -0.477662214863595, - 0.465334389212898, 84, 16, -0.00616391282534857, "contGamma", - "contNormal", "", 0.97955830101113, 0.240564778617038, - -0.0256226736963896, -0.285601877096401, 0.255931908323174, - 16, 50, -0.0148349843866135, "contGamma", "contNormal", "", - 0.914484338166963, 0.138148912350208, -0.107384011457194, -0.158320315558095, - 0.11136577638069, 50, 50, -0.0234772695887022, "contGamma", - "contNormal", "", 0.732918659871749, 0.0687987366262939, - -0.341245649847144, -0.322692739217352, 0.256874288256014, 84, - 50, -0.032909225480669, "contGamma", "contNormal", "", - 0.823860034035419, 0.147851448303366, -0.222583044388884, -0.537943173689472, - 0.445573981706666, 16, 84, -0.046184595991403, "contGamma", - "contNormal", "", 0.853955121607986, 0.250901843899683, - -0.184074358615989, -0.35094135373842, 0.241287591351436, 50, - 84, -0.0548268811934917, "contGamma", "contNormal", "", - 0.716682688691803, 0.151081588682568, -0.362895847677948, -0.277374000577762, - 0.148856326406845, 84, 84, -0.0642588370854585, "contGamma", - "contNormal", "", 0.554539458718292, 0.108734224288471, - -0.590971586967691)) + list(-0.17515664262081, 0.19898054114065, 16, 16, 0.01191194925992, + "contGamma", "contNormal", "", 0.900678369373086, 0.0954449129454946, + 0.124804443655604, -0.250367117827483, 0.256906430759303, 50, + 16, 0.00326965646591023, "contGamma", "contNormal", "", + 0.979842723600564, 0.12940889541545, 0.0252660874309561, -0.477660609823986, + 0.465335994400638, 84, 16, -0.00616230771167361, "contGamma", + "contNormal", "", 0.97956362297046, 0.240564778654828, + -0.025616001420206, -0.285600027728774, 0.255933757762182, 16, + 50, -0.0148331349832961, "contGamma", "contNormal", "", + 0.914494958080953, 0.138148912368417, -0.107370624415333, -0.158318473742292, + 0.11136761818768, 50, 50, -0.0234754277773059, "contGamma", + "contNormal", "", 0.732938811960452, 0.0687987366240455, + -0.341218878852218, -0.322690905724989, 0.25687612181521, 84, + 50, -0.0329073919548897, "contGamma", "contNormal", "", + 0.823869686646883, 0.147851448320416, -0.222570643228158, -0.537941056636039, + 0.445576098927959, 16, 84, -0.04618247885404, "contGamma", "contNormal", + "", 0.853961741174023, 0.250901843942505, -0.184065920474554, + -0.350939244232729, 0.241289700936629, 50, 84, -0.0548247716480498, + "contGamma", "contNormal", "", 0.716693119624935, 0.15108158870285, + -0.362881884674116, -0.277371899322844, 0.148858427671577, 84, + 84, -0.0642567358256336, "contGamma", "contNormal", "", + 0.554552407181609, 0.108734224290975, -0.590952262221336)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.157313569947831, 0.112100456491949, -0.0226065567279409, "contGamma", - "", 0.742214999753388, "contNormal", 0.0687293308869152, - -0.328921530825565, -0.219434360638533, 0.758255069283487, 0.269410354322477, - "contcor1", "", 0.280067217402433, "contNormal", 0.249415151919604, - 1.08016835484525, -0.250026098944752, 0.232282683825594, -0.00887170755957936, - "contGamma:contcor1", "", 0.942519040469954, "contNormal", - 0.12304021568119, -0.072104128804251, -0.58597717963421, 0.452207990135227, - -0.0668845947494917, "contcor2", "", 0.800624064342124, - "contNormal", 0.264848022197987, -0.252539528875516, -0.259037240981549, - 0.202955645981926, -0.0280407974998117, "contGamma:contcor2", - "", 0.811942205080005, "contNormal", 0.117857493966118, - -0.23792120938761)) + list(-0.157311735263844, 0.112102291166833, -0.0226047220485055, "contGamma", + "", 0.742235177229438, "contNormal", 0.0687293308845928, + -0.328894836564936, -0.219434320875926, 0.758255109178322, 0.269410394151198, + "contcor1", "", 0.280067146370022, "contNormal", 0.249415151953336, + 1.08016851438762, -0.250026106779323, 0.232282676073244, -0.0088717153530394, + "contGamma:contcor1", "", 0.942518990072331, "contNormal", + 0.123040215702165, -0.0721041921327132, -0.585977065352088, + 0.452208104537436, -0.0668844804073256, "contcor2", "", + 0.800624398022235, "contNormal", 0.264848022228622, -0.252539097118836, + -0.259037001544805, 0.202955885496963, -0.0280405580239212, + "contGamma:contcor2", "", 0.811943781098948, "contNormal", + 0.117857493986091, -0.237919177436697)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.175158263608998, 0.198978920146411, 16, 16, 0.0119103282687069, - "Total", 0.900691815153884, 0.0954449129439508, 0.124787460131072, - -0.250368731200256, 0.256904817333493, 50, 16, 0.00326804306661823, - "Total", 0.979852668013464, 0.12940889540192, 0.0252536199808235, - -0.477662214863595, 0.465334389212898, 84, 16, -0.00616391282534857, - "Total", 0.97955830101113, 0.240564778617038, -0.0256226736963896, - -0.285601877096401, 0.255931908323174, 16, 50, -0.0148349843866135, - "Total", 0.914484338166963, 0.138148912350208, -0.107384011457194, - -0.158320315558095, 0.11136577638069, 50, 50, -0.0234772695887022, - "Total", 0.732918659871749, 0.0687987366262939, -0.341245649847144, - -0.322692739217352, 0.256874288256014, 84, 50, -0.032909225480669, - "Total", 0.823860034035419, 0.147851448303366, -0.222583044388884, - -0.537943173689472, 0.445573981706666, 16, 84, -0.046184595991403, - "Total", 0.853955121607986, 0.250901843899683, -0.184074358615989, - -0.35094135373842, 0.241287591351436, 50, 84, -0.0548268811934917, - "Total", 0.716682688691803, 0.151081588682568, -0.362895847677948, - -0.277374000577762, 0.148856326406845, 84, 84, -0.0642588370854585, - "Total", 0.554539458718292, 0.108734224288471, -0.590971586967691 + list(-0.17515664262081, 0.19898054114065, 16, 16, 0.01191194925992, + "Total", 0.900678369373086, 0.0954449129454946, 0.124804443655604, + -0.250367117827483, 0.256906430759303, 50, 16, 0.00326965646591023, + "Total", 0.979842723600564, 0.12940889541545, 0.0252660874309561, + -0.477660609823986, 0.465335994400638, 84, 16, -0.00616230771167361, + "Total", 0.97956362297046, 0.240564778654828, -0.025616001420206, + -0.285600027728774, 0.255933757762182, 16, 50, -0.0148331349832961, + "Total", 0.914494958080953, 0.138148912368417, -0.107370624415333, + -0.158318473742292, 0.11136761818768, 50, 50, -0.0234754277773059, + "Total", 0.732938811960452, 0.0687987366240455, -0.341218878852218, + -0.322690905724989, 0.25687612181521, 84, 50, -0.0329073919548897, + "Total", 0.823869686646883, 0.147851448320416, -0.222570643228158, + -0.537941056636039, 0.445576098927959, 16, 84, -0.04618247885404, + "Total", 0.853961741174023, 0.250901843942505, -0.184065920474554, + -0.350939244232729, 0.241289700936629, 50, 84, -0.0548247716480498, + "Total", 0.716693119624935, 0.15108158870285, -0.362881884674116, + -0.277371899322844, 0.148858427671577, 84, 84, -0.0642567358256336, + "Total", 0.554552407181609, 0.108734224290975, -0.590952262221336 )) @@ -342,7 +341,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 2 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -353,21 +352,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -383,77 +382,77 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962232683604102, 0.0896223175831507, 0.0399999953735549, - "facExperimexperimental", "", 0.114128645514137, "facGenderm", - 0.0253179765551869, 1.57990490615886, -0.163250713701659, 0.0341991764118286, - -0.0645257686449151, "contcor2", "", 0.200188229808621, - "facGenderm", 0.0503707955020977, -1.28101547735588, -0.170527239521533, - 0.0272978261644089, -0.0716147066785622, "contcor2", "", - 0.155883213071685, "facExperimexperimental", 0.0504665053149857, - -1.41905420697511, 0.180704804599351, 0.319295176626582, 0.249999990612966, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553364042438, 7.0710680773768, 0.180704807996443, 0.319295188478233, + list(-0.163250713701616, 0.0341991764117861, -0.0645257686449151, "contcor2", + "", 0.200188229808427, "facGenderm", 0.0503707955020761, + -1.28101547735643, -0.00962232683594784, 0.0896223175830575, + 0.0399999953735549, "facExperimexperimental", "", 0.114128645513458, + "facGenderm", 0.0253179765551394, 1.57990490616183, 0.180704804599385, + 0.319295176626548, 0.249999990612966, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553364042261, 7.07106807738034, + 0.756348936485436, 1.3364258535154, 1.04638739500042, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.147981524560027, + 7.07106781141427, -0.170527239521493, 0.0272978261643685, -0.0716147066785622, + "contcor2", "", 0.155883213071517, "facExperimexperimental", + 0.0504665053149651, -1.41905420697569, 0.180704807996422, 0.319295188478254, 0.249999998237338, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553385610586, 7.07106786166361, - 0.721541791202529, 1.27492354169264, 0.998232666447587, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171407958289, - 7.07106829126849, 0.756348936487087, 1.33642585351375, 1.04638739500042, - "contNormal", "", 1.53743684450092e-12, "contNormal", - 0.147981524559185, 7.07106781145452)) + "facExperimexperimental", 0.0353553385610694, 7.07106786166146, + 0.721541791202579, 1.27492354169259, 0.998232666447587, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171407958263, + 7.07106829126978)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.161065462166927, 1.33098043660259, 16, 0.584957487217831, 0, - "m", "facGender", "contNormal", "", 0.124339818079468, - 0.380630947950723, 1.5368101053453, -0.358875044036943, 1.00789206259432, + list(-0.161065462194807, 1.33098043663047, 16, 0.584957487217831, 0, + "m", "facGender", "contNormal", "", 0.124339818093537, + 0.380630947964948, 1.53681010528786, -0.358875044039608, 1.00789206259699, 16, 0.32450850927869, 1, "m", "facGender", "contNormal", "", - 0.352008831944638, 0.348671485142623, 0.930699879704677, 0.0267424851786442, - 1.18684632303876, 50, 0.606794404108703, 0, "m", "facGender", - "contNormal", "", 0.0403326883329289, 0.295950294753085, - 2.0503253920222, -0.238349615464404, 0.931040467803529, 50, + 0.352008831946516, 0.348671485143983, 0.930699879701047, 0.0267424851522365, + 1.18684632306517, 50, 0.606794404108703, 0, "m", "facGender", + "contNormal", "", 0.0403326883420316, 0.295950294766558, + 2.05032539192885, -0.238349615477602, 0.931040467816727, 50, 0.346345426169562, 1, "m", "facGender", "contNormal", "", - 0.245646338204931, 0.298319278438771, 1.16098908519132, -0.0593588649528981, - 1.32414010991594, 84, 0.632390622481523, 0, "m", "facGender", - "contNormal", "", 0.0731682258788371, 0.352939897309773, - 1.79177992429254, -0.399560650456646, 1.14344393954141, 84, + 0.245646338215588, 0.298319278445504, 1.16098908516511, -0.0593588649715731, + 1.32414010993462, 84, 0.632390622481523, 0, "m", "facGender", + "contNormal", "", 0.0731682258865887, 0.352939897319302, + 1.79177992424417, -0.399560650480822, 1.14344393956559, 84, 0.371941644542382, 1, "m", "facGender", "contNormal", "", - 0.34471012405264, 0.393630852956758, 0.944899622955218)) + 0.344710124067758, 0.393630852969093, 0.944899622925609)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0242260928635688, 1.18799361530134, 0.606109854082454, "facGenderm", - "", 0.0411947062715143, "contNormal", 0.296884925339807, - 2.0415649376226, -0.427734844494525, 0.721274257641559, 0.146769706573517, - "facExperimexperimental", "", 0.61657135554629, "contNormal", - 0.293119953019372, 0.500715509338995, -1.08932599525597, 0.568428039377683, + list(0.0242260928370315, 1.18799361532788, 0.606109854082454, "facGenderm", + "", 0.0411947062807585, "contNormal", 0.296884925353347, + 2.04156493752949, -0.427734844509414, 0.721274257656449, 0.146769706573517, + "facExperimexperimental", "", 0.616571355555424, "contNormal", + 0.293119953026969, 0.500715509326018, -1.08932599531723, 0.568428039438946, -0.260448977939141, "facGenderm:facExperimexperimental", "", - 0.537988184248315, "contNormal", 0.422904208370613, -0.615858089808593, - -0.226807989822624, 0.320133541185827, 0.0466627756816015, "contcor2", - "", 0.738053637805199, "contNormal", 0.139528464635742, - 0.334431944072637, -0.392685638198668, 0.438474937613372, 0.022894649707352, - "facGenderm:contcor2", "", 0.914014745957768, "contNormal", - 0.212034655322273, 0.107975980023427)) + 0.53798818427836, "contNormal", 0.42290420840187, -0.615858089763074, + -0.226807989822628, 0.320133541185831, 0.0466627756816015, "contcor2", + "", 0.738053637805202, "contNormal", 0.139528464635744, + 0.334431944072633, -0.39268563820285, 0.438474937617554, 0.022894649707352, + "facGenderm:contcor2", "", 0.914014745958629, "contNormal", + 0.212034655324407, 0.10797598002234)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.161065462166927, 1.33098043660259, 16, 0.584957487217831, 0, - "m", "Total", 0.124339818079468, 0.380630947950723, 1.5368101053453, - -0.358875044036943, 1.00789206259432, 16, 0.32450850927869, - 1, "m", "Total", 0.352008831944638, 0.348671485142623, 0.930699879704677, - 0.0267424851786442, 1.18684632303876, 50, 0.606794404108703, - 0, "m", "Total", 0.0403326883329289, 0.295950294753085, 2.0503253920222, - -0.238349615464404, 0.931040467803529, 50, 0.346345426169562, - 1, "m", "Total", 0.245646338204931, 0.298319278438771, 1.16098908519132, - -0.0593588649528981, 1.32414010991594, 84, 0.632390622481523, - 0, "m", "Total", 0.0731682258788371, 0.352939897309773, 1.79177992429254, - -0.399560650456646, 1.14344393954141, 84, 0.371941644542382, - 1, "m", "Total", 0.34471012405264, 0.393630852956758, 0.944899622955218 + list(-0.161065462194807, 1.33098043663047, 16, 0.584957487217831, 0, + "m", "Total", 0.124339818093537, 0.380630947964948, 1.53681010528786, + -0.358875044039608, 1.00789206259699, 16, 0.32450850927869, + 1, "m", "Total", 0.352008831946516, 0.348671485143983, 0.930699879701047, + 0.0267424851522365, 1.18684632306517, 50, 0.606794404108703, + 0, "m", "Total", 0.0403326883420316, 0.295950294766558, 2.05032539192885, + -0.238349615477602, 0.931040467816727, 50, 0.346345426169562, + 1, "m", "Total", 0.245646338215588, 0.298319278445504, 1.16098908516511, + -0.0593588649715731, 1.32414010993462, 84, 0.632390622481523, + 0, "m", "Total", 0.0731682258865887, 0.352939897319302, 1.79177992424417, + -0.399560650480822, 1.14344393956559, 84, 0.371941644542382, + 1, "m", "Total", 0.344710124067758, 0.393630852969093, 0.944899622925609 )) @@ -470,7 +469,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 3 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -481,21 +480,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -504,102 +503,102 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1202.63140796969, 1249.52447131747, 12, "Model 1", 100, -583.315703984843, + list(1202.63140796962, 1249.52447131741, 12, "Model 1", 100, -583.315703984811, 3)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544849427334636, 0.0642078256317021, -0.240320800851467, "contcor1", - "", 0.121931097288307, "contGamma", 0.155374603250494, - -1.54671867746637, -0.403934959137799, 0.194627392107699, -0.10465378351505, - "contcor2", "", 0.493111930314577, "contGamma", 0.152697283206957, - -0.685367685115972, 0.424979014460392, 0.89676262409244, 0.660870819276416, - "contcor2", "", 3.99653763416552e-08, "contcor1", 0.12035517319538, - 5.49100467998651, 1.68041150265537, 2.96919326227729, 2.32480238246633, + list(-0.403934719485908, 0.194627523139163, -0.104653598173373, "contcor2", + "", 0.493112617592176, "contGamma", 0.152697255497156, + -0.685366595703628, -0.54484893124694, 0.0642081196599298, -0.240320405793505, + "contcor1", "", 0.121931586882155, "contGamma", 0.155374551703765, + -1.54671664798556, 1.68041109906878, 2.96919185457515, 2.32480147682197, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.32877689839907, 7.07106367201166, 0.732634521996073, 1.29452370476885, - 1.01357911338246, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341711175535, 7.07106888197564, 0.72154165755781, - 1.27492307554818, 0.998232366552995, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171323135367, 7.07107041559571, - 0.760953923146403, 1.34456261026381, 1.05275826670511, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.148882502872717, - 7.07106776412228)) + 0.328776642242437, 7.07106642663404, 0.76095392253491, 1.34456260813113, + 1.05275826533302, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.14888250248465, 7.0710677733373, 0.424979147181667, + 0.896762978356815, 0.660871062769241, "contcor2", "", + 3.99655020189016e-08, "contcor1", 0.120355229712515, 5.49100412460533, + 0.732634580828943, 1.29452390997947, 1.01357924540421, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341748517483, + 7.07106796091987, 0.721541757181454, 1.27492342302875, 0.998232590105103, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171386365337, + 7.07106883204916)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.220182657978791, 0.191149969642854, 16, 16, -0.0145163441679686, - "contGamma", "contNormal", "", 0.889973120730033, 0.10493372094237, - -0.138338219950677, -0.253451002665607, 0.257888249936756, 50, - 16, 0.00221862363557457, "contGamma", "contNormal", "", - 0.986430254160242, 0.13044608386576, 0.0170079742513215, -0.480404948022749, - 0.521370376089958, 84, 16, 0.0204827140336046, "contGamma", - "contNormal", "", 0.936119169960982, 0.25555962558868, - 0.0801484741043222, -0.338189976480042, 0.282578248470728, 16, - 50, -0.0278058640046572, "contGamma", "contNormal", "", - 0.860620752949082, 0.158362151000557, -0.175584025785047, -0.212793511029009, - 0.161540558267983, 50, 50, -0.0256264763805133, "contGamma", - "contNormal", "", 0.788427056375257, 0.0954951397703457, - -0.268353723992047, -0.330684932521569, 0.284189028958006, 84, - 50, -0.0232479517817814, "contGamma", "contNormal", "", - 0.882177262695022, 0.156858484729725, -0.148209717962269, -0.687596862600622, - 0.600830420442811, 16, 84, -0.0433832210789053, "contGamma", - "contNormal", "", 0.89499245639928, 0.328686469038815, - -0.131989677596926, -0.434125888620604, 0.317595473460781, 50, - 84, -0.0582652075799117, "contGamma", "contNormal", "", - 0.761257495580776, 0.191769177395827, -0.303829887425797, -0.289302227007096, - 0.140288218218954, 84, 84, -0.0745070043940707, "contGamma", - "contNormal", "", 0.496592034591191, 0.109591413060292, - -0.679861700050171)) + list(-0.220182733576812, 0.191149893780464, 16, 16, -0.0145164198981741, + "contGamma", "contNormal", "", 0.889972550313695, 0.104933720874928, + -0.138338941735197, -0.253451043483989, 0.257888208611024, 50, + 16, 0.00221858256351789, "contGamma", "contNormal", "", + 0.986430505331174, 0.130446083736332, 0.0170076594097088, -0.48040495075626, + 0.521370372329285, 84, 16, 0.0204827107865124, "contGamma", + "contNormal", "", 0.936119180000883, 0.255559625326644, + 0.080148461480691, -0.338190016263921, 0.282578208006221, 16, + 50, -0.0278059041288497, "contGamma", "contNormal", "", + 0.860620553730323, 0.158362150826924, -0.1755842793474, -0.212793523976785, + 0.161540545055392, 50, 50, -0.0256264894606964, "contGamma", + "contNormal", "", 0.788426950806225, 0.0954951397027894, + -0.268353861154128, -0.330684915806524, 0.284189045112793, 84, + 50, -0.0232479353468655, "contGamma", "contNormal", "", + 0.882177345274006, 0.1568584845868, -0.148209613321879, -0.687596860251758, + 0.600830421316987, 16, 84, -0.0433832194673854, "contGamma", + "contNormal", "", 0.894992460157817, 0.328686468662612, + -0.131989672845088, -0.434125868485485, 0.31759549278684, 50, + 84, -0.0582651878493224, "contGamma", "contNormal", "", + 0.761257573720771, 0.19176917718943, -0.303829784865625, -0.289302187361277, + 0.140288257583636, 84, 84, -0.0745069648888202, "contGamma", + "contNormal", "", 0.496592262580247, 0.109591412988572, + -0.679861340017484)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.20996567212304, 0.160438814841778, -0.0247634286406308, "contGamma", - "", 0.793269655138961, "contNormal", 0.0944926768773614, - -0.262067172388082, -0.26423116719376, 0.718915878424558, 0.227342355615399, - "contcor1", "", 0.364702013316455, "contNormal", 0.250807426405091, - 0.906441882020698, -0.238546163347031, 0.243957459850524, 0.00270564825174626, - "contGamma:contcor1", "", 0.982463055280149, "contNormal", - 0.123089920785148, 0.0219810707041476, -0.628303746968009, 0.464182010792896, - -0.0820608680875565, "contcor2", "", 0.768420876175338, - "contNormal", 0.278700467554071, -0.294441085110975, -0.276763073422661, - 0.218489407644298, -0.0291368328891819, "contGamma:contcor2", - "", 0.817611348018274, "contNormal", 0.126342240207842, - -0.230618301854151, -0.168390610541875, 0.137059136907114, -0.0156657368173804, - "contGamma:contcor1:contcor2", "", 0.84066488388015, - "contNormal", 0.0779222857813556, -0.201043086201774, -0.234142196963926, - 0.527680824631435, 0.146769313833754, "contcor1:contcor2", "", - 0.450131829602761, "contNormal", 0.194346178706477, 0.7551952645049 + list(-0.209965686053068, 0.160438800652554, -0.0247634427002567, "contGamma", + "", 0.793269540287346, "contNormal", 0.0944926768112387, + -0.262067321362107, -0.264231158096318, 0.71891588648238, 0.227342364193031, + "contcor1", "", 0.364701994714644, "contNormal", 0.250807426139877, + 0.90644191717928, -0.238546135055623, 0.243957487573035, 0.00270567625870588, + "contGamma:contcor1", "", 0.982462873758645, "contNormal", + 0.123089920640018, 0.0219812982625828, -0.62830373750896, 0.464182018987634, + -0.0820608592606628, "contcor2", "", 0.768420900113276, + "contNormal", 0.278700467231536, -0.294441053780111, -0.276763043740878, + 0.218489436717651, -0.0291368035116134, "contGamma:contcor2", + "", 0.817611528456655, "contNormal", 0.126342240052628, + -0.230618069613745, -0.168390618628367, 0.137059128603864, -0.0156657450122515, + "contGamma:contcor1:contcor2", "", 0.840664801536042, + "contNormal", 0.077922285726059, -0.201043191511675, -0.234142199130234, + 0.527680821946979, 0.146769311408372, "contcor1:contcor2", "", + 0.450131836781496, "contNormal", 0.194346178574294, 0.755195252538838 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.220182657978791, 0.191149969642854, 16, 16, -0.0145163441679686, - "Total", 0.889973120730033, 0.10493372094237, -0.138338219950677, - -0.253451002665607, 0.257888249936756, 50, 16, 0.00221862363557457, - "Total", 0.986430254160242, 0.13044608386576, 0.0170079742513215, - -0.480404948022749, 0.521370376089958, 84, 16, 0.0204827140336046, - "Total", 0.936119169960982, 0.25555962558868, 0.0801484741043222, - -0.338189976480042, 0.282578248470728, 16, 50, -0.0278058640046572, - "Total", 0.860620752949082, 0.158362151000557, -0.175584025785047, - -0.212793511029009, 0.161540558267983, 50, 50, -0.0256264763805133, - "Total", 0.788427056375257, 0.0954951397703457, -0.268353723992047, - -0.330684932521569, 0.284189028958006, 84, 50, -0.0232479517817814, - "Total", 0.882177262695022, 0.156858484729725, -0.148209717962269, - -0.687596862600622, 0.600830420442811, 16, 84, -0.0433832210789053, - "Total", 0.89499245639928, 0.328686469038815, -0.131989677596926, - -0.434125888620604, 0.317595473460781, 50, 84, -0.0582652075799117, - "Total", 0.761257495580776, 0.191769177395827, -0.303829887425797, - -0.289302227007096, 0.140288218218954, 84, 84, -0.0745070043940707, - "Total", 0.496592034591191, 0.109591413060292, -0.679861700050171 + list(-0.220182733576812, 0.191149893780464, 16, 16, -0.0145164198981741, + "Total", 0.889972550313695, 0.104933720874928, -0.138338941735197, + -0.253451043483989, 0.257888208611024, 50, 16, 0.00221858256351789, + "Total", 0.986430505331174, 0.130446083736332, 0.0170076594097088, + -0.48040495075626, 0.521370372329285, 84, 16, 0.0204827107865124, + "Total", 0.936119180000883, 0.255559625326644, 0.080148461480691, + -0.338190016263921, 0.282578208006221, 16, 50, -0.0278059041288497, + "Total", 0.860620553730323, 0.158362150826924, -0.1755842793474, + -0.212793523976785, 0.161540545055392, 50, 50, -0.0256264894606964, + "Total", 0.788426950806225, 0.0954951397027894, -0.268353861154128, + -0.330684915806524, 0.284189045112793, 84, 50, -0.0232479353468655, + "Total", 0.882177345274006, 0.1568584845868, -0.148209613321879, + -0.687596860251758, 0.600830421316987, 16, 84, -0.0433832194673854, + "Total", 0.894992460157817, 0.328686468662612, -0.131989672845088, + -0.434125868485485, 0.31759549278684, 50, 84, -0.0582651878493224, + "Total", 0.761257573720771, 0.19176917718943, -0.303829784865625, + -0.289302187361277, 0.140288257583636, 84, 84, -0.0745069648888202, + "Total", 0.496592262580247, 0.109591412988572, -0.679861340017484 )) @@ -616,7 +615,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 3 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -627,21 +626,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facExperim", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "facExperim", 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) @@ -650,89 +649,89 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(887.378924315379, 934.271987663165, 12, "Model 1", 100, -425.68946215769, + list(887.37892431538, 934.271987663166, 12, "Model 1", 100, -425.68946215769, 3)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.009622326836036, 0.0896223175831457, 0.0399999953735548, "facExperimexperimental", - "", 0.114128645514101, "facGenderm", 0.0253179765551844, - 1.57990490615902, -0.163250713700933, 0.0341991764111025, -0.0645257686449151, - "contcor2", "", 0.200188229805311, "facGenderm", 0.0503707955017273, - -1.2810154773653, -0.170527239521542, 0.0272978261644181, -0.0716147066785622, - "contcor2", "", 0.155883213071724, "facExperimexperimental", - 0.0504665053149904, -1.41905420697498, 0.180704804599426, 0.319295176626507, - 0.249999990612966, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553364042057, 7.07106807738443, 0.180704807996472, - 0.319295188478203, 0.249999998237338, "facExperimexperimental", - "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553385610436, 7.07106786166662, 0.721541791203161, 1.27492354169201, - 0.998232666447587, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.141171407957967, 7.07106829128464, 0.719380656934396, - 1.2711049913854, 0.995242824159901, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.140748589974852, 7.07106781203085 - )) + list(-0.163250713701575, 0.034199176411745, -0.0645257686449151, "contcor2", + "", 0.200188229808239, "facGenderm", 0.0503707955020551, + -1.28101547735696, -0.00962232683601574, 0.0896223175831254, + 0.0399999953735549, "facExperimexperimental", "", 0.114128645513953, + "facGenderm", 0.025317976555174, 1.57990490615966, 0.180704804599391, + 0.319295176626542, 0.249999990612966, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553364042231, 7.07106807738094, + 0.719380656934087, 1.27110499138571, 0.995242824159901, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.140748589975009, + 7.07106781202291, -0.170527239521602, 0.0272978261644779, -0.0716147066785622, + "contcor2", "", 0.155883213071974, "facExperimexperimental", + 0.0504665053150208, -1.41905420697412, 0.180704807996413, 0.319295188478263, + 0.249999998237338, "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553385610739, 7.07106786166056, + 0.721541791202229, 1.27492354169294, 0.998232666447587, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171407958442, + 7.07106829126084)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.879096135794025, 0.893322475661732, 16, 0.00711316993385364, - 0, "m", "facGender", "contNormal", "", 0.987448457029138, - 0.452155913434218, 0.0157316751202647, -0.226236100911908, 1.45144461323237, + list(-0.879096135662962, 0.89332247553067, 16, 0.00711316993385364, + 0, "m", "facGender", "contNormal", "", 0.987448457027282, + 0.452155913367349, 0.0157316751225912, -0.22623610084653, 1.45144461316699, 16, 0.61260425616023, 1, "m", "facGender", "contNormal", "", - 0.152327153088125, 0.427987638389687, 1.43135969642761, -0.0706048609407803, - 1.07522417225395, 50, 0.502309655656585, 0, "m", "facGender", - "contNormal", "", 0.0857196943308809, 0.292308696035459, - 1.71842186862498, -0.295309938992243, 0.864575094385034, 50, - 0.284632577696396, 1, "m", "facGender", "contNormal", "", - 0.336080006943378, 0.295894476257294, 0.961939476858953, 0.299944751940104, - 1.86556713860983, 84, 1.08275594527497, 0, "m", "facGender", - "contNormal", "", 0.00670905737302419, 0.399400805070695, - 2.7109508331695, -1.0144280267332, 0.814826886209518, 84, -0.0998005702618417, - 1, "m", "facGender", "contNormal", "", 0.830653424048315, - 0.466655236364456, -0.21386360311598)) + 0.152327153056169, 0.42798763835633, 1.43135969653916, -0.0706048608473389, + 1.07522417216051, 50, 0.502309655656585, 0, "m", "facGender", + "contNormal", "", 0.0857196942797964, 0.292308695987784, + 1.71842186890525, -0.295309938962812, 0.864575094355603, 50, + 0.284632577696395, 1, "m", "facGender", "contNormal", "", + 0.336080006918855, 0.295894476242278, 0.96193947690777, 0.299944752023776, + 1.86556713852616, 84, 1.08275594527497, 0, "m", "facGender", + "contNormal", "", 0.00670905736716132, 0.399400805028005, + 2.71095083345926, -1.01442802676004, 0.814826886236355, 84, + -0.0998005702618417, 1, "m", "facGender", "contNormal", "", + 0.830653424053209, 0.466655236378149, -0.213863603109705)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0900823231778928, 1.06365450737194, 0.486786092097024, "facGenderm", - "", 0.0981476436109345, "contNormal", 0.294326028348062, - 1.65390093030224, -0.456710630044385, 0.690161425619607, 0.116725397787611, - "facExperimexperimental", "", 0.689923271434322, "contNormal", - 0.292574778085305, 0.398959194471568, -1.01011707338055, 0.626372747842174, + list(-0.0900823230834538, 1.0636545072775, 0.486786092097024, "facGenderm", + "", 0.0981476435559117, "contNormal", 0.294326028299878, + 1.653900930573, -0.45671062992195, 0.690161425497172, 0.116725397787611, + "facExperimexperimental", "", 0.689923271371556, "contNormal", + 0.292574778022837, 0.39895919455675, -1.0101170732093, 0.626372747670924, -0.191872162769187, "facGenderm:facExperimexperimental", "", - 0.645805844109498, "contNormal", 0.417479564454027, -0.459596538623668, - -0.308134865893038, 0.319885281086001, 0.00587520759648154, - "contcor2", "", 0.97074699684123, "contNormal", 0.160212165104252, - 0.0366714200052066, -0.0759541812290865, 1.11431963671814, 0.519182727744529, - "facGenderm:contcor2", "", 0.0872983994651413, "contNormal", - 0.303646859670882, 1.70982413026522, -1.73253791641326, 0.00645663273415575, + 0.645805844040443, "contNormal", 0.417479564366653, -0.459596538719856, + -0.308134865845155, 0.319885281038118, 0.00587520759648157, + "contcor2", "", 0.970746996836771, "contNormal", 0.160212165079822, + 0.0366714200107987, -0.075954181167165, 1.11431963665622, 0.519182727744529, + "facGenderm:contcor2", "", 0.0872983994322345, "contNormal", + 0.303646859639288, 1.70982413044312, -1.7325379163599, 0.00645663268079, -0.863040641839553, "facGenderm:facExperimexperimental:contcor2", - "", 0.0517256684320713, "contNormal", 0.443629210246817, - -1.94540986460155, -0.44850606821623, 0.741301251524615, 0.146397591654192, - "facExperimexperimental:contcor2", "", 0.629578553618805, - "contNormal", 0.303527852839617, 0.482320124115754)) + "", 0.0517256684177121, "contNormal", 0.443629210219589, + -1.94540986472095, -0.448506068173794, 0.741301251482179, 0.146397591654192, + "facExperimexperimental:contcor2", "", 0.629578553594368, + "contNormal", 0.303527852817965, 0.482320124150159)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.879096135794025, 0.893322475661732, 16, 0.00711316993385364, - 0, "m", "Total", 0.987448457029138, 0.452155913434218, 0.0157316751202647, - -0.226236100911908, 1.45144461323237, 16, 0.61260425616023, - 1, "m", "Total", 0.152327153088125, 0.427987638389687, 1.43135969642761, - -0.0706048609407803, 1.07522417225395, 50, 0.502309655656585, - 0, "m", "Total", 0.0857196943308809, 0.292308696035459, 1.71842186862498, - -0.295309938992243, 0.864575094385034, 50, 0.284632577696396, - 1, "m", "Total", 0.336080006943378, 0.295894476257294, 0.961939476858953, - 0.299944751940104, 1.86556713860983, 84, 1.08275594527497, 0, - "m", "Total", 0.00670905737302419, 0.399400805070695, 2.7109508331695, - -1.0144280267332, 0.814826886209518, 84, -0.0998005702618417, - 1, "m", "Total", 0.830653424048315, 0.466655236364456, -0.21386360311598 + list(-0.879096135662962, 0.89332247553067, 16, 0.00711316993385364, + 0, "m", "Total", 0.987448457027282, 0.452155913367349, 0.0157316751225912, + -0.22623610084653, 1.45144461316699, 16, 0.61260425616023, 1, + "m", "Total", 0.152327153056169, 0.42798763835633, 1.43135969653916, + -0.0706048608473389, 1.07522417216051, 50, 0.502309655656585, + 0, "m", "Total", 0.0857196942797964, 0.292308695987784, 1.71842186890525, + -0.295309938962812, 0.864575094355603, 50, 0.284632577696395, + 1, "m", "Total", 0.336080006918855, 0.295894476242278, 0.96193947690777, + 0.299944752023776, 1.86556713852616, 84, 1.08275594527497, 0, + "m", "Total", 0.00670905736716132, 0.399400805028005, 2.71095083345926, + -1.01442802676004, 0.814826886236355, 84, -0.0998005702618417, + 1, "m", "Total", 0.830653424053209, 0.466655236378149, -0.213863603109705 )) @@ -749,7 +748,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 4 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -760,19 +759,19 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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) @@ -790,12 +789,11 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) jaspTools::expect_equal_tables(table, list(1.68041089500486, 2.96919114281872, 2.32480101891179, "contGamma", "", 1.53743684450092e-12, "contGamma", 0.328776512726659, - 7.07106781938708, 0.00468047959390449, 0.00827014307736615, + 7.07106781938708, 0.79850843700121, 1.41091930982898, 1.1047138734151, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.156230134241852, 7.07106781144378, 0.00468047959390449, 0.00827014307736615, 0.00647531133563532, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000915747307546586, 7.07106783964627, 0.79850843700121, - 1.41091930982898, 1.1047138734151, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.156230134241852, 7.07106781144378 - )) + "debCollin1", 0.000915747307546586, 7.07106783964627)) @@ -843,7 +841,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 4 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -854,19 +852,19 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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) @@ -884,11 +882,11 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) jaspTools::expect_equal_tables(table, list(0.180704810207797, 0.319295196191503, 0.25000000319965, "facGenderm", "", 1.53743684450092e-12, "facGenderm", 0.0353553399646345, - 7.07106772130382, 0.0048066281871781, 0.00849304083605079, 0.00664983451161445, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000940428670616055, 7.07106739659296, 0.762533966062566, 1.34735445145525, - 1.05494420875891, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.149191640766277, 7.07106781144378)) + 7.07106772130382, 0.762533966062566, 1.34735445145525, 1.05494420875891, + "contNormal", "", 1.53743684450092e-12, "contNormal", + 0.149191640766277, 7.07106781144378, 0.0048066281871781, 0.00849304083605079, + 0.00664983451161445, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000940428670616055, 7.07106739659296)) @@ -937,7 +935,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 5 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -948,21 +946,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -978,64 +976,63 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544849832273558, 0.0642074734174259, -0.240321179428066, "contcor1", - "", 0.121930541797918, "contGamma", 0.155374616700906, - -1.54672098011145, 1.6804114310289, 2.96919301244183, 2.32480222173537, + list(-0.544849832274378, 0.064207473419186, -0.240321179427596, "contcor1", + "", 0.121930541800229, "contGamma", 0.155374616701564, + -1.54672098010187, 1.68041143102892, 2.96919301244204, 2.32480222173548, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776852936759, 7.07106416090231, 0.732634558405971, 1.29452383176427, - 1.01357919508512, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341734284509, 7.07106831199164, 0.00468047909735602, - 0.00827014134543383, 0.00647531022139492, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000915746992391851, 7.07106905640168, - 0.775909019717868, 1.37098741586214, 1.07344821779, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.151808502818974, - 7.07106781146542)) + 0.328776852936806, 7.07106416090163, 0.775909019715258, 1.37098741586475, + 1.07344821779, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.151808502820305, 7.07106781140341, 0.004680479097358, + 0.00827014134544073, 0.00647531022139937, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000915746992393108, 7.07106905639682, + 0.73263455840361, 1.29452383176516, 1.01357919508438, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341734285338, + 7.07106831194561)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.167903421172924, 0.202768168191218, 16, 0.017432373509147, - "contGamma", "contNormal", "", "", "", 0.853738170072067, - 0.0945608164966175, 0.184350919915867, -0.166282829881294, 0.10777795289638, - 50, -0.0292524384924568, "contGamma", "contNormal", "", "", - "", 0.675653565492472, 0.069914749694237, -0.418401533587526, - -0.285599495107988, 0.125193540496644, 84, -0.0802029773056715, - "contGamma", "contNormal", "", "", "", 0.444078455368951, - 0.104796067388206, -0.765324303712353, -0.02036397004716, 0.0263253942049165, - "", 0.00298071207887824, "contGamma", "debCollin1", "contNormal", - "", "", 0.802391316946556, 0.0119107709683332, - 0.250253496335626)) + list(-0.167903421315091, 0.202768168074761, 16, 0.0174323733798352, + "contGamma", "contNormal", "", "", "", 0.85373817115482, + 0.0945608165031762, 0.184350918535582, -0.166282829940277, 0.107777952835919, + 50, -0.0292524385521792, "contGamma", "contNormal", "", "", + "", 0.675653564866377, 0.06991474969386, -0.418401534444, -0.285599495083809, + 0.125193540504917, 84, -0.080202977289446, "contGamma", "contNormal", + "", "", "", 0.444078455443482, 0.104796067384148, -0.765324303587158, + -0.0203639700462949, 0.026325394204279, "", 0.00298071207899204, + "contGamma", "debCollin1", "contNormal", "", "", + 0.80239131693294, 0.0119107709679499, 0.250253496353234)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.166080238086521, 0.107924248768033, -0.0290779946592441, "contGamma", - "", 0.677415937181174, "contNormal", 0.069900388225464, - -0.415991890709575, -2.85705005222214, 2.20397287136149, -0.326538590430326, - "debCollin1", "", 0.800334029083245, "contNormal", - 1.29110100070826, -0.252914830250458, -0.085712703788556, 0.607920341408166, - 0.261103818809805, "contcor1", "", 0.140057795350511, - "contNormal", 0.176950456913497, 1.4755758383684, -0.184506744993105, - 0.0886584849861165, -0.0479241300034941, "contGamma:contcor1", - "", 0.491633859762656, "contNormal", 0.0696862881496583, - -0.687712479398705, -0.0194721356632695, 0.00121572024265946, - -0.00912820771030503, "contGamma", "", 0.0837000278083639, - "debCollin1", 0.00527761123906158, -1.72960972243347)) + list(-0.166080238145818, 0.107924248707365, -0.0290779947192265, "contGamma", + "", 0.677415936551726, "contNormal", 0.0699003882251143, + -0.415991891569769, -2.8570500521471, 2.20397287126219, -0.326538590442452, + "debCollin1", "", 0.800334029069255, "contNormal", + 1.29110100066379, -0.252914830268562, -0.085712703783281, 0.607920341447722, + 0.261103818832221, "contcor1", "", 0.140057795336072, + "contNormal", 0.176950456922243, 1.47557583842215, -0.184506744925651, + 0.0886584850615364, -0.0479241299320574, "contGamma:contcor1", + "", 0.491633860420964, "contNormal", 0.0696862881516905, + -0.68771247835353, -0.0194721356632828, 0.00121572024265372, + -0.00912820771031456, "contGamma", "", 0.0837000278081541, + "debCollin1", 0.00527761123906351, -1.72960972243464)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.164688058986728, 0.205514230162778, 16, 0.0204130855880252, - "Total", 0.828873773424247, 0.0944410948541949, 0.216146219180754, - -0.161305474738213, 0.108762021911056, 50, -0.0262717264135785, - "Total", 0.702962690371781, 0.0688960355342054, -0.381324211326139, - -0.280068339680188, 0.125623809226602, 84, -0.0772222652267933, - "Total", 0.455579011080368, 0.103494796870462, -0.746146352878466, - -0.02036397004716, 0.0263253942049165, 0.00298071207887824, - "Total indirect", 0.802391316946556, 0.0119107709683332, 0.250253496335626 + list(-0.164688059120473, 0.205514230038128, 16, 0.0204130854588272, + "Total", 0.828873774494712, 0.0944410948565151, 0.216146217807417, + -0.16130547479782, 0.108762021851446, 50, -0.0262717264731872, + "Total", 0.70296268972986, 0.0688960355342047, -0.38132421219134, + -0.280068339665127, 0.125623809244219, 84, -0.0772222652104539, + "Total", 0.455579011178567, 0.103494796871115, -0.746146352715889, + -0.0203639700462949, 0.026325394204279, 0.00298071207899204, + "Total indirect", 0.80239131693294, 0.0119107709679499, 0.250253496353234 )) @@ -1052,7 +1049,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 5 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1063,21 +1060,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -1086,69 +1083,68 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(386.817183760122, 423.289566363955, 4, "Model 1", 100, -179.408591880061, + list(386.817183760126, 423.289566363959, 4, "Model 1", 100, -179.408591880063, 5)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962234655027178, 0.0896223603875536, 0.0400000069186409, - "facExperimexperimental", "", 0.1141287690259, "facGenderm", - 0.025317992504111, 1.57990436691005, 0.180704841463671, 0.31929530520992, - 0.250000073336796, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553598023825, 7.0710657375335, 0.180704841463712, - 0.319295305210277, 0.250000073336995, "facExperimexperimental", + list(-0.00962234648118625, 0.089622360543309, 0.0400000070310614, "facExperimexperimental", + "", 0.114128768324884, "facGenderm", 0.0253179925262211, + 1.57990436997067, 0.18070484150563, 0.319295305357382, 0.250000073431506, + "facGenderm", "", 1.53743684450092e-12, "facGenderm", + 0.035355359829297, 7.0710657348294, 0.758625478845665, 1.34044837528475, + 1.04953692706521, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.148426935655051, 7.07106781146763, 0.00480663372203901, + 0.00849306014137553, 0.00664984693170727, "debCollin1", "", + 1.53765888910584e-12, "debCollin1", 0.000940432183554029, 7.07105418976256, + 0.180704841505041, 0.319295305354682, 0.250000073429861, "facExperimexperimental", "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553598024628, 7.07106573752306, 0.00480663371579281, 0.00849306011958904, - 0.00664984691769092, "debCollin1", "", 1.53765888910584e-12, - "debCollin1", 0.000940432179589597, 7.07105420466674, 0.758625478844354, - 1.34044837528606, 1.04953692706521, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.14842693565572, 7.07106781143578 - )) + 0.0353553598287583, 7.07106573489063)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0389876732996416, 1.18993239606349, 0.614460034681565, 0, "m", - "facGender", "contNormal", "", "", "", 0.0363715155500868, - 0.293613742865265, 2.09274957188748, -0.261259762109523, 0.89279798255157, + list(0.0389876734583422, 1.18993239590479, 0.614460034681565, 0, "m", + "facGender", "contNormal", "", "", "", 0.0363715154985409, + 0.293613742784294, 2.09274957246461, -0.261259762044, 0.892797982486047, 0.315769110221023, 1, "m", "facGender", "contNormal", "", "", - "", 0.283470138708214, 0.294407895697103, 1.07255652730828, - -0.0214503308222069, 0.0220182200677286, 0.000283944622760887, + "", 0.283470138653544, 0.294407895663672, 1.07255652743007, + -0.0214503277786216, 0.0220182169434177, 0.000283944582398049, "", "m", "facGender", "debCollin1", "contNormal", "", - "", 0.979571843382763, 0.0110891198085296, 0.0256056952818275 + "", 0.979571843388014, 0.0110891182350578, 0.0256056952752447 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0389876732996416, 1.18993239606349, 0.614460034681565, "facGenderm", - "", 0.0363715155500868, "contNormal", 0.293613742865265, - 2.09274957188748, -2.51056185086199, 2.44573722657329, -0.0324123121443508, - "debCollin1", "", 0.97954859768542, "contNormal", 1.26438524292536, - -0.0256348390063139, -0.427732890946185, 0.723063282067016, - 0.147665195560416, "facExperimexperimental", "", 0.614972547352301, - "contNormal", 0.293575846824364, 0.502988229984596, -1.11430547361659, - 0.516923624695504, -0.298690924460542, "facGenderm:facExperimexperimental", - "", 0.472899265484902, "contNormal", 0.41613751864295, - -0.717769754177877, -0.0407260712155185, 0.0232052833435322, - -0.00876039393599312, "facGenderm", "", 0.591170637894333, - "debCollin1", 0.0163093187077245, -0.537140397645426)) + list(0.0389876734583422, 1.18993239590479, 0.614460034681565, "facGenderm", + "", 0.0363715154985409, "contNormal", 0.293613742784294, + 2.09274957246461, -2.51056185069249, 2.44573722640379, -0.0324123121443508, + "debCollin1", "", 0.979548597684021, "contNormal", + 1.26438524283888, -0.0256348390080672, -0.427732890801516, 0.723063281922348, + 0.147665195560416, "facExperimexperimental", "", 0.614972547263388, + "contNormal", 0.293575846750552, 0.502988230111059, -1.1143054733107, + 0.516923624389617, -0.298690924460542, "facGenderm:facExperimexperimental", + "", 0.472899265318895, "contNormal", 0.416137518486882, + -0.717769754447069, -0.0407260700039158, 0.0232052846225164, + -0.00876039269069973, "facGenderm", "", 0.591170691023478, + "debCollin1", 0.016309318724914, -0.537140320724583)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.038393337805159, 1.19109462080349, 0.614743979304326, 0, "m", - "Total", 0.0365705663010119, 0.294061853200032, 2.0905261005961, - -0.259723189210586, 0.891829298898155, 0.316053054843784, 1, - "m", "Total", 0.28199144682767, 0.293768787894074, 1.07585648260817, - -0.0214503308222069, 0.0220182200677286, 0.000283944622760887, - "", "m", "Total indirect", 0.979571843382763, 0.0110891198085296, - 0.0256056952818275)) + list(0.0383933381127616, 1.19109462041516, 0.614743979263963, 0, "m", + "Total", 0.0365705662000761, 0.294061853022495, 2.09052610172097, + -0.259723189309591, 0.891829298916434, 0.316053054803422, 1, + "m", "Total", 0.281991446938141, 0.293768787923994, 1.0758564823612, + -0.0214503277786216, 0.0220182169434177, 0.000283944582398049, + "", "m", "Total indirect", 0.979571843388014, 0.0110891182350578, + 0.0256056952752447)) @@ -1164,7 +1160,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 7 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1175,21 +1171,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -1198,76 +1194,76 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(751.811728258425, 788.284110862258, 4, "Model 1", 100, -361.905864129212, + list(751.811728258425, 788.284110862258, 4, "Model 1", 100, -361.905864129213, 7)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544847852212827, 0.0642084966239226, -0.240319677794452, "contcor1", - "", 0.121932287092284, "contGamma", 0.155374372600953, - -1.54671374546215, 1.68040993187621, 2.9691877834851, 2.32479885768065, + list(-0.544847852209774, 0.0642084966216132, -0.240319677794081, "contcor1", + "", 0.121932287089576, "contGamma", 0.155374372599585, + -1.54671374547338, 1.68040993187797, 2.9691877834857, 2.32479885768184, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328775901438651, 7.07107439294621, 0.732634623343372, 1.29452405826863, - 1.013579340806, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341775501328, 7.07106729535809, 0.00465468501969246, - 0.00822456430195469, 0.00643962466082357, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.00091070022470336, 7.07106958595639, - 0.79850843700122, 1.41091930982897, 1.1047138734151, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.156230134241847, - 7.071067811444)) + 0.328775901438355, 7.07107439295617, 0.798508437001276, 1.41091930982892, + 1.1047138734151, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.156230134241818, 7.0710678114453, 0.00465468501969337, + 0.00822456430195796, 0.00643962466082566, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000910700224703961, 7.07106958595401, + 0.732634623343682, 1.29452405826749, 1.01357934080558, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341775500957, + 7.07106729537347)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.180371928151819, 0.0938554638732369, "", -0.0432582321392911, - "contGamma", "contNormal", "", "", "", 0.536343096369635, - 0.0699572528342681, -0.618352356427886, -0.0129246594659768, - 0.0157306912130232, 16, 0.00140301587352322, "contGamma", "debCollin1", - "contNormal", "", "", 0.847799779268132, 0.00731017276466042, - 0.191926500055624, -0.0215673931237313, 0.0263996712180194, - 50, 0.00241613904714404, "contGamma", "debCollin1", "contNormal", - "", "", 0.843475500378468, 0.0122367208581659, - 0.197449878537653, -0.0314505030469635, 0.0384941714999988, - 84, 0.00352183422651761, "contGamma", "debCollin1", "contNormal", - "", "", 0.84353402088629, 0.0178433570970378, - 0.197375090761496)) + list(-0.180371927586059, 0.0938554644373771, "", -0.0432582315743408, + "contGamma", "contNormal", "", "", "", 0.536343101689403, + 0.0699572528338548, -0.61835234835589, -0.012924659465717, 0.0157306912114074, + 16, 0.0014030158728452, "contGamma", "debCollin1", "contNormal", + "", "", 0.847799779330944, 0.00731017276418193, + 0.191926499975437, -0.0215673931238623, 0.0263996712158205, + 50, 0.00241613904597911, "contGamma", "debCollin1", "contNormal", + "", "", 0.8434755004463, 0.0122367208576384, + 0.197449878450966, -0.0314505030471165, 0.0384941714967591, + 84, 0.00352183422482127, "contGamma", "debCollin1", "contNormal", + "", "", 0.843534020953864, 0.0178433570962503, + 0.197375090675138)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.180371928151819, 0.0938554638732369, -0.0432582321392911, "contGamma", - "", 0.536343096369635, "contNormal", 0.0699572528342681, - -0.618352356427886, -2.81958314914146, 2.30044870257389, -0.259567223283784, - "debCollin1", "", 0.84247687547225, "contNormal", 1.30615457531401, - -0.198726267311341, -0.0197475098822824, 0.00116000602906654, - -0.00929375192660791, "contGamma", "", 0.0814252424810622, - "debCollin1", 0.00533364798441827, -1.74247568526433, -0.0185475887218878, - 0.0350787642647076, 0.00826558777140989, "contcor1", "", - 0.545717297936527, "debCollin1", 0.0136804434697763, 0.604190046153895, - -0.0145563198120785, 0.00654284240162934, -0.00400673870522458, - "contGamma:contcor1", "", 0.456637076925929, "debCollin1", - 0.00538253824563496, -0.744395770615082)) + list(-0.180371927586059, 0.0938554644373771, -0.0432582315743408, "contGamma", + "", 0.536343101689403, "contNormal", 0.0699572528338548, + -0.61835234835589, -2.81958314892277, 2.30044870260536, -0.259567223158705, + "debCollin1", "", 0.842476875541477, "contNormal", + 1.30615457526625, -0.198726267222847, -0.0197475098822755, 0.00116000602906473, + -0.00929375192660537, "contGamma", "", 0.0814252424810189, + "debCollin1", 0.00533364798441605, -1.74247568526457, -0.0185475887220455, + 0.0350787642649449, 0.00826558777144971, "contcor1", "", + 0.54571729793755, "debCollin1", 0.0136804434698771, 0.604190046152355, + -0.0145563198121615, 0.00654284240170213, -0.00400673870522966, + "contGamma:contcor1", "", 0.456637076928682, "debCollin1", + 0.00538253824567469, -0.74439577061053)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.177349625681573, 0.0936391931500374, 16, -0.0418552162657678, - "Total", 0.544881869602115, 0.0691310710220024, -0.60544724169609, - -0.175977834534408, 0.0942936483501144, 50, -0.040842093092147, - "Total", 0.553609428213643, 0.0689480737953325, -0.592360175476169, - -0.175382476672515, 0.095909680846968, 84, -0.0397363979127734, - "Total", 0.565862745895811, 0.0692084547622816, -0.574155253852448, - -0.0129246594659768, 0.0157306912130232, 16, 0.00140301587352322, - "Total indirect", 0.847799779268132, 0.00731017276466042, 0.191926500055624, - -0.0215673931237313, 0.0263996712180194, 50, 0.00241613904714404, - "Total indirect", 0.843475500378468, 0.0122367208581659, 0.197449878537653, - -0.0314505030469635, 0.0384941714999988, 84, 0.00352183422651761, - "Total indirect", 0.84353402088629, 0.0178433570970378, 0.197375090761496 + list(-0.177349625116597, 0.093639193713606, 16, -0.0418552157014956, + "Total", 0.544881875021989, 0.0691310710216434, -0.605447233536881, + -0.175977833970114, 0.0942936489133905, 50, -0.0408420925283617, + "Total", 0.553609433686552, 0.0689480737950726, -0.592360167301447, + -0.175382476108843, 0.0959096814098041, 84, -0.0397363973495196, + "Total", 0.565862751401444, 0.0692084547620684, -0.574155245715704, + -0.012924659465717, 0.0157306912114074, 16, 0.0014030158728452, + "Total indirect", 0.847799779330944, 0.00731017276418193, 0.191926499975437, + -0.0215673931238623, 0.0263996712158205, 50, 0.00241613904597911, + "Total indirect", 0.8434755004463, 0.0122367208576384, 0.197449878450966, + -0.0314505030471165, 0.0384941714967591, 84, 0.00352183422482127, + "Total indirect", 0.843534020953864, 0.0178433570962503, 0.197375090675138 )) @@ -1284,7 +1280,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 7 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1295,21 +1291,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -1318,71 +1314,71 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(386.048084316838, 422.520466920672, 4, "Model 1", 100, -179.024042158419, + list(386.048084316838, 422.520466920671, 4, "Model 1", 100, -179.024042158419, 7)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962230905162569, 0.089622357280502, 0.0400000241144381, "facExperimexperimental", - "", 0.114128465403659, "facGenderm", 0.0253179821453243, - 1.57990569251686, 0.180704816866822, 0.319295219417819, 0.250000018142321, + list(-0.00962230937901645, 0.0896223566778864, 0.040000023649435, "facExperimexperimental", + "", 0.114128468606866, "facGenderm", 0.0253179820751127, + 1.57990567853173, 0.180704816740547, 0.319295218977326, 0.250000017858937, "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.035355344191062, 7.07106729866094, 0.180704816858394, 0.319295219388413, - 0.250000018123404, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553441857103, 7.07106729919623, - 0.00474535427099621, 0.00838477398315746, 0.00656506412707683, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000928440456270758, 7.07106641329111, 0.762533966062566, 1.34735445145525, + 0.0353553441109027, 7.07106730667748, 0.762533966062568, 1.34735445145525, 1.05494420875891, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.149191640766278, 7.07106781144376)) + "contNormal", 0.149191640766277, 7.07106781144382, 0.0047453542563447, + 0.00838477393205378, 0.00656506409419924, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000928440446971566, 7.07106644870276, + 0.180704816734103, 0.319295218954869, 0.250000017844486, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353553441068177, 7.07106730708577)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0622024992016066, 0.86859872614096, 0.465400612671283, "", "m", - "facGender", "contNormal", "", "", "", 0.0236768306573629, - 0.205717103298863, 2.26233310312151, -0.0122966566756132, 0.0126066279449722, - 0.000154985634679501, 0, "m", "facGender", "debCollin1", "contNormal", - "", "", 0.980536995391145, 0.00635299546752372, - 0.0243956784593633, -0.0445413897110322, 0.0434397906359828, - -0.000550799537524732, 1, "m", "facGender", "debCollin1", "contNormal", - "", "", 0.980421548403501, 0.022444591084581, - -0.0245404131199842)) + list(0.0622024992018677, 0.868598726140699, 0.465400612671283, "", + "m", "facGender", "contNormal", "", "", "", 0.0236768306572726, + 0.205717103298729, 2.26233310312297, -0.0122966563006479, 0.0126066275604591, + 0.000154985629905595, 0, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.980536995397082, 0.00635299527377566, + 0.0243956784519195, -0.0445413904626056, 0.043439791368907, + -0.000550799546849288, 1, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.980421548402401, 0.0224445914632863, + -0.0245404131213641)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0622024992016066, 0.86859872614096, 0.465400612671283, "facGenderm", - "", 0.0236768306573629, "contNormal", 0.205717103298863, - 2.26233310312151, -2.43771284945107, 2.49956339319174, 0.0309252718703352, - "debCollin1", "", 0.980411525584177, "contNormal", - 1.25953238977538, 0.0245529786461865, -0.0404917913693883, 0.0505150264328879, - 0.00501161753174982, "facGenderm", "", 0.82909303972292, - "debCollin1", 0.0232164515573057, 0.215864923172239, -0.0488495856920725, - 0.042157232110065, -0.00334617679100376, "facExperimexperimental", - "", 0.885398168241213, "debCollin1", 0.0232164515572704, - -0.144129553250177, -0.0871738166601345, 0.0415292593438089, - -0.0228222786581628, "facGenderm:facExperimexperimental", "", - 0.486991756906405, "debCollin1", 0.0328330206624042, -0.695101400898386 + list(0.0622024992018677, 0.868598726140699, 0.465400612671283, "facGenderm", + "", 0.0236768306572726, "contNormal", 0.205717103298729, + 2.26233310312297, -2.43771284937024, 2.49956339311091, 0.0309252718703352, + "debCollin1", "", 0.980411525583536, "contNormal", + 1.25953238973414, 0.0245529786469905, -0.0404917914096137, 0.0505150261643752, + 0.00501161737738073, "facGenderm", "", 0.829093044483881, + "debCollin1", 0.0232164514990681, 0.215864917064603, -0.048849585667176, + 0.0421572319070364, -0.00334617688006983, "facExperimexperimental", + "", 0.885398164926853, "debCollin1", 0.0232164514991251, + -0.144129557447482, -0.0871738166461715, 0.0415292590355461, + -0.0228222788053127, "facGenderm:facExperimexperimental", "", + 0.486991753007389, "debCollin1", 0.0328330205802022, -0.695101407120432 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0615025124506953, 0.86960868416123, 0.465555598305963, 0, "m", - "Total", 0.0239270977275898, 0.20615332171529, 2.25829782626022, - 0.0616103170585399, 0.868089309208977, 0.464849813133758, 1, - "m", "Total", 0.0238570388065877, 0.205738217261093, 2.25942374402826, - -0.0122966566756132, 0.0126066279449722, 0.000154985634679501, - 0, "m", "Total indirect", 0.980536995391145, 0.00635299546752372, - 0.0243956784593633, -0.0445413897110322, 0.0434397906359828, - -0.000550799537524732, 1, "m", "Total indirect", 0.980421548403501, - 0.022444591084581, -0.0245404131199842)) + list(0.061502512479497, 0.86960868412288, 0.465555598301189, 0, "m", + "Total", 0.0239270977173409, 0.206153321698159, 2.25829782642472, + 0.0616103170042059, 0.868089309244662, 0.464849813124434, 1, + "m", "Total", 0.0238570388250769, 0.205738217284057, 2.25942374373074, + -0.0122966563006479, 0.0126066275604591, 0.000154985629905595, + 0, "m", "Total indirect", 0.980536995397082, 0.00635299527377566, + 0.0243956784519195, -0.0445413904626056, 0.043439791368907, + -0.000550799546849288, 1, "m", "Total indirect", 0.980421548402401, + 0.0224445914632863, -0.0245404131213641)) @@ -1398,7 +1394,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 8 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1409,23 +1405,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -1441,79 +1437,78 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848037084144, 0.0642086256890931, -0.240319705697526, "contcor1", - "", 0.121932436098888, "contGamma", 0.155374452688263, - -1.54671312779903, 1.68041066029559, 2.96919032417917, 2.32480049223738, + list(-0.544848037067041, 0.064208625691915, -0.240319705687563, "contcor1", + "", 0.121932436105607, "contGamma", 0.15537445268462, + -1.54671312777117, 1.68041066029069, 2.96919032414887, 2.32480049221978, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776363762115, 7.07106942127834, 0.73263454172082, 1.29452377357635, - 1.01357915764858, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341723696873, 7.07106857311144, 0.00465468553503957, - 0.00822456609945539, 0.00643962581724748, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000910700551789365, 7.07106831613834, - 0.775909019717289, 1.37098741586275, 1.07344821779002, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.151808502819277, - 7.07106781145138)) + 0.328776363755637, 7.07106942136416, 0.775909019716124, 1.37098741586392, + 1.07344821779002, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.151808502819872, 7.07106781142372, 0.00465468553508693, + 0.00822456609962058, 0.00643962581735376, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000910700551819425, 7.07106831602164, + 0.732634541721294, 1.29452377356768, 1.01357915764449, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341723694542, + 7.07106857319786)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.167906749571033, 0.202764839804378, 16, 0.0174290451166726, - "contGamma", "contNormal", "", "", "", 0.853765781257436, - 0.0945608164994922, 0.184315721478211, -0.166284495653088, 0.107776287123045, - 50, -0.0292541042650212, "contGamma", "contNormal", "", "", - "", 0.675636148583765, 0.0699147496938438, -0.418425359357284, - -0.285599346337461, 0.125193689257626, 84, -0.0802028285399178, - "contGamma", "contNormal", "", "", "", 0.444079300463064, - 0.104796067385771, -0.765322884156316, -0.0126897313297684, - 0.0162197667642412, 16, 0.00176501771723642, "contGamma", "debCollin1", - "contNormal", "", "", 0.810854206713327, 0.00737500748025067, - 0.239324193495791, -0.0207614719735328, 0.0268405444694456, - 50, 0.0030395362479564, "contGamma", "debCollin1", "contNormal", - "", "", 0.80235570677162, 0.0121435946829781, - 0.25029954698809, -0.0302836127286732, 0.0391446352028949, 84, - 0.00443051123711088, "contGamma", "debCollin1", "contNormal", - "", "", 0.802473481166182, 0.0177116131926937, - 0.25014724457389)) + list(-0.167906749428334, 0.202764839949028, 16, 0.0174290452603471, + "contGamma", "contNormal", "", "", "", 0.85376578006632, + 0.0945608164999899, 0.184315722996628, -0.166284495584993, 0.107776287191615, + 50, -0.0292541041966892, "contGamma", "contNormal", "", "", + "", 0.675636149298754, 0.069914749693965, -0.418425358379198, + -0.285599346378567, 0.125193689270941, 84, -0.0802028285538126, + "contGamma", "contNormal", "", "", "", 0.44407930044449, + 0.104796067399654, -0.765322884187516, -0.0126897313297177, + 0.0162197667636987, 16, 0.00176501771699053, "contGamma", "debCollin1", + "contNormal", "", "", 0.810854206735371, 0.00737500748009933, + 0.239324193467361, -0.0207614719723181, 0.0268405444672006, + 50, 0.00303953624744125, "contGamma", "debCollin1", "contNormal", + "", "", 0.802355706790357, 0.0121435946820955, + 0.25029954696386, -0.0302836127261613, 0.039144635198765, 84, + 0.00443051123630188, "contGamma", "debCollin1", "contNormal", + "", "", 0.802473481182998, 0.0177116131909993, + 0.250147244552144)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.166081910070936, 0.10792257678213, -0.0290796666444026, "contGamma", - "", 0.677398434136382, "contNormal", 0.0699003882250844, - -0.416015810252211, -2.85705039527481, 2.20397252799499, -0.326538933639909, - "debCollin1", "", 0.800333823648056, "contNormal", - 1.2911010006282, -0.252915096093201, -0.0857121751715187, 0.60792087001202, - 0.261104347420251, "contcor1", "", 0.140056992883251, - "contNormal", 0.176950456910134, 1.47557882573231, -0.184505038237753, - 0.0886601917440383, -0.0479224232468575, "contGamma:contcor1", - "", 0.491649286306918, "contNormal", 0.0696862881503141, - -0.68768798739127, -0.0197475169492253, 0.00116000083940391, - -0.00929375805491072, "contGamma", "", 0.0814250689499771, - "debCollin1", 0.00533364846332512, -1.74247667779679, -0.0185476017033763, - 0.035078756098602, 0.00826557719761284, "contcor1", "", - 0.545717847812172, "debCollin1", 0.0136804446982129, 0.604189218987348, - -0.0145563095597655, 0.00654285454853061, -0.00400672750561743, - "contGamma:contcor1", "", 0.456638375783228, "debCollin1", - 0.00538253872895716, -0.744393623042952)) + list(-0.166081910002496, 0.107922576850917, -0.0290796665757891, "contGamma", + "", 0.677398434855039, "contNormal", 0.0699003882251729, + -0.416015809270095, -2.85705039540825, 2.20397252815633, -0.326538933625959, + "debCollin1", "", 0.80033382366779, "contNormal", 1.2911010007034, + -0.252915096067664, -0.0857121752426425, 0.60792087003482, 0.261104347396089, + "contcor1", "", 0.140056992973602, "contNormal", 0.176950456934095, + 1.47557882539595, -0.184505038334425, 0.0886601916860251, -0.0479224233242001, + "contGamma:contcor1", "", 0.491649285669151, "contNormal", + 0.0696862881601761, -0.687687988403815, -0.0197475169481414, + 0.00116000084067494, -0.00929375805373325, "contGamma", "", + 0.081425068991301, "debCollin1", 0.00533364846337285, -1.74247667756044, + -0.0185476017037164, 0.0350787560990341, 0.00826557719765883, + "contcor1", "", 0.54571784781572, "debCollin1", 0.0136804446984099, + 0.60418921898201, -0.0145563095592424, 0.00654285454935806, + -0.00400672750494215, "contGamma:contcor1", "", 0.456638375865599, + "debCollin1", 0.0053825387290348, -0.744393622906757)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.165695421227273, 0.204083546895091, 16, 0.0191940628339091, - "Total", 0.838766810201981, 0.0943331028118714, 0.203471127968596, - -0.16124846307974, 0.108819327045611, 50, -0.0262145680170648, - "Total", 0.703578626899117, 0.0688961104019286, -0.380494165260322, - -0.278343598352713, 0.126798963747099, 84, -0.0757723173028069, - "Total", 0.463479355993182, 0.103354593578128, -0.73312965277667, - -0.0126897313297684, 0.0162197667642412, 16, 0.00176501771723642, - "Total indirect", 0.810854206713327, 0.00737500748025067, 0.239324193495791, - -0.0207614719735328, 0.0268405444694456, 50, 0.0030395362479564, - "Total indirect", 0.80235570677162, 0.0121435946829781, 0.25029954698809, - -0.0302836127286732, 0.0391446352028949, 84, 0.00443051123711088, - "Total indirect", 0.802473481166182, 0.0177116131926937, 0.25014724457389 + list(-0.165695421089731, 0.204083547044407, 16, 0.0191940629773376, + "Total", 0.838766809018757, 0.0943331028148751, 0.203471129482566, + -0.161248463011925, 0.108819327113429, 50, -0.026214567949248, + "Total", 0.703578627629663, 0.0688961104019295, -0.380494164275982, + -0.278343598382402, 0.12679896374738, 84, -0.0757723173175107, + "Total", 0.463479355939496, 0.103354593585774, -0.733129652864702, + -0.0126897313297177, 0.0162197667636987, 16, 0.00176501771699053, + "Total indirect", 0.810854206735371, 0.00737500748009933, 0.239324193467361, + -0.0207614719723181, 0.0268405444672006, 50, 0.00303953624744125, + "Total indirect", 0.802355706790357, 0.0121435946820955, 0.25029954696386, + -0.0302836127261613, 0.039144635198765, 84, 0.00443051123630188, + "Total indirect", 0.802473481182998, 0.0177116131909993, 0.250147244552144 )) @@ -1530,7 +1525,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 8 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1541,23 +1536,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -1566,79 +1561,80 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(389.534200538847, 431.216923514656, 2, "Model 1", 100, -178.767100269423, + list(389.534200538851, 431.216923514661, 2, "Model 1", 100, -178.767100269426, 8)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962237032888125, 0.0896224699735494, 0.0400000498223341, - "facExperimexperimental", "", 0.114128867165655, "facGenderm", - 0.0253180265263192, 1.57990393843502, 0.18070491517623, 0.319295562315781, - 0.250000238746006, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353554065872476, 7.07106105905112, 0.180704915177124, - 0.31929556231885, 0.250000238747987, "facExperimexperimental", - "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353554065878023, 7.0710610589962, 0.0047453549557304, 0.00838477637147298, - 0.00656506566360169, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000928440890865819, 7.07106475833849, 0.758625478845071, - 1.34044837528535, 1.04953692706521, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.148426935655354, 7.0710678114532 + list(-0.00962237030987215, 0.0896224699824778, 0.0400000498363028, + "facExperimexperimental", "", 0.114128867002528, "facGenderm", + 0.0253180265237475, 1.57990393914723, 0.180704915169893, 0.319295562293862, + 0.250000238731877, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353554065832726, 7.0710610594465, 0.758625478844887, + 1.34044837528553, 1.04953692706521, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.148426935655448, 7.07106781144874, + 0.00474535494860523, 0.00838477634662079, 0.00656506564761301, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000928440886343538, 7.07106477555948, 0.180704915169599, 0.319295562292805, + 0.250000238731202, "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353554065830779, 7.07106105946633 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0389876734574709, 1.18993239590566, 0.614460034681565, 0, "m", - "facGender", "contNormal", "", "", "", 0.036371515498824, - 0.293613742784738, 2.09274957246144, -0.261259761975917, 0.892797982417963, + list(0.0389876734895682, 1.18993239587356, 0.614460034681565, 0, "m", + "facGender", "contNormal", "", "", "", 0.0363715154883988, + 0.293613742768362, 2.09274957257817, -0.261259762032965, 0.892797982475011, 0.315769110221023, 1, "m", "facGender", "contNormal", "", "", - "", 0.283470138596737, 0.294407895628935, 1.07255652755662, - -0.0126694778620506, 0.0123445955233525, -0.00016244116934909, + "", 0.283470138644336, 0.294407895658042, 1.07255652745058, + -0.0126694644988879, 0.0123445825076434, -0.000162440995622282, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.979691262161339, 0.00638125842686675, -0.0254559772513163, - -0.0435841095532679, 0.0447386598161608, 0.000577275131446476, + "", 0.979691262464158, 0.00638125169743907, -0.0254559768716649, + -0.0435841206778998, 0.0447386712358085, 0.000577275278954367, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.979560003906632, 0.0225317327425676, 0.0256205387327301 + "", 0.979560003901, 0.022531738493765, 0.0256205387397919 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0389876734574709, 1.18993239590566, 0.614460034681565, "facGenderm", - "", 0.036371515498824, "contNormal", 0.293613742784738, - 2.09274957246144, -2.51056185077398, 2.44573722648528, -0.0324123121443508, - "debCollin1", "", 0.979548597684694, "contNormal", - 1.26438524288046, -0.0256348390072243, -0.427732890877032, 0.723063281997863, - 0.147665195560416, "facExperimexperimental", "", 0.6149725473098, - "contNormal", 0.293575846789081, 0.502988230045046, -1.11430547323624, - 0.516923624315154, -0.298690924460542, "facGenderm:facExperimexperimental", - "", 0.472899265278483, "contNormal", 0.416137518448889, - -0.7177697545126, -0.0404917023610975, 0.0505151260912927, 0.00501171186509761, - "facGenderm", "", 0.82908989210391, "debCollin1", 0.0232164542742215, - 0.215868961121354, -0.0488495033123178, 0.0421573251397484, - -0.0033460890862847, "facExperimexperimental", "", - 0.885401164581169, "debCollin1", 0.0232164542741388, -0.144125758687103, - -0.0871736230662236, 0.0415294679993971, -0.0228220775334133, - "facGenderm:facExperimexperimental", "", 0.486995646521936, - "debCollin1", 0.0328330245047394, -0.695095193868567)) + list(0.0389876734895682, 1.18993239587356, 0.614460034681565, "facGenderm", + "", 0.0363715154883988, "contNormal", 0.293613742768362, + 2.09274957257817, -2.51056185078724, 2.44573722649854, -0.0324123121443508, + "debCollin1", "", 0.979548597684803, "contNormal", + 1.26438524288723, -0.0256348390070872, -0.427732890820987, 0.723063281941818, + 0.147665195560416, "facExperimexperimental", "", 0.614972547275355, + "contNormal", 0.293575846760486, 0.502988230094038, -1.11430547322961, + 0.516923624308527, -0.298690924460542, "facGenderm:facExperimexperimental", + "", 0.472899265274886, "contNormal", 0.416137518445509, + -0.717769754518431, -0.0404917076648898, 0.0505151206752815, + 0.00501170650519585, "facGenderm", "", 0.829090071858942, + "debCollin1", 0.0232164542455937, 0.215868730521028, -0.0488494969620237, + 0.0421573313782042, -0.00334608279190978, "facExperimexperimental", + "", 0.885401378526267, "debCollin1", 0.0232164542456081, + -0.144125487747241, -0.0871736221779587, 0.0415294687289691, + -0.0228220767244948, "facGenderm:facExperimexperimental", "", + 0.486995661423805, "debCollin1", 0.0328330244642558, -0.695095170088287 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0389573728877487, 1.18963781413668, 0.614297593512216, 0, "m", - "Total", 0.0363780113944387, 0.293546322872603, 2.09267684739085, - -0.2589938353015, 0.891686606006439, 0.31634638535247, 1, "m", - "Total", 0.281180565102892, 0.293546322887655, 1.07767108863953, - -0.0126694778620506, 0.0123445955233525, -0.00016244116934909, - 0, "m", "Total indirect", 0.979691262161339, 0.00638125842686675, - -0.0254559772513163, -0.0435841095532679, 0.0447386598161608, - 0.000577275131446476, 1, "m", "Total indirect", 0.979560003906632, - 0.0225317327425676, 0.0256205387327301)) + list(0.0389573730957821, 1.1896378142761, 0.614297593685943, 0, "m", + "Total", 0.036378011330426, 0.293546322855099, 2.09267684810746, + -0.25899383519449, 0.891686606194445, 0.316346385499978, 1, + "m", "Total", 0.281180564912425, 0.293546322908318, 1.07767108906618, + -0.0126694644988879, 0.0123445825076434, -0.000162440995622282, + 0, "m", "Total indirect", 0.979691262464158, 0.00638125169743907, + -0.0254559768716649, -0.0435841206778998, 0.0447386712358085, + 0.000577275278954367, 1, "m", "Total indirect", 0.979560003901, + 0.022531738493765, 0.0256205387397919)) @@ -1654,7 +1650,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 9 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1665,23 +1661,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -1690,129 +1686,130 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(990.094319982524, 1042.19772370229, 10, "Model 1", 100, -475.047159991262, + list(990.094319977651, 1042.19772369741, 10, "Model 1", 100, -475.047159988826, 9)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.54484763693664, 0.0642097027389649, -0.240318967098838, "contcor1", - "", 0.12193399759072, "contGamma", 0.155374625370612, - -1.5467066551286, -0.403934729538153, 0.194628523830995, -0.104653102853579, - "contcor2", "", 0.493115394131512, "contGamma", 0.15269751334477, - -0.685362194584575, 0.42497958612686, 0.89676405876516, 0.66087182244601, - "contcor2", "", 3.9965763143357e-08, "contcor1", 0.120355393354081, - 5.49100297069155, 1.68041191041863, 2.96919468452232, 2.32480329747048, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328777157200196, 7.07106088898651, 0.73263457904545, 1.29452390376284, - 1.01357924140414, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341747386559, 7.07106798880273, 0.721542183404804, - 1.27492490966532, 0.998233546535062, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171656883883, 7.07106205713891, - 0.0046262132522075, 0.00817425886472432, 0.00640023605846591, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000905130308644277, 7.07106589774053, 0.798508437001589, 1.41091930982999, - 1.10471387341579, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.156230134242012, 7.07106781144097)) + list(-0.403934709900946, 0.194627627221449, -0.104653541339749, "contcor2", + "", 0.493112920661958, "contGamma", 0.152697279604059, + -0.685366115304172, -0.544848471379311, 0.0642085158721243, + -0.240319977753593, "contcor1", "", 0.121932212479145, + "contGamma", 0.155374535464835, -1.54671405474923, 1.68041098279404, + 2.96919144904592, 2.32480121591998, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.32877656845167, 7.07106722011341, + 0.798508437001129, 1.41091930982908, 1.1047138734151, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.156230134241897, + 7.07106781144179, 0.00462621320803617, 0.00817425871065686, + 0.00640023595934652, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000905130280609035, 7.07106600724924, 0.424979303923101, + 0.896763375787041, 0.660871339855071, "contcor2", "", + 3.99656148175609e-08, "contcor1", 0.120355291113845, 5.49100362550698, + 0.732634622582289, 1.29452405562078, 1.01357933910154, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341775020001, + 7.07106730721106, 0.721541879940711, 1.27492385121403, 0.998232865577373, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171464281571, + 7.07106688067189)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.180369436228721, 0.0938579557959881, "", "", -0.0432557402163664, - "contGamma", "contNormal", "", "", "", 0.536366572058952, - 0.0699572528341795, -0.618316735777146, -0.0112823578372222, - 0.013697450136648, 16, 16, 0.00120754614971293, "contGamma", - "debCollin1", "contNormal", "", "", 0.849706592315187, - 0.00637251708983118, 0.189492806796838, -0.0217864646337114, - 0.0265801048309022, 50, 16, 0.00239682009859541, "contGamma", - "debCollin1", "contNormal", "", "", 0.845977608319149, - 0.0123386373030635, 0.194253225840452, -0.033959347798064, 0.0413488707200262, - 84, 16, 0.00369476146098112, "contGamma", "debCollin1", "contNormal", - "", "", 0.847492362211712, 0.019211633252476, - 0.192318966973041, -0.0125633341927989, 0.015146747875033, 16, - 50, 0.00129170684111702, "contGamma", "debCollin1", "contNormal", - "", "", 0.855011730868061, 0.00706902838174719, - 0.182727635448785, -0.0221379396607771, 0.0270999012407761, - 50, 50, 0.0024809807899995, "contGamma", "debCollin1", "contNormal", - "", "", 0.843423688677146, 0.0125609045089438, - 0.197516093545091, -0.0339443314234804, 0.0415021757282509, - 84, 50, 0.0037789221523852, "contGamma", "debCollin1", "contNormal", - "", "", 0.844344725040594, 0.0192469116133877, - 0.19633914408152, -0.0155176014689822, 0.0182983136477349, 16, - 84, 0.00139035608937636, "contGamma", "debCollin1", "contNormal", - "", "", 0.87195986547754, 0.00862666747538545, - 0.161169547028847, -0.023550280163801, 0.0287095402403187, 50, - 84, 0.00257963003825885, "contGamma", "debCollin1", "contNormal", - "", "", 0.846572070896425, 0.0133318318133237, - 0.193494043007712, -0.0346050743640666, 0.0423602171653558, - 84, 84, 0.00387757140064455, "contGamma", "debCollin1", "contNormal", - "", "", 0.843444867042652, 0.0196343637272202, - 0.197489027631125)) + list(-0.18037166803057, 0.093855723995512, "", "", -0.043257972017529, + "contGamma", "contNormal", "", "", "", 0.536345546879366, + 0.0699572528345298, -0.618348638129734, -0.0112823469722449, + 0.0136974413191591, 16, 16, 0.0012075471734571, "contGamma", + "debCollin1", "contNormal", "", "", 0.849706349404902, + 0.0063725120687016, 0.189493116754997, -0.0217863902667088, + 0.0265800229601214, 50, 16, 0.0023968163467063, "contGamma", + "debCollin1", "contNormal", "", "", 0.845977355092127, + 0.0123385974457537, 0.194253549258239, -0.0339592085980376, + 0.0413487135922281, 84, 16, 0.00369475249709524, "contGamma", + "debCollin1", "contNormal", "", "", 0.847492134936242, + 0.0192115576572542, 0.192319257137389, -0.0125633786742627, + 0.0151468079025851, 16, 50, 0.00129171461416118, "contGamma", + "debCollin1", "contNormal", "", "", 0.85501140881415, + 0.00706905504270033, 0.182728045878641, -0.0221379203181609, + 0.0270998878929816, 50, 50, 0.00248098378741038, "contGamma", + "debCollin1", "contNormal", "", "", 0.843423399344977, + 0.0125608961694001, 0.197516463312098, -0.0339442436702542, + 0.0415020835458529, 84, 50, 0.00377891993779932, "contGamma", + "debCollin1", "contNormal", "", "", 0.844344448610203, + 0.0192468657105993, 0.19633949727816, -0.0155177010468488, 0.018298444594121, + 16, 84, 0.00139037177363608, "contGamma", "debCollin1", "contNormal", + "", "", 0.87195929887819, 0.0086267262836734, + 0.161170266439014, -0.0235503294343676, 0.0287096113281382, + 50, 84, 0.00257964094688528, "contGamma", "debCollin1", "contNormal", + "", "", 0.846571779113002, 0.0133318625175579, + 0.193494415614317, -0.0346050530643567, 0.0423602072589051, + 84, 84, 0.00387757709727422, "contGamma", "debCollin1", "contNormal", + "", "", 0.843444577362881, 0.0196343557663187, + 0.197489397840388)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.180369436228721, 0.0938579557959881, -0.0432557402163664, "contGamma", - "", 0.536366572058952, "contNormal", 0.0699572528341795, - -0.618316735777146, -2.81958259727896, 2.30044925412217, -0.259566671578396, - "debCollin1", "", 0.842477205890922, "contNormal", - 1.30615457523385, -0.198725844934489, -0.0199698015409048, 0.000908042916001037, - -0.00953087931245188, "contGamma", "", 0.0735385068104779, - "debCollin1", 0.00532607859674658, -1.78947402658943, -0.0336994680053639, - 0.0420651390522923, 0.00418283552346422, "contcor1", "", - 0.828666162496539, "debCollin1", 0.0193280610397124, 0.216412578316571, - -0.0233913021295953, 0.0139845089294196, -0.00470339660008785, - "contGamma:contcor1", "", 0.621810300816535, "debCollin1", - 0.00953482088289136, -0.493286308978001, -0.0310213374132232, - 0.0494312981918923, 0.00920498038933459, "contcor2", "", - 0.653793704417738, "debCollin1", 0.0205240086653927, 0.448498173013144, - -0.018240670878656, 0.0175607896602272, -0.000339940609214391, - "contGamma:contcor2", "", 0.970309317128687, "debCollin1", - 0.0091331934722476, -0.0372203446962275)) + list(-0.18037166803057, 0.093855723995512, -0.043257972017529, "contGamma", + "", 0.536345546879366, "contNormal", 0.0699572528345298, + -0.618348638129734, -2.81958309157292, 2.30044876018594, -0.259567165693488, + "debCollin1", "", 0.842476909965635, "contNormal", + 1.30615457532511, -0.198726223218167, -0.0199697941183376, 0.000908050176914097, + -0.00953087197071173, "contGamma", "", 0.0735387263900533, + "debCollin1", 0.00532607855550751, -1.78947266199373, -0.0336995217410371, + 0.0420650847306885, 0.0041827814948257, "contcor1", "", + 0.828668339934898, "debCollin1", 0.0193280608902375, 0.216409784643135, + -0.0233912741447127, 0.0139845366251453, -0.00470336875978368, + "contGamma:contcor1", "", 0.621812360948663, "debCollin1", + 0.0095348208091255, -0.493283392938252, -0.0310213018406379, + 0.0494313331422735, 0.00920501565081779, "contcor2", "", + 0.653792462265298, "debCollin1", 0.0205240085066643, 0.448499894541988, + -0.0182406973546844, 0.0175607629072456, -0.00033996722371943, + "contGamma:contcor2", "", 0.97030699344044, "debCollin1", + 0.00913319340159497, -0.0372232590257051)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.177693134931255, 0.0935967467979477, 16, 16, -0.0420481940666534, - "Total", 0.543476863718327, 0.0692078741928684, -0.607563728217884, - -0.176063182928263, 0.0943453426927214, 50, 16, -0.040858920117771, - "Total", 0.553647106193617, 0.0689830343194907, -0.592303897919818, - -0.175630493036055, 0.0965085355252843, 84, 16, -0.0395609787553852, - "Total", 0.568785018757641, 0.069424497263199, -0.569841775092781, - -0.177598545662749, 0.0936704789122499, 16, 50, -0.0419640333752494, - "Total", 0.544252957854077, 0.0692025533924944, -0.606394292089816, - -0.175914165769241, 0.0943646469165074, 50, 50, -0.0407747594263669, - "Total", 0.554274176381045, 0.0689499436769434, -0.591367552342204, - -0.175422877637962, 0.0964692415099994, 84, 50, -0.0394768180639812, - "Total", 0.569257135190777, 0.0693615090105256, -0.569145894129705, - -0.177678365212413, 0.093947596958433, 16, 84, -0.04186538412699, - "Total", 0.545728096887404, 0.0692936105748364, -0.604173801591358, - -0.175930936897188, 0.094578716540973, 50, 84, -0.0406761101781075, - "Total", 0.555570583522043, 0.0690088327060871, -0.589433389655344, - -0.175369820469393, 0.0966134828379493, 84, 84, -0.0393781688157218, - "Total", 0.57035189990021, 0.0693847707031129, -0.567533313386811, - -0.0112823578372222, 0.013697450136648, 16, 16, 0.00120754614971293, - "Total indirect", 0.849706592315187, 0.00637251708983118, 0.189492806796838, - -0.0217864646337114, 0.0265801048309022, 50, 16, 0.00239682009859541, - "Total indirect", 0.845977608319149, 0.0123386373030635, 0.194253225840452, - -0.033959347798064, 0.0413488707200262, 84, 16, 0.00369476146098112, - "Total indirect", 0.847492362211712, 0.019211633252476, 0.192318966973041, - -0.0125633341927989, 0.015146747875033, 16, 50, 0.00129170684111702, - "Total indirect", 0.855011730868061, 0.00706902838174719, 0.182727635448785, - -0.0221379396607771, 0.0270999012407761, 50, 50, 0.0024809807899995, - "Total indirect", 0.843423688677146, 0.0125609045089438, 0.197516093545091, - -0.0339443314234804, 0.0415021757282509, 84, 50, 0.0037789221523852, - "Total indirect", 0.844344725040594, 0.0192469116133877, 0.19633914408152, - -0.0155176014689822, 0.0182983136477349, 16, 84, 0.00139035608937636, - "Total indirect", 0.87195986547754, 0.00862666747538545, 0.161169547028847, - -0.023550280163801, 0.0287095402403187, 50, 84, 0.00257963003825885, - "Total indirect", 0.846572070896425, 0.0133318318133237, 0.193494043007712, - -0.0346050743640666, 0.0423602171653558, 84, 84, 0.00387757140064455, - "Total indirect", 0.843444867042652, 0.0196343637272202, 0.197489027631125 + list(-0.177695366968202, 0.0935945172800583, 16, 16, -0.0420504248440719, + "Total", 0.543455483892819, 0.0692078748354971, -0.6075959555762, + -0.176065418680118, 0.0943431073384728, 50, 16, -0.0408611556708227, + "Total", 0.55362540985428, 0.0689830344209228, -0.592336304336728, + -0.175632719893458, 0.0965062808525906, 84, 16, -0.0395632195204338, + "Total", 0.568763086128397, 0.0694244901673312, -0.569874109627252, + -0.177600765997399, 0.0936682511906639, 16, 50, -0.0419662574033678, + "Total", 0.544231611240325, 0.0692025515080376, -0.606426446552243, + -0.175916394535477, 0.0943624180752396, 50, 50, -0.0407769882301186, + "Total", 0.554252522474563, 0.0689499436578022, -0.591399877460297, + -0.175425102635222, 0.0964669984757624, 84, 50, -0.0394790520797297, + "Total", 0.569235253909734, 0.0693615044091714, -0.569178140180442, + -0.177680573551959, 0.0939453730641733, 16, 84, -0.0418676002438929, + "Total", 0.545706813509877, 0.0692936066067242, -0.604205817738892, + -0.17593315919183, 0.0945764970505427, 50, 84, -0.0406783310706437, + "Total", 0.555549004463266, 0.0690088334214604, -0.589465566273339, + -0.175372045009348, 0.0966112551688387, 84, 84, -0.0393803949202548, + "Total", 0.570330104540171, 0.0693847699048443, -0.56756540339129, + -0.0112823469722449, 0.0136974413191591, 16, 16, 0.0012075471734571, + "Total indirect", 0.849706349404902, 0.0063725120687016, 0.189493116754997, + -0.0217863902667088, 0.0265800229601214, 50, 16, 0.0023968163467063, + "Total indirect", 0.845977355092127, 0.0123385974457537, 0.194253549258239, + -0.0339592085980376, 0.0413487135922281, 84, 16, 0.00369475249709524, + "Total indirect", 0.847492134936242, 0.0192115576572542, 0.192319257137389, + -0.0125633786742627, 0.0151468079025851, 16, 50, 0.00129171461416118, + "Total indirect", 0.85501140881415, 0.00706905504270033, 0.182728045878641, + -0.0221379203181609, 0.0270998878929816, 50, 50, 0.00248098378741038, + "Total indirect", 0.843423399344977, 0.0125608961694001, 0.197516463312098, + -0.0339442436702542, 0.0415020835458529, 84, 50, 0.00377891993779932, + "Total indirect", 0.844344448610203, 0.0192468657105993, 0.19633949727816, + -0.0155177010468488, 0.018298444594121, 16, 84, 0.00139037177363608, + "Total indirect", 0.87195929887819, 0.0086267262836734, 0.161170266439014, + -0.0235503294343676, 0.0287096113281382, 50, 84, 0.00257964094688528, + "Total indirect", 0.846571779113002, 0.0133318625175579, 0.193494415614317, + -0.0346050530643567, 0.0423602072589051, 84, 84, 0.00387757709727422, + "Total indirect", 0.843444577362881, 0.0196343557663187, 0.197489397840388 )) @@ -1829,7 +1826,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 9 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1840,23 +1837,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(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, +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) @@ -1865,111 +1862,112 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(678.245914480132, 730.349318199894, 10, "Model 1", 100, -319.122957240066, + list(678.245914480128, 730.34931819989, 10, "Model 1", 100, -319.122957240064, 9)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962233589416118, 0.0896223187506266, 0.0399999914282327, - "facExperimexperimental", "", 0.114128718491041, "facGenderm", - 0.0253179791638053, 1.57990458754374, -0.16325064346661, 0.0341992613249421, - -0.0645256910708342, "contcor2", "", 0.200188804184563, - "facGenderm", 0.0503707992465709, -1.28101384206698, -0.170527289293386, - 0.0272978081049055, -0.0716147405942401, "contcor2", "", - 0.155883083473357, "facExperimexperimental", 0.0504665134050192, - -1.41905465153686, 0.180704809182135, 0.319295192614084, 0.250000000898109, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553393136641, 7.0710677864005, 0.180704815748453, 0.319295215517031, - 0.250000015632742, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553434812479, 7.07106736964213, - 0.72154182436723, 1.27492365737003, 0.998232740868629, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171429007829, - 7.071067764096, 0.00473838138261496, 0.0083724522988411, 0.00655541684072803, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000927075942438542, 7.07106779568126, 0.762533966062653, 1.34735445145516, - 1.05494420875891, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.149191640766233, 7.07106781144587)) + list(-0.16325069159424, 0.0341992192299563, -0.0645257361821418, "contcor2", + "", 0.200188503367873, "facGenderm", 0.0503708007855389, + -1.28101469851293, -0.00962232995390352, 0.089622309064412, + 0.0399999895552542, "facExperimexperimental", "", 0.114128678457754, + "facGenderm", 0.0253179751773871, 1.57990476232793, 0.180704797460858, + 0.319295151730962, 0.24999997459591, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553318742812, 7.07106853033869, + 0.762533966062582, 1.34735445145523, 1.05494420875891, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.14919164076627, + 7.07106781144414, 0.00473838147316543, 0.00837245261467598, + 0.00655541704392071, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000927075999910112, 7.07106757650539, -0.170527264436012, + 0.0272978411886537, -0.071614711623679, "contcor2", "", + 0.155883268024098, "facExperimexperimental", 0.0504665155036227, + -1.41905401847168, 0.180704809745863, 0.319295194580343, 0.250000002163103, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553396714589, 7.07106775062097, + 0.721541874611074, 1.27492383261666, 0.998232853613865, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171460896881, + 7.07106696546143)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0622024991960345, 0.868598726146532, "", 0.465400612671283, - "", "m", "facGender", "contNormal", "", "", "", 0.0236768306592932, - 0.205717103301706, 2.26233310309024, -0.0234805716729502, 0.0240745476005247, - 16, 0.000296987963787239, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.980469365838342, 0.0121316308994919, - 0.0244804648482734, -0.0327171718179227, 0.031908672568233, - 16, -0.000404249624844824, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.980437785068855, 0.0164864877354676, - -0.0245200573543118, -0.0138827148944902, 0.0142331283695509, - 50, 0.000175206737530344, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.980511668942837, 0.00717254079304909, - 0.0244274299143948, -0.0425413075557195, 0.0414892458535161, - 50, -0.000526030851101718, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.980422891086795, 0.0214367595711089, - -0.0245387298092697, -0.00306290247311634, 0.00312782336911389, - 84, 3.24604479987777e-05, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.983601636527509, 0.00157929581641854, - 0.0205537478547814, -0.0540879144054593, 0.0527503601241927, - 84, -0.000668777140633285, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.980423767086204, 0.0272551626898195, - -0.0245376315762404)) + list(0.0622024991984884, 0.868598726144078, "", 0.465400612671283, + "", "m", "facGender", "contNormal", "", "", "", 0.0236768306584432, + 0.205717103300454, 2.26233310310401, -0.023480568561037, 0.0240745444093339, + 16, 0.000296987924148467, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.980469365856427, 0.0121316292915277, + 0.0244804648256004, -0.032717154583596, 0.0319086557609848, + 16, -0.000404249411305584, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.980437785097947, 0.0164864790512328, + -0.0245200573178392, -0.0138827195038994, 0.0142331330964475, + 50, 0.000175206796274091, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.980511668880159, 0.00717254317480351, + 0.0244274299929733, -0.0425412823610393, 0.0414892212826794, + 50, -0.00052603053917996, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.980422891101302, 0.0214367468755907, + -0.0245387297910828, -0.00306291394501443, 0.00312783518913831, + 84, 3.24606220619373e-05, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.983601610295137, 0.00157930175834469, + 0.0205537807391288, -0.0540878798977091, 0.0527503264709249, + 84, -0.000668776713392113, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.980423767102963, 0.0272551453014852, + -0.0245376315552304)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0622024991960345, 0.868598726146532, 0.465400612671283, "facGenderm", - "", 0.0236768306592932, "contNormal", 0.205717103301706, - 2.26233310309024, -2.437712849311, 2.49956339305167, 0.0309252718703351, - "debCollin1", "", 0.980411525583066, "contNormal", - 1.25953238970391, 0.0245529786475796, -0.0402674820786209, 0.0518453509235997, - 0.00578893442248938, "facGenderm", "", 0.805409547027929, - "debCollin1", 0.0234986034765932, 0.246352274859896, -0.0489096767166117, - 0.0420350192788051, -0.00343732871890329, "facExperimexperimental", - "", 0.882218973339189, "debCollin1", 0.0232006038663917, - -0.148156864308286, -0.0882812951233331, 0.0429308392520157, - -0.0226752279356587, "facGenderm:facExperimexperimental", "", - 0.498141754792757, "debCollin1", 0.0334730983350545, -0.677416464669248, - -0.0174100484132546, 0.0258806715444776, 0.0042353115656115, - "contcor2", "", 0.701346926993641, "debCollin1", 0.0110437539411958, - 0.38350289115124, -0.0370220696484552, 0.0287647424476423, -0.00412866360040647, - "facGenderm:contcor2", "", 0.805676253221833, "debCollin1", - 0.0167826584098013, -0.246007724139537)) + list(0.0622024991984884, 0.868598726144078, 0.465400612671283, "facGenderm", + "", 0.0236768306584432, "contNormal", 0.205717103300454, + 2.26233310310401, -2.4377128493963, 2.49956339313697, 0.0309252718703351, + "debCollin1", "", 0.980411525583743, "contNormal", + 1.25953238974744, 0.0245529786467312, -0.0402674809927275, 0.0518453534373269, + 0.00578893622229969, "facGenderm", "", 0.805409490698547, + "debCollin1", 0.0234986038408432, 0.246352347633432, -0.0489096680891263, + 0.042035029316418, -0.00343731938635413, "facExperimexperimental", + "", 0.882219292601553, "debCollin1", 0.0232006042261247, + -0.148156459756492, -0.0882812879536171, 0.0429308484558348, + -0.0226752197488911, "facGenderm:facExperimexperimental", "", + 0.498141916588695, "debCollin1", 0.0334730988539678, -0.677416209590145, + -0.0174100525786915, 0.0258806680500183, 0.00423530773566338, + "contcor2", "", 0.701347188486652, "debCollin1", 0.0110437541123667, + 0.383502538409534, -0.0370220668228941, 0.0287647462928684, + -0.00412866026501286, "facGenderm:contcor2", "", 0.805676410018953, + "debCollin1", 0.0167826586699247, -0.246007521586053)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0605315476462935, 0.870863653623847, 16, 0.46569760063507, 0, - "m", "Total", 0.0242729391292758, 0.206721172523921, 2.25278134285534, - 0.0622345831299339, 0.867758142962943, 16, 0.464996363046438, - 1, "m", "Total", 0.0236469844630725, 0.205494480048326, 2.2628168062572, - 0.0613836654269441, 0.869767973390683, 50, 0.465575819408813, - 0, "m", "Total", 0.0239694305294997, 0.206224276144912, 2.25761888033811, - 0.0617397111812278, 0.868009452459135, 50, 0.464874581820181, - 1, "m", "Total", 0.0238131494725367, 0.205684835955574, 2.26013055197025, - 0.0620841183034912, 0.868782027935073, 84, 0.465433073119282, - 0, "m", "Total", 0.02371935861357, 0.205794064583511, 2.26164478582622, - 0.0608591197226557, 0.868604551338644, 84, 0.46473183553065, - 1, "m", "Total", 0.0241139573028737, 0.206061294489945, 2.25530872588654, - -0.0234805716729502, 0.0240745476005247, 16, 0.000296987963787239, - 0, "m", "Total indirect", 0.980469365838342, 0.0121316308994919, - 0.0244804648482734, -0.0327171718179227, 0.031908672568233, - 16, -0.000404249624844824, 1, "m", "Total indirect", 0.980437785068855, - 0.0164864877354676, -0.0245200573543118, -0.0138827148944902, - 0.0142331283695509, 50, 0.000175206737530344, 0, "m", "Total indirect", - 0.980511668942837, 0.00717254079304909, 0.0244274299143948, - -0.0425413075557195, 0.0414892458535161, 50, -0.000526030851101718, - 1, "m", "Total indirect", 0.980422891086795, 0.0214367595711089, - -0.0245387298092697, -0.00306290247311634, 0.00312782336911389, - 84, 3.24604479987777e-05, 0, "m", "Total indirect", 0.983601636527509, - 0.00157929581641854, 0.0205537478547814, -0.0540879144054593, - 0.0527503601241927, 84, -0.000668777140633285, 1, "m", "Total indirect", - 0.980423767086204, 0.0272551626898195, -0.0245376315762404 + list(0.0605315479611798, 0.870863653229683, 16, 0.465697600595432, + 0, "m", "Total", 0.024272939017022, 0.206721172343038, 2.2527813446348, + 0.0622345837985437, 0.867758142721411, 16, 0.464996363259978, + 1, "m", "Total", 0.0236469842413172, 0.205494479816143, 2.26281680985305, + 0.0613836650738303, 0.869767973861284, 50, 0.465575819467557, + 0, "m", "Total", 0.0239694306552691, 0.206224276355047, 2.25761887832253, + 0.0617397127562481, 0.868009451507958, 50, 0.464874582132103, + 1, "m", "Total", 0.0238131489390738, 0.205684835311124, 2.26013056056817, + 0.0620841176454394, 0.868782028941251, 84, 0.465433073293345, + 0, "m", "Total", 0.0237193588497735, 0.205794065008067, 2.26164478200623, + 0.0608591228377613, 0.868604549078021, 84, 0.464731835957891, + 1, "m", "Total", 0.0241139562313502, 0.20606129311856, 2.2553087429695, + -0.023480568561037, 0.0240745444093339, 16, 0.000296987924148467, + 0, "m", "Total indirect", 0.980469365856427, 0.0121316292915277, + 0.0244804648256004, -0.032717154583596, 0.0319086557609848, + 16, -0.000404249411305584, 1, "m", "Total indirect", 0.980437785097947, + 0.0164864790512328, -0.0245200573178392, -0.0138827195038994, + 0.0142331330964475, 50, 0.000175206796274091, 0, "m", "Total indirect", + 0.980511668880159, 0.00717254317480351, 0.0244274299929733, + -0.0425412823610393, 0.0414892212826794, 50, -0.00052603053917996, + 1, "m", "Total indirect", 0.980422891101302, 0.0214367468755907, + -0.0245387297910828, -0.00306291394501443, 0.00312783518913831, + 84, 3.24606220619373e-05, 0, "m", "Total indirect", 0.983601610295137, + 0.00157930175834469, 0.0205537807391288, -0.0540878798977091, + 0.0527503264709249, 84, -0.000668776713392113, 1, "m", "Total indirect", + 0.980423767102963, 0.0272551453014852, -0.0245376315552304 )) @@ -1986,7 +1984,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 10 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -1997,27 +1995,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -2026,159 +2024,159 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(994.470215604387, 1056.9943000681, 6, "Model 1", 100, -473.235107802194, + list(994.47021560483, 1056.99430006854, 6, "Model 1", 100, -473.235107802415, 10)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544847237722932, 0.0642095766945461, -0.240318830514193, "contcor1", - "", 0.121933887864896, "contGamma", 0.15537449137373, - -1.54670710996017, -0.403935927160572, 0.194627521278341, -0.104654202941116, - "contcor2", "", 0.493110990024461, "contGamma", 0.15269756310838, - -0.685369175582948, 0.424979707068854, 0.896764946522677, 0.660872326795765, - "contcor2", "", 3.99668345085757e-08, "contcor1", 0.12035558897388, - 5.49099823639422, 1.68041072128933, 2.96919053690682, 2.32480062909807, + list(-0.40393633516448, 0.194627260086343, -0.104654537539068, "contcor2", + "", 0.493109713687085, "contGamma", 0.152697600561086, + -0.68537119872556, -0.544846693693219, 0.0642098763913818, -0.240318408650918, + "contcor1", "", 0.121934393190041, "contGamma", 0.155374429042768, + -1.54670501530704, 1.68041034700747, 2.96918923144789, 2.32479978922768, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776402470458, 7.07106900504201, 0.732634710977552, 1.29452436394456, - 1.01357953746106, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341831125246, 7.07106592335516, 0.721542795514781, - 1.27492704467991, 0.998234920097347, "contcor2", "", - 1.53765888910584e-12, "contcor2", 0.141172045387098, 7.07105232739354, - 0.00462621336289047, 0.0081742592507802, 0.00640023630683534, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000905130378893762, 7.07106562333884, 0.770087764748521, 1.36070158528519, - 1.06539467501686, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.150669559541745, 7.07106782721875)) + 0.328776164920923, 7.07107155954217, 0.770087764351379, 1.3607015839001, + 1.06539467412574, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.150669559289713, 7.0710678331325, 0.00462621316575856, + 0.00817425856319512, 0.00640023586447684, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000905130253775857, 7.07106611206233, + 0.424979799962066, 0.896765348132967, 0.660872574047517, "contcor2", + "", 3.99671828965609e-08, "contcor1", 0.120355667729684, + 5.490996697653, 0.732634727383404, 1.29452442114335, 1.01357957426338, + "contcor1", "", 1.53743684450092e-12, "contcor1", 0.143341841531798, + 7.07106566674415, 0.721543052420085, 1.27492794077402, 0.998235496597055, + "contcor2", "", 1.53765888910584e-12, "contcor2", 0.141172208448464, + 7.07104824361709)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.176626011720109, 0.198183811048906, 16, 16, 0.0107788996643987, - "contGamma", "contNormal", "", "", "", 0.91024419544886, - 0.095616507682148, 0.112730530801547, -0.253642837376779, 0.25568596916654, - 50, 16, 0.00102156589488065, "contGamma", "contNormal", "", - "", "", 0.993726905647035, 0.129933205548888, 0.00786223883698675, - -0.482413948688039, 0.463159301109202, 84, 16, -0.00962732378941848, - "contGamma", "contNormal", "", "", "", 0.968164383357829, - 0.241222098277265, -0.0399106212000223, -0.287055897621293, - 0.254966168639527, 16, 50, -0.016044864490883, "contGamma", - "contNormal", "", "", "", 0.907623073951672, 0.138273476078189, - -0.116037181865669, -0.162770711687414, 0.111166315166612, 50, - 50, -0.0258021982604011, "contGamma", "contNormal", "", "", - "", 0.711964485360669, 0.0698831787254273, -0.369219012801043, - -0.328512634495527, 0.255610458606126, 84, 50, -0.0364510879447002, - "contGamma", "contNormal", "", "", "", 0.80675405972854, - 0.149013731300458, -0.244615631234705, -0.539344053403376, 0.444371186812877, - 16, 84, -0.0474864332952498, "contGamma", "contNormal", "", - "", "", 0.849916568692494, 0.250952376670101, -0.189224879737541, - -0.354370266456379, 0.239882732326843, 50, 84, -0.0572437670647679, - "contGamma", "contNormal", "", "", "", 0.705725875226671, - 0.151597938398515, -0.377602543078704, -0.284292604613835, 0.148507291115701, - 84, 84, -0.067892656749067, "contGamma", "contNormal", "", "", - "", 0.538612113300844, 0.110410165478398, -0.614913096587563, - -0.011149607603969, 0.0134144422989011, 16, 16, 0.00113241734746607, + list(-0.176626040134406, 0.198183782443686, 16, 16, 0.01077887115464, + "contGamma", "contNormal", "", "", "", 0.910244431799913, + 0.0956165076334425, 0.112730232691222, -0.253642847390018, 0.255685959005243, + 50, 16, 0.00102155580761252, "contGamma", "contNormal", "", + "", "", 0.993726967586474, 0.129933205511117, 0.00786216120501326, + -0.48241393851876, 0.463159310977001, 84, 16, -0.00962731377087953, + "contGamma", "contNormal", "", "", "", 0.968164416459384, + 0.241222098200355, -0.0399105796803212, -0.287055904337625, + 0.254966161693, 16, 50, -0.0160448713223128, "contGamma", "contNormal", + "", "", "", 0.907623034757458, 0.138273476019464, -0.116037231320157, + -0.162770700040035, 0.111166326701354, 50, 50, -0.0258021866693402, + "contGamma", "contNormal", "", "", "", 0.711964608867456, + 0.0698831786966929, -0.369218847089468, -0.328512602684112, + 0.255610490188448, 84, 50, -0.0364510562478323, "contGamma", + "contNormal", "", "", "", 0.806754224370608, 0.149013731242015, + -0.244615418619588, -0.539344034664796, 0.444371205232095, 16, + 84, -0.0474864147163505, "contGamma", "contNormal", "", "", + "", 0.849916626666462, 0.250952376588629, -0.189224805765406, + -0.354370229366097, 0.239882769239342, 50, 84, -0.057243730063378, + "contGamma", "contNormal", "", "", "", 0.70572605648673, + 0.151597938353161, -0.377602299115859, -0.284292547410124, 0.148507348126384, + 84, 84, -0.06789259964187, "contGamma", "contNormal", "", "", + "", 0.538612454717159, 0.110410165429155, -0.614912579634103, + -0.0111496082956666, 0.0134144431281046, 16, 16, 0.00113241741621903, "contGamma", "debCollin1", "contNormal", "", "", - 0.85659441105862, 0.00626645440850654, 0.18071101673202, -0.0215878308287415, - 0.0260832370031915, 50, 16, 0.00224770308722498, "contGamma", - "debCollin1", "contNormal", "", "", 0.853365819933423, - 0.0121612101569101, 0.184825610134516, -0.0336129298254576, - 0.0405427212714798, 84, 16, 0.0034648957230111, "contGamma", - "debCollin1", "contNormal", "", "", 0.85467467318165, - 0.0189176055483335, 0.183157203175554, -0.012369769655007, 0.0147924527517403, - 16, 50, 0.00121134154836666, "contGamma", "debCollin1", "contNormal", - "", "", 0.861224778624891, 0.00692926569595141, - 0.174815283685026, -0.0219771724707164, 0.0266304270469676, - 50, 50, 0.00232662728812558, "contGamma", "debCollin1", "contNormal", - "", "", 0.851167231746682, 0.0124001256913634, - 0.187629331027351, -0.0336749986385088, 0.0407626384863322, - 84, 50, 0.00354381992391169, "contGamma", "debCollin1", "contNormal", - "", "", 0.851958932148349, 0.018989542081384, - 0.186619556634059, -0.015113157227429, 0.0177208628794294, 16, - 84, 0.0013038528260002, "contGamma", "debCollin1", "contNormal", - "", "", 0.876299453443827, 0.00837617945172691, - 0.155661997634421, -0.0233255012020632, 0.0281637783335815, - 50, 84, 0.00241913856575911, "contGamma", "debCollin1", "contNormal", - "", "", 0.853879052644048, 0.0131352616532206, - 0.184171326740642, -0.0343532493066957, 0.0416259117097862, - 84, 84, 0.00363633120154523, "contGamma", "debCollin1", "contNormal", - "", "", 0.851185420292616, 0.0193827951982271, - 0.187606130300435)) + 0.856594411229165, 0.00626645479649864, 0.180711016514755, -0.0215878488244143, + 0.0260832588757973, 50, 16, 0.00224770502569151, "contGamma", + "debCollin1", "contNormal", "", "", 0.853365816149532, + 0.0121612203275762, 0.184825614958617, -0.033612966260651, 0.0405427656647157, + 84, 16, 0.00346489970203235, "contGamma", "debCollin1", "contNormal", + "", "", 0.854674664789451, 0.0189176261682096, + 0.183157213871526, -0.0123697654337952, 0.014792447542944, 16, + 50, 0.0012113410545744, "contGamma", "debCollin1", "contNormal", + "", "", 0.861224786931106, 0.00692926329029292, + 0.174815273114437, -0.0219771855599355, 0.0266304428880293, + 50, 50, 0.00232662866404688, "contGamma", "debCollin1", "contNormal", + "", "", 0.851167232305641, 0.0124001330716726, + 0.187629330314359, -0.0336750306904459, 0.0407626773712213, + 84, 50, 0.00354382334038771, "contGamma", "debCollin1", "contNormal", + "", "", 0.851958930524662, 0.0189895601778457, + 0.186619558704795, -0.0151131483762209, 0.017720851721858, 16, + 84, 0.00130385167281857, "contGamma", "debCollin1", "contNormal", + "", "", 0.876299487193745, 0.00837617434735265, + 0.155661954819585, -0.0233255079627803, 0.0281637865273624, + 50, 84, 0.00241913928229105, "contGamma", "debCollin1", "contNormal", + "", "", 0.853879051812739, 0.0131352654682136, + 0.184171327800355, -0.034353275420804, 0.0416259433380678, 84, + 84, 0.00363633395863189, "contGamma", "debCollin1", "contNormal", + "", "", 0.8511854205531, 0.0193828099286993, + 0.18760612996817)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.161747330715793, 0.111897611603565, -0.024924859556114, "contGamma", - "", 0.72105785611609, "contNormal", 0.0698086659953536, - -0.357045349609932, -2.77216347799977, 2.28533091806331, -0.243416279968226, - "debCollin1", "", 0.850355058810312, "contNormal", - 1.2902008495962, -0.188665415965591, -0.218443531323747, 0.759300824058727, - 0.27042864636749, "contcor1", "", 0.278280491188469, - "contNormal", 0.24942916377413, 1.08419016555889, -0.251421013195681, - 0.231388299685266, -0.0100163567552078, "contGamma:contcor1", - "", 0.935185255763032, "contNormal", 0.123167904280202, - -0.0813227830232535, -0.584165718925558, 0.454878164832598, - -0.0646437770464802, "contcor2", "", 0.807326049657197, - "contNormal", 0.265067085914334, -0.243877042762572, -0.259079991409322, - 0.20283389336931, -0.028123049020006, "contGamma:contcor2", - "", 0.811369305237293, "contNormal", 0.117837339977201, - -0.238659910563555, -0.0199698615297152, 0.000907983332325647, - -0.00953093909869475, "contGamma", "", 0.0735367061526764, - "debCollin1", 0.00532607870009923, -1.78948521705419, -0.0336994219008381, - 0.042065186627567, 0.00418288236336445, "contcor1", "", - 0.828664276920102, "debCollin1", 0.0193280614149103, 0.216414997529842, - -0.0233913409468855, 0.0139844708377809, -0.00470343505455233, - "contGamma:contcor1", "", 0.621807458302733, "debCollin1", - 0.00953482106800994, -0.493290332456548, -0.0310212777963293, - 0.0494313593720958, 0.00920504078788325, "contcor2", "", - 0.653791587340314, "debCollin1", 0.0205240090642035, 0.448501107122293, - -0.0182406713875885, 0.0175607898467894, -0.00033994077039956, - "contGamma:contcor2", "", 0.970309303633664, "debCollin1", - 0.00913319364967295, -0.0372203616214502)) + list(-0.161747319816978, 0.111897622390039, -0.0249248487134697, "contGamma", + "", 0.721057972280652, "contNormal", 0.0698086659666945, + -0.357045194437052, -2.77216347418321, 2.2853309197564, -0.243416277213404, + "debCollin1", "", 0.850355060421806, "contNormal", + 1.29020084905449, -0.188665413909616, -0.21844352484079, 0.759300830045725, + 0.270428652602467, "contcor1", "", 0.278280479863704, + "contNormal", 0.249429163647608, 1.08419019110583, -0.251420994185901, + 0.231388318498572, -0.0100163378436646, "contGamma:contcor1", + "", 0.935185377841701, "contNormal", 0.123167904230081, + -0.0813226295135611, -0.584165711559245, 0.454878171871008, + -0.0646437698441181, "contcor2", "", 0.807326070642358, + "contNormal", 0.265067085830683, -0.243877015667688, -0.259079968621583, + 0.202833916038332, -0.0281230262916259, "contGamma:contcor2", + "", 0.811369454764114, "contNormal", 0.117837339946916, + -0.238659717745623, -0.0199698669731268, 0.000907977167427763, + -0.00953094490284952, "contGamma", "", 0.0735365208505061, + "debCollin1", 0.00532607851604324, -1.78948636865573, -0.0336994081742972, + 0.0420651977367971, 0.00418289478124995, "contcor1", "", + 0.828663770333571, "debCollin1", 0.0193280607472168, 0.216415647485601, + -0.0233913482394637, 0.0139844622538117, -0.00470344299282601, + "contGamma:contcor1", "", 0.621806858076576, "debCollin1", + 0.00953482073856739, -0.493291182056634, -0.0310212766162259, + 0.0494313577716089, 0.00920504057769153, "contcor2", "", + 0.653791583545191, "debCollin1", 0.0205240083548563, 0.44850111238205, + -0.0182406683497788, 0.0175607916472529, -0.000339938351262955, + "contGamma:contcor2", "", 0.970309513799752, "debCollin1", + 0.00913319333401763, -0.0372200980348041)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.175157274429801, 0.198979908453531, 16, 16, 0.0119113170118648, - "Total", 0.900683613502916, 0.0954449127214783, 0.124797819728996, - -0.250367504719299, 0.25690604268351, 50, 16, 0.00326926898210563, - "Total", 0.979845111864547, 0.12940889511341, 0.0252630932304966, - -0.477660729076516, 0.465335872943701, 84, 16, -0.00616242806640738, - "Total", 0.979563223871418, 0.240564778092469, -0.0256165017808162, - -0.285600415049596, 0.255933369164563, 16, 50, -0.0148335229425164, - "Total", 0.914492730085084, 0.138148912042698, -0.107373432936857, - -0.158318616621063, 0.111367474676512, 50, 50, -0.0234755709722755, - "Total", 0.732937244590175, 0.0687987364627169, -0.341220961012813, - -0.322690781115122, 0.256876245073545, 84, 50, -0.0329072680207885, - "Total", 0.823870338694592, 0.147851447975631, -0.22256980551325, - -0.537941157095924, 0.445575996157425, 16, 84, -0.0461825804692496, - "Total", 0.853961423119646, 0.250901843353043, -0.184066325906846, - -0.350939100389499, 0.241289843391482, 50, 84, -0.0548246284990088, - "Total", 0.716693826808683, 0.151081588348666, -0.362880938029885, - -0.277371488551315, 0.148858837456271, 84, 84, -0.0642563255475218, - "Total", 0.554554934511725, 0.108734224039226, -0.590948490369886, - -0.011149607603969, 0.0134144422989011, 16, 16, 0.00113241734746607, - "Total indirect", 0.85659441105862, 0.00626645440850654, 0.18071101673202, - -0.0215878308287415, 0.0260832370031915, 50, 16, 0.00224770308722498, - "Total indirect", 0.853365819933423, 0.0121612101569101, 0.184825610134516, - -0.0336129298254576, 0.0405427212714798, 84, 16, 0.0034648957230111, - "Total indirect", 0.85467467318165, 0.0189176055483335, 0.183157203175554, - -0.012369769655007, 0.0147924527517403, 16, 50, 0.00121134154836666, - "Total indirect", 0.861224778624891, 0.00692926569595141, 0.174815283685026, - -0.0219771724707164, 0.0266304270469676, 50, 50, 0.00232662728812558, - "Total indirect", 0.851167231746682, 0.0124001256913634, 0.187629331027351, - -0.0336749986385088, 0.0407626384863322, 84, 50, 0.00354381992391169, - "Total indirect", 0.851958932148349, 0.018989542081384, 0.186619556634059, - -0.015113157227429, 0.0177208628794294, 16, 84, 0.0013038528260002, - "Total indirect", 0.876299453443827, 0.00837617945172691, 0.155661997634421, - -0.0233255012020632, 0.0281637783335815, 50, 84, 0.00241913856575911, - "Total indirect", 0.853879052644048, 0.0131352616532206, 0.184171326740642, - -0.0343532493066957, 0.0416259117097862, 84, 84, 0.00363633120154523, - "Total indirect", 0.851185420292616, 0.0193827951982271, 0.187606130300435 + list(-0.175157302775487, 0.198979879917205, 16, 16, 0.011911288570859, + "Total", 0.900683849364705, 0.0954449126728447, 0.124797521809121, + -0.250367512784815, 0.256906034451423, 50, 16, 0.00326926083330403, + "Total", 0.979845162084219, 0.129408895070917, 0.0252630302693834, + -0.477660714907219, 0.465335886769524, 84, 16, -0.00616241406884718, + "Total", 0.97956327027465, 0.240564778004846, -0.0256164436039055, + -0.285600422260722, 0.255933361725246, 16, 50, -0.0148335302677384, + "Total", 0.914492687985258, 0.138148911984485, -0.107373486006204, + -0.158318603595395, 0.111367487584809, 50, 50, -0.0234755580052934, + "Total", 0.732937386356594, 0.0687987364327747, -0.341220772684278, + -0.322690745866886, 0.256876280051997, 84, 50, -0.0329072329074446, + "Total", 0.823870523468349, 0.147851447906807, -0.222569568126154, + -0.537941139508612, 0.445576013421548, 16, 84, -0.0461825630435319, + "Total", 0.853961477556304, 0.250901843270595, -0.184066256515001, + -0.350939062584821, 0.241289881022647, 50, 84, -0.0548245907810869, + "Total", 0.716694013230526, 0.151081588304401, -0.362880688483534, + -0.277371428577905, 0.148858897211429, 84, 84, -0.0642562656832381, + "Total", 0.554555303209668, 0.108734223983549, -0.590947940116444, + -0.0111496082956666, 0.0134144431281046, 16, 16, 0.00113241741621903, + "Total indirect", 0.856594411229165, 0.00626645479649864, 0.180711016514755, + -0.0215878488244143, 0.0260832588757973, 50, 16, 0.00224770502569151, + "Total indirect", 0.853365816149532, 0.0121612203275762, 0.184825614958617, + -0.033612966260651, 0.0405427656647157, 84, 16, 0.00346489970203235, + "Total indirect", 0.854674664789451, 0.0189176261682096, 0.183157213871526, + -0.0123697654337952, 0.014792447542944, 16, 50, 0.0012113410545744, + "Total indirect", 0.861224786931106, 0.00692926329029292, 0.174815273114437, + -0.0219771855599355, 0.0266304428880293, 50, 50, 0.00232662866404688, + "Total indirect", 0.851167232305641, 0.0124001330716726, 0.187629330314359, + -0.0336750306904459, 0.0407626773712213, 84, 50, 0.00354382334038771, + "Total indirect", 0.851958930524662, 0.0189895601778457, 0.186619558704795, + -0.0151131483762209, 0.017720851721858, 16, 84, 0.00130385167281857, + "Total indirect", 0.876299487193745, 0.00837617434735265, 0.155661954819585, + -0.0233255079627803, 0.0281637865273624, 50, 84, 0.00241913928229105, + "Total indirect", 0.853879051812739, 0.0131352654682136, 0.184171327800355, + -0.034353275420804, 0.0416259433380678, 84, 84, 0.00363633395863189, + "Total indirect", 0.8511854205531, 0.0193828099286993, 0.18760612996817 )) @@ -2195,7 +2193,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 10 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -2206,27 +2204,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -2235,134 +2233,134 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(685.429979661851, 747.954064125565, 6, "Model 1", 100, -318.714989830925, + list(685.429979661898, 747.954064125612, 6, "Model 1", 100, -318.714989830949, 10)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962230129441327, 0.0896223670504912, 0.0400000328780389, - "facExperimexperimental", "", 0.114128393461191, "facGenderm", - 0.0253179826587972, 1.57990600661622, -0.163250838285229, 0.0341991019679519, - -0.0645258681586388, "contcor2", "", 0.200187650152055, - "facGenderm", 0.050370808293071, -1.28101712768256, -0.170527220534562, - 0.0272979098810573, -0.0716146553267522, "contcor2", "", - 0.155883645064778, "facExperimexperimental", 0.0504665218279618, - -1.4190527251092, 0.18070480696902, 0.31929518489459, 0.249999995931805, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553379089497, 7.07106792687508, 0.180704827823729, 0.319295257635153, - 0.250000042729441, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553511453801, 7.07106660322644, - 0.721541873693507, 1.27492382941747, 0.998232851555489, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171460314825, - 7.07106698003506, 0.00473838134637852, 0.00837245217245049, - 0.0065554167594145, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000927075919439605, 7.07106788339093, 0.756337499872704, - 1.33640564566196, 1.04637157276733, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.147979286957506, 7.07106781145534 - )) + list(-0.163250983216219, 0.0341989507437262, -0.0645260162362465, "contcor2", + "", 0.200186603263831, "facGenderm", 0.0503708066876242, + -1.28102010826243, -0.00962228283197884, 0.0896223766216305, + 0.0400000468948258, "facExperimexperimental", "", 0.114128234236348, + "facGenderm", 0.025317980390568, 1.57990670178919, 0.180704794824098, + 0.319295142534337, 0.249999968679218, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553302008153, 7.07106869768261, + 0.756337499871344, 1.33640564566332, 1.04637157276733, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.1479792869582, + 7.07106781142219, 0.00473838184223441, 0.00837245390196784, + 0.00655541787210112, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000927076234154943, 7.07106668318014, -0.170527327947284, + 0.027297813645229, -0.0716147571510274, "contcor2", "", + 0.155883080249962, "facExperimexperimental", 0.0504665246792626, + -1.41905466259409, 0.180704827733195, 0.319295257318888, 0.250000042526042, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553510877946, 7.07106660899054, + 0.72154187370912, 1.27492382947063, 0.998232851589875, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171460324403, + 7.07106697979889)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.160966936882472, 1.33182551367605, 16, 0.58542928839679, 0, - "m", "facGender", "contNormal", "", "", "", 0.124224648229917, - 0.380821398335245, 1.53728044420819, -0.360278235735231, 1.0080108561311, - 16, 0.323866310197933, 1, "m", "facGender", "contNormal", "", - "", "", 0.353498436753044, 0.349059753816708, 0.927824839892589, - 0.0268555790493255, 1.18728990326231, 50, 0.607072741155815, - 0, "m", "facGender", "contNormal", "", "", "", 0.0402979555318521, - 0.296034604045365, 2.05068168673547, -0.240696017862408, 0.931715543776325, - 50, 0.345509762956958, 1, "m", "facGender", "contNormal", "", - "", "", 0.248007295971046, 0.299090077901065, 1.15520302572942, - -0.0593069506129866, 1.32419133035509, 84, 0.632442189871049, - 0, "m", "facGender", "contNormal", "", "", "", 0.0731446713359649, - 0.352939720291018, 1.79192693117557, -0.402473478079912, 1.1442319014243, + list(-0.160966936946416, 1.33182551374, 16, 0.585429288396791, 0, "m", + "facGender", "contNormal", "", "", "", 0.124224648262154, + 0.38082139836787, 1.53728044407649, -0.360278235774999, 1.00801085617087, + 16, 0.323866310197934, 1, "m", "facGender", "contNormal", "", + "", "", 0.353498436781024, 0.349059753836998, 0.927824839838657, + 0.0268555789958278, 1.1872899033158, 50, 0.607072741155816, + 0, "m", "facGender", "contNormal", "", "", "", 0.0402979555502774, + 0.29603460407266, 2.05068168654639, -0.240696017921072, 0.931715543834989, + 50, 0.345509762956959, 1, "m", "facGender", "contNormal", "", + "", "", 0.248007296018375, 0.299090077930996, 1.15520302561382, + -0.0593069506334035, 1.3241913303755, 84, 0.632442189871049, + 0, "m", "facGender", "contNormal", "", "", "", 0.0731446713444379, + 0.352939720301435, 1.79192693112268, -0.402473478138683, 1.14423190148307, 84, 0.370879211672192, 1, "m", "facGender", "contNormal", "", - "", "", 0.347245173937405, 0.394574949260401, 0.939946168319544, - -0.0244283163085191, 0.0234847144242383, 16, -0.000471800942140402, + "", "", 0.347245173974047, 0.394574949290386, 0.939946168248114, + -0.0244283894400712, 0.0234847846908252, 16, -0.000471802374623043, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.969209589795566, 0.0122229365209487, -0.0385996394018566, - -0.0318355292516048, 0.033119927916608, 16, 0.000642199332501614, + "", 0.969209588462472, 0.0122229731027788, -0.0385996410738876, + -0.0318354200595275, 0.0331198142882155, 16, 0.000642197114343996, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.969085398826703, 0.0165705741739576, 0.0387554061651586, - -0.0144875372254733, 0.0139308636248141, 50, -0.000278336800329581, + "", 0.969085399557278, 0.0165705173309565, 0.0387554052488309, + -0.0144874741583837, 0.0139308030436161, 50, -0.000278335557383788, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.969374551226098, 0.00724972526904785, -0.0383927376555797, - -0.0413456780600054, 0.0430170050086302, 50, 0.000835663474312435, + "", 0.9693745547348, 0.00724969372553768, -0.0383927332548308, + -0.0413457006255193, 0.0430170284886858, 50, 0.000835663931583251, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.969026515646823, 0.0215214880819438, 0.0388292608359895, - -0.00379203726602771, 0.00368890300389759, 84, -5.15671310650621e-05, + "", 0.969026515603792, 0.0215214998284784, 0.0388292608899616, + -0.00379187968753868, 0.0036887541833257, 84, -5.15627521064903e-05, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.978443309502044, 0.00190843819808272, -0.0270205926064927, - -0.0525714502863859, 0.0546963165735398, 84, 0.00106243314357695, + "", 0.978444256949649, 0.00190836003362069, -0.027019404723469, + -0.0525716275339396, 0.0546965010076607, 84, 0.00106243673686055, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.969029984491913, 0.0273647290730952, 0.0388249100051032 + "", 0.969029984171162, 0.027364821340524, 0.0388249104074072 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0243383511426141, 1.18845016065634, 0.606394255899478, "facGenderm", - "", 0.0411595853213451, "contNormal", 0.296972755289407, - 2.04191881274945, -2.52535807348402, 2.42710102169802, -0.0491285258930037, - "debCollin1", "", 0.968981446200616, "contNormal", - 1.26340563761539, -0.0388857896706328, -0.427962420357303, 0.721164092456126, - 0.146600836049411, "facExperimexperimental", "", 0.617012908228135, - "contNormal", 0.293149905273156, 0.500088294119724, -1.09233336613616, - 0.569207409738444, -0.261562978198857, "facGenderm:facExperimexperimental", - "", 0.537180192549532, "contNormal", 0.423870231540126, - -0.617082679405137, -0.22679887497335, 0.320540575340402, 0.0468708501835257, - "contcor2", "", 0.737112947250965, "contNormal", 0.13962997652791, - 0.33567899493385, -0.393011065493465, 0.43839469467993, 0.0226918145932324, - "facGenderm:contcor2", "", 0.914798653136687, "contNormal", - 0.212097203502569, 0.10698780662121, -0.0402674867612311, 0.0518453456684367, - 0.00578892945360281, "facGenderm", "", 0.805409709516241, - "debCollin1", 0.0234986033305311, 0.246352064936617, -0.048909666220872, - 0.0420350292096245, -0.00343731850562374, "facExperimexperimental", - "", 0.882219320020677, "debCollin1", 0.0232006037222767, - -0.14815642501248, -0.0882812896648974, 0.0429308438946261, - -0.0226752228851356, "facGenderm:facExperimexperimental", "", - 0.498141847825833, "debCollin1", 0.0334730981269319, -0.677416317998109, - -0.0174100522902595, 0.0258806673990157, 0.0042353075543781, - "contcor2", "", 0.701347194486085, "debCollin1", 0.0110437538727106, - 0.383502530316584, -0.0370220687924962, 0.0287647428956227, - -0.00412866294843674, "facGenderm:contcor2", "", 0.805676282113033, - "debCollin1", 0.0167826583057232, -0.246007686817337)) + list(0.024338351088441, 1.18845016071051, 0.606394255899478, "facGenderm", + "", 0.0411595853401998, "contNormal", 0.296972755317047, + 2.0419188125594, -2.52535807336346, 2.42710102157745, -0.0491285258930035, + "debCollin1", "", 0.968981446199107, "contNormal", + 1.26340563755387, -0.038885789672526, -0.427962420454414, 0.721164092553237, + 0.146600836049411, "facExperimexperimental", "", 0.617012908287648, + "contNormal", 0.293149905322704, 0.5000882940352, -1.09233336631245, + 0.569207409914738, -0.261562978198857, "facGenderm:facExperimexperimental", + "", 0.5371801926359, "contNormal", 0.423870231630074, + -0.617082679274188, -0.226798874973649, 0.3205405753407, 0.0468708501835257, + "contcor2", "", 0.737112947251242, "contNormal", 0.139629976528062, + 0.335678994933483, -0.39301106549621, 0.438394694682674, 0.0226918145932323, + "facGenderm:contcor2", "", 0.914798653137248, "contNormal", + 0.212097203503969, 0.106987806620504, -0.0402675142633745, 0.0518453259851349, + 0.00578890586088022, "facGenderm", "", 0.805410502839226, + "debCollin1", 0.0234986053251702, 0.246351040020214, -0.0489096353246045, + 0.0420350678256656, -0.00343728374946945, "facExperimexperimental", + "", 0.88222051218656, "debCollin1", 0.0232006056916429, + -0.148154914365343, -0.0882812792419863, 0.0429308654561868, + -0.0226752068928998, "facGenderm:facExperimexperimental", "", + 0.498142187346072, "debCollin1", 0.0334731009684764, -0.677415782728178, + -0.0174100260197651, 0.0258806973434847, 0.0042353356618598, + "contcor2", "", 0.701345331890019, "debCollin1", 0.0110437548099663, + 0.383505042871621, -0.0370221286796712, 0.0287646885916909, + -0.00412872004399018, "facGenderm:contcor2", "", 0.805673664736493, + "debCollin1", 0.0167826597300461, -0.24601106799529)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.161065461858297, 1.3309804367676, 16, 0.58495748745465, 0, - "m", "Total", 0.124339817890827, 0.380630947914085, 1.5368101061154, - -0.358875043779641, 1.00789206284051, 16, 0.324508509530435, - 1, "m", "Total", 0.352008831567136, 0.348671485139787, 0.930699880434257, - 0.026742485486911, 1.18684632322406, 50, 0.606794404355486, - 0, "m", "Total", 0.0403326882304174, 0.295950294721715, 2.05032539307339, - -0.238349615156111, 0.931040468018653, 50, 0.346345426431271, - 1, "m", "Total", 0.245646337810546, 0.298319278415003, 1.16098908616109, - -0.0593588646633562, 1.32414011014332, 84, 0.632390622739984, - 0, "m", "Total", 0.0731682257485846, 0.352939897293916, 1.79177992510536, - -0.399560650103491, 1.14344393973503, 84, 0.371941644815769, - 1, "m", "Total", 0.344710123648147, 0.39363085291606, 0.944899623747441, - -0.0244283163085191, 0.0234847144242383, 16, -0.000471800942140402, - 0, "m", "Total indirect", 0.969209589795566, 0.0122229365209487, - -0.0385996394018566, -0.0318355292516048, 0.033119927916608, - 16, 0.000642199332501614, 1, "m", "Total indirect", 0.969085398826703, - 0.0165705741739576, 0.0387554061651586, -0.0144875372254733, - 0.0139308636248141, 50, -0.000278336800329581, 0, "m", "Total indirect", - 0.969374551226098, 0.00724972526904785, -0.0383927376555797, - -0.0413456780600054, 0.0430170050086302, 50, 0.000835663474312435, - 1, "m", "Total indirect", 0.969026515646823, 0.0215214880819438, - 0.0388292608359895, -0.00379203726602771, 0.00368890300389759, - 84, -5.15671310650621e-05, 0, "m", "Total indirect", 0.978443309502044, - 0.00190843819808272, -0.0270205926064927, -0.0525714502863859, - 0.0546963165735398, 84, 0.00106243314357695, 1, "m", "Total indirect", - 0.969029984491913, 0.0273647290730952, 0.0388249100051032)) + list(-0.16106546336287, 1.33098043540721, 16, 0.584957486022167, 0, + "m", "Total", 0.124339818849076, 0.380630947950866, 1.53681010220345, + -0.358875046046061, 1.00789206067062, 16, 0.324508507312278, + 1, "m", "Total", 0.352008834892863, 0.348671485164412, 0.930699874006787, + 0.0267424866714, 1.18684632452546, 50, 0.606794405598432, 0, + "m", "Total", 0.0403326878410031, 0.29595029475154, 2.05032539706661, + -0.238349614773835, 0.931040468550919, 50, 0.346345426888542, + 1, "m", "Total", 0.245646337247743, 0.298319278453266, 1.16098908754501, + -0.059358860306221, 1.32414011454411, 84, 0.632390627118943, + 0, "m", "Total", 0.0731682237694238, 0.35293989730505, 1.79177993745592, + -0.399560646589365, 1.14344394340747, 84, 0.371941648409053, + 1, "m", "Total", 0.34471011903679, 0.393630852956447, 0.944899632779055, + -0.0244283894400712, 0.0234847846908252, 16, -0.000471802374623043, + 0, "m", "Total indirect", 0.969209588462472, 0.0122229731027788, + -0.0385996410738876, -0.0318354200595275, 0.0331198142882155, + 16, 0.000642197114343996, 1, "m", "Total indirect", 0.969085399557278, + 0.0165705173309565, 0.0387554052488309, -0.0144874741583837, + 0.0139308030436161, 50, -0.000278335557383788, 0, "m", "Total indirect", + 0.9693745547348, 0.00724969372553768, -0.0383927332548308, -0.0413457006255193, + 0.0430170284886858, 50, 0.000835663931583251, 1, "m", "Total indirect", + 0.969026515603792, 0.0215214998284784, 0.0388292608899616, -0.00379187968753868, + 0.0036887541833257, 84, -5.15627521064903e-05, 0, "m", "Total indirect", + 0.978444256949649, 0.00190836003362069, -0.027019404723469, + -0.0525716275339396, 0.0546965010076607, 84, 0.00106243673686055, + 1, "m", "Total indirect", 0.969029984171162, 0.027364821340524, + 0.0388249104074072)) @@ -2378,7 +2376,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 11 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -2389,159 +2387,160 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contcor1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, - localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) -set.seed(1) -results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) - +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, + localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) +set.seed(1) +results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) + table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(993.308268293342, 1050.62201238508, 18, "Model 1", 100, -474.654134146671, + list(993.308268293332, 1050.62201238507, 18, "Model 1", 100, -474.654134146666, 11)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848144910524, 0.0642086508122414, -0.240319747049141, "contcor1", - "", 0.121932453344515, "contGamma", 0.155374486604582, - -1.54671305631238, -0.403934141953763, 0.19462796216848, -0.104653089892641, - "contcor2", "", 0.49311461751293, "contGamma", 0.152697220164152, - -0.685363425608778, 0.424979140647373, 0.896762993056517, 0.660871066851945, - "contcor2", "", 3.99655502025809e-08, "contcor1", 0.12035523512945, - 5.49100391138894, 1.68041081901581, 2.9691908777742, 2.324800848395, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776464497339, 7.07106833802522, 0.732634569730422, 1.29452387127373, - 1.01357922050208, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341741474696, 7.07106813461592, 0.721541794404164, - 1.27492355285633, 0.998232673630249, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171409989463, 7.07106824040901, - 0.004589989216102, 0.00811024931659384, 0.00635011926634792, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000898042037572937, 7.07107128694093, 0.798508437001214, 1.41091930982898, - 1.1047138734151, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.15623013424185, 7.07106781144384)) + list(-0.403934284192825, 0.194627907986819, -0.104653188103003, "contcor2", + "", 0.493114275363958, "contGamma", 0.152697242628188, + -0.685363967952126, -0.544848306453824, 0.0642085525706252, + -0.240319876941599, "contcor1", "", 0.121932290447916, + "contGamma", 0.155374502753268, -1.54671373155236, 1.68041088807521, + 2.96919111861005, 2.32480100334263, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776508318667, 7.07106786683589, + 0.79850843700126, 1.41091930982894, 1.1047138734151, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.156230134241826, + 7.07106781144492, 0.00458999025779085, 0.00811025294994239, + 0.00635012160386662, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000898042698722764, 7.07106868403701, 0.424979168613991, + 0.896763072326101, 0.660871120470046, "contcor2", "", + 3.99655846194946e-08, "contcor1", 0.120355248217182, 5.49100375978204, + 0.732634575755025, 1.29452389228452, 1.01357923401977, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341745297773, + 7.07106804032698, 0.721541826566401, 1.27492366504037, 0.998232745803384, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171430403562, + 7.0710677291416)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.180371952375408, 0.0938554396450196, "", "", -0.0432582563651942, - "contGamma", "contNormal", "", "", "", 0.536342868140022, - 0.0699572528330873, -0.618352702734127, -0.0182490048294261, - 0.022270434192922, 16, 16, 0.00201071468174793, "contGamma", - "debCollin1", "contNormal", "", "", 0.845768438730284, - 0.01033678152812, 0.194520381056523, -0.0189871780752168, 0.0231274055423588, - 50, 16, 0.00207011373357102, "contGamma", "debCollin1", "contNormal", - "", "", 0.847208495009883, 0.0107437136472328, - 0.192681395050417, -0.0212171785979163, 0.0254870590963387, - 84, 16, 0.00213494024921119, "contGamma", "debCollin1", "contNormal", - "", "", 0.857790538899785, 0.0119145652835083, - 0.17918742299111, -0.00635092664172057, 0.00674081319211249, - 16, 50, 0.00019494327519596, "contGamma", "debCollin1", "contNormal", - "", "", 0.953453987043079, 0.00333979091888908, - 0.0583699039641691, -0.0135227618404186, 0.0164655116432874, - 50, 50, 0.0014713749014344, "contGamma", "debCollin1", "contNormal", - "", "", 0.847482702061777, 0.00765021034066176, - 0.192331300175352, -0.0260583020096531, 0.0317871775920513, - 84, 50, 0.00286443779119912, "contGamma", "debCollin1", "contNormal", - "", "", 0.846089700680365, 0.0147567710575251, - 0.194110065137754, -0.0250044388260874, 0.0211375997893015, - 16, 84, -0.00193341951839295, "contGamma", "debCollin1", "contNormal", - "", "", 0.869533737246054, 0.0117711445157542, - -0.164250767272911, -0.009955133764027, 0.0114942559419666, - 50, 84, 0.000769561088969798, "contGamma", "debCollin1", "contNormal", - "", "", 0.888155014681053, 0.00547188363540954, - 0.140639154676066, -0.033219418610941, 0.0406584603748081, 84, - 84, 0.00371952088193355, "contGamma", "debCollin1", "contNormal", - "", "", 0.843548840135208, 0.0188467440137902, - 0.197356152299409)) + list(-0.180371901094874, 0.0938554909269518, "", "", -0.0432582050839611, + "contGamma", "contNormal", "", "", "", 0.536343351242548, + 0.069957252833444, -0.618351969694284, -0.018248978400939, 0.0222704014327129, + 16, 16, 0.00201071151588698, "contGamma", "debCollin1", "contNormal", + "", "", 0.845768456053562, 0.0103367664286853, + 0.194520358930342, -0.0189871557738677, 0.0231273777877397, + 50, 16, 0.00207011100693601, "contGamma", "debCollin1", "contNormal", + "", "", 0.84720851441338, 0.0107437008776185, + 0.192681370276094, -0.021217162308726, 0.0254870383125969, 84, + 16, 0.00213493800193548, "contGamma", "debCollin1", "contNormal", + "", "", 0.85779057531657, 0.0119145558259539, + 0.17918737661079, -0.00635092758620015, 0.0067408142217701, + 16, 50, 0.000194943317784976, "contGamma", "debCollin1", "contNormal", + "", "", 0.953453983896599, 0.00333979142250476, + 0.0583699079144209, -0.0135227591572159, 0.0164655081567428, + 50, 50, 0.00147137449976344, "contGamma", "debCollin1", "contNormal", + "", "", 0.847482712192954, 0.00765020876671772, + 0.19233128724077, -0.026058295753581, 0.0317871695629307, 84, + 50, 0.00286443690467486, "contGamma", "debCollin1", "contNormal", + "", "", 0.846089710185469, 0.0147567674132763, + 0.194110052998314, -0.0250044057360041, 0.0211375743059879, + 16, 84, -0.00193341571500811, "contGamma", "debCollin1", "contNormal", + "", "", 0.869533827465287, 0.0117711295732866, + -0.164250652664278, -0.00995514864458462, 0.0114942754696118, + 50, 84, 0.000769563412513568, "contGamma", "debCollin1", "contNormal", + "", "", 0.888154857444369, 0.00547189241317358, + 0.140639353701627, -0.0332194265095245, 0.0406584696903622, + 84, 84, 0.00371952159041887, "contGamma", "debCollin1", "contNormal", + "", "", 0.843548846703201, 0.0188467484052325, + 0.197356143905768)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.180371952375408, 0.0938554396450196, -0.0432582563651942, "contGamma", - "", 0.536342868140022, "contNormal", 0.0699572528330873, - -0.618352702734127, -2.81958315438328, 2.30044869708861, -0.259567228647337, - "debCollin1", "", 0.84247687225251, "contNormal", 1.3061545752519, - -0.19872627142716, -0.0201068284308043, 0.00866071979766407, - -0.00572305431657013, "contGamma", "", 0.43548759871719, - "debCollin1", 0.00733879511444679, -0.77983568519361, -0.0350282906348514, - 0.0413280469439438, 0.00314987815454619, "contcor1", "", - 0.871537198381027, "debCollin1", 0.0194790154770915, 0.16170622987854, - -0.0236340729715997, 0.0138396800126521, -0.0048971964794738, - "contGamma:contcor1", "", 0.608462468892575, "debCollin1", - 0.00955980652701784, -0.512269413155317, -0.039076443784976, - 0.0457717095936877, 0.00334763290435585, "contcor2", "", - 0.877090625359006, "debCollin1", 0.0216453348245006, 0.154658402445529, - -0.0167951676316982, 0.0216687282819967, 0.00243678032514924, - "contGamma:contcor2", "", 0.803873777531711, "debCollin1", - 0.00981239865045819, 0.248336865628208, -0.0169077186106578, - 0.00681510508717116, -0.00504630676174334, "contGamma:contcor1:contcor2", - "", 0.404368307730761, "debCollin1", 0.00605185194344172, - -0.833845045930433, -0.0164773400823176, 0.0426898171385692, - 0.0131062385281258, "contcor1:contcor2", "", 0.385223939865152, - "debCollin1", 0.0150939399110366, 0.868311296147577)) + list(-0.180371901094874, 0.0938554909269518, -0.0432582050839611, "contGamma", + "", 0.536343351242548, "contNormal", 0.069957252833444, + -0.618351969694284, -2.81958314320814, 2.30044870862053, -0.259567217293802, + "debCollin1", "", 0.842476879063219, "contNormal", + 1.30615457534292, -0.198726262720976, -0.0201068295061491, 0.00866072401686628, + -0.0057230527446414, "contGamma", "", 0.435487809301689, + "debCollin1", 0.00733879646512134, -0.779835327473791, -0.0350283054884077, + 0.041328046145676, 0.00314987032863416, "contcor1", "", + 0.871537538217544, "debCollin1", 0.0194790190626902, 0.161705798351385, + -0.0236340749873402, 0.013839684894872, -0.00489719504623415, + "contGamma:contcor1", "", 0.608462639790213, "debCollin1", + 0.00955980828673395, -0.512269168936152, -0.039076411540482, + 0.0457717574556939, 0.00334767295760592, "contcor2", "", + 0.877089188923055, "debCollin1", 0.0216453388086331, 0.15466022441149, + -0.0167951804693068, 0.0216687225242266, 0.00243677102745989, + "contGamma:contcor2", "", 0.80387454597013, "debCollin1", + 0.00981240045657262, 0.248335872373378, -0.0169077173511117, + 0.0068151107127481, -0.00504630331918178, "contGamma:contcor1:contcor2", + "", 0.404368714811561, "debCollin1", 0.00605185305724554, + -0.833844323622518, -0.0164773543905517, 0.0426898137198377, + 0.013106229664643, "contcor1:contcor2", "", 0.385224348708892, + "debCollin1", 0.015093942689022, 0.868310549116855)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.176465119401474, 0.0939700360345819, 16, 16, -0.0412475416834463, - "Total", 0.54992093950089, 0.0689898277644932, -0.597878600657633, - -0.176426328591184, 0.0940500433279374, 50, 16, -0.0411881426316232, - "Total", 0.550556359250881, 0.0690003423666466, -0.596926641505082, - -0.176627550037361, 0.0943809178053948, 84, 16, -0.041123316115983, - "Total", 0.551965819504904, 0.0691360836169531, -0.594816974936356, - -0.180005475884956, 0.093878849704959, 16, 50, -0.0430633130899983, - "Total", 0.537672022945095, 0.0698697342783539, -0.616337152771161, - -0.177237119969289, 0.093663357041769, 50, 50, -0.0417868814637598, - "Total", 0.545407671434765, 0.0691085344291748, -0.604655876570277, - -0.175731702074488, 0.0949440649264973, 84, 50, -0.0403938185739951, - "Total", 0.558558807270057, 0.0690512093936523, -0.584983506135497, - -0.187401511350343, 0.0970181595831684, 16, 84, -0.0451916758835872, - "Total", 0.533389285177102, 0.0725573717621796, -0.622840585126365, - -0.178725472635204, 0.0937480820827555, 50, 84, -0.0424886952762244, - "Total", 0.541026398758971, 0.0695098371365996, -0.611261614564372, - -0.175370090297307, 0.0962926193307853, 84, 84, -0.0395387354832607, - "Total", 0.568325096064287, 0.0693029850984337, -0.570519948413511, - -0.0182490048294261, 0.022270434192922, 16, 16, 0.00201071468174793, - "Total indirect", 0.845768438730284, 0.01033678152812, 0.194520381056523, - -0.0189871780752168, 0.0231274055423588, 50, 16, 0.00207011373357102, - "Total indirect", 0.847208495009883, 0.0107437136472328, 0.192681395050417, - -0.0212171785979163, 0.0254870590963387, 84, 16, 0.00213494024921119, - "Total indirect", 0.857790538899785, 0.0119145652835083, 0.17918742299111, - -0.00635092664172057, 0.00674081319211249, 16, 50, 0.00019494327519596, - "Total indirect", 0.953453987043079, 0.00333979091888908, 0.0583699039641691, - -0.0135227618404186, 0.0164655116432874, 50, 50, 0.0014713749014344, - "Total indirect", 0.847482702061777, 0.00765021034066176, 0.192331300175352, - -0.0260583020096531, 0.0317871775920513, 84, 50, 0.00286443779119912, - "Total indirect", 0.846089700680365, 0.0147567710575251, 0.194110065137754, - -0.0250044388260874, 0.0211375997893015, 16, 84, -0.00193341951839295, - "Total indirect", 0.869533737246054, 0.0117711445157542, -0.164250767272911, - -0.009955133764027, 0.0114942559419666, 50, 84, 0.000769561088969798, - "Total indirect", 0.888155014681053, 0.00547188363540954, 0.140639154676066, - -0.033219418610941, 0.0406584603748081, 84, 84, 0.00371952088193355, - "Total indirect", 0.843548840135208, 0.0188467440137902, 0.197356152299409 + list(-0.176465072097754, 0.0939700849616062, 16, 16, -0.0412474935680741, + "Total", 0.549921407286432, 0.0689898281786091, -0.597877899641781, + -0.176426280631263, 0.0940500924772129, 50, 16, -0.0411880940770251, + "Total", 0.550556830838091, 0.069000342670059, -0.596925935193908, + -0.176627501471225, 0.0943809673071737, 84, 16, -0.0411232670820256, + "Total", 0.551966295014983, 0.069136083855642, -0.594816263644497, + -0.18000542452281, 0.0938789009904577, 16, 50, -0.0430632617661761, + "Total", 0.537672507541319, 0.0698697342588008, -0.616336418379205, + -0.177237069321787, 0.0936634081533914, 50, 50, -0.0417868305841977, + "Total", 0.545408161407111, 0.069108534547575, -0.604655139307449, + -0.175731651448281, 0.0949441150897086, 84, 50, -0.0403937681792862, + "Total", 0.558559297329688, 0.0690512092755391, -0.584982777319664, + -0.187401445489095, 0.0970182038911563, 16, 84, -0.0451916207989692, + "Total", 0.533389753100818, 0.072557366263798, -0.622839873137971, + -0.178725416397073, 0.0937481330541783, 50, 84, -0.0424886416714475, + "Total", 0.541026901398967, 0.0695098357930269, -0.611260855196984, + -0.175370039168381, 0.0962926721812969, 84, 84, -0.0395386834935422, + "Total", 0.568325607173644, 0.0693029855376219, -0.570519194617932, + -0.018248978400939, 0.0222704014327129, 16, 16, 0.00201071151588698, + "Total indirect", 0.845768456053562, 0.0103367664286853, 0.194520358930342, + -0.0189871557738677, 0.0231273777877397, 50, 16, 0.00207011100693601, + "Total indirect", 0.84720851441338, 0.0107437008776185, 0.192681370276094, + -0.021217162308726, 0.0254870383125969, 84, 16, 0.00213493800193548, + "Total indirect", 0.85779057531657, 0.0119145558259539, 0.17918737661079, + -0.00635092758620015, 0.0067408142217701, 16, 50, 0.000194943317784976, + "Total indirect", 0.953453983896599, 0.00333979142250476, 0.0583699079144209, + -0.0135227591572159, 0.0164655081567428, 50, 50, 0.00147137449976344, + "Total indirect", 0.847482712192954, 0.00765020876671772, 0.19233128724077, + -0.026058295753581, 0.0317871695629307, 84, 50, 0.00286443690467486, + "Total indirect", 0.846089710185469, 0.0147567674132763, 0.194110052998314, + -0.0250044057360041, 0.0211375743059879, 16, 84, -0.00193341571500811, + "Total indirect", 0.869533827465287, 0.0117711295732866, -0.164250652664278, + -0.00995514864458462, 0.0114942754696118, 50, 84, 0.000769563412513568, + "Total indirect", 0.888154857444369, 0.00547189241317358, 0.140639353701627, + -0.0332194265095245, 0.0406584696903622, 84, 84, 0.00371952159041887, + "Total indirect", 0.843548846703201, 0.0188467484052325, 0.197356143905768 )) @@ -2558,7 +2557,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 11 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -2569,23 +2568,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facExperim", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +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 = "facExperim", 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) @@ -2601,110 +2600,111 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962232004030648, 0.0896223133978259, 0.0399999966787597, - "facExperimexperimental", "", 0.114128593666998, "facGenderm", - 0.0253179737538448, 1.57990513252212, -0.163250715131426, 0.0341991866664326, - -0.0645257642324969, "contcor2", "", 0.200188287202505, - "facGenderm", 0.0503707984828596, -1.28101531395128, -0.170527193449884, - 0.0272978696240783, -0.0716146619129027, "contcor2", "", - 0.155883466198296, "facExperimexperimental", 0.050466504648652, - -1.41905333867452, 0.180704800982979, 0.319295164012593, 0.249999982497786, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553341088909, 7.07106830691547, 0.180704798784776, 0.319295156345456, - 0.249999977565116, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553327137293, 7.07106844643087, - 0.721541833421912, 1.27492368895136, 0.998232761186638, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171434754531, - 7.07106762017662, 0.0046947201673906, 0.00829530460594733, 0.00649501238666896, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000918533316672574, 7.0710689190866, 0.762533966062545, 1.34735445145527, - 1.05494420875891, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.149191640766288, 7.07106781144326)) + list(-0.163250715057074, 0.0341991868396277, -0.0645257641087231, "contcor2", + "", 0.200188288290825, "facGenderm", 0.050370798508075, + -1.28101531085275, -0.00962231996667848, 0.0896223134007242, + 0.0399999967170229, "facExperimexperimental", "", 0.114128593062947, + "facGenderm", 0.0253179737358012, 1.57990513515939, 0.180704800926561, + 0.319295163819053, 0.249999982372807, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553340739104, 7.07106831037663, + 0.762533966062521, 1.34735445145529, 1.05494420875891, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.149191640766301, + 7.07106781144268, 0.00469472017806602, 0.00829530464318257, + 0.00649501241062429, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000918533323448162, 7.07106889300663, -0.17052719344766, + 0.0272978697722143, -0.0716146618377228, "contcor2", "", + 0.155883466937697, "facExperimexperimental", 0.0504665046858751, + -1.41905333613815, 0.180704798753658, 0.319295156236804, 0.249999977495231, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553326939496, 7.07106844841016, + 0.721541833900503, 1.27492369062011, 0.998232762260306, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171435058147, + 7.07106761257435)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0622024992020542, 0.868598726140512, "", 0.465400612671283, - "", "m", "facGender", "contNormal", "", "", "", 0.0236768306572079, - 0.205717103298634, 2.26233310312402, -0.00502186744432948, 0.00513639658203032, - 16, 5.72645688504206e-05, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.982370122140312, 0.0025914415026212, - 0.0220975734132909, -0.0157840291533143, 0.016181006251643, - 16, 0.000198488549164307, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.980580612317733, 0.00815449560734112, - 0.0243409965155438, -0.011149058111866, 0.0114296246961494, - 50, 0.000140283292141703, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.980569563261315, 0.00575997390414138, - 0.0243548485594423, -0.0349764678843367, 0.0341117434797597, - 50, -0.000432362202288511, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.980428759128093, 0.0176248675764084, - -0.0245313730962294, -0.0188291244993071, 0.0193043124562885, - 84, 0.000237593978490679, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.980514818600596, 0.00972809634676639, - 0.0244234812260731, -0.0947410135891975, 0.0923973813630137, - 84, -0.00117181611309188, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.980417366068978, 0.0477402637059494, - -0.0245456564779269)) + list(0.0622024992005967, 0.86859872614197, "", 0.465400612671283, "", + "m", "facGender", "contNormal", "", "", "", 0.0236768306577129, + 0.205717103299378, 2.26233310311584, -0.00502186788705978, 0.00513639703723035, + 16, 5.72645750852856e-05, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.982370121779237, 0.00259144173168926, + 0.022097573865941, -0.015784029541219, 0.0161810066494787, 16, + 0.000198488554129831, 1, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.980580612309279, 0.00815449580778879, + 0.0243409965261426, -0.0111490588840251, 0.0114296254880841, + 50, 0.000140283302029461, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.980569563237786, 0.00575997430315224, + 0.0243548485889405, -0.034976467123433, 0.0341117427376346, + 50, -0.000432362192899236, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.98042875912733, 0.0176248671929756, + -0.0245313730971858, -0.0188291256089367, 0.0193043135942571, + 84, 0.000237593992660189, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.980514818587015, 0.0097280969201438, + 0.0244234812430998, -0.094741012404904, 0.0923973802078694, + 84, -0.00117181609851729, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.980417366067735, 0.0477402631091431, + -0.0245456564794856)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0622024992020542, 0.868598726140512, 0.465400612671283, "facGenderm", - "", 0.0236768306572079, "contNormal", 0.205717103298634, - 2.26233310312402, -2.43771284963591, 2.49956339337658, 0.0309252718703351, - "debCollin1", "", 0.980411525585644, "contNormal", - 1.25953238986969, 0.0245529786443481, -0.0421497018904654, 0.0510537980367465, - 0.00445204807314052, "facGenderm", "", 0.851470071277126, - "debCollin1", 0.0237768399476698, 0.187243051765457, -0.0546133772431467, - 0.0380355585847405, -0.0082889093292031, "facExperimexperimental", - "", 0.725813865146141, "debCollin1", 0.0236353669145684, - -0.350699414109538, -0.0838945517075597, 0.0483076757910587, - -0.0177934379582505, "facGenderm:facExperimexperimental", "", - 0.597781719643452, "debCollin1", 0.0337256777526048, -0.527593191418554, - -0.0277181247354253, 0.0230158677800561, -0.00235112847768462, - "contcor2", "", 0.855850839850886, "debCollin1", 0.0129425828524567, - -0.181658367922933, -0.0452630267270384, 0.050892077961617, - 0.0028145256172893, "facGenderm:contcor2", "", 0.908652024179313, - "debCollin1", 0.0245298141820755, 0.114738970152735, -0.0944433024997552, - 0.0460396690924197, -0.0242018167036678, "facGenderm:facExperimexperimental:contcor2", - "", 0.499479633779924, "debCollin1", 0.0358381512875457, - -0.675308737593231, -0.0244181667555369, 0.0716992523381723, - 0.0236405427913177, "facExperimexperimental:contcor2", "", - 0.334983165215515, "debCollin1", 0.0245202003332386, 0.964125189437037 + list(0.0622024992005967, 0.86859872614197, 0.465400612671283, "facGenderm", + "", 0.0236768306577129, "contNormal", 0.205717103299378, + 2.26233310311584, -2.43771284946332, 2.49956339320399, 0.0309252718703352, + "debCollin1", "", 0.980411525584274, "contNormal", + 1.25953238978163, 0.0245529786460647, -0.0421497016596865, 0.0510537984380232, + 0.00445204838916833, "facGenderm", "", 0.851470061124944, + "debCollin1", 0.0237768399911649, 0.187243064714345, -0.0546133777351463, + 0.0380355582628425, -0.00828890973615191, "facExperimexperimental", + "", 0.725813852710787, "debCollin1", 0.0236353669579624, + -0.350699430683452, -0.0838945518453724, 0.0483076758950707, + -0.0177934379751508, "facGenderm:facExperimexperimental", "", + 0.597781719965544, "debCollin1", 0.0337256778142959, -0.52759319095459, + -0.0277181246701452, 0.0230158679390083, -0.00235112836556842, + "contcor2", "", 0.855850846912753, "debCollin1", 0.012942582876353, + -0.181658358924948, -0.0452630266917793, 0.0508920781740408, + 0.00281452574113078, "facGenderm:contcor2", "", 0.908652020345104, + "debCollin1", 0.0245298142272713, 0.114738974989941, -0.094443302602814, + 0.0460396692477463, -0.0242018166775338, "facGenderm:facExperimexperimental:contcor2", + "", 0.499479635032092, "debCollin1", 0.0358381513534616, + -0.675308735621939, -0.0244181668785211, 0.071699252391922, + 0.0236405427567004, "facExperimexperimental:contcor2", "", + 0.334983166811916, "debCollin1", 0.0245202003783246, 0.964125186252485 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0619826744391681, 0.868933080041099, 16, 0.465457877240134, - 0, "m", "Total", 0.0237556901799967, 0.205858478004456, 2.26105760497295, - 0.0612360212538626, 0.869962181187032, 16, 0.465599101220447, - 1, "m", "Total", 0.0240219861554143, 0.206311484882452, 2.25677742315571, - 0.06158478720509, 0.86949700472176, 50, 0.465540895963425, 0, - "m", "Total", 0.0238977803654057, 0.206103842695422, 2.25876863757168, - 0.0621417932928844, 0.867794707645105, 50, 0.464968250468995, - 1, "m", "Total", 0.0236778428085556, 0.205527479256534, 2.26231670894301, - 0.0609746149230449, 0.870301798376503, 84, 0.465638206649774, - 0, "m", "Total", 0.024115075622728, 0.206464810026441, 2.25529089722428, - 0.0552326240750896, 0.873224969041293, 84, 0.464228796558191, - 1, "m", "Total", 0.0261050082820293, 0.208675351031555, 2.22464605552762, - -0.00502186744432948, 0.00513639658203032, 16, 5.72645688504206e-05, - 0, "m", "Total indirect", 0.982370122140312, 0.0025914415026212, - 0.0220975734132909, -0.0157840291533143, 0.016181006251643, - 16, 0.000198488549164307, 1, "m", "Total indirect", 0.980580612317733, - 0.00815449560734112, 0.0243409965155438, -0.011149058111866, - 0.0114296246961494, 50, 0.000140283292141703, 0, "m", "Total indirect", - 0.980569563261315, 0.00575997390414138, 0.0243548485594423, - -0.0349764678843367, 0.0341117434797597, 50, -0.000432362202288511, - 1, "m", "Total indirect", 0.980428759128093, 0.0176248675764084, - -0.0245313730962294, -0.0188291244993071, 0.0193043124562885, - 84, 0.000237593978490679, 0, "m", "Total indirect", 0.980514818600596, - 0.00972809634676639, 0.0244234812260731, -0.0947410135891975, - 0.0923973813630137, 84, -0.00117181611309188, 1, "m", "Total indirect", - 0.980417366068978, 0.0477402637059494, -0.0245456564779269 + list(0.0619826744118318, 0.868933080080905, 16, 0.465457877246368, + 0, "m", "Total", 0.0237556901897698, 0.205858478021585, 2.26105760481511, + 0.0612360212207425, 0.869962181230084, 16, 0.465599101225413, + 1, "m", "Total", 0.0240219861671982, 0.206311484901883, 2.25677742296722, + 0.0615847871496267, 0.869497004796999, 50, 0.465540895973313, + 0, "m", "Total", 0.0238977803851623, 0.206103842728765, 2.25876863725424, + 0.062141793324559, 0.867794707632209, 50, 0.464968250478384, + 1, "m", "Total", 0.023677842798008, 0.205527479245164, 2.26231670911385, + 0.0609746148225805, 0.870301798505306, 84, 0.465638206663943, + 0, "m", "Total", 0.0241150756584985, 0.206464810084929, 2.25529089665403, + 0.0552326242932137, 0.873224968852318, 84, 0.464228796572766, + 1, "m", "Total", 0.026105008202953, 0.208675350927702, 2.22464605670463, + -0.00502186788705978, 0.00513639703723035, 16, 5.72645750852856e-05, + 0, "m", "Total indirect", 0.982370121779237, 0.00259144173168926, + 0.022097573865941, -0.015784029541219, 0.0161810066494787, 16, + 0.000198488554129831, 1, "m", "Total indirect", 0.980580612309279, + 0.00815449580778879, 0.0243409965261426, -0.0111490588840251, + 0.0114296254880841, 50, 0.000140283302029461, 0, "m", "Total indirect", + 0.980569563237786, 0.00575997430315224, 0.0243548485889405, + -0.034976467123433, 0.0341117427376346, 50, -0.000432362192899236, + 1, "m", "Total indirect", 0.98042875912733, 0.0176248671929756, + -0.0245313730971858, -0.0188291256089367, 0.0193043135942571, + 84, 0.000237593992660189, 0, "m", "Total indirect", 0.980514818587015, + 0.0097280969201438, 0.0244234812430998, -0.094741012404904, + 0.0923973802078694, 84, -0.00117181609851729, 1, "m", "Total indirect", + 0.980417366067735, 0.0477402631091431, -0.0245456564794856 )) @@ -2721,7 +2721,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 12 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -2732,27 +2732,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contcor1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "contcor1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -2761,168 +2761,169 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1000.43299004608, 1073.37775525374, 12, "Model 1", 100, -472.216495023038, + list(1000.432990046, 1073.37775525366, 12, "Model 1", 100, -472.216495022999, 12)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848950619477, 0.0642088009922596, -0.240320074813609, "contcor1", - "", 0.12193253005672, "contGamma", 0.155374730458291, - -1.54671273832472, -0.403935050947285, 0.194627853448167, -0.104653598749559, - "contcor2", "", 0.49311309324769, "contGamma", 0.152697424319232, - -0.685365841736581, 0.424979588269839, 0.896764372073894, 0.660871980171866, - "contcor2", "", 3.99662860584016e-08, "contcor1", 0.120355472734559, - 5.49100065959945, 1.6804114433115, 2.96919305531096, 2.32480224931123, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776860739587, 7.07106407695955, 0.732634993627561, 1.29452534979758, - 1.01358017171257, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143342010517064, 7.07106149869377, 0.7215421034897, - 1.27492463093053, 0.998233367210114, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171606163644, 7.07106332737321, - 0.004589990350168, 0.00811025327214836, 0.00635012181115818, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000898042757353642, 7.07106845321125, 0.760512655544403, 1.34378291183864, - 1.05214778369152, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.148796166892605, 7.07106779471621)) + list(-0.403934578073409, 0.194627906827133, -0.104653335623138, "contcor2", + "", 0.4931138773316, "contGamma", 0.152697317303259, + -0.685364598876976, -0.544848389909948, 0.0642087932538327, + -0.240319798328058, "contcor1", "", 0.121932611088383, + "contGamma", 0.155374585443392, -1.54671240243221, 1.6804111222115, + 2.96919193530637, 2.32480152875893, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776656933649, 7.07106626863752, + 0.760512655329314, 1.34378291108448, 1.05214778320689, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.148796166755084, + 7.07106779799449, 0.00458999030713782, 0.00811025312206174, + 0.00635012171459978, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000898042730042823, 7.07106856073205, 0.424979347776852, + 0.896763596383727, 0.66087147208029, "contcor2", "", + 3.99658317551399e-08, "contcor1", 0.120355336202157, 5.49100266705454, + 0.732634727187279, 1.29452442046774, 1.01357957382751, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341841409478, + 7.07106566973743, 0.721541938684277, 1.27492405609648, 0.998232997390377, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171501562582, + 7.0710659470308)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.223451956294512, 0.189614822530707, 16, 16, -0.0169185668819021, - "contGamma", "contNormal", "", "", "", 0.872444611333131, - 0.105376114582573, -0.160554096617832, -0.256640563771251, 0.256131853110321, - 50, 16, -0.000254355330465169, "contGamma", "contNormal", "", - "", "", 0.998448563293649, 0.130811693716378, -0.00194443878248877, - -0.483239662462547, 0.519104689685104, 84, 16, 0.0179325136112785, - "contGamma", "contNormal", "", "", "", 0.944090385665761, - 0.255704788469078, 0.0701297528241131, -0.338338808597789, 0.282260971976478, - 16, 50, -0.0280389183106556, "contGamma", "contNormal", "", - "", "", 0.859426906895459, 0.158319179706739, -0.177103736657764, - -0.215042649880455, 0.160274313030384, 50, 50, -0.0273841684250356, - "contGamma", "contNormal", "", "", "", 0.77487135392024, - 0.0957458825446009, -0.286008836069575, -0.335275828236034, - 0.281936643953144, 84, 50, -0.026669592141445, "contGamma", - "contNormal", "", "", "", 0.865498478187113, 0.157455054546326, - -0.169379079117452, -0.685374608589659, 0.603227254465, 16, - 84, -0.0410736770623293, "contGamma", "contNormal", "", "", - "", 0.900566173700392, 0.328731005574333, -0.124946160738834, - -0.435010600268149, 0.316641653143954, 50, 84, -0.0591844735620975, - "contGamma", "contNormal", "", "", "", 0.757586359768409, - 0.191751547309298, -0.308651869529022, -0.296705021935538, 0.138804809698056, - 84, 84, -0.078950106118741, "contGamma", "contNormal", "", "", - "", 0.477324396489304, 0.111101488361225, -0.710612497485632, - -0.0177591103097022, 0.0225627865328877, 16, 16, 0.00240183811159276, + list(-0.223451946014033, 0.189614832705325, 16, 16, -0.0169185566543542, + "contGamma", "contNormal", "", "", "", 0.872444687749732, + 0.105376114555568, -0.160553999601424, -0.256640561364494, 0.256131855379639, + 50, 16, -0.000254352992427573, "contGamma", "contNormal", "", + "", "", 0.998448577554042, 0.130811693681317, -0.00194442090970267, + -0.483239668611766, 0.519104683289603, 84, 16, 0.0179325073389183, + "contGamma", "contNormal", "", "", "", 0.94409040517584, + 0.25570478840625, 0.0701297283116504, -0.338338805093114, 0.282260975348098, + 16, 50, -0.0280389148725081, "contGamma", "contNormal", "", + "", "", 0.859426923923318, 0.158319179672796, -0.177103714979178, + -0.215042642940816, 0.160274319893705, 50, 50, -0.0273841615235555, + "contGamma", "contNormal", "", "", "", 0.774871409083354, + 0.0957458825251315, -0.286008764046513, -0.335275817486043, + 0.281936654565687, 84, 50, -0.0266695814601776, "contGamma", + "contNormal", "", "", "", 0.865498531512608, 0.157455054511262, + -0.169379011318243, -0.685374612951383, 0.603227249786581, 16, + 84, -0.0410736815824013, "contGamma", "contNormal", "", "", + "", 0.900566162790423, 0.328731005493543, -0.124946174519605, + -0.435010587926991, 0.316641665303866, 50, 84, -0.0591844613115625, + "contGamma", "contNormal", "", "", "", 0.757586408315507, + 0.19175154726306, -0.308651805715906, -0.296704991344328, 0.138804840213889, + 84, 84, -0.0789500755652198, "contGamma", "contNormal", "", + "", "", 0.477324566875479, 0.111101488341996, -0.710612222603116, + -0.0177591130751241, 0.0225627900810571, 16, 16, 0.00240183850296654, "contGamma", "debCollin1", "contNormal", "", "", - 0.815375682847979, 0.0102863871889085, 0.233496763001745, -0.0185685918605925, - 0.0235141745818085, 50, 16, 0.00247279136060799, "contGamma", - "debCollin1", "contNormal", "", "", 0.817830911549593, - 0.0107355968717651, 0.230335713062353, -0.0214512928824987, - 0.0265517485104643, 84, 16, 0.0025502278139828, "contGamma", - "debCollin1", "contNormal", "", "", 0.835032534336158, - 0.0122458988460004, 0.208251582513742, -0.00747785658355776, - 0.00794358473478, 16, 50, 0.000232864075611117, "contGamma", - "debCollin1", "contNormal", "", "", 0.952799984753835, - 0.0039341134428949, 0.0591909915642302, -0.0132369038151169, - 0.0167520808741543, 50, 50, 0.00175758852951869, "contGamma", - "debCollin1", "contNormal", "", "", 0.818295077958259, - 0.00765039177398679, 0.229738369150574, -0.0253868642967908, - 0.0322301272637507, 84, 50, 0.00342163148347997, "contGamma", - "debCollin1", "contNormal", "", "", 0.81592596796004, - 0.0146984822208513, 0.232788081930395, -0.0266773906707256, - 0.0220583778443268, 16, 84, -0.00230950641319941, "contGamma", - "debCollin1", "contNormal", "", "", 0.852633900354963, - 0.0124328224649723, -0.185758818619514, -0.0108224801097624, - 0.0126610021779048, 50, 84, 0.000919261034071187, "contGamma", - "debCollin1", "contNormal", "", "", 0.878046886758959, - 0.00599079433930977, 0.153445600367096, -0.0320771139682762, - 0.0409632146422981, 84, 84, 0.00444305033701094, "contGamma", - "debCollin1", "contNormal", "", "", 0.811532399847239, - 0.0186330792776569, 0.238449601958096)) + 0.815375681693523, 0.0102863887995482, 0.233496764488627, -0.0185685953844489, + 0.0235141791273406, 50, 16, 0.00247279187144589, "contGamma", + "debCollin1", "contNormal", "", "", 0.817830908894916, + 0.0107355989303204, 0.230335716478939, -0.0214512967509855, + 0.0265517536613867, 84, 16, 0.0025502284552006, "contGamma", + "debCollin1", "contNormal", "", "", 0.835032524004288, + 0.0122459011469124, 0.208251595746679, -0.0074778562282595, + 0.00794358383956618, 16, 50, 0.000232863805653341, "contGamma", + "debCollin1", "contNormal", "", "", 0.952800035585686, + 0.00393411312388086, 0.059190927744251, -0.0132369056153792, + 0.0167520831946443, 50, 50, 0.00175758878963257, "contGamma", + "debCollin1", "contNormal", "", "", 0.818295076068354, + 0.00765039282521842, 0.229738371582558, -0.0253868701425222, + 0.0322301347867216, 84, 50, 0.00342163232209968, "contGamma", + "debCollin1", "contNormal", "", "", 0.815925965597981, + 0.0146984856312972, 0.232788084972106, -0.0266773982165446, + 0.022058383299866, 16, 84, -0.00230950745833928, "contGamma", + "debCollin1", "contNormal", "", "", 0.85263387329282, + 0.0124328257817062, -0.185758853127139, -0.0108224799043036, + 0.0126610019048996, 50, 84, 0.000919261000298021, "contGamma", + "debCollin1", "contNormal", "", "", 0.878046888739105, + 0.0059907942172504, 0.153445597855961, -0.0320771216620022, + 0.0409632244760342, 84, 84, 0.00444305140701599, "contGamma", + "debCollin1", "contNormal", "", "", 0.811532399688756, + 0.0186330837490304, 0.238449602162454)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.21224868586618, 0.159172651856103, -0.0265380170050381, "contGamma", - "", 0.779417312484425, "contNormal", 0.0947520823474328, - -0.280078456827256, -2.83293200154124, 2.2128143078926, -0.310058846824322, - "debCollin1", "", 0.809649817063519, "contNormal", - 1.28720383365053, -0.240877814933934, -0.263176192599081, 0.719814248014808, - 0.228319027707863, "contcor1", "", 0.362568884950634, - "contNormal", 0.250767475414751, 0.910481023626532, -0.24031077503337, - 0.242685421694867, 0.00118732333074845, "contGamma:contcor1", - "", 0.99231158676137, "contNormal", 0.123215579607087, - 0.00963614613131403, -0.627172653450798, 0.465126911122153, - -0.0810228711643221, "contcor2", "", 0.771230119831554, - "contNormal", 0.27865296841903, -0.290766223033671, -0.276011957886984, - 0.219249551361251, -0.0283812032628668, "contGamma:contcor2", - "", 0.822264486069294, "contNormal", 0.126344543357632, - -0.224633391428158, -0.170440963768059, 0.13597995157157, -0.0172305060982447, - "contGamma:contcor1:contcor2", "", 0.825541415888206, - "contNormal", 0.0781700372447244, -0.220423409090899, -0.231400924217743, - 0.533066888966849, 0.150832982374553, "contcor1:contcor2", "", - 0.439274066167304, "contNormal", 0.195020882836271, 0.773419647070228, - -0.0201068256838571, 0.00866072830882205, -0.00572304868751753, - "contGamma", "", 0.435488142241196, "debCollin1", 0.00733879658493573, - -0.779834761909761, -0.0350283156670668, 0.0413280372122035, - 0.00314986077256836, "contcor1", "", 0.871537926638096, - "debCollin1", 0.0194790193803456, 0.161705305131868, -0.0236340715470717, - 0.0138396889462534, -0.00489719130040913, "contGamma:contcor1", - "", 0.60846291982802, "debCollin1", 0.00955980844263296, - -0.51226876875164, -0.0390763983936371, 0.045771771987426, 0.00334768679689441, - "contcor2", "", 0.877088686838098, "debCollin1", 0.0216453391619271, - 0.154660861252883, -0.0167951852470268, 0.0216687183742135, - 0.00243676656359335, "contGamma:contcor2", "", 0.803874901058294, - "debCollin1", 0.00981240061670488, 0.248335413399748, -0.0169077162555454, - 0.00681511219555333, -0.00504630202999601, "contGamma:contcor1:contcor2", - "", 0.404368842539091, "debCollin1", 0.0060518531560328, - -0.833844096987978, -0.0164773719834557, 0.0426897970925491, - 0.0131062125545467, "contcor1:contcor2", "", 0.385224976860546, - "debCollin1", 0.015093942935357, 0.868309401372249)) + list(-0.212248679081557, 0.159172658565106, -0.0265380102582255, "contGamma", + "", 0.779417367068773, "contNormal", 0.0947520823281418, + -0.280078385679378, -2.83293199965326, 2.21281430881344, -0.310058845419909, + "debCollin1", "", 0.80964981787338, "contNormal", 1.2872038334038, + -0.240877813889046, -0.263176191386111, 0.719814249012618, 0.228319028813254, + "contcor1", "", 0.362568882521908, "contNormal", 0.250767475359862, + 0.910481028233851, -0.240310771788629, 0.24268542482999, 0.00118732652068046, + "contGamma:contcor1", "", 0.992311566104126, "contNormal", + 0.123215579579123, 0.00963617202253238, -0.627172651858087, + 0.465126912427422, -0.0810228697153327, "contcor2", "", + 0.77123012375028, "contNormal", 0.278652968345702, -0.290766217910208, + -0.27601195307859, 0.219249556032876, -0.0283811985228572, "contGamma:contcor2", + "", 0.82226451520911, "contNormal", 0.126344543322741, + -0.224633353973656, -0.170440951511632, 0.135979963752595, -0.0172304938795185, + "contGamma:contcor1:contcor2", "", 0.825541537569701, + "contNormal", 0.0781700372254887, -0.220423252835553, -0.231400920432453, + 0.533066892560113, 0.15083298606383, "contcor1:contcor2", "", + 0.439274054860369, "contNormal", 0.195020882787284, 0.773419666181849, + -0.0201068264584729, 0.00866072731552443, -0.00572304957147421, + "contGamma", "", 0.435488067844325, "debCollin1", 0.00733879652914852, + -0.779834888287635, -0.0350283069592402, 0.0413280453394685, + 0.00314986919011417, "contcor1", "", 0.871537585355422, + "debCollin1", 0.0194790192322405, 0.161705738495329, -0.0236340731391162, + 0.0138396870692318, -0.00489719303494223, "contGamma:contcor1", + "", 0.608462790135254, "debCollin1", 0.0095598083699334, + -0.512268954087449, -0.0390764153355969, 0.0457717543999051, + 0.00334766953215412, "contcor2", "", 0.877089314752439, + "debCollin1", 0.0216453389972401, 0.154660064810302, -0.0167951842366913, + 0.0216687190919332, 0.00243676742762091, "contGamma:contcor2", + "", 0.803874831472579, "debCollin1", 0.00981240054205661, + 0.248335503343627, -0.0169077176135745, 0.00681511065728235, + -0.00504630347814608, "contGamma:contcor1:contcor2", "", + 0.404368704108425, "debCollin1", 0.00605185311005189, -0.83384434261373, + -0.0164773608561475, 0.0426898077703487, 0.0131062234571006, + "contcor1:contcor2", "", 0.385224577933747, "debCollin1", + 0.0150939428206843, 0.868310130282212)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.220183042131347, 0.191149584590728, 16, 16, -0.0145167287703094, - "Total", 0.889970223940104, 0.104933720712884, -0.138341885446238, - -0.253451189695466, 0.257888061755751, 50, 16, 0.00221843603014282, - "Total", 0.986431401468326, 0.130446083572095, 0.0170065361059056, - -0.4804049194923, 0.521370402342823, 84, 16, 0.0204827414252613, - "Total", 0.936119084570605, 0.255559625007653, 0.0801485814695806, - -0.33819016599703, 0.282578057526941, 16, 50, -0.0278060542350445, - "Total", 0.860619808845156, 0.158362150636571, -0.175585227425064, - -0.212793614132573, 0.161540454341539, 50, 50, -0.0256265798955169, - "Total", 0.788426221616983, 0.0954951395604234, -0.268354808563864, - -0.330684940709842, 0.284189019393912, 84, 50, -0.023247960657965, - "Total", 0.882177217776424, 0.156858484378744, -0.148209774881105, - -0.687596823512946, 0.600830456561888, 16, 84, -0.0433831834755287, - "Total", 0.894992546649055, 0.328686468281505, -0.131989563496033, - -0.4341258927064, 0.317595467650347, 50, 84, -0.0582652125280264, - "Total", 0.761257475390952, 0.19176917695586, -0.30382991392531, - -0.289302277925793, 0.140288166362333, 84, 84, -0.07450705578173, - "Total", 0.496591736721116, 0.109591412821021, -0.679862170436757, - -0.0177591103097022, 0.0225627865328877, 16, 16, 0.00240183811159276, - "Total indirect", 0.815375682847979, 0.0102863871889085, 0.233496763001745, - -0.0185685918605925, 0.0235141745818085, 50, 16, 0.00247279136060799, - "Total indirect", 0.817830911549593, 0.0107355968717651, 0.230335713062353, - -0.0214512928824987, 0.0265517485104643, 84, 16, 0.0025502278139828, - "Total indirect", 0.835032534336158, 0.0122458988460004, 0.208251582513742, - -0.00747785658355776, 0.00794358473478, 16, 50, 0.000232864075611117, - "Total indirect", 0.952799984753835, 0.0039341134428949, 0.0591909915642302, - -0.0132369038151169, 0.0167520808741543, 50, 50, 0.00175758852951869, - "Total indirect", 0.818295077958259, 0.00765039177398679, 0.229738369150574, - -0.0253868642967908, 0.0322301272637507, 84, 50, 0.00342163148347997, - "Total indirect", 0.81592596796004, 0.0146984822208513, 0.232788081930395, - -0.0266773906707256, 0.0220583778443268, 16, 84, -0.00230950641319941, - "Total indirect", 0.852633900354963, 0.0124328224649723, -0.185758818619514, - -0.0108224801097624, 0.0126610021779048, 50, 84, 0.000919261034071187, - "Total indirect", 0.878046886758959, 0.00599079433930977, 0.153445600367096, - -0.0320771139682762, 0.0409632146422981, 84, 84, 0.00444305033701094, - "Total indirect", 0.811532399847239, 0.0186330792776569, 0.238449601958096 + list(-0.220183031461475, 0.1911495951587, 16, 16, -0.0145167181513877, + "Total", 0.889970303887153, 0.104933720686889, -0.138341784284044, + -0.253451186776244, 0.257888064534281, 50, 16, 0.00221843887901831, + "Total", 0.986431384041724, 0.130446083536204, 0.0170065579500715, + -0.480404924996547, 0.521370396584785, 84, 16, 0.0204827357941189, + "Total", 0.936119102079109, 0.255559624942909, 0.0801485594553314, + -0.338190162760752, 0.282578060627042, 16, 50, -0.0278060510668548, + "Total", 0.860619824533179, 0.158362150601831, -0.175585207457604, + -0.212793606928692, 0.161540461460846, 50, 50, -0.0256265727339229, + "Total", 0.788426279290911, 0.0954951395388481, -0.268354733630164, + -0.330684929114374, 0.284189030838218, 84, 50, -0.0232479491380779, + "Total", 0.882177275705269, 0.156858484340182, -0.148209701476266, + -0.687596828918866, 0.600830450837384, 16, 84, -0.0433831890407405, + "Total", 0.894992533230885, 0.328686468200232, -0.131989580460343, + -0.434125880396077, 0.317595479773548, 50, 84, -0.0582652003112644, + "Total", 0.76125752387022, 0.191769176908124, -0.303829850295385, + -0.289302246251156, 0.140288197934749, 84, 84, -0.0745070241582038, + "Total", 0.496591919346923, 0.109591412794944, -0.679861882040096, + -0.0177591130751241, 0.0225627900810571, 16, 16, 0.00240183850296654, + "Total indirect", 0.815375681693523, 0.0102863887995482, 0.233496764488627, + -0.0185685953844489, 0.0235141791273406, 50, 16, 0.00247279187144589, + "Total indirect", 0.817830908894916, 0.0107355989303204, 0.230335716478939, + -0.0214512967509855, 0.0265517536613867, 84, 16, 0.0025502284552006, + "Total indirect", 0.835032524004288, 0.0122459011469124, 0.208251595746679, + -0.0074778562282595, 0.00794358383956618, 16, 50, 0.000232863805653341, + "Total indirect", 0.952800035585686, 0.00393411312388086, 0.059190927744251, + -0.0132369056153792, 0.0167520831946443, 50, 50, 0.00175758878963257, + "Total indirect", 0.818295076068354, 0.00765039282521842, 0.229738371582558, + -0.0253868701425222, 0.0322301347867216, 84, 50, 0.00342163232209968, + "Total indirect", 0.815925965597981, 0.0146984856312972, 0.232788084972106, + -0.0266773982165446, 0.022058383299866, 16, 84, -0.00230950745833928, + "Total indirect", 0.85263387329282, 0.0124328257817062, -0.185758853127139, + -0.0108224799043036, 0.0126610019048996, 50, 84, 0.000919261000298021, + "Total indirect", 0.878046888739105, 0.0059907942172504, 0.153445597855961, + -0.0320771216620022, 0.0409632244760342, 84, 84, 0.00444305140701599, + "Total indirect", 0.811532399688756, 0.0186330837490304, 0.238449602162454 )) @@ -2939,7 +2940,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 12 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -2950,27 +2951,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facExperim", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "facExperim", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facExperim", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facExperim", 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) @@ -2979,145 +2980,146 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(687.486235562675, 760.431000770342, 12, "Model 1", 100, -315.743117781338, + list(687.486235562681, 760.431000770348, 12, "Model 1", 100, -315.743117781341, 12)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962235771172162, 0.0896222994692625, 0.0399999708787705, - "facExperimexperimental", "", 0.114128913643489, "facGenderm", - 0.0253179798108061, 1.57990373551439, -0.163250617786972, 0.0341992304986956, - -0.0645256936441384, "contcor2", "", 0.200188657477256, - "facGenderm", 0.0503707848315396, -1.28101425975272, -0.170527076637115, - 0.0272979152004801, -0.0716145807183172, "contcor2", "", - 0.155883786253155, "facExperimexperimental", 0.0504664864757753, - -1.41905224079139, 0.180704821049348, 0.319295234006659, 0.250000027528004, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553468457827, 7.0710670331841, 0.180704809731439, 0.319295194529998, - 0.250000002130719, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553396622955, 7.07106775153768, - 0.721541646958159, 1.27492303857769, 0.998232342767924, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171316407988, - 7.07107058407681, 0.00469472159504364, 0.0082953095855207, 0.00649501559028217, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000918534222791348, 7.07106543133947, 0.719320671169339, 1.27099899992446, - 0.9951598355469, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.140736853612284, 7.07106781204921)) + list(-0.163250589052998, 0.0341992363231237, -0.0645256763649372, "contcor2", + "", 0.200188725760716, "facGenderm", 0.0503707789871602, + -1.28101406534501, -0.00962236242886483, 0.0896222847790031, + 0.0399999611750691, "facExperimexperimental", "", 0.114128965065874, + "facGenderm", 0.025317977266597, 1.5799035110061, 0.180704817941389, + 0.319295223166034, 0.250000020553712, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553448731272, 7.07106723045236, + 0.719320671168252, 1.27099899992555, 0.9951598355469, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.140736853612838, + 7.07106781202134, 0.00469472139546466, 0.00829530888940007, + 0.00649501514243237, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000918534096120233, 7.07106591890977, -0.170527025733967, + 0.0272979343203526, -0.0716145457068074, "contcor2", "", + 0.155883922033882, "facExperimexperimental", 0.0504664783676481, + -1.41905177502372, 0.180704802741823, 0.319295170147439, 0.249999986444631, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553352252387, 7.07106819527951, + 0.721541610868722, 1.27492291270025, 0.998232261784488, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171293502465, + 7.07107115772836)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.878861262130587, 0.893506224549961, 16, 0.00732248120968704, - 0, "m", "facGender", "contNormal", "", "", "", 0.987078775998107, - 0.452142871160072, 0.0161950606251949, -0.225620138867185, 1.45227966471852, - 16, 0.613329762925667, 1, "m", "facGender", "contNormal", "", - "", "", 0.15189563934561, 0.42804352958033, 1.4328677355011, - -0.0701739101694813, 1.07581873989779, 50, 0.502822414864154, - 0, "m", "facGender", "contNormal", "", "", "", 0.0854450857996136, - 0.292350435800534, 1.7199304440484, -0.297857186939633, 0.863961645448948, + list(-0.878861262005879, 0.893506224425253, 16, 0.00732248120968687, + 0, "m", "facGender", "contNormal", "", "", "", 0.987078775996289, + 0.452142871096444, 0.0161950606274736, -0.225620138928087, 1.45227966477942, + 16, 0.613329762925666, 1, "m", "facGender", "contNormal", "", + "", "", 0.151895639375342, 0.428043529611403, 1.43286773539709, + -0.0701739100670175, 1.07581873979533, 50, 0.502822414864154, + 0, "m", "facGender", "contNormal", "", "", "", 0.0854450857437006, + 0.292350435748255, 1.71993044435596, -0.297857186940053, 0.863961645449368, 50, 0.283052229254658, 1, "m", "facGender", "contNormal", "", - "", "", 0.339574491110516, 0.296387801396572, 0.95500633940035, - 0.3006239527811, 1.8666248312892, 84, 1.08362439203515, 0, "m", - "facGender", "contNormal", "", "", "", 0.00667839343786802, - 0.39949736088533, 2.71246946321176, -1.02328146791015, 0.815113998039957, + "", "", 0.339574491110865, 0.296387801396786, 0.955006339399659, + 0.300623952725298, 1.866624831345, 84, 1.08362439203515, 0, + "m", "facGender", "contNormal", "", "", "", 0.00667839344176335, + 0.399497360913802, 2.71246946301845, -1.02328146782893, 0.815113997958734, 84, -0.104083734935097, 1, "m", "facGender", "contNormal", "", - "", "", 0.824365988783905, 0.468987052938508, -0.221933066772195, - -0.00946512820932726, 0.00904650124377593, 16, -0.000209313482775664, + "", "", 0.824365988768639, 0.468987052897066, -0.221933066791806, + -0.00946514153585161, 0.00904651219300797, 16, -0.00020931467142182, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.964646816773848, 0.00472244122828801, -0.0443231525088867, - -0.0180790050005119, 0.0166279854774981, 16, -0.000725509761506888, + "", 0.964646662473437, 0.00472244742119681, -0.0443233460858255, + -0.0180790256381808, 0.0166280040662397, 16, -0.000725510785970541, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.934693161078461, 0.00885398679561828, -0.0819415906364275, - -0.0126981879898938, 0.011672668935515, 50, -0.000512759527189366, + "", 0.934693142713297, 0.00885399680253953, -0.0819416137311511, + -0.0126981858404611, 0.0116726669892643, 50, -0.000512759425598391, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.934269193892388, 0.00621716958006449, -0.0824747532757579, - -0.0327491847142696, 0.0359098803609505, 50, 0.00158034782334045, + "", 0.934269195864394, 0.00621716853522809, -0.0824747507957944, + -0.0327491905385415, 0.0359098867646487, 50, 0.00158034811305358, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.928107428809268, 0.0175153894706214, 0.0902262450967002, - -0.0208313638609613, 0.0190944741258224, 84, -0.000868444867569445, + "", 0.928107428434616, 0.0175153925900589, 0.0902262455681715, + -0.020831329814902, 0.0190944433076569, 84, -0.000868443253622511, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.932051418009093, 0.0101853499099253, -0.085264117114246, - -0.0880239699181569, 0.0965903036018672, 84, 0.00428316684185515, + "", 0.932051433858097, 0.0101853333626251, -0.0852640971781295, + -0.0880240071771769, 0.0965903445211473, 84, 0.00428316867198519, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.92753646395841, 0.0470963433451426, 0.0909447854680826 + "", 0.927536463682652, 0.0470963632889529, 0.0909447858151261 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0896561374958056, 1.06423481495683, 0.487289338730511, "facGenderm", - "", 0.0978454897219478, "contNormal", 0.29436534588247, - 1.65538962227255, -2.53911310289052, 2.31303982934518, -0.11303663677267, - "debCollin1", "", 0.927238839524947, "contNormal", - 1.23781686054154, -0.0913193545636609, -0.457976186700579, 0.689553077761796, - 0.115788445530608, "facExperimexperimental", "", 0.692451711268419, - "contNormal", 0.292742436471777, 0.39553010122525, -1.01323224042072, - 0.625465293972185, -0.193883473224267, "facGenderm:facExperimexperimental", - "", 0.642799205538996, "contNormal", 0.418042766938256, - -0.463788608625546, -0.308439343011646, 0.319658229622508, 0.00560944330543085, - "contcor2", "", 0.972073140958033, "contNormal", 0.160231916909828, - 0.0350082768378015, -0.0756503939568387, 1.1146521420266, 0.519500874034879, - "facGenderm:contcor2", "", 0.0871123883149723, "contNormal", - 0.303654185835145, 1.71083060358969, -1.73721765402894, 0.00566498612062205, + list(-0.0896561373903666, 1.06423481485139, 0.487289338730511, "facGenderm", + "", 0.0978454896606202, "contNormal", 0.294365345828674, + 1.65538962257508, -2.53911310281365, 2.31303982926831, -0.11303663677267, + "debCollin1", "", 0.927238839522648, "contNormal", + 1.23781686050232, -0.0913193545665544, -0.457976186692855, 0.689553077754071, + 0.115788445530608, "facExperimexperimental", "", 0.69245171126449, + "contNormal", 0.292742436467836, 0.395530101230575, -1.01323224029417, + 0.625465293845637, -0.193883473224267, "facGenderm:facExperimexperimental", + "", 0.64279920548767, "contNormal", 0.418042766873689, + -0.463788608697179, -0.308439343065367, 0.319658229676228, 0.00560944330543089, + "contcor2", "", 0.972073140962808, "contNormal", 0.160231916937237, + 0.0350082768318132, -0.0756503939870765, 1.11465214205683, 0.519500874034879, + "facGenderm:contcor2", "", 0.0871123883310227, "contNormal", + 0.303654185850573, 1.71083060350277, -1.73721765413328, 0.00566498622495981, -0.865776333954158, "facGenderm:facExperimexperimental:contcor2", - "", 0.0515080258158382, "contNormal", 0.444621088422338, - -1.94722282972726, -0.448567429745986, 0.746707103519289, 0.149069836886652, - "facExperimexperimental:contcor2", "", 0.624928309042205, - "contNormal", 0.304922575795639, 0.48887766508492, -0.0421496915195911, - 0.0510538313921231, 0.00445206993626599, "facGenderm", "", - 0.851469386563036, "debCollin1", 0.023776845811171, 0.187243925103569, - -0.0546134094228103, 0.0380355492530061, -0.00828893008490212, - "facExperimexperimental", "", 0.725813271153165, "debCollin1", - 0.0236353727432289, -0.350700205786971, -0.0838945658629744, - 0.0483076942369822, -0.0177934358129961, "facGenderm:facExperimexperimental", - "", 0.597781854123591, "debCollin1", 0.0337256860694256, - -0.527592997704114, -0.0277181291309028, 0.0230158758963417, - -0.00235112661728056, "contcor2", "", 0.855850987824245, - "debCollin1", 0.0129425860442916, -0.181658179380429, -0.0452630403378743, - 0.0508920880642307, 0.00281452386317821, "facGenderm:contcor2", - "", 0.908652103290406, "debCollin1", 0.024529820231536, - 0.114738870346869, -0.0944433257031349, 0.0460396805343723, - -0.0242018225843813, "facGenderm:facExperimexperimental:contcor2", - "", 0.499479635336796, "debCollin1", 0.0358381601258032, - -0.675308735142243, -0.0244181868415852, 0.0716992559558612, - 0.023640534557138, "facExperimexperimental:contcor2", "", - 0.334983452747052, "debCollin1", 0.0245202063802214, 0.964124615859965 + "", 0.051508025843777, "contNormal", 0.444621088475572, + -1.94722282949412, -0.448567429836505, 0.746707103609809, 0.149069836886652, + "facExperimexperimental:contcor2", "", 0.624928309094631, + "contNormal", 0.304922575841824, 0.488877665010873, -0.0421496904541727, + 0.0510538292448564, 0.00445206939534185, "facGenderm", "", + 0.851469399339276, "debCollin1", 0.0237768449915934, 0.187243908807747, + -0.0546134098135766, 0.0380355456689728, -0.00828893207230188, + "facExperimexperimental", "", 0.725813198994766, "debCollin1", + 0.0236353719286049, -0.350700301960136, -0.0838945652422306, + 0.0483076903010001, -0.0177934374706152, "facGenderm:facExperimexperimental", + "", 0.597781807378362, "debCollin1", 0.0337256849069741, + -0.527593065039155, -0.0277181280014622, 0.0230158752768089, + -0.00235112636232662, "contcor2", "", 0.855850998369556, + "debCollin1", 0.0129425855981167, -0.181658165943962, -0.045263050647636, + 0.050892074439568, 0.00281451189596604, "facGenderm:contcor2", + "", 0.908652486860189, "debCollin1", 0.0245298193858824, + 0.114738386438584, -0.0944433235044348, 0.0460396778915819, + -0.0242018228064265, "facGenderm:facExperimexperimental:contcor2", + "", 0.499479616617992, "debCollin1", 0.0358381588907064, + -0.675308764611302, -0.0244181736484713, 0.071699265836329, + 0.0236405460939289, "facExperimexperimental:contcor2", "", + 0.334983200229756, "debCollin1", 0.0245202055351431, 0.964125119589497 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.879096137926492, 0.893322473380314, 16, 0.00711316772691137, - 0, "m", "Total", 0.987448460922022, 0.45215591339622, 0.0157316702406547, - -0.226236103881886, 1.45144461021021, 16, 0.61260425316416, - 1, "m", "Total", 0.152327155080635, 0.427987638376374, 1.43135968947176, - -0.0706048612258585, 1.07522417189979, 50, 0.502309655336965, - 0, "m", "Total", 0.0857196945112946, 0.292308696017835, 1.71842186763515, - -0.295309939589727, 0.864575093745723, 50, 0.284632577077998, - 1, "m", "Total", 0.336080007975829, 0.295894476246624, 0.961939474803717, - 0.299944753987687, 1.86556714034747, 84, 1.08275594716758, 0, - "m", "Total", 0.00670905726628668, 0.399400804991626, 2.71095083844481, - -1.01442802461674, 0.814826888430255, 84, -0.0998005680932418, - 1, "m", "Total", 0.83065342768185, 0.466655236391057, -0.213863598456675, - -0.00946512820932726, 0.00904650124377593, 16, -0.000209313482775664, - 0, "m", "Total indirect", 0.964646816773848, 0.00472244122828801, - -0.0443231525088867, -0.0180790050005119, 0.0166279854774981, - 16, -0.000725509761506888, 1, "m", "Total indirect", 0.934693161078461, - 0.00885398679561828, -0.0819415906364275, -0.0126981879898938, - 0.011672668935515, 50, -0.000512759527189366, 0, "m", "Total indirect", - 0.934269193892388, 0.00621716958006449, -0.0824747532757579, - -0.0327491847142696, 0.0359098803609505, 50, 0.00158034782334045, - 1, "m", "Total indirect", 0.928107428809268, 0.0175153894706214, - 0.0902262450967002, -0.0208313638609613, 0.0190944741258224, - 84, -0.000868444867569445, 0, "m", "Total indirect", 0.932051418009093, - 0.0101853499099253, -0.085264117114246, -0.0880239699181569, - 0.0965903036018672, 84, 0.00428316684185515, 1, "m", "Total indirect", - 0.92753646395841, 0.0470963433451426, 0.0909447854680826)) + list(-0.879096138987367, 0.893322472063898, 16, 0.00711316653826505, + 0, "m", "Total", 0.987448463017465, 0.45215591333103, 0.0157316676140812, + -0.226236104961682, 1.45144460924107, 16, 0.612604252139696, + 1, "m", "Total", 0.152327155793353, 0.427987638404605, 1.43135968698367, + -0.0706048610194797, 1.07522417189659, 50, 0.502309655438556, + 0, "m", "Total", 0.0857196943906604, 0.292308695964371, 1.71842186829701, + -0.295309939309781, 0.864575094045203, 50, 0.284632577367711, + 1, "m", "Total", 0.33608000749211, 0.295894476251607, 0.961939475766626, + 0.299944755550164, 1.86556714201289, 84, 1.08275594878153, 0, + "m", "Total", 0.00670905718813142, 0.399400805017887, 2.71095084230748, + -1.01442802272573, 0.814826890199504, 84, -0.0998005662631116, + 1, "m", "Total", 0.830653430729147, 0.466655236359994, -0.213863594549107, + -0.00946514153585161, 0.00904651219300797, 16, -0.00020931467142182, + 0, "m", "Total indirect", 0.964646662473437, 0.00472244742119681, + -0.0443233460858255, -0.0180790256381808, 0.0166280040662397, + 16, -0.000725510785970541, 1, "m", "Total indirect", 0.934693142713297, + 0.00885399680253953, -0.0819416137311511, -0.0126981858404611, + 0.0116726669892643, 50, -0.000512759425598391, 0, "m", "Total indirect", + 0.934269195864394, 0.00621716853522809, -0.0824747507957944, + -0.0327491905385415, 0.0359098867646487, 50, 0.00158034811305358, + 1, "m", "Total indirect", 0.928107428434616, 0.0175153925900589, + 0.0902262455681715, -0.020831329814902, 0.0190944433076569, + 84, -0.000868443253622511, 0, "m", "Total indirect", 0.932051433858097, + 0.0101853333626251, -0.0852640971781295, -0.0880240071771769, + 0.0965903445211473, 84, 0.00428316867198519, 1, "m", "Total indirect", + 0.927536463682652, 0.0470963632889529, 0.0909447858151261)) @@ -3133,7 +3135,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 13 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -3144,25 +3146,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contcor1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -3171,144 +3173,144 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(994.437241996865, 1056.96132646058, 16, "Model 1", 100, -473.218620998432, + list(994.437241995385, 1056.9613264591, 16, "Model 1", 100, -473.218620997692, 13)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544846870776706, 0.0642102248888691, -0.240318322943919, "contcor1", - "", 0.121934848260143, "contGamma", 0.155374563122011, - -1.54670312897487, -0.403932795927104, 0.194629450612031, -0.104651672657537, - "contcor2", "", 0.493120575742174, "contGamma", 0.15269725649566, - -0.685353981199468, 0.42497974941872, 0.896764739238333, 0.660872244328527, - "contcor2", "", 3.99663320216348e-08, "contcor1", 0.120355525290514, - 5.49100045663309, 1.68041042975123, 2.9691895200285, 2.32479997488987, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776217431289, 7.07107099489557, 0.732635098545955, 1.29452571575508, - 1.01358040715052, "contcor1", "", 1.53765888910584e-12, - "contcor1", 0.143342077109898, 7.0710598561609, 0.721542124749597, - 1.27492470509634, 0.998233414922968, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171619660298, 7.07106298932478, - 0.00458997720859551, 0.00811020743535989, 0.0063500923219777, - "debCollin1", "", 1.53699275529107e-12, "debCollin1", - 0.000898034416584056, 7.07110129045186, 0.775909019719154, 1.37098741586068, - 1.07344821778992, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.151808502818274, 7.07106781149747)) + list(-0.403936615988686, 0.194627257996075, -0.104654678996305, "contcor2", + "", 0.493109330604995, "contGamma", 0.152697671667989, + -0.685371805955601, -0.544848104782641, 0.064209535762863, -0.240319284509889, + "contcor1", "", 0.121933689083668, "contGamma", 0.155374702124547, + -1.54670793394185, 1.68041221027666, 2.96919573041192, 2.32480397034429, + "contGamma", "", 1.53765888910584e-12, "contGamma", + 0.328777347517866, 7.07105884239169, 0.775909019716225, 1.37098741586351, + 1.07344821778987, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.151808502819742, 7.07106781142875, 0.00458999123956811, + 0.0081102563743258, 0.00635012380694695, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000898043321848026, 7.07106623083554, + 0.424979908914958, 0.896764878644039, 0.660872393779499, "contcor2", + "", 3.9965998066549e-08, "contcor1", 0.120355520165284, + 5.49100193220822, 0.732634647667565, 1.29452414311918, 1.01357939539337, + "contcor1", "", 1.53743684450092e-12, "contcor1", 0.143341790942008, + 7.07106691448718, 0.72154245482336, 1.27492585637271, 0.998234155598033, + "contcor2", "", 1.53765888910584e-12, "contcor2", 0.141171829154608, + 7.0710577427228)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.167905993014772, 0.202765596326774, 16, "", 0.0174298016560009, - "contGamma", "contNormal", "", "", "", 0.853759505242573, - 0.094560816490853, 0.184323722053383, -0.166284133962474, 0.107776648815589, - 50, "", -0.0292537425734422, "contGamma", "contNormal", "", - "", "", 0.675639930329083, 0.0699147496943362, -0.418420186031389, - -0.285599415615849, 0.125193620066903, 84, "", -0.0802028977744733, - "contGamma", "contNormal", "", "", "", 0.444078907254283, - 0.104796067408135, -0.765323544652855, -0.017754952641951, 0.0228139678856641, - 16, 16, 0.00252950762185653, "contGamma", "debCollin1", "contNormal", - "", "", 0.806912575993251, 0.010349404593048, - 0.244410931963725, -0.0185931352093794, 0.0238015581275225, - 50, 16, 0.00260421145907155, "contGamma", "debCollin1", "contNormal", - "", "", 0.809715995036187, 0.0108151715213407, - 0.240792432550226, -0.0216976338199139, 0.0270691162254719, - 84, 16, 0.00268574120277897, "contGamma", "debCollin1", "contNormal", - "", "", 0.829078952549622, 0.0124407260618184, - 0.215882995046545, -0.00785251019399384, 0.00834306132620437, - 16, 50, 0.000245275566105266, "contGamma", "debCollin1", "contNormal", - "", "", 0.952660777627974, 0.0041315992660954, - 0.0593657686305732, -0.0132583847681005, 0.0169604173336467, - 50, 50, 0.00185101628277309, "contGamma", "debCollin1", "contNormal", - "", "", 0.810244624841716, 0.00770901974222723, - 0.240110460819537, -0.0253896852062175, 0.0325966415874892, - 84, 50, 0.00360347819063581, "contGamma", "debCollin1", "contNormal", - "", "", 0.80754188740396, 0.0147927021238899, - 0.243598374418442, -0.0273756858301377, 0.022511295804181, 16, - 84, -0.00243219501297831, "contGamma", "debCollin1", "contNormal", - "", "", 0.848437399900821, 0.0127265046775912, - -0.191112569758522, -0.0111624362160021, 0.0130987480704942, - 50, 84, 0.00096815592724606, "contGamma", "debCollin1", "contNormal", - "", "", 0.875696546420553, 0.0061891913519497, - 0.156426885547992, -0.0319891645162097, 0.0413475781263007, - 84, 84, 0.00467920680504549, "contGamma", "debCollin1", "contNormal", - "", "", 0.802503327526605, 0.0187086964916145, - 0.250108649052209)) + list(-0.167905067868034, 0.202766521504205, 16, "", 0.0174307268180858, + "contGamma", "contNormal", "", "", "", 0.853751830426498, + 0.094560816498683, 0.184333505816635, -0.166283648316555, 0.107777134456734, + 50, "", -0.0292532569299105, "contGamma", "contNormal", "", + "", "", 0.675645008085773, 0.0699147496931182, -0.418413239814401, + -0.285599409593889, 0.125193625974727, 84, "", -0.080202891809581, + "contGamma", "contNormal", "", "", "", 0.444078941012903, + 0.104796067379018, -0.765323487946448, -0.017754975814652, 0.0228139955008436, + 16, 16, 0.00252950984309584, "contGamma", "debCollin1", "contNormal", + "", "", 0.806912646735945, 0.0103494175493781, + 0.24441084061275, -0.0185932781482687, 0.023801742677788, 50, + 16, 0.00260423226475964, "contGamma", "debCollin1", "contNormal", + "", "", 0.809715945675566, 0.0108152550660276, + 0.240792496234319, -0.0216978843746705, 0.0270694489567323, + 84, 16, 0.00268578229103088, "contGamma", "debCollin1", "contNormal", + "", "", 0.829078390841743, 0.012440874862006, + 0.215883715640704, -0.00785250140158746, 0.00834299016804445, + 16, 50, 0.000245244383228493, "contGamma", "debCollin1", "contNormal", + "", "", 0.952666555599063, 0.00413157887016799, + 0.0593585142472474, -0.0132583503102953, 0.0169603696936007, + 50, 50, 0.0018510096916527, "contGamma", "debCollin1", "contNormal", + "", "", 0.810244781947307, 0.00770899879851297, + 0.240110258158264, -0.0253898289463891, 0.0325968258229731, + 84, 50, 0.00360349843829198, "contGamma", "debCollin1", "contNormal", + "", "", 0.807541894416439, 0.0147927857926864, + 0.243598365364931, -0.0273761956744423, 0.0225116649732296, + 16, 84, -0.00243226535060637, "contGamma", "debCollin1", "contNormal", + "", "", 0.848435708126859, 0.0127267289198121, + -0.191114729160295, -0.0111623071004024, 0.0130985415461243, + 50, 84, 0.000968117222860964, "contGamma", "debCollin1", "contNormal", + "", "", 0.875699769710299, 0.00618910572793509, + 0.156422796025487, -0.0319891494884635, 0.0413475547371127, + 84, 84, 0.00467920262432461, "contGamma", "debCollin1", "contNormal", + "", "", 0.802503399016845, 0.0187086866911961, + 0.250108556605769)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.16608154690477, 0.107922939949922, -0.029079303477424, "contGamma", - "", 0.677402235907902, "contNormal", 0.0699003882254992, - -0.41601061475673, -2.85705032172033, 2.2039726022684, -0.326538859725964, - "debCollin1", "", 0.800333867915928, "contNormal", - 1.29110100081161, -0.252915038808503, -0.0857123017404963, 0.607920743538258, - 0.261104220898881, "contcor1", "", 0.140057185003736, - "contNormal", 0.176950456934424, 1.47557811051962, -0.184505443585246, - 0.088659786432387, -0.0479228285764296, "contGamma:contcor1", - "", 0.491645622764062, "contNormal", 0.0696862881594574, - -0.687693803790664, -0.0201068203222804, 0.00866066687384823, - -0.00572307672421609, "contGamma", "", 0.435484827309141, - "debCollin1", 0.00733877954468626, -0.77984039299286, -0.0350284501674901, - 0.0413277254178423, 0.00314963762517607, "contcor1", "", - 0.871546652642198, "debCollin1", 0.0194789741514692, 0.161694224792558, - -0.0236339506789962, 0.0138397228028826, -0.00489711393805678, - "contGamma:contcor1", "", 0.608467750376869, "debCollin1", - 0.00955978624542757, -0.512261865729379, -0.0390760418372605, - 0.045771931531641, 0.00334794484719026, "contcor2", "", - 0.877079004609357, "debCollin1", 0.0216452889027991, 0.15467314214306, - -0.0167952099087041, 0.0216686044017873, 0.00243669724654163, - "contGamma:contcor2", "", 0.803879920259654, "debCollin1", - 0.0098123778329319, 0.248328925774106, -0.0169076752959448, - 0.00681509807214511, -0.00504628861189985, "contGamma:contcor1:contcor2", - "", 0.40436900093535, "debCollin1", 0.00605183910398664, - -0.833843815936153, -0.0164773412786598, 0.0426896904147196, - 0.0131061745680299, "contcor1:contcor2", "", 0.385225250786817, - "debCollin1", 0.0150939078881248, 0.868308900860671)) + list(-0.166081059616714, 0.107923427233565, -0.0290788161915744, "contGamma", + "", 0.677407337009052, "contNormal", 0.0699003882243733, + -0.41600364361689, -2.85705022054336, 2.20397270283523, -0.326538758854063, + "debCollin1", "", 0.800333928267764, "contNormal", + 1.29110100065595, -0.252914960710404, -0.0857124401061475, 0.607920605053797, + 0.261104082473825, "contcor1", "", 0.140057395072571, + "contNormal", 0.176950456904115, 1.47557732849094, -0.184505894744658, + 0.0886593352193409, -0.0479232797626586, "contGamma:contcor1", + "", 0.491641544617958, "contNormal", 0.069686288145775, + -0.687700278459503, -0.0201068399148487, 0.00866071859838308, + -0.00572306065823283, "contGamma", "", 0.435487254143615, + "debCollin1", 0.00733879773815914, -0.779836270520845, -0.0350283292852364, + 0.0413280355935237, 0.00314985315414361, "contcor1", "", + 0.871538254657293, "debCollin1", 0.0194790224414962, 0.161704888610502, + -0.0236340753595507, 0.0138396910227186, -0.00489719216841603, + "contGamma:contcor1", "", 0.608462912623685, "debCollin1", + 0.00955980994494226, -0.512268779046904, -0.0390764317684587, + 0.0457717519457205, 0.00334766008863092, "contcor2", "", + 0.877089678806982, "debCollin1", 0.0216453425632948, 0.154659603045864, + -0.016795168796782, 0.0216687408686563, 0.00243678603593715, + "contGamma:contcor2", "", 0.803873395955925, "debCollin1", + 0.00981240215862046, 0.248337358838923, -0.0169077260602541, + 0.00681510611861751, -0.00504630997081832, "contGamma:contcor1:contcor2", + "", 0.404368176889877, "debCollin1", 0.00605185410701276, + -0.833845278089364, -0.0164773505845386, 0.0426898277890426, + 0.013106238602252, "contcor1:contcor2", "", 0.385224107071821, + "debCollin1", 0.0150939453072312, 0.868310990630994)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.16503953553478, 0.204958154090495, 16, 16, 0.0199593092778575, - "Total", 0.832529726801734, 0.0943889001389235, 0.21145822494468, - -0.161837988374949, 0.108538926146208, 50, 16, -0.0266495311143706, - "Total", 0.699226187223127, 0.0689749701152308, -0.386365243360736, - -0.280871707668068, 0.125837394524679, 84, 16, -0.0775171565716943, - "Total", 0.454989398678793, 0.103754228496242, -0.747122866173131, - -0.16769734163303, 0.203047496077243, 16, 50, 0.0176750772221062, - "Total", 0.851754225140351, 0.0945795026425642, 0.186880631936753, - -0.162790537459919, 0.107985084878581, 50, 50, -0.0274027262906691, - "Total", 0.691588635263408, 0.0690766831621254, -0.396700088021799, - -0.279357300809405, 0.12615846164173, 84, 50, -0.0765994195838374, - "Total", 0.459026898293715, 0.103449799498815, -0.740450150265539, - -0.173382722066673, 0.203377935352718, 16, 84, 0.0149976066430226, - "Total", 0.876001900385108, 0.0961141787275765, 0.156039481807689, - -0.164561146984054, 0.107989973691661, 50, 84, -0.0282855866461961, - "Total", 0.684145006059508, 0.0695296247343225, -0.406813451881515, - -0.278112634893862, 0.127065252955006, 84, 84, -0.0755236909694278, - "Total", 0.464986622878694, 0.1033636054144, -0.730660377670089, - -0.017754952641951, 0.0228139678856641, 16, 16, 0.00252950762185653, - "Total indirect", 0.806912575993251, 0.010349404593048, 0.244410931963725, - -0.0185931352093794, 0.0238015581275225, 50, 16, 0.00260421145907155, - "Total indirect", 0.809715995036187, 0.0108151715213407, 0.240792432550226, - -0.0216976338199139, 0.0270691162254719, 84, 16, 0.00268574120277897, - "Total indirect", 0.829078952549622, 0.0124407260618184, 0.215882995046545, - -0.00785251019399384, 0.00834306132620437, 16, 50, 0.000245275566105266, - "Total indirect", 0.952660777627974, 0.0041315992660954, 0.0593657686305732, - -0.0132583847681005, 0.0169604173336467, 50, 50, 0.00185101628277309, - "Total indirect", 0.810244624841716, 0.00770901974222723, 0.240110460819537, - -0.0253896852062175, 0.0325966415874892, 84, 50, 0.00360347819063581, - "Total indirect", 0.80754188740396, 0.0147927021238899, 0.243598374418442, - -0.0273756858301377, 0.022511295804181, 16, 84, -0.00243219501297831, - "Total indirect", 0.848437399900821, 0.0127265046775912, -0.191112569758522, - -0.0111624362160021, 0.0130987480704942, 50, 84, 0.00096815592724606, - "Total indirect", 0.875696546420553, 0.0061891913519497, 0.156426885547992, - -0.0319891645162097, 0.0413475781263007, 84, 84, 0.00467920680504549, - "Total indirect", 0.802503327526605, 0.0187086964916145, 0.250108649052209 + list(-0.165038609203327, 0.20495908252569, 16, 16, 0.0199602366611816, + "Total", 0.832522061748624, 0.0943889006756023, 0.211468048873472, + -0.161837478420492, 0.108539429090191, 50, 16, -0.0266490246651509, + "Total", 0.699231616935238, 0.0689749683268115, -0.386357910871154, + -0.280871640711373, 0.125837421674272, 84, 16, -0.0775171095185502, + "Total", 0.454989628266287, 0.103754218341182, -0.747122485792772, + -0.167696463707588, 0.203048406110217, 16, 50, 0.0176759712013142, + "Total", 0.851746826668139, 0.0945795108334116, 0.186890067896925, + -0.162790061940529, 0.107985567464013, 50, 50, -0.0274022472382578, + "Total", 0.691593757590749, 0.0690766849647202, -0.396693142588604, + -0.27935726999871, 0.126158483256132, 84, 50, -0.0765993933712891, + "Total", 0.459027041805039, 0.103449797152779, -0.740449913673235, + -0.173381965479239, 0.203378888414198, 16, 84, 0.0149984614674794, + "Total", 0.875994954140133, 0.0961142288494275, 0.15604829427468, + -0.164560736547629, 0.10799045713353, 50, 84, -0.0282851397070496, + "Total", 0.684149807618648, 0.0695296433585025, -0.406806914875261, + -0.278112633221875, 0.127065254851362, 84, 84, -0.0755236891852564, + "Total", 0.464986633671746, 0.103363605471638, -0.730660360004365, + -0.017754975814652, 0.0228139955008436, 16, 16, 0.00252950984309584, + "Total indirect", 0.806912646735945, 0.0103494175493781, 0.24441084061275, + -0.0185932781482687, 0.023801742677788, 50, 16, 0.00260423226475964, + "Total indirect", 0.809715945675566, 0.0108152550660276, 0.240792496234319, + -0.0216978843746705, 0.0270694489567323, 84, 16, 0.00268578229103088, + "Total indirect", 0.829078390841743, 0.012440874862006, 0.215883715640704, + -0.00785250140158746, 0.00834299016804445, 16, 50, 0.000245244383228493, + "Total indirect", 0.952666555599063, 0.00413157887016799, 0.0593585142472474, + -0.0132583503102953, 0.0169603696936007, 50, 50, 0.0018510096916527, + "Total indirect", 0.810244781947307, 0.00770899879851297, 0.240110258158264, + -0.0253898289463891, 0.0325968258229731, 84, 50, 0.00360349843829198, + "Total indirect", 0.807541894416439, 0.0147927857926864, 0.243598365364931, + -0.0273761956744423, 0.0225116649732296, 16, 84, -0.00243226535060637, + "Total indirect", 0.848435708126859, 0.0127267289198121, -0.191114729160295, + -0.0111623071004024, 0.0130985415461243, 50, 84, 0.000968117222860964, + "Total indirect", 0.875699769710299, 0.00618910572793509, 0.156422796025487, + -0.0319891494884635, 0.0413475547371127, 84, 84, 0.00467920262432461, + "Total indirect", 0.802503399016845, 0.0187086866911961, 0.250108556605769 )) @@ -3325,7 +3327,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 13 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -3336,25 +3338,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facExperim", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facExperim", 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) @@ -3363,125 +3365,125 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(684.806331665918, 747.330416129632, 16, "Model 1", 100, -318.403165832959, + list(684.806331665921, 747.330416129635, 16, "Model 1", 100, -318.40316583296, 13)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962229032513796, 0.0896222820878539, 0.039999995881358, "facExperimexperimental", - "", 0.114128378369841, "facGenderm", 0.0253179581859209, - 1.57990607250476, -0.163250670474983, 0.034199139172048, -0.0645257656514676, - "contcor2", "", 0.200188067318225, "facGenderm", 0.0503707749745634, - -1.28101593997814, -0.170527298303061, 0.0272978084787187, -0.0716147449121711, - "contcor2", "", 0.155883078153151, "facExperimexperimental", - 0.0504665157988103, -1.4190546697868, 0.180704729530138, 0.3192949147928, - 0.249999822161469, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353552887593456, 7.07107284183573, 0.180704800091371, - 0.319295160902879, 0.249999980497125, "facExperimexperimental", + list(-0.163250670420452, 0.0341991392507475, -0.0645257655848522, "contcor2", + "", 0.200188067837811, "facGenderm", 0.0503707749807288, + -1.28101593849884, -0.0096222903317717, 0.0896222821466379, + 0.0399999959074331, "facExperimexperimental", "", 0.114128378372475, + "facGenderm", 0.0253179582026094, 1.57990607249326, 0.180704729680805, + 0.319294915317575, 0.24999982249919, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.035355288854783, 7.07107283230043, + 0.758625478847735, 1.34044837528268, 1.04953692706521, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.148426935653995, + 7.07106781151795, 0.0046947193116614, 0.00829530162121499, 0.0064950104664382, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000918532773549545, 7.0710710096267, -0.17052729923779, 0.0272978072940433, + -0.0716147459718733, "contcor2", "", 0.155883071509119, + "facExperimexperimental", 0.0504665157350473, -1.41905469257786, + 0.180704800012359, 0.319295160627491, 0.249999980319925, "facExperimexperimental", "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553335430373, 7.07106836349897, 0.721541907319786, 1.27492394670412, - 0.998232927011953, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.141171481657148, 7.0710664455324, 0.00469471931422651, - 0.00829530163016194, 0.00649501047219422, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000918532775177596, 7.07107100336014, - 0.758625478844545, 1.34044837528587, 1.04953692706521, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.148426935655622, - 7.07106781144042)) + 0.0353553334929406, 7.07106836850634, 0.72154190679076, 1.27492394485782, + 0.99823292582429, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.141171481321103, 7.0710664539515)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0389876734115612, 1.18993239595157, "", 0.614460034681565, 0, - "m", "facGender", "contNormal", "", "", "", 0.0363715155137354, - 0.293613742808162, 2.09274957229449, -0.261259761966587, 0.892797982408634, + list(0.0389876735250847, 1.18993239583805, "", 0.614460034681565, 0, + "m", "facGender", "contNormal", "", "", "", 0.0363715154768631, + 0.293613742750241, 2.09274957270733, -0.261259761924931, 0.892797982366978, "", 0.315769110221023, 1, "m", "facGender", "contNormal", "", - "", "", 0.283470138588953, 0.294407895624175, 1.07255652757396, - -0.00520211784329566, 0.00508208285320103, "", -6.00174950473189e-05, + "", "", 0.283470138554196, 0.294407895602922, 1.07255652765139, + -0.00520211751601444, 0.0050820825353787, "", -6.00174903178679e-05, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.981748961047472, 0.00262356879453326, -0.0228762802684564, - -0.0162645022638133, 0.0158484377006518, "", -0.000208032281580749, + "", 0.98174896134078, 0.002623568629963, -0.0228762799007527, + -0.0162645014946992, 0.0158484369515734, "", -0.000208032271562873, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.979740807114921, 0.00819222705564179, -0.0253938617872514, - -0.0114880482262254, 0.011193991106291, 16, -0.000147028559967234, + "", 0.979740807132719, 0.00819222666834069, -0.0253938617649369, + -0.011488047481077, 0.0111939903805648, 16, -0.000147028550256125, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.979728260294143, 0.00578634084897209, -0.0254095919692239, - -0.0342268317573894, 0.0351331373610994, 16, 0.000453152801854978, + "", 0.979728260318496, 0.00578634047374207, -0.0254095919386922, + -0.0342268327142128, 0.035133138343294, 16, 0.000453152814540616, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.979568208213754, 0.0176941948080657, 0.0256102527846259, - -0.0193982813953672, 0.0189002436283779, 50, -0.000249018883494665, + "", 0.979568208212972, 0.0176941953027223, 0.0256102527856069, + -0.0193982801981742, 0.0189002424622856, 50, -0.00024901886794429, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.979666068202633, 0.00977021142374016, -0.0254875634410108, - -0.0927040977441078, 0.0951604241557044, 50, 0.0012281632057983, + "", 0.979666068217669, 0.00977021082085018, -0.0254875634221597, + -0.0927040989378182, 0.0951604253810402, 50, 0.00122816322161097, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.979555244264738, 0.0479255035760003, 0.0256265060178383 + "", 0.979555244264769, 0.0479255041931152, 0.0256265060178 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0389876734115612, 1.18993239595157, 0.614460034681565, "facGenderm", - "", 0.0363715155137354, "contNormal", 0.293613742808162, - 2.09274957229449, -2.51056185058093, 2.44573722629223, -0.0324123121443508, - "debCollin1", "", 0.979548597683101, "contNormal", - 1.26438524278196, -0.0256348390092214, -0.42773289087203, 0.723063281992861, - 0.147665195560416, "facExperimexperimental", "", 0.614972547306726, - "contNormal", 0.293575846786529, 0.502988230049419, -1.11430547325453, - 0.516923624333443, -0.298690924460542, "facGenderm:facExperimexperimental", - "", 0.472899265288409, "contNormal", 0.416137518458221, - -0.717769754496504, -0.0421497030446407, 0.0510537831446481, - 0.00445204005000372, "facGenderm", "", 0.851470314194547, - "debCollin1", 0.0237768364430331, 0.187242741929539, -0.0546133827888865, - 0.0380355393826983, -0.00828892170309412, "facExperimexperimental", - "", 0.725813433556354, "debCollin1", 0.0236353634307538, - -0.350699989334997, -0.0838945489361464, 0.0483076590755706, - -0.0177934449302879, "facGenderm:facExperimexperimental", "", - 0.597781522140885, "debCollin1", 0.0337256727813652, -0.527593475914867, - -0.0277181023640303, 0.0230158826742227, -0.0023511098449038, - "contcor2", "", 0.855851948715503, "debCollin1", 0.0129425809449654, - -0.181656955046387, -0.0452630070213772, 0.0508920834956948, - 0.00281453823715879, "facGenderm:contcor2", "", 0.908651602980126, - "debCollin1", 0.0245298105668092, 0.114739501533986, -0.0944433016179671, - 0.0460396492691515, -0.0242018261744078, "facGenderm:facExperimexperimental:contcor2", - "", 0.499479402696979, "debCollin1", 0.0358381460055466, - -0.675309101387726, -0.0244181844030357, 0.071699220524257, - 0.0236405180606106, "facExperimexperimental:contcor2", "", - 0.334983599581037, "debCollin1", 0.0245201967192904, 0.964124322950977 + list(0.0389876735250847, 1.18993239583805, 0.614460034681565, "facGenderm", + "", 0.0363715154768631, "contNormal", 0.293613742750241, + 2.09274957270733, -2.51056185059803, 2.44573722630932, -0.0324123121443508, + "debCollin1", "", 0.979548597683242, "contNormal", + 1.26438524279069, -0.0256348390090444, -0.427732890719997, 0.723063281840828, + 0.147665195560416, "facExperimexperimental", "", 0.614972547213287, + "contNormal", 0.29357584670896, 0.50298823018232, -1.11430547305445, + 0.516923624133367, -0.298690924460542, "facGenderm:facExperimexperimental", + "", 0.472899265179825, "contNormal", 0.416137518356139, + -0.717769754672579, -0.0421497033195661, 0.0510537828299863, + 0.00445203975521014, "facGenderm", "", 0.851470323852511, + "debCollin1", 0.0237768364328961, 0.187242729611017, -0.0546133826212562, + 0.0380355395104895, -0.00828892155538333, "facExperimexperimental", + "", 0.725813438132237, "debCollin1", 0.0236353634205905, + -0.350699983236231, -0.0838945490020728, 0.0483076589534779, + -0.0177934450242974, "facGenderm:facExperimexperimental", "", + 0.597781520050159, "debCollin1", 0.0337256727670368, -0.527593478926494, + -0.0277181023977047, 0.023015882618586, -0.00235110988955934, + "contcor2", "", 0.85585194594591, "debCollin1", 0.0129425809393626, + -0.181656958575306, -0.045263007161804, 0.0508920833138393, + 0.00281453807601762, "facGenderm:contcor2", "", 0.908651608148013, + "debCollin1", 0.0245298105562404, 0.114739495014225, -0.0944433015130648, + 0.0460396493139438, -0.0242018260995605, "facGenderm:facExperimexperimental:contcor2", + "", 0.499479403840043, "debCollin1", 0.0358381459902121, + -0.675309099588197, -0.024418184104823, 0.0716992207808175, + 0.0236405183379973, "facExperimexperimental:contcor2", "", + 0.334983593700649, "debCollin1", 0.0245201967086646, 0.964124334681355 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0390037194536534, 1.18979631491938, 16, 0.614400017186518, 0, - "m", "Total", 0.0363650665347719, 0.293574934167932, 2.09282178305817, - -0.26290602806488, 0.894028183943765, 16, 0.315561077939442, - 1, "m", "Total", 0.284986320299432, 0.295141701871666, 1.06918499127126, - 0.0389715139185325, 1.18965449832466, 50, 0.614313006121598, - 0, "m", "Total", 0.0363737346110711, 0.293546971649115, 2.09272472705289, - -0.259196346614675, 0.891640872660431, 50, 0.316222263022878, - 1, "m", "Total", 0.281434923758643, 0.293586318001954, 1.07710149837696, - 0.0388309531739891, 1.18959107842215, 84, 0.61421101579807, - 0, "m", "Total", 0.0364173180559209, 0.293566650796956, 2.09223702396253, - -0.260494199128902, 0.894488745982545, 84, 0.316997273426822, - 1, "m", "Total", 0.28198734578731, 0.294643920557165, 1.0758656510794, - -0.00520211784329566, 0.00508208285320103, 16, -6.00174950473189e-05, - 0, "m", "Total indirect", 0.981748961047472, 0.00262356879453326, - -0.0228762802684564, -0.0162645022638133, 0.0158484377006518, - 16, -0.000208032281580749, 1, "m", "Total indirect", 0.979740807114921, - 0.00819222705564179, -0.0253938617872514, -0.0114880482262254, - 0.011193991106291, 50, -0.000147028559967234, 0, "m", "Total indirect", - 0.979728260294143, 0.00578634084897209, -0.0254095919692239, - -0.0342268317573894, 0.0351331373610994, 50, 0.000453152801854978, - 1, "m", "Total indirect", 0.979568208213754, 0.0176941948080657, - 0.0256102527846259, -0.0193982813953672, 0.0189002436283779, - 84, -0.000249018883494665, 0, "m", "Total indirect", 0.979666068202633, - 0.00977021142374016, -0.0254875634410108, -0.0927040977441078, - 0.0951604241557044, 84, 0.0012281632057983, 1, "m", "Total indirect", - 0.979555244264738, 0.0479255035760003, 0.0256265060178383)) + list(0.0390037195696235, 1.18979631481287, 16, 0.614400017191247, 0, + "m", "Total", 0.0363650664972019, 0.293574934111176, 2.09282178347889, + -0.262906027938399, 0.89402818383732, 16, 0.315561077949461, + 1, "m", "Total", 0.284986320187163, 0.295141701812245, 1.06918499152046, + 0.0389715140468981, 1.18965449821572, 50, 0.614313006131309, + 0, "m", "Total", 0.0363737345695669, 0.293546971588576, 2.09272472751757, + -0.259196346534362, 0.891640872605491, 50, 0.316222263035564, + 1, "m", "Total", 0.281434923682794, 0.29358631796745, 1.07710149854675, + 0.0388309533280815, 1.18959107829916, 84, 0.614211015813621, + 0, "m", "Total", 0.036417318006142, 0.293566650726271, 2.09223702451927, + -0.260494199148994, 0.894488746034263, 84, 0.316997273442634, + 1, "m", "Total", 0.281987345793225, 0.294643920575484, 1.07586565106618, + -0.00520211751601444, 0.0050820825353787, 16, -6.00174903178679e-05, + 0, "m", "Total indirect", 0.98174896134078, 0.002623568629963, + -0.0228762799007527, -0.0162645014946992, 0.0158484369515734, + 16, -0.000208032271562873, 1, "m", "Total indirect", 0.979740807132719, + 0.00819222666834069, -0.0253938617649369, -0.011488047481077, + 0.0111939903805648, 50, -0.000147028550256125, 0, "m", "Total indirect", + 0.979728260318496, 0.00578634047374207, -0.0254095919386922, + -0.0342268327142128, 0.035133138343294, 50, 0.000453152814540616, + 1, "m", "Total indirect", 0.979568208212972, 0.0176941953027223, + 0.0256102527856069, -0.0193982801981742, 0.0189002424622856, + 84, -0.00024901886794429, 0, "m", "Total indirect", 0.979666068217669, + 0.00977021082085018, -0.0254875634221597, -0.0927040989378182, + 0.0951604253810402, 84, 0.00122816322161097, 1, "m", "Total indirect", + 0.979555244264769, 0.0479255041931152, 0.0256265060178)) @@ -3497,7 +3499,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 14 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -3508,21 +3510,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -3538,71 +3540,71 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.54484854133826, 0.0642086243507837, -0.240319958493738, "contcor1", - "", 0.121932351701044, "contGamma", 0.155374580985469, - -1.54671347764544, 1.68041095258521, 2.96919134362364, 2.32480114810442, + list(-0.54484854131078, 0.0642086243269446, -0.240319958491918, "contcor1", + "", 0.12193235167243, "contGamma", 0.155374580972378, + -1.54671347776405, 1.68041095258812, 2.96919134365665, 2.32480114812239, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776549264214, 7.07106742651572, 0.732634773017414, 1.29452458060716, - 1.01357967681229, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341870570547, 7.0710649496753, 0.00468047986921921, - 0.00827014403764829, 0.00647531195343375, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000915747482286381, 7.07106716500776, - 0.761632488096831, 1.34576159072992, 1.05369703941337, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.149015264372361, - 7.07106781208924, 0.323891768708371, 0.572298415111302, 0.448095091909837, + 0.328776549271892, 7.07106742640522, 0.761632488106293, 1.34576159072045, + 1.05369703941337, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.149015264367534, 7.07106781231833, 0.00468047986923246, + 0.00827014403769448, 0.00647531195346347, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000915747482294786, 7.0710671649753, + 0.732634773113356, 1.29452458052864, 1.013579676821, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341870526039, + 7.07106495193164, 0.323891768700946, 0.572298415117332, 0.448095091909139, "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", - 0.0633702068921498, 7.07106878587998)) + 0.0633702068955823, 7.07106878548596)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.154211935056873, 0.117652641562767, "", -0.0182796467470533, - "contGamma", "contNormal", "", "", "", 0.792112547499167, - 0.069354482726232, -0.263568352448246, -0.0186973017941751, - 0.0556659659407027, 16, 0.0184843320732638, "contGamma", "debCollin1", - "contNormal", "", "", 0.329873439543783, 0.0189705699496128, - 0.974368831424651, -0.0215735578449936, 0.0242488343679387, - 50, 0.00133763826147251, "contGamma", "debCollin1", "contNormal", - "", "", 0.908897118846133, 0.0116896005677588, - 0.114429766331098, -0.0566796630335963, 0.021928065542527, 84, - -0.0173757987455346, "contGamma", "debCollin1", "contNormal", - "", "", 0.386228001825847, 0.0200533604689094, - -0.866478153248876)) + list(-0.154211934974373, 0.117652641621852, "", -0.0182796466762605, + "contGamma", "contNormal", "", "", "", 0.792112548268301, + 0.0693544827202587, -0.263568351450207, -0.0186973017164823, + 0.0556659658626801, 16, 0.0184843320730989, "contGamma", "debCollin1", + "contNormal", "", "", 0.329873438535405, 0.0189705699098887, + 0.974368833456268, -0.0215735578368454, 0.0242488343595076, + 50, 0.0013376382613311, "contGamma", "debCollin1", "contNormal", + "", "", 0.908897118822903, 0.0116896005635293, + 0.114429766360404, -0.0566796628074722, 0.0219280653161715, + 84, -0.0173757987456503, "contGamma", "debCollin1", "contNormal", + "", "", 0.386227999088671, 0.0200533603534788, + -0.866478158242244)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.154211935056873, 0.117652641562767, -0.0182796467470533, "contGamma", - "", 0.792112547499167, "contNormal", 0.069354482726232, - -0.263568352448246, -2.65749892659056, 2.35038162453774, -0.153558651026407, - "debCollin1", "", 0.904326045086754, "contNormal", - 1.27754402392846, -0.120198324402327, -2.74314934037875, 0.527114559351205, - -1.10801739051377, "contcor1", "", 0.184133874907439, - "contNormal", 0.83426632466856, -1.32813390370751, -0.53383096122544, - 4.39043816015436, 1.92830359946446, "debCollin1:contcor1", "", - 0.124780929322091, "contNormal", 1.25621418562326, 1.53501180095952, - -0.0194720969090329, 0.00121576176371193, -0.00912816757266046, - "contGamma", "", 0.0837014288890114, "debCollin1", - 0.0052776119448949, -1.7296018858473)) + list(-0.154211934974373, 0.117652641621852, -0.0182796466762605, "contGamma", + "", 0.792112548268301, "contNormal", 0.0693544827202587, + -0.263568351450207, -2.65749892570467, 2.35038162368311, -0.153558651010781, + "debCollin1", "", 0.904326045063351, "contNormal", + 1.27754402348444, -0.120198324431871, -2.74314932318945, 0.527114542157789, + -1.10801739051583, "contcor1", "", 0.184133870294461, + "contNormal", 0.834266315897299, -1.32813391767364, -0.533830935110884, + 4.39043813403135, 1.92830359946023, "debCollin1:contcor1", "", + 0.124780925323126, "contNormal", 1.2562141722971, 1.53501181723985, + -0.0194720969090654, 0.00121576176372949, -0.00912816757266795, + "contGamma", "", 0.0837014288895066, "debCollin1", + 0.00527761194490768, -1.72960188584453)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.138531019591335, 0.138940390243756, 16, 0.000204685326210544, - "Total", 0.997692795917383, 0.0707848236048595, 0.00289165552425693, - -0.150858308072707, 0.116974291101546, 50, -0.0169420084855808, - "Total", 0.804166275556364, 0.0683258981509054, -0.247958811286497, - -0.171505611689224, 0.100194720704048, 84, -0.0356554454925879, - "Total", 0.606961741572253, 0.0693125829189746, -0.514415189724911, - -0.0186973017941751, 0.0556659659407027, 16, 0.0184843320732638, - "Total indirect", 0.329873439543783, 0.0189705699496128, 0.974368831424651, - -0.0215735578449936, 0.0242488343679387, 50, 0.00133763826147251, - "Total indirect", 0.908897118846133, 0.0116896005677588, 0.114429766331098, - -0.0566796630335963, 0.021928065542527, 84, -0.0173757987455346, - "Total indirect", 0.386228001825847, 0.0200533604689094, -0.866478153248876 + list(-0.13853101946683, 0.138940390260507, 16, 0.000204685396838402, + "Total", 0.997692795120375, 0.0707848235773708, 0.00289165652316237, + -0.150858308000585, 0.116974291170727, 50, -0.0169420084149294, + "Total", 0.804166276354321, 0.0683258981501551, -0.247958810255185, + -0.171505611589776, 0.100194720745955, 84, -0.0356554454219108, + "Total", 0.606961742208862, 0.0693125829042952, -0.51441518881417, + -0.0186973017164823, 0.0556659658626801, 16, 0.0184843320730989, + "Total indirect", 0.329873438535405, 0.0189705699098887, 0.974368833456268, + -0.0215735578368454, 0.0242488343595076, 50, 0.0013376382613311, + "Total indirect", 0.908897118822903, 0.0116896005635293, 0.114429766360404, + -0.0566796628074722, 0.0219280653161715, 84, -0.0173757987456503, + "Total indirect", 0.386227999088671, 0.0200533603534788, -0.866478158242244 )) @@ -3619,7 +3621,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 14 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -3630,21 +3632,21 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -3653,73 +3655,73 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(454.545887676963, 496.228610652773, 4, "Model 1", 100, -211.272943838482, + list(454.545887676964, 496.228610652774, 4, "Model 1", 100, -211.272943838482, 5)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962231578189747, 0.0896223599059113, 0.0400000220620069, - "facExperimexperimental", "", 0.11412851808419, "facGenderm", - 0.0253179845320215, 1.57990546251483, 0.180704822394576, 0.31929523869832, - 0.250000030546448, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553476994801, 7.07106694781916, 0.180704822394615, - 0.319295238698405, 0.25000003054651, "facExperimexperimental", - "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553476994919, 7.07106694781856, 0.0048066068927647, 0.00849296656298341, - 0.00664978672787406, "debCollin1", "", 1.53699275529107e-12, - "debCollin1", 0.000940415155404958, 7.07111820737359, 0.762423372129427, - 1.34715903822245, 1.05479120517594, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.14917000279223, 7.07106781143587, - 0.0796446883189379, 0.14072766548653, 0.110186176902734, "debCollin1:facExperimexperimental", + list(-0.00962231575875291, 0.0896223599008215, 0.0400000220710343, + "facExperimexperimental", "", 0.114128517899573, "facGenderm", + 0.0253179845248188, 1.57990546332087, 0.18070482237773, 0.319295238639485, + 0.250000030508607, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553476887683, 7.07106694889121, 0.76242337212959, + 1.34715903822228, 1.05479120517594, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.149170002792146, 7.07106781143983, + 0.00480660693130372, 0.008492966697403, 0.00664978681435336, + "debCollin1", "", 1.53699275529107e-12, "debCollin1", + 0.000940415179864737, 7.0711181154156, 0.180704822377798, 0.319295238639757, + 0.250000030508777, "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553476888203, 7.07106694888563, + 0.0796446883266463, 0.140727665513485, 0.110186176920066, "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826784699635, 7.07106786006811)) + 0.0155826784748735, 7.07106785895231)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0581216478201232, 0.876434140268832, 0.467277894044478, "", - "m", "facGender", "contNormal", "", "", "", 0.0251961761086923, - 0.208757022808443, 2.2383816733833, -0.029612452321592, 0.0316945053564423, - 0.00104102651742515, 0, "m", "facGender", "debCollin1", "contNormal", - "", "", 0.946929940544045, 0.0156398174052217, - 0.0665625748979385, -0.03325288367973, 0.0299903817501172, -0.00163125096480638, - 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.919464900720464, 0.0161337825410829, -0.101107781802102 - )) + list(0.0581216477957473, 0.876434140293208, 0.467277894044478, "", + "m", "facGender", "contNormal", "", "", "", 0.0251961761173811, + 0.20875702282088, 2.23838167324994, -0.0296124763499278, 0.0316945310965695, + 0.00104102737332085, 0, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.946929939994326, 0.0156398301014914, + 0.0665625755884377, -0.0332529101606829, 0.0299904055487548, + -0.00163125230596403, 1, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.91946489854168, 0.0161337953677447, + -0.101107784546796)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0581216478201232, 0.876434140268832, 0.467277894044478, "facGenderm", - "", 0.0251961761086923, "contNormal", 0.208757022808443, - 2.2383816733833, -3.5907480264832, 3.35309576189913, -0.118826132292034, - "debCollin1", "", 0.946518378217341, "contNormal", - 1.77142127180767, -0.0670795446476583, -3.51918446090412, 3.11340998089136, - -0.202887240006382, "facExperimexperimental", "", 0.904555760498264, - "contNormal", 1.69201946926386, -0.119908336571713, -4.66097025686835, - 5.27101503922424, 0.305022391177944, "debCollin1:facExperimexperimental", - "", 0.904177873967954, "contNormal", 2.53371627602212, - 0.120385377820134, -0.0407264549573039, 0.0232046102696949, - -0.00876092234380449, "facGenderm", "", 0.591146580929993, - "debCollin1", 0.0163092448971713, -0.537175227856441)) + list(0.0581216477957473, 0.876434140293208, 0.467277894044478, "facGenderm", + "", 0.0251961761173811, "contNormal", 0.20875702282088, + 2.23838167324994, -3.59074803410091, 3.35309576951684, -0.118826132292034, + "debCollin1", "", 0.946518378334508, "contNormal", + 1.77142127569433, -0.0670795445004797, -3.51918447423615, 3.11340999422339, + -0.202887240006382, "facExperimexperimental", "", 0.90455576088013, + "contNormal", 1.69201947606604, -0.119908336089662, -4.66097027673996, + 5.27101505909585, 0.305022391177944, "debCollin1:facExperimexperimental", + "", 0.904177874349542, "contNormal", 2.53371628616088, + 0.120385377338407, -0.0407264623680856, 0.0232046032746269, + -0.00876092954672932, "facGenderm", "", 0.591146278303373, + "debCollin1", 0.0163092450032227, -0.537175666010179)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0573677096736821, 0.879270131450124, 0.468318920561903, 0, "m", - "Total", 0.0255113922789543, 0.209672837934652, 2.23356980892233, - 0.0576673996184482, 0.873625886540895, 0.465646643079671, 1, - "m", "Total", 0.0252861666506017, 0.208156500159856, 2.23700265291775, - -0.029612452321592, 0.0316945053564423, 0.00104102651742515, - 0, "m", "Total indirect", 0.946929940544045, 0.0156398174052217, - 0.0665625748979385, -0.03325288367973, 0.0299903817501172, -0.00163125096480638, - 1, "m", "Total indirect", 0.919464900720464, 0.0161337825410829, - -0.101107781802102)) + list(0.0573677080967191, 0.879270134738878, 0.468318921417799, 0, "m", + "Total", 0.0255113928809787, 0.209672839175929, 2.2335697997815, + 0.0576673982940646, 0.873625885182963, 0.465646641738514, 1, + "m", "Total", 0.025286167065691, 0.208156500151297, 2.2370026465667, + -0.0296124763499278, 0.0316945310965695, 0.00104102737332085, + 0, "m", "Total indirect", 0.946929939994326, 0.0156398301014914, + 0.0665625755884377, -0.0332529101606829, 0.0299904055487548, + -0.00163125230596403, 1, "m", "Total indirect", 0.91946489854168, + 0.0161337953677447, -0.101107784546796)) @@ -3735,7 +3737,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 15 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -3746,23 +3748,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -3771,85 +3773,86 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(957.131264837897, 1001.41915799969, 8, "Model 1", 100, -461.565632418949, + list(957.131264837898, 1001.4191579997, 8, "Model 1", 100, -461.565632418949, 15)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848019472875, 0.0642092576245898, -0.240319380924142, "contcor1", - "", 0.121933316721152, "contGamma", 0.155374609406507, - -1.54670947745004, 1.68041019662023, 2.96918870692706, 2.32479945177365, + list(-0.544848019436809, 0.0642092576173677, -0.240319380909721, "contcor1", + "", 0.121933316717024, "contGamma", 0.155374609395464, + -1.54670947746715, 1.68041019662854, 2.96918870690667, 2.32479945176761, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776069476926, 7.07107258588601, 0.732635240502969, 1.29452621102618, - 1.01358072576457, "contcor1", "", 1.53765888910584e-12, - "contcor1", 0.143342167242698, 7.07105763266746, 0.00468048279191418, - 0.00827015423185603, 0.0064753185118851, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000915749337298215, 7.071060003155, - 0.761497827549178, 1.34552365317276, 1.05351074036097, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.148988917712341, - 7.07106781186922, 0.323891995914787, 0.5722992076189, 0.448095601766844, + 0.328776069469607, 7.07107258602506, 0.761497827494539, 1.3455236532274, + 1.05351074036097, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.148988917740219, 7.07106781054614, 0.00468048279202195, + 0.00827015423223193, 0.00647531851212694, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000915749337366617, 7.07106000289091, + 0.732635240541571, 1.29452621099895, 1.01358072577026, "contcor1", + "", 1.53765888910584e-12, "contcor1", 0.143342167225903, + 7.07105763353561, 0.323891995896637, 0.572299207627026, 0.448095601761832, "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", - 0.063370351104285, 7.07106073989456)) + 0.063370351110988, 7.07106073906753)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.197084400999463, 0.178066483557748, 16, -0.00950895872085766, - "contGamma", "contNormal", "", "", "", 0.920853623223206, - 0.0957035148391382, -0.0993585108847951, -0.155656527760373, - 0.117371496950143, 50, -0.0191425154051151, "contGamma", "contNormal", - "", "", "", 0.783444064081619, 0.069651286162431, -0.274833624184248, - -0.245504312530266, 0.186191676265238, 84, -0.0296563181325139, - "contGamma", "contNormal", "", "", "", 0.787707920613664, - 0.11012855139193, -0.269288188736558, -0.0194060897292875, 0.0555056335891945, - 16, 0.0180497719299535, "contGamma", "debCollin1", "contNormal", - "", "", 0.344916362241374, 0.019110484659253, - 0.944495770347409, -0.0215453986549142, 0.0245412375411383, - 50, 0.00149791944311204, "contGamma", "debCollin1", "contNormal", - "", "", 0.898618683829625, 0.0117570109858084, - 0.127406484940784, -0.0572067812229106, 0.0240741335027219, - 84, -0.0165663238600943, "contGamma", "debCollin1", "contNormal", - "", "", 0.424323618161285, 0.0207353082420815, - -0.798942734136628)) + list(-0.197084392240546, 0.178066491360756, 16, -0.00950895043989496, + "contGamma", "contNormal", "", "", "", 0.920853691721022, + 0.0957035145952795, -0.099358424610709, -0.155656524837576, + 0.1173714997598, 50, -0.019142512538888, "contGamma", "contNormal", + "", "", "", 0.783444095611043, 0.0696512861335683, + -0.274833583147035, -0.245504314481277, 0.186191672129712, 84, + -0.0296563211757825, "contGamma", "contNormal", "", "", + "", 0.787707898301667, 0.110128550834646, -0.269288217733024, + -0.0194060893317924, 0.055505633105869, 16, 0.0180497718870383, + "contGamma", "debCollin1", "contNormal", "", "", + 0.344916357715988, 0.0191104844345497, 0.944495779207264, -0.0215453986489551, + 0.0245412375257463, 50, 0.00149791943839562, "contGamma", "debCollin1", + "contNormal", "", "", 0.8986186841004, 0.0117570109803616, + 0.127406484598652, -0.0572067804096599, 0.0240741327634166, + 84, -0.0165663238231217, "contGamma", "debCollin1", "contNormal", + "", "", 0.424323610345977, 0.020735307846014, + -0.798942747614247)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.155572124452488, 0.117359087701285, -0.0191065183756011, "contGamma", - "", 0.783766400568177, "contNormal", 0.0696265886278064, - -0.274414110358563, -2.68756658753293, 2.34581823335441, -0.170874177089257, - "debCollin1", "", 0.89413457217117, "contNormal", 1.2840503347485, - -0.133074360455445, -2.9340262318588, 0.84675179393241, -1.0436372189632, - "contcor1", "", 0.279231267743915, "contNormal", 0.964501913201851, - -1.08204784736884, -0.790595736550288, 4.51341346421089, 1.8614088638303, - "debCollin1:contcor1", "", 0.168922519927436, "contNormal", - 1.35308843494027, 1.37567421002492, -0.155644887594485, 0.13586629994947, - -0.00988929382250745, "contGamma:contcor1", "", 0.894208758928921, - "contNormal", 0.0743664653645062, -0.132980554797585, -0.0194720989675517, - 0.00121577018192911, -0.0091281643928113, "contGamma", "", - 0.0837016932136123, "debCollin1", 0.00527761461758076, -1.72960040742718 + list(-0.155572121510989, 0.117359090532706, -0.0191065154891412, "contGamma", + "", 0.783766432338208, "contNormal", 0.0696265885997247, + -0.274414069012951, -2.68756658596506, 2.34581823285142, -0.170874176556824, + "debCollin1", "", 0.894134572455798, "contNormal", + 1.28405033422021, -0.133074360095543, -2.93402616431927, 0.846751722220131, + -1.04363722104957, "contcor1", "", 0.279231249074989, + "contNormal", 0.964501877677778, -1.08204788938548, -0.790595642125541, + 4.51341336119216, 1.86140885953331, "debCollin1:contcor1", "", + 0.168922505049449, "contNormal", 1.35308838457111, 1.37567425805915, + -0.155644892147398, 0.135866293385428, -0.00988929938098528, + "contGamma:contcor1", "", 0.894208699090933, "contNormal", + 0.0743664648514538, -0.132980630459429, -0.019472098967748, + 0.00121577018211373, -0.00912816439281713, "contGamma", "", + 0.0837016932191084, "debCollin1", 0.00527761461767793, -1.72960040739644 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.176713770067927, 0.193795396486118, 16, 0.00854081320909581, - "Total", 0.928000789643487, 0.0945193813449059, 0.0903604434092724, - -0.151951089931007, 0.116661898007001, 50, -0.017644595962003, - "Total", 0.796799422058718, 0.0685249805753557, -0.257491440549911, - -0.252799894007649, 0.160354610022432, 84, -0.0462226419926082, - "Total", 0.660986722077528, 0.105398493872589, -0.438551257179105, - -0.0194060897292875, 0.0555056335891945, 16, 0.0180497719299535, - "Total indirect", 0.344916362241374, 0.019110484659253, 0.944495770347409, - -0.0215453986549142, 0.0245412375411383, 50, 0.00149791944311204, - "Total indirect", 0.898618683829625, 0.0117570109858084, 0.127406484940784, - -0.0572067812229106, 0.0240741335027219, 84, -0.0165663238600943, - "Total indirect", 0.424323618161285, 0.0207353082420815, -0.798942734136628 + list(-0.176713761676462, 0.193795404570749, 16, 0.00854082144714335, + "Total", 0.928000720325939, 0.0945193812666306, 0.0903605306413345, + -0.151951087028764, 0.116661900827779, 50, -0.0176445931004923, + "Total", 0.796799454230591, 0.0685249805545735, -0.257491398869353, + -0.252799896518261, 0.160354606520453, 84, -0.0462226449989041, + "Total", 0.660986700643291, 0.105398493619685, -0.43855128675455, + -0.0194060893317924, 0.055505633105869, 16, 0.0180497718870383, + "Total indirect", 0.344916357715988, 0.0191104844345497, 0.944495779207264, + -0.0215453986489551, 0.0245412375257463, 50, 0.00149791943839562, + "Total indirect", 0.8986186841004, 0.0117570109803616, 0.127406484598652, + -0.0572067804096599, 0.0240741327634166, 84, -0.0165663238231217, + "Total indirect", 0.424323610345977, 0.020735307846014, -0.798942747614247 )) @@ -3866,7 +3869,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 15 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -3877,23 +3880,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -3902,79 +3905,77 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(456.038100789861, 500.325993951659, 8, "Model 1", 100, -211.019050394931, + list(456.038100789855, 500.325993951652, 8, "Model 1", 100, -211.019050394927, 15)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962280035640686, 0.0896214292883833, 0.0399993144659882, - "facExperimexperimental", "", 0.114133293212594, "facGenderm", - 0.0253178707434463, 1.57988461475744, 0.180704616078477, 0.319294519079532, - 0.249999567579005, "facGenderm", "", 1.53721479989599e-12, - "facGenderm", 0.0353552167525104, 7.07108004255847, 0.18070461607774, - 0.319294519080253, 0.249999567578996, "facExperimexperimental", + list(-0.00962280021855701, 0.089621429692629, 0.039999314737036, "facExperimexperimental", + "", 0.114133291731779, "facGenderm", 0.0253178708114057, + 1.57988462122243, 0.180704616212412, 0.319294519547459, 0.249999567879935, + "facGenderm", "", 1.53721479989599e-12, "facGenderm", + 0.0353552168377141, 7.07108003402925, 0.758561699060889, 1.34033568000834, + 1.04944868953461, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.148414456984008, 7.07106781145784, 0.00480662808251222, + 0.00849304047098215, 0.00664983427674719, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000940428604185557, 7.07106764633788, + 0.180704616212597, 0.319294519547294, 0.249999567879946, "facExperimexperimental", "", 1.53721479989599e-12, "facExperimexperimental", - 0.0353552167528823, 7.07108004248385, 0.00480662808241353, 0.00849304047063793, - 0.00664983427652573, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.00094042860412292, 7.07106764657337, 0.7585616990602, - 1.34033568000903, 1.04944868953461, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.148414456984359, 7.0710678114411, - 0.0796448659425373, 0.140728285030243, 0.11018657548639, "debCollin1:facExperimexperimental", - "", 1.53765888910584e-12, "debCollin1:facExperimexperimental", - 0.015582791206758, 7.07104228147551)) + 0.0353552168376246, 7.07108003404745, 0.0796448657937809, 0.140728284511372, + 0.110186575152576, "debCollin1:facExperimexperimental", "", + 1.53765888910584e-12, "debCollin1:facExperimexperimental", 0.0155827911123391, + 7.07104230289824)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0394515151154701, 1.19060350292156, 0.615027509018516, 0, "m", - "facGender", "contNormal", "", "", "", 0.0362328060356722, - 0.293666617572117, 2.09430514814126, -0.260888183281027, 0.896654610515889, + list(0.0394515151517563, 1.19060350288528, 0.615027509018516, 0, "m", + "facGender", "contNormal", "", "", "", 0.0362328060239183, + 0.293666617553603, 2.0943051482733, -0.260888183361713, 0.896654610596575, 0.317883213617431, 1, "m", "facGender", "contNormal", "", "", - "", 0.281709693122984, 0.295296955180673, 1.07648659439424, - -0.0294254304617834, 0.0319773338212055, 0.00127595167971108, - 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.935079119781431, 0.0156642583147767, 0.0814562460648022, - -0.0319483383453816, 0.0304364764961899, -0.00075593092459585, - 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.96211580258074, 0.0159147860199613, -0.0474986546251841 - )) + "", 0.281709693190066, 0.29529695522184, 1.07648659424417, -0.0294254128249684, + 0.0319773146219319, 0.00127595089848178, 0, "m", "facGender", + "debCollin1", "contNormal", "", "", 0.935079120582247, + 0.0156642489176427, 0.0814562450577935, -0.0319483189043059, + 0.0304364579807846, -0.000755930461760621, 1, "m", "facGender", + "debCollin1", "contNormal", "", "", 0.962115802726366, + 0.0159147763370076, -0.0474986544424635)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0394515151154701, 1.19060350292156, 0.615027509018516, "facGenderm", - "", 0.0362328060356722, "contNormal", 0.293666617572117, - 2.09430514814126, -3.60954587703253, 3.31825726790047, -0.145644304566028, - "debCollin1", "", 0.934321266668116, "contNormal", - 1.76732919573488, -0.0824092675645905, -3.35825808023996, 3.34465481134039, - -0.00680163444978707, "facExperimexperimental", "", - 0.996826293840405, "contNormal", 1.70995817893902, -0.00397766128643408, - -4.72553741691392, 5.18939844483482, 0.231930513960453, "debCollin1:facExperimexperimental", - "", 0.926940300784574, "contNormal", 2.52936685060452, - 0.091695087213237, -1.11339429065027, 0.519105699848097, -0.297144295401085, - "facGenderm:facExperimexperimental", "", 0.475538121586405, - "contNormal", 0.416461731790817, -0.713497238085578, -0.0407263854884215, - 0.0232049083044974, -0.00876073859196204, "facGenderm", "", - 0.59115568916787, "debCollin1", 0.0163093032058754, -0.537162040669278 - )) + list(0.0394515151517563, 1.19060350288528, 0.615027509018516, "facGenderm", + "", 0.0362328060239183, "contNormal", 0.293666617553603, + 2.0943051482733, -3.60954587099145, 3.31825726185939, -0.145644304566028, + "debCollin1", "", 0.93432126655383, "contNormal", 1.76732919265264, + -0.0824092677083133, -3.35825807172983, 3.34465480283025, -0.00680163444978706, + "facExperimexperimental", "", 0.996826293832346, "contNormal", + 1.70995817459703, -0.0039776612965343, -4.72553740348335, 5.18939843140425, + 0.231930513960453, "debCollin1:facExperimexperimental", "", + 0.926940300587197, "contNormal", 2.52936684375207, 0.0916950874616536, + -1.11339429069185, 0.519105699889676, -0.297144295401085, "facGenderm:facExperimexperimental", + "", 0.475538121608887, "contNormal", 0.416461731812032, + -0.713497238049233, -0.0407263801250132, 0.0232049136689964, + -0.00876073322800838, "facGenderm", "", 0.591155916334995, + "debCollin1", 0.0163093032061537, -0.537161711770916)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0389959973859365, 1.19361092401052, 0.616303460698227, 0, "m", - "Total", 0.0364067046401961, 0.294550036564967, 2.09235574330779, - -0.259088061157634, 0.893342626543304, 0.317127282692835, 1, - "m", "Total", 0.280725694804147, 0.293992822518976, 1.07869056113561, - -0.0294254304617834, 0.0319773338212055, 0.00127595167971108, - 0, "m", "Total indirect", 0.935079119781431, 0.0156642583147767, - 0.0814562460648022, -0.0319483383453816, 0.0304364764961899, - -0.00075593092459585, 1, "m", "Total indirect", 0.96211580258074, - 0.0159147860199613, -0.0474986546251841)) + list(0.0389959981970045, 1.19361092163699, 0.616303459916998, 0, "m", + "Total", 0.036406704361418, 0.294550035752555, 2.09235574642653, + -0.259088061814586, 0.893342628125926, 0.31712728315567, 1, + "m", "Total", 0.28072569503691, 0.293992823090306, 1.07869056061364, + -0.0294254128249684, 0.0319773146219319, 0.00127595089848178, + 0, "m", "Total indirect", 0.935079120582247, 0.0156642489176427, + 0.0814562450577935, -0.0319483189043059, 0.0304364579807846, + -0.000755930461760621, 1, "m", "Total indirect", 0.962115802726366, + 0.0159147763370076, -0.0474986544424635)) @@ -3990,7 +3991,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 16 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -4001,23 +4002,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -4026,133 +4027,134 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1397.64854781574, 1460.17263227945, 11, "Model 1", 100, -674.824273907869, + list(1397.64854781706, 1460.17263228078, 11, "Model 1", 100, -674.824273908531, 16)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544847987793211, 0.0642085979559598, -0.240319694918626, "contcor1", - "", 0.121932405646672, "contGamma", 0.155374433038906, - -1.5467132540297, -0.403934047353378, 0.194627874029554, -0.104653086661912, - "contcor2", "", 0.493114498857452, "contGamma", 0.152697173546124, - -0.685363613690598, 0.424979049236264, 0.896762640193846, 0.660870844715055, - "contcor2", "", 3.99652793081628e-08, "contcor1", 0.120355168431398, - 5.49100510869836, 1.68041074403021, 2.969190616131, 2.3248006800806, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776416879729, 7.07106885020603, 0.732634447419053, 1.29452344606979, - 1.01357894674442, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341664204762, 7.07107003652847, 0.721541690177134, - 1.27492318966486, 0.998232439920995, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.14117134392589, 7.07106989393708, - 0.00468047964880548, 0.00827014326885767, 0.00647531145883158, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000915747342391749, 7.07106770511542, 0.744754608631506, 1.31593933230602, - 1.03034697046876, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.145713066204264, 7.0710677999487, 0.323891803389515, - 0.572298536151052, 0.448095169770283, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702289228111, - 7.07106755628248, 0.318532853805494, 0.562829544699716, 0.440681199252605, - "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", - 0.0623217295881972, 7.07106818383396)) + list(-0.403938439209818, 0.194623318820707, -0.104657560194555, "contcor2", + "", 0.493095898547909, "contGamma", 0.152697131873826, + -0.685393097501228, -0.544851654020432, 0.0642057513870133, + -0.24032295131671, "contcor1", "", 0.121927851819372, + "contGamma", 0.155374642139247, -1.54673213085397, 1.68040998259662, + 2.96918796055742, 2.32479897157702, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328775933671871, 7.07107404612299, + 0.744754608429956, 1.31593933165916, 1.03034697004456, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.145713066090662, + 7.07106780255026, 0.00468047875720312, 0.00827014015900056, + 0.00647530945810184, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915746776500038, 7.07106988992123, 0.424979286104144, + 0.896763639231304, 0.660871462667724, "contcor2", "", + 3.99661248540184e-08, "contcor1", 0.120355362865985, 5.49100137235763, + 0.732635102236491, 1.29452572894913, 1.01358041559281, "contcor1", + "", 1.53765888910584e-12, "contcor1", 0.143342079534308, + 7.07105979546093, 0.721541715692989, 1.27492327838823, 0.99823249704061, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171360050554, + 7.07106949088783, 0.323892159497589, 0.572299778103913, 0.448095968800751, + "debCollin1:contcor1", "", 1.53765888910584e-12, "debCollin1:contcor1", + 0.0633704549077767, 7.07105494907473, 0.318532976978448, 0.562829974301427, + 0.440681475639937, "debCollin1:contcor2", "", 1.53743684450092e-12, + "debCollin1:contcor2", 0.062321807760235, 7.07106374923095 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.146732357574352, 0.12266094490765, "", "", -0.0120357063333511, - "contGamma", "contNormal", "", "", "", 0.860976748541671, - 0.0687240440658457, -0.175130938479398, -0.0235237393843932, - 0.0469048390609559, 16, 16, 0.0116905498382814, "contGamma", - "debCollin1", "contNormal", "", "", 0.515256322884239, - 0.0179668042374454, 0.650674971674516, -0.0585994716811879, - 0.0261200845296767, 50, 16, -0.0162396935757556, "contGamma", - "debCollin1", "contNormal", "", "", 0.452410865401193, - 0.0216125288217339, -0.751401823900623, -0.127745735617899, - 0.0343017267782665, 84, 16, -0.0467220044198164, "contGamma", - "debCollin1", "contNormal", "", "", 0.258389750306886, - 0.0413393979875078, -1.13020524473857, -0.0188121193544891, - 0.0717942240461896, 16, 50, 0.0264910523458503, "contGamma", - "debCollin1", "contNormal", "", "", 0.25175794720327, - 0.0231142878428813, 1.14608992178009, -0.0244468665829715, 0.0215684844465981, - 50, 50, -0.00143919106818671, "contGamma", "debCollin1", "contNormal", - "", "", 0.902423109525533, 0.0117388256601991, - -0.122600940660218, -0.0869915201587274, 0.0231485163342323, - 84, 50, -0.0319215019122475, "contGamma", "debCollin1", "contNormal", - "", "", 0.255915122720189, 0.0280974643824403, - -1.13609902579669, -0.0308375673575464, 0.118516593423669, 16, - 84, 0.0438395130330615, "contGamma", "debCollin1", "contNormal", - "", "", 0.249894529464843, 0.0381012513391323, - 1.15060559672578, -0.0243237244970188, 0.0561422637350677, 50, - 84, 0.0159092696190245, "contGamma", "debCollin1", "contNormal", - "", "", 0.438324605046442, 0.0205274150103757, - 0.775025477439953, -0.0528432778551859, 0.0236971954051132, - 84, 84, -0.0145730412250363, "contGamma", "debCollin1", "contNormal", - "", "", 0.455461619440356, 0.0195259897283931, - -0.746340719612558)) + list(-0.146732544035622, 0.122660758019806, "", "", -0.0120358930079083, + "contGamma", "contNormal", "", "", "", 0.860974614019709, + 0.0687240439570237, -0.175133655048513, -0.0235238368218723, + 0.0469050734342987, 16, 16, 0.0116906183062132, "contGamma", + "debCollin1", "contNormal", "", "", 0.515255841694146, + 0.0179668888846186, 0.65067571694182, -0.0585997411036139, 0.0261201801532243, + 50, 16, -0.0162397804751948, "contGamma", "debCollin1", "contNormal", + "", "", 0.452410394261912, 0.0216126219474179, + -0.751402606990724, -0.127746236880358, 0.0343017151143696, + 84, 16, -0.0467222608829944, "contGamma", "debCollin1", "contNormal", + "", "", 0.258388575328973, 0.0413395228873953, + -1.13020803385325, -0.0188121095119888, 0.0717945099290637, + 16, 50, 0.0264912002085375, "contGamma", "debCollin1", "contNormal", + "", "", 0.251756745187462, 0.023114358262638, + 1.14609282713065, -0.0244469977750735, 0.0215686006293324, 50, + 50, -0.00143919857287052, "contGamma", "debCollin1", "contNormal", + "", "", 0.902423125196048, 0.0117388887671843, + -0.122600920871979, -0.0869918637124669, 0.0231485057511267, + 84, 50, -0.0319216789806701, "contGamma", "debCollin1", "contNormal", + "", "", 0.255913922836244, 0.0280975493254894, + -1.13610189311819, -0.0308375483011525, 0.118517056218329, 16, + 84, 0.0438397539585883, "contGamma", "debCollin1", "contNormal", + "", "", 0.249893333898918, 0.0381013645397496, + 1.15060850151054, -0.0243238117665086, 0.0561425221208693, 50, + 84, 0.0159093551771803, "contGamma", "debCollin1", "contNormal", + "", "", 0.438324109443966, 0.0205275031893663, + 0.775026316177691, -0.0528435317193822, 0.0236972812581436, + 84, 84, -0.0145731252306193, "contGamma", "debCollin1", "contNormal", + "", "", 0.455461021746113, 0.0195260763925434, + -0.746341709294164)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.146732357574352, 0.12266094490765, -0.0120357063333511, "contGamma", - "", 0.860976748541671, "contNormal", 0.0687240440658457, - -0.175130938479398, -2.33172276191396, 2.72584288554023, 0.197060061813138, - "debCollin1", "", 0.878608200590335, "contNormal", - 1.29021902630549, 0.152733805497672, -3.92782165696858, 0.322249172723584, - -1.8027862421225, "contcor1", "", 0.0963631043513191, - "contNormal", 1.08422166509594, -1.66274692727431, -0.0857622044432826, - 6.36779074119008, 3.1410142683734, "debCollin1:contcor1", "", - 0.0564078278011753, "contNormal", 1.64634477891894, 1.9078714911927, - -1.07379963847166, 3.00630206978383, 0.966251215656084, "contcor2", - "", 0.353242219317147, "contNormal", 1.04086139858661, - 0.928318810715972, -4.80094194613809, 1.40104538934966, -1.69994827839422, - "debCollin1:contcor2", "", 0.28262469001949, "contNormal", - 1.58216869912106, -1.07444185903727, -0.0194720929532453, 0.00121576492939892, - -0.00912816401192318, "contGamma", "", 0.0837015377052102, - "debCollin1", 0.00527761174333493, -1.72960127721618)) + list(-0.146732544035622, 0.122660758019806, -0.0120358930079083, "contGamma", + "", 0.860974614019709, "contNormal", 0.0687240439570237, + -0.175133655048513, -2.33172275771093, 2.72584280803213, 0.197060025160602, + "debCollin1", "", 0.878608221047767, "contNormal", + 1.29021900546043, 0.152733779557277, -3.92782130353444, 0.322249265339909, + -1.80278601909726, "contcor1", "", 0.0963631251102417, + "contNormal", 1.08422159855956, -1.66274682361277, -0.0857615514613155, + 6.36779099117681, 3.14101471985775, "debCollin1:contcor1", "", + 0.0564077769461915, "contNormal", 1.64634467611215, 1.90787188456507, + -1.0737995143109, 3.00630204208172, 0.966251263885411, "contcor2", + "", 0.353242177370841, "contNormal", 1.04086135984537, + 0.928318891604312, -4.8009417316721, 1.40104536060377, -1.69994818553416, + "debCollin1:contcor2", "", 0.282624697436817, "contNormal", + 1.58216863707608, -1.07444184248004, -0.0194721408203328, 0.00121571386628688, + -0.00912821347702297, "contGamma", "", 0.0836998142280301, + "debCollin1", 0.00527761092800757, -1.72961091704975)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.13705027609083, 0.136359963100691, 16, 16, -0.000345156495069691, - "Total", 0.996051631749021, 0.0697487916482513, -0.00494856594520436, - -0.164815442716853, 0.10826464289864, 50, 16, -0.0282753999091067, - "Total", 0.684831350326856, 0.0696645672495807, -0.405879215581818, - -0.20962021937262, 0.0921047978662847, 84, 16, -0.0587577107531675, - "Total", 0.4452463874124, 0.0769720820430561, -0.763363926160916, - -0.125903394618686, 0.154814086643684, 16, 50, 0.0144553460124992, - "Total", 0.84003095167858, 0.0716129182670278, 0.201853888408773, - -0.146057478341201, 0.119107683538125, 50, 50, -0.0134748974015378, - "Total", 0.842107104866566, 0.0676454169492181, -0.199198970296147, - -0.183339106448312, 0.0954246899571144, 84, 50, -0.0439572082455986, - "Total", 0.536497156456481, 0.0711145201147264, -0.61811860889568, - -0.121360298641764, 0.184967912041185, 16, 84, 0.0318038066997104, - "Total", 0.68402465264744, 0.0781463876630456, 0.406977310798334, - -0.133610470607348, 0.141357597178694, 50, 84, 0.00387356328567343, - "Total", 0.95596217464935, 0.0701462042045045, 0.055221281459228, - -0.161121184799628, 0.107903689682853, 84, 84, -0.0266087475583874, - "Total", 0.698228619670629, 0.0686300556042138, -0.38771274952535, - -0.0235237393843932, 0.0469048390609559, 16, 16, 0.0116905498382814, - "Total indirect", 0.515256322884239, 0.0179668042374454, 0.650674971674516, - -0.0585994716811879, 0.0261200845296767, 50, 16, -0.0162396935757556, - "Total indirect", 0.452410865401193, 0.0216125288217339, -0.751401823900623, - -0.127745735617899, 0.0343017267782665, 84, 16, -0.0467220044198164, - "Total indirect", 0.258389750306886, 0.0413393979875078, -1.13020524473857, - -0.0188121193544891, 0.0717942240461896, 16, 50, 0.0264910523458503, - "Total indirect", 0.25175794720327, 0.0231142878428813, 1.14608992178009, - -0.0244468665829715, 0.0215684844465981, 50, 50, -0.00143919106818671, - "Total indirect", 0.902423109525533, 0.0117388256601991, -0.122600940660218, - -0.0869915201587274, 0.0231485163342323, 84, 50, -0.0319215019122475, - "Total indirect", 0.255915122720189, 0.0280974643824403, -1.13609902579669, - -0.0308375673575464, 0.118516593423669, 16, 84, 0.0438395130330615, - "Total indirect", 0.249894529464843, 0.0381012513391323, 1.15060559672578, - -0.0243237244970188, 0.0561422637350677, 50, 84, 0.0159092696190245, - "Total indirect", 0.438324605046442, 0.0205274150103757, 0.775025477439953, - -0.0528432778551859, 0.0236971954051132, 84, 84, -0.0145730412250363, - "Total indirect", 0.455461619440356, 0.0195259897283931, -0.746340719612558 + list(-0.137050423166403, 0.136359873763013, 16, 16, -0.00034527470169503, + "Total", 0.9960502803864, 0.0697488063775765, -0.0049502596478272, + -0.164815747813149, 0.108264400846943, 50, 16, -0.028275673483103, + "Total", 0.684828533619725, 0.0696645833326819, -0.405883048895492, + -0.209620760182997, 0.0921044524011913, 84, 16, -0.0587581538909026, + "Total", 0.445243249599995, 0.0769721318769523, -0.763369189057066, + -0.125903467780505, 0.154814082181763, 16, 50, 0.0144553072006292, + "Total", 0.840031414005797, 0.071612935792834, 0.201853297041841, + -0.146057671633827, 0.11910748847227, 50, 50, -0.0134750915807788, + "Total", 0.842104858454623, 0.0676454164968555, -0.19920184217367, + -0.1833395027149, 0.0954243587377429, 84, 50, -0.0439575719885784, + "Total", 0.536493880127059, 0.071114536708709, -0.618123579552127, + -0.12136034677324, 0.1849680686746, 16, 84, 0.0318038609506801, + "Total", 0.684024342570278, 0.0781464398999471, 0.406977732976696, + -0.133610604704114, 0.141357529042658, 50, 84, 0.00387346216927208, + "Total", 0.955963333608062, 0.0701462210315305, 0.0552198267035792, + -0.161121473393248, 0.107903436916193, 84, 84, -0.0266090182385275, + "Total", 0.698225738845945, 0.0686300647439125, -0.387716641938441, + -0.0235238368218723, 0.0469050734342987, 16, 16, 0.0116906183062132, + "Total indirect", 0.515255841694146, 0.0179668888846186, 0.65067571694182, + -0.0585997411036139, 0.0261201801532243, 50, 16, -0.0162397804751948, + "Total indirect", 0.452410394261912, 0.0216126219474179, -0.751402606990724, + -0.127746236880358, 0.0343017151143696, 84, 16, -0.0467222608829944, + "Total indirect", 0.258388575328973, 0.0413395228873953, -1.13020803385325, + -0.0188121095119888, 0.0717945099290637, 16, 50, 0.0264912002085375, + "Total indirect", 0.251756745187462, 0.023114358262638, 1.14609282713065, + -0.0244469977750735, 0.0215686006293324, 50, 50, -0.00143919857287052, + "Total indirect", 0.902423125196048, 0.0117388887671843, -0.122600920871979, + -0.0869918637124669, 0.0231485057511267, 84, 50, -0.0319216789806701, + "Total indirect", 0.255913922836244, 0.0280975493254894, -1.13610189311819, + -0.0308375483011525, 0.118517056218329, 16, 84, 0.0438397539585883, + "Total indirect", 0.249893333898918, 0.0381013645397496, 1.15060850151054, + -0.0243238117665086, 0.0561425221208693, 50, 84, 0.0159093551771803, + "Total indirect", 0.438324109443966, 0.0205275031893663, 0.775026316177691, + -0.0528435317193822, 0.0236972812581436, 84, 84, -0.0145731252306193, + "Total indirect", 0.455461021746113, 0.0195260763925434, -0.746341709294164 )) @@ -4169,7 +4171,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 16 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -4180,23 +4182,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -4205,116 +4207,116 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(952.231206533577, 1014.75529099729, 11, "Model 1", 100, -452.115603266789, + list(952.231206535173, 1014.75529099889, 11, "Model 1", 100, -452.115603267587, 16)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962232658422959, 0.0896223256893578, 0.0399999995525641, - "facExperimexperimental", "", 0.114128636346767, "facGenderm", - 0.0253179785588961, 1.57990494618335, -0.163250686497062, 0.0341991507316638, - -0.0645257678826992, "contcor2", "", 0.200188114611848, - "facGenderm", 0.0503707820108393, -1.28101580532964, -0.170527176662721, - 0.0272978360697645, -0.0716146702964781, "contcor2", "", - 0.155883312498968, "facExperimexperimental", 0.0504664918062025, - -1.41905386590943, 0.18070480773028, 0.31929518754686, 0.24999999763857, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553383913592, 7.07106787866778, 0.180704813312522, 0.319295207020593, - 0.250000010166557, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553419351718, 7.07106752425028, - 0.721541657739983, 1.2749230761898, 0.998232366964889, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171323252574, - 7.07107041264268, 0.00480662806403926, 0.00849304040654951, - 0.00664983423529439, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000940428592460934, 7.07106769041651, 0.758591156311699, - 1.34038772931088, 1.04948944281129, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.148420220368415, 7.07106781142222, - 0.0796446867125519, 0.140727659883603, 0.110186173298078, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.015582677450419, 7.07106809138982, 0.318532860928584, 0.562829569610282, - 0.440681215269433, "debCollin1:contcor2", "", 1.53743684450092e-12, - "debCollin1:contcor2", 0.0623217341259022, 7.07106792598502 - )) + list(-0.163250385656579, 0.0341993577782572, -0.0645255139391609, "contcor2", + "", 0.200189671642659, "facGenderm", 0.0503707580833869, + -1.28101137235897, -0.00962245848454567, 0.0896223871303146, + 0.0399999643228845, "facExperimexperimental", "", 0.114129660025139, + "facGenderm", 0.0253180278815557, 1.57990047684656, 0.180704899729498, + 0.319295508438587, 0.250000204084043, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553967833781, 7.07106203943317, + 0.75859115631242, 1.34038772931016, 1.04948944281129, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.148420220368047, + 7.07106781143974, 0.00480661523881547, 0.00849299567313208, + 0.00664980545597377, "debCollin1", "", 1.53721479989599e-12, + "debCollin1", 0.000940420452466043, 7.07109829282864, -0.170527412513586, + 0.0272976323992835, -0.0716148900571513, "contcor2", "", + 0.155882110349897, "facExperimexperimental", 0.0504665000156351, + -1.4190579896558, 0.18070494893236, 0.31929568005566, 0.25000031449401, + "facExperimexperimental", "", 1.53765888910584e-12, + "facExperimexperimental", 0.0353554280120671, 7.0710589165738, + 0.721541133966052, 1.27492124928051, 0.998231191623282, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141170990813977, + 7.07107873839792, 0.0796447205682989, 0.140727777970582, 0.110186249269441, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.015582698938373, 7.07106321601982, + 0.318532814242887, 0.562829406774349, 0.440681110508618, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217044951956, + 7.07106960693911)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0715438299978369, 0.892289575881436, "", 0.481916702939637, - "", "m", "facGender", "contNormal", "", "", "", 0.0213542773563125, - 0.209377762131737, 2.30166135139233, -0.0360412388561742, 0.0452239043461729, - 16, 0.00459133274499938, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.824727428432538, 0.0207312848203733, - 0.221468798715617, -0.0368483585191957, 0.0426809487614308, - 16, 0.00291629512111753, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.885704550663031, 0.0202884613972358, - 0.143741561472713, -0.0295028956100662, 0.0318509207699986, - 50, 0.00117401257996621, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.940208117350952, 0.0156517713753966, - 0.0750082883149995, -0.0317184176690603, 0.030716367581229, - 50, -0.000501025043915644, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.974905454057705, 0.0159275338074493, - -0.0314565362078413, -0.0415552923337116, 0.0358920699689909, - 84, -0.00283161118236036, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.886037910796878, 0.019757343225079, - -0.143319430659384, -0.0451757904832907, 0.0361624928708063, - 84, -0.00450664880624222, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.828061456542636, 0.0207499433652055, - -0.217188487068316)) + list(0.0715438299850523, 0.892289575894221, "", 0.481916702939636, + "", "m", "facGender", "contNormal", "", "", "", 0.0213542773603592, + 0.20937776213826, 2.30166135132062, -0.0360409104138435, 0.0452234770012829, + 16, 0.0045912832937197, 0, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.824727681953852, 0.020731092013968, + 0.221468473085076, -0.0368479858149054, 0.0426805132368076, + 16, 0.00291626371095109, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.88570461966865, 0.0202882552126018, + 0.143741474088895, -0.0295025830221205, 0.031850582892479, 50, + 0.00117399993517924, 0, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.940208127418891, 0.0156516054372798, + 0.0750082756611631, -0.0317180768836937, 0.030716037588515, + 50, -0.000501019647589358, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.974905454732843, 0.0159273626874476, + -0.0314565353612631, -0.0415548681889997, 0.0358917068204229, + 84, -0.00283158068428839, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.88603797927891, 0.019757142381266, + -0.143319343943855, -0.0451753614038327, 0.0361621608697187, + 84, -0.00450660026705699, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.828061695798468, 0.0207497492084373, + -0.217188180049159)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0715438299978369, 0.892289575881436, 0.481916702939637, "facGenderm", - "", 0.0213542773563125, "contNormal", 0.209377762131737, - 2.30166135139233, -3.61764354162639, 3.32517001363875, -0.146236763993818, - "debCollin1", "", 0.934196953420706, "contNormal", - 1.77115845240759, -0.0825656020753165, -3.4328686830771, 3.20124665816247, - -0.115811012457313, "facExperimexperimental", "", 0.945443543542303, - "contNormal", 1.69240746094536, -0.0684297458678314, -4.77223996346348, - 5.15463710017423, 0.191198568355379, "debCollin1:facExperimexperimental", - "", 0.939816464947311, "contNormal", 2.53241313155233, - 0.0755005437198067, -1.77567671961911, 1.3674384645021, -0.204119127558505, - "contcor2", "", 0.799057826494252, "contNormal", 0.801829831801427, - -0.254566641777249, -1.95652756388472, 2.77446185607772, 0.408967146096502, - "debCollin1:contcor2", "", 0.734718593952127, "contNormal", - 1.2069072333165, 0.338855493452208, -0.0407263694235283, 0.0232049241711928, - -0.00876072262616776, "facGenderm", "", 0.591156364161312, - "debCollin1", 0.0163093031553138, -0.537161063396714)) + list(0.0715438299850523, 0.892289575894221, 0.481916702939636, "facGenderm", + "", 0.0213542773603592, "contNormal", 0.20937776213826, + 2.30166135132062, -3.61764354598448, 3.32517001799684, -0.146236763993818, + "debCollin1", "", 0.934196953503129, "contNormal", + 1.77115845463114, -0.0825656019716616, -3.43286867776334, 3.20124665284871, + -0.115811012457313, "facExperimexperimental", "", 0.945443543455042, + "contNormal", 1.69240745823421, -0.0684297459774525, -4.77223995442022, + 5.15463709113098, 0.191198568355379, "debCollin1:facExperimexperimental", + "", 0.939816464837867, "contNormal", 2.53241312693834, + 0.0755005438573667, -1.77567672114398, 1.36743846602697, -0.204119127558505, + "contcor2", "", 0.79905782668505, "contNormal", 0.801829832579436, + -0.254566641530245, -1.95652756581039, 2.77446185800339, 0.408967146096502, + "debCollin1:contcor2", "", 0.734718594159944, "contNormal", + 1.206907234299, 0.338855493176357, -0.0407262058946152, 0.0232049493582665, + -0.00876062826817436, "facGenderm", "", 0.591159557349349, + "debCollin1", 0.0163092678633798, -0.537156440225325)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0731884353865058, 0.899827635982766, 16, 0.486508035684636, - 0, "m", "Total", 0.0210534834671383, 0.210881222082825, 2.30702397719203, - 0.0743381953163758, 0.895327800805132, 16, 0.484832998060754, - 1, "m", "Total", 0.0206182992462751, 0.209439972357813, 2.31490193874, - 0.0709442619941575, 0.895237169045048, 50, 0.483090715519603, - 0, "m", "Total", 0.0215993995978774, 0.210282666812454, 2.29733968492258, - 0.0719760347917035, 0.890855320999738, 50, 0.481415677895721, - 1, "m", "Total", 0.0211940811802391, 0.208901615710097, 2.30450911669254, - 0.0666287964377364, 0.891541387076816, 84, 0.479085091757276, - 0, "m", "Total", 0.0228113512798522, 0.210440752265318, 2.27657944861011, - 0.0675108952700392, 0.887309212996749, 84, 0.477410054133394, - 1, "m", "Total", 0.0224437748935551, 0.20913606683418, 2.28277246177687, - -0.0360412388561742, 0.0452239043461729, 16, 0.00459133274499938, - 0, "m", "Total indirect", 0.824727428432538, 0.0207312848203733, - 0.221468798715617, -0.0368483585191957, 0.0426809487614308, - 16, 0.00291629512111753, 1, "m", "Total indirect", 0.885704550663031, - 0.0202884613972358, 0.143741561472713, -0.0295028956100662, - 0.0318509207699986, 50, 0.00117401257996621, 0, "m", "Total indirect", - 0.940208117350952, 0.0156517713753966, 0.0750082883149995, -0.0317184176690603, - 0.030716367581229, 50, -0.000501025043915644, 1, "m", "Total indirect", - 0.974905454057705, 0.0159275338074493, -0.0314565362078413, - -0.0415552923337116, 0.0358920699689909, 84, -0.00283161118236036, - 0, "m", "Total indirect", 0.886037910796878, 0.019757343225079, - -0.143319430659384, -0.0451757904832907, 0.0361624928708063, - 84, -0.00450664880624222, 1, "m", "Total indirect", 0.828061456542636, - 0.0207499433652055, -0.217188487068316)) + list(0.073188433123304, 0.899827539343408, 16, 0.486507986233356, 0, + "m", "Total", 0.0210534818566037, 0.210881198006833, 2.30702400608324, + 0.0743381835563662, 0.895327749744809, 16, 0.484832966650588, + 1, "m", "Total", 0.0206183013898098, 0.209439962332039, 2.31490189958089, + 0.0709442802945054, 0.895237125455126, 50, 0.483090702874816, + 0, "m", "Total", 0.0215993931932645, 0.210282651023829, 2.2973397972811, + 0.0719760428614865, 0.890855323722608, 50, 0.481415683292047, + 1, "m", "Total", 0.0211940788881779, 0.208901614346064, 2.30450915757185, + 0.0666288667261928, 0.891541377784503, 84, 0.479085122255348, + 0, "m", "Total", 0.0228113294895274, 0.210440731963729, 2.27657981316052, + 0.0675109547691318, 0.887309250576027, 84, 0.477410102672579, + 1, "m", "Total", 0.022443757617838, 0.209136061242288, 2.28277275490759, + -0.0360409104138435, 0.0452234770012829, 16, 0.0045912832937197, + 0, "m", "Total indirect", 0.824727681953852, 0.020731092013968, + 0.221468473085076, -0.0368479858149054, 0.0426805132368076, + 16, 0.00291626371095109, 1, "m", "Total indirect", 0.88570461966865, + 0.0202882552126018, 0.143741474088895, -0.0295025830221205, + 0.031850582892479, 50, 0.00117399993517924, 0, "m", "Total indirect", + 0.940208127418891, 0.0156516054372798, 0.0750082756611631, -0.0317180768836937, + 0.030716037588515, 50, -0.000501019647589358, 1, "m", "Total indirect", + 0.974905454732843, 0.0159273626874476, -0.0314565353612631, + -0.0415548681889997, 0.0358917068204229, 84, -0.00283158068428839, + 0, "m", "Total indirect", 0.88603797927891, 0.019757142381266, + -0.143319343943855, -0.0451753614038327, 0.0361621608697187, + 84, -0.00450660026705699, 1, "m", "Total indirect", 0.828061695798468, + 0.0207497492084373, -0.217188180049159)) @@ -4330,7 +4332,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 17 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -4341,27 +4343,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -4370,158 +4372,159 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1401.22456599494, 1468.95899083063, 23, "Model 1", 100, -674.612282997468, + list(1401.22456598067, 1468.95899081636, 23, "Model 1", 100, -674.612282990333, 17)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544849652457236, 0.0642075839675968, -0.240321034244819, "contcor1", - "", 0.121930724779344, "contGamma", 0.155374599030645, - -1.54672022160727, -0.403936341830419, 0.194625917099898, -0.10465521236526, - "contcor2", "", 0.493105960344464, "contGamma", 0.152697259656734, - -0.685377148224712, 0.424979732126091, 0.896764827807638, 0.660872279966865, - "contcor2", "", 3.99665438521879e-08, "contcor1", 0.120355552296605, - 5.49099952063869, 1.68040996937575, 2.96918791435465, 2.3247989418652, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328775925257969, 7.07107413671206, 0.732635156733576, 1.29452591771096, - 1.01358053722227, "contcor1", "", 1.53765888910584e-12, - "contcor1", 0.143342113786148, 7.07105895434492, 0.721542189595767, - 1.2749249317947, 0.998233560695233, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171660949881, 7.07106195378426, - 0.00468047921351431, 0.00827014175058718, 0.00647531048205075, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000915747066116437, 7.07106877176433, 0.741603673552149, 1.31037181593163, - 1.02598774474189, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.145096580056024, 7.07106772844501, 0.323891730575864, - 0.572298282303672, 0.448095006439768, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633701827398889, - 7.07107013213188, 0.318532957808809, 0.562829907599016, 0.440681432703912, - "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", - 0.0623217956343051, 7.07106443610458)) + list(-0.403935355053862, 0.194630234332366, -0.104652560360748, "contcor2", + "", 0.49311932287884, "contGamma", 0.152698109278445, + -0.685355967112298, -0.544851849875568, 0.0642072313362714, + -0.240322309269648, "contcor1", "", 0.121929875320595, + "contGamma", 0.155375069648223, -1.54672374283564, 1.68040549394405, + 2.96917230442781, 2.32478889918593, "contGamma", "", + 1.53699275529107e-12, "contGamma", 0.32877308477334, 7.07110468239416, + 0.74160364207833, 1.31037170671685, 1.02598767439759, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.145096560223781, + 7.07106821012998, 0.00468047474067115, 0.00827012614959984, + 0.0064753004451355, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915744227251979, 7.07107973212888, 0.424982141036245, + 0.896775827283023, 0.660878984159634, "contcor2", "", + 3.99765662795204e-08, "contcor1", 0.120357743807597, 5.49095524103633, + 0.732638392264504, 1.29453720254613, 1.01358779740532, "contcor1", + "", 1.53810297831569e-12, "contcor1", 0.143344167217819, + 7.07100830873096, 0.721546704812893, 1.27494067972974, 0.998243692271317, + "contcor2", "", 1.53832502292062e-12, "contcor2", 0.1411745264918, + 7.07099019262018, 0.323893280313161, 0.5723036875496, 0.448098483931381, + "debCollin1:contcor1", "", 1.53810297831569e-12, "debCollin1:contcor1", + 0.0633711663060824, 7.07101525900703, 0.318532503278858, 0.562828322061924, + 0.440680412670391, "debCollin1:contcor2", "", 1.53721479989599e-12, + "debCollin1:contcor2", 0.0623215071067733, 7.07108080546558 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.209481468986081, 0.166378873948835, 16, 16, -0.0215512975186229, - "contGamma", "contNormal", "", "", "", 0.822163577530733, - 0.0958845024448546, -0.224763094860065, -0.198501891558565, - 0.31405011431001, 50, 16, 0.0577741113757224, "contGamma", "contNormal", - "", "", "", 0.65859881134311, 0.130755465383936, 0.441848539226111, - -0.344930502452125, 0.633625928821167, 84, 16, 0.144347713184521, - "contGamma", "contNormal", "", "", "", 0.563107499851462, - 0.2496363297979, 0.57823199572507, -0.3669832429997, 0.186099987005723, - 16, 50, -0.0904416279969889, "contGamma", "contNormal", "", - "", "", 0.521524660315251, 0.14109525337406, -0.640996956554006, - -0.146441183647153, 0.124208745441866, 50, 50, -0.0111162191026435, - "contGamma", "contNormal", "", "", "", 0.872092994431311, - 0.0690446179684602, -0.161000515749417, -0.233440742841721, - 0.384355508254032, 84, 50, 0.0754573827061552, "contGamma", - "contNormal", "", "", "", 0.632096279637637, 0.157603980473328, - 0.478778406989062, -0.669513223371602, 0.32712988460385, 16, - 84, -0.171191669383876, "contGamma", "contNormal", "", "", - "", 0.500744194023341, 0.254250362720143, -0.673319272988841, - -0.385805900044165, 0.202073379065103, 50, 84, -0.0918662604895309, - "contGamma", "contNormal", "", "", "", 0.54016979698968, - 0.149971959624357, -0.61255624531168, -0.229487424207077, 0.218902106845613, - 84, 84, -0.00529265868073207, "contGamma", "contNormal", "", - "", "", 0.963095304069624, 0.114387186343609, -0.0462696815081491, - -0.0233319507230081, 0.0488977084225861, 16, 16, 0.012782878849789, + list(-0.209488463840881, 0.166371864707221, 16, 16, -0.0215582995668301, + "contGamma", "contNormal", "", "", "", 0.822106758422855, + 0.0958844987746819, -0.224836129325656, -0.198508398590839, + 0.314043590821838, 50, 16, 0.0577675961154999, "contGamma", + "contNormal", "", "", "", 0.658634860858025, 0.130755461185925, + 0.441798725587135, -0.344936470154995, 0.633619928538024, 84, + 16, 0.144341729191515, "contGamma", "contNormal", "", "", + "", 0.56312366850178, 0.249636321486453, 0.578208044134106, + -0.366990518066826, 0.186092691376485, 16, 50, -0.0904489133451704, + "contGamma", "contNormal", "", "", "", 0.521491098120044, + 0.141095248128527, -0.641048614640646, -0.146447977763524, 0.124201942437843, + 50, 50, -0.0111230176628405, "contGamma", "contNormal", "", + "", "", 0.872015437903586, 0.0690446157011607, -0.16109898722564, + -0.233446999805697, 0.384349230632046, 84, 50, 0.0754511154131743, + "contGamma", "contNormal", "", "", "", 0.63212456135332, + 0.15760397520333, 0.478738656914155, -0.669520823259919, 0.327122249653696, + 16, 84, -0.171199286803112, "contGamma", "contNormal", "", "", + "", 0.500725122755054, 0.254250353775633, -0.673349256985457, + -0.385813020538989, 0.202066238297425, 50, 84, -0.0918733911207819, + "contGamma", "contNormal", "", "", "", 0.540138336501395, + 0.149971954452615, -0.612603812866959, -0.229494015841956, 0.218895499752421, + 84, 84, -0.00529925804476715, "contGamma", "contNormal", "", + "", "", 0.963049319584797, 0.114387182400089, -0.0463273763159238, + -0.0233317804482821, 0.0488973078405367, 16, 16, 0.0127827636961273, "contGamma", "debCollin1", "contNormal", "", "", - 0.487850828727717, 0.0184262720425815, 0.693731147583671, -0.0619905627787901, - 0.0255954198901113, 50, 16, -0.0181975714443394, "contGamma", - "debCollin1", "contNormal", "", "", 0.41539527520019, - 0.0223437734978215, -0.814435907440326, -0.139192824744574, - 0.0351752338911211, 84, 16, -0.0520087954267265, "contGamma", - "debCollin1", "contNormal", "", "", 0.242323990596199, - 0.0444824649868794, -1.16919769266535, -0.019049389051351, 0.0769521797383029, - 16, 50, 0.028951395343476, "contGamma", "debCollin1", "contNormal", - "", "", 0.237149783961453, 0.0244906461411796, - 1.18214093562831, -0.0252588122821311, 0.0212007023808263, 50, - 50, -0.00202905495065243, "contGamma", "debCollin1", "contNormal", - "", "", 0.86406853258481, 0.0118521347916146, - -0.171197424457912, -0.0960695657699904, 0.0243890079039113, - 84, 50, -0.0358402789330395, "contGamma", "debCollin1", "contNormal", - "", "", 0.243491571627872, 0.0307297926451873, - -1.16630396263519, -0.0309767844150469, 0.126783541216367, 16, - 84, 0.0479033784006598, "contGamma", "debCollin1", "contNormal", - "", "", 0.233939266846383, 0.0402457205529813, - 1.19027259898596, -0.0239457243372326, 0.0577915805502955, 50, - 84, 0.0169229281065315, "contGamma", "debCollin1", "contNormal", - "", "", 0.41703058342938, 0.0208517364431851, - 0.81158363729762, -0.0583143926218183, 0.024537800870107, 84, - 84, -0.0168882958758556, "contGamma", "debCollin1", "contNormal", - "", "", 0.424276409719079, 0.0211361520276528, - -0.799024148471321)) + 0.487851309589944, 0.0184261264131771, 0.693730380954397, -0.0619900565065755, + 0.0255952667774187, 50, 16, -0.0181973948645784, "contGamma", + "debCollin1", "contNormal", "", "", 0.415396289659742, + 0.022343605284295, -0.814434135988299, -0.139191846688779, 0.0351752457747534, + 84, 16, -0.052008300457013, "contGamma", "debCollin1", "contNormal", + "", "", 0.242325863164413, 0.0444822185098599, + -1.16919304385605, -0.0190493987039469, 0.0769516716121437, + 16, 50, 0.0289511364540984, "contGamma", "debCollin1", "contNormal", + "", "", 0.23715154258828, 0.0244905189772197, + 1.18213650274328, -0.0252585640154173, 0.0212005198022027, 50, + 50, -0.00202902210660728, "contGamma", "debCollin1", "contNormal", + "", "", 0.864069463184028, 0.0118520248800701, + -0.171196240907257, -0.0960688728292828, 0.0243890174311991, + 84, 50, -0.0358399276990419, "contGamma", "debCollin1", "contNormal", + "", "", 0.243493516829645, 0.0307296183018255, + -1.16629914979818, -0.0309768069617969, 0.126782709023719, 16, + 84, 0.0479029510309612, "contGamma", "debCollin1", "contNormal", + "", "", 0.233941039049673, 0.0402455140068652, + 1.19026808858224, -0.0239455669687298, 0.0577911519092408, 50, + 84, 0.0169227924702555, "contGamma", "debCollin1", "contNormal", + "", "", 0.417030977315009, 0.020851586948204, + 0.811582951086277, -0.0583138872429368, 0.0245376609985786, + 84, 84, -0.0168881131221791, "contGamma", "debCollin1", "contNormal", + "", "", 0.424277815090338, 0.0211359874199317, + -0.799021724731594)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.144534783484598, 0.126028714256119, -0.00925303461423916, "contGamma", - "", 0.893356629669803, "contNormal", 0.0690225687499586, - -0.134058102759972, -2.28223613532475, 2.81249567769679, 0.265129771186022, - "debCollin1", "", 0.838358972345859, "contNormal", - 1.29970036521286, 0.203992995833774, -4.64758080412202, 0.319583475865841, - -2.16399866412809, "contcor1", "", 0.0876810925534244, - "contNormal", 1.26715702920263, -1.7077588761748, -0.00781771803552056, - 6.97589473984329, 3.48403851090388, "debCollin1:contcor1", "", - 0.050515130324791, "contNormal", 1.78159203765106, 1.95557593280301, - -0.173334683989693, 0.336197124489714, 0.0814312202500106, "contGamma:contcor1", - "", 0.53100912023781, "contNormal", 0.129984992708675, - 0.626466321635423, -0.962519302497609, 3.3543939876674, 1.1959373425849, - "contcor2", "", 0.277497398582156, "contNormal", 1.10127362650954, - 1.08595839743788, -4.98755749304741, 1.27340740741443, -1.85707504281649, - "debCollin1:contcor2", "", 0.244952764289239, "contNormal", - 1.59721427277428, -1.16269624838178, -0.303234301694474, 0.158779844830633, - -0.0722272284319207, "contGamma:contcor2", "", 0.540003919202543, - "contNormal", 0.117862917423334, -0.612807064434851, -0.0194720914921461, - 0.00121576483014766, -0.0091281633309992, "contGamma", "", - 0.083701537449304, "debCollin1", 0.00527761134527902, -1.72960127864751 + list(-0.144541570555052, 0.126021918330227, -0.00925982611241228, "contGamma", + "", 0.893278820896481, "contNormal", 0.0690225664908768, + -0.134156502477146, -2.28223757773457, 2.81249408600535, 0.265128254135388, + "debCollin1", "", 0.838359879813409, "contNormal", + 1.29970032713012, 0.203991834579914, -4.64758093304361, 0.319582975175791, + -2.16399897893391, "contcor1", "", 0.0876810227105433, + "contNormal", 1.267156934362, -1.70775925242714, -0.00781798674195544, + 6.97589392096666, 3.48403796711235, "debCollin1:contcor1", "", + 0.0505151481474697, "contNormal", 1.78159189729894, 1.95557578163354, + -0.173334175153088, 0.336197615074105, 0.0814317199605087, "contGamma:contcor1", + "", 0.531006584694947, "contNormal", 0.129984988052412, + 0.626470188447255, -0.96251953883415, 3.35439338403007, 1.19593692259796, + "contcor2", "", 0.277497526433512, "contNormal", 1.10127353280863, + 1.08595810847093, -4.98755790470384, 1.27340644198907, -1.85707573135738, + "debCollin1:contcor2", "", 0.244952547584552, "contNormal", + 1.5972141315041, -1.16269678230844, -0.303234590970528, 0.158779540061867, + -0.0722275254543304, "contGamma:contcor2", "", 0.540002239111151, + "contNormal", 0.117862913471039, -0.612809605050853, -0.0194719989430799, + 0.00121584134588881, -0.00912807879859553, "contGamma", "", + 0.0837041615119032, "debCollin1", 0.00527760725506992, -1.72958660192584 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.194499169336244, 0.176962331998576, 16, 16, -0.00876841866883395, - "Total", 0.926276450297623, 0.0947623283552301, -0.09253063765977, - -0.213762434856534, 0.2929155147193, 50, 16, 0.039576539931383, - "Total", 0.759463795882075, 0.129256954100291, 0.306184995668979, - -0.386993267551301, 0.57167110306689, 84, 16, 0.0923389177577947, - "Total", 0.705750829378369, 0.244561731281802, 0.377568956818493, - -0.333977789329091, 0.210997324022065, 16, 50, -0.0614902326535129, - "Total", 0.658279047788859, 0.139026818260399, -0.442290440239673, - -0.146084344599737, 0.119793796493145, 50, 50, -0.013145274053296, - "Total", 0.846328529730004, 0.0678273027438503, -0.193805053739776, - -0.258892784672418, 0.338126992218649, 84, 50, 0.0396171037731157, - "Total", 0.794771974895448, 0.152303762109988, 0.260119009696593, - -0.616214774287804, 0.369638192321371, 16, 84, -0.123288290983216, - "Total", 0.623980828732091, 0.251497725056546, -0.490216326829582, - -0.366984851422835, 0.217098186656836, 50, 84, -0.0749433323829994, - "Total", 0.614989915769719, 0.149003512994842, -0.502963526676005, - -0.237525210700645, 0.193163301587469, 84, 84, -0.0221809545565877, - "Total", 0.840009907446068, 0.109871537356127, -0.201880806351989, - -0.0233319507230081, 0.0488977084225861, 16, 16, 0.012782878849789, - "Total indirect", 0.487850828727717, 0.0184262720425815, 0.693731147583671, - -0.0619905627787901, 0.0255954198901113, 50, 16, -0.0181975714443394, - "Total indirect", 0.41539527520019, 0.0223437734978215, -0.814435907440326, - -0.139192824744574, 0.0351752338911211, 84, 16, -0.0520087954267265, - "Total indirect", 0.242323990596199, 0.0444824649868794, -1.16919769266535, - -0.019049389051351, 0.0769521797383029, 16, 50, 0.028951395343476, - "Total indirect", 0.237149783961453, 0.0244906461411796, 1.18214093562831, - -0.0252588122821311, 0.0212007023808263, 50, 50, -0.00202905495065243, - "Total indirect", 0.86406853258481, 0.0118521347916146, -0.171197424457912, - -0.0960695657699904, 0.0243890079039113, 84, 50, -0.0358402789330395, - "Total indirect", 0.243491571627872, 0.0307297926451873, -1.16630396263519, - -0.0309767844150469, 0.126783541216367, 16, 84, 0.0479033784006598, - "Total indirect", 0.233939266846383, 0.0402457205529813, 1.19027259898596, - -0.0239457243372326, 0.0577915805502955, 50, 84, 0.0169229281065315, - "Total indirect", 0.41703058342938, 0.0208517364431851, 0.81158363729762, - -0.0583143926218183, 0.024537800870107, 84, 84, -0.0168882958758556, - "Total indirect", 0.424276409719079, 0.0211361520276528, -0.799024148471321 + list(-0.19450627764232, 0.176955205900914, 16, 16, -0.0087755358707028, + "Total", 0.926216777202699, 0.094762323816477, -0.092605747909877, + -0.213768771321856, 0.292909173823699, 50, 16, 0.0395702012509214, + "Total", 0.759501130109219, 0.129256952970097, 0.306135958969077, + -0.386998820706206, 0.571665678175209, 84, 16, 0.0923334287345016, + "Total", 0.705767542926696, 0.244561764002614, 0.377546461978884, + -0.333985357779414, 0.21098980399727, 16, 50, -0.061497776891072, + "Total", 0.658239814166233, 0.139026830614077, -0.442344665554398, + -0.146091109332846, 0.119787029793951, 50, 50, -0.0131520397694478, + "Total", 0.846250421787997, 0.0678273022422887, -0.193904804328895, + -0.258898776564589, 0.338121151992854, 84, 50, 0.0396111877141324, + "Total", 0.794801987909016, 0.152303800801102, 0.26008009981223, + -0.616222847593227, 0.369630176048926, 16, 84, -0.123296335772151, + "Total", 0.623958216214422, 0.251497739606043, -0.490248285989717, + -0.366992111398894, 0.217090914097841, 50, 84, -0.0749505986505264, + "Total", 0.614955622107455, 0.14900350978485, -0.503012303258826, + -0.237531678054174, 0.193156935720281, 84, 84, -0.0221873711669462, + "Total", 0.839964287586365, 0.109871563245976, -0.201939159792184, + -0.0233317804482821, 0.0488973078405367, 16, 16, 0.0127827636961273, + "Total indirect", 0.487851309589944, 0.0184261264131771, 0.693730380954397, + -0.0619900565065755, 0.0255952667774187, 50, 16, -0.0181973948645784, + "Total indirect", 0.415396289659742, 0.022343605284295, -0.814434135988299, + -0.139191846688779, 0.0351752457747534, 84, 16, -0.052008300457013, + "Total indirect", 0.242325863164413, 0.0444822185098599, -1.16919304385605, + -0.0190493987039469, 0.0769516716121437, 16, 50, 0.0289511364540984, + "Total indirect", 0.23715154258828, 0.0244905189772197, 1.18213650274328, + -0.0252585640154173, 0.0212005198022027, 50, 50, -0.00202902210660728, + "Total indirect", 0.864069463184028, 0.0118520248800701, -0.171196240907257, + -0.0960688728292828, 0.0243890174311991, 84, 50, -0.0358399276990419, + "Total indirect", 0.243493516829645, 0.0307296183018255, -1.16629914979818, + -0.0309768069617969, 0.126782709023719, 16, 84, 0.0479029510309612, + "Total indirect", 0.233941039049673, 0.0402455140068652, 1.19026808858224, + -0.0239455669687298, 0.0577911519092408, 50, 84, 0.0169227924702555, + "Total indirect", 0.417030977315009, 0.020851586948204, 0.811582951086277, + -0.0583138872429368, 0.0245376609985786, 84, 84, -0.0168881131221791, + "Total indirect", 0.424277815090338, 0.0211359874199317, -0.799021724731594 )) @@ -4538,7 +4541,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 17 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -4549,27 +4552,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -4578,134 +4581,134 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(955.821601517801, 1023.55602635349, 23, "Model 1", 100, -451.9108007589, + list(955.821601558203, 1023.55602639389, 23, "Model 1", 100, -451.910800779101, 17)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962230455542618, 0.0896223561066308, 0.0400000257756023, - "facExperimexperimental", "", 0.114128429701336, "facGenderm", - 0.0253179806988512, 1.57990584839246, -0.163250680286586, 0.0341991448812765, - -0.0645257677026549, "contcor2", "", 0.200188088383477, - "facGenderm", 0.0503707789340319, -1.28101588000378, -0.170527161858374, - 0.0272978155254724, -0.0716146731664506, "contcor2", "", - 0.155883222001254, "facExperimexperimental", 0.0504664827885268, - -1.41905417634398, 0.180704817484416, 0.319295221572282, 0.250000019528349, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553445831276, 7.07106725945064, 0.180704809475697, 0.319295193638004, - 0.25000000155685, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553394999832, 7.07106776776868, - 0.721541591198695, 1.27492284411424, 0.998232217656467, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171281023668, - 7.07107147018882, 0.00480662810718712, 0.00849304055704681, - 0.00664983433211697, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000940428619846496, 7.07106758746071, 0.755490283882801, - 1.33490866286991, 1.04519947337636, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.147813527074347, 7.07106781134208, - 0.0796446854280189, 0.140727655403211, 0.110186170415615, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826766351338, 7.07106827636923, 0.318532849856785, 0.562829530990413, - 0.440681190423599, "debCollin1:contcor2", "", 1.53743684450092e-12, - "debCollin1:contcor2", 0.0623217270982041, 7.07106832468219 - )) + list(-0.163246774260074, 0.0341973637286503, -0.0645247052657118, "contcor2", + "", 0.200182536975677, "facGenderm", 0.0503693280963677, + -1.28103168543884, -0.00962218601650656, 0.0896220748909627, + 0.0399999444372281, "facExperimexperimental", "", 0.114127707951043, + "facGenderm", 0.0253178787187661, 1.5799089995474, 0.180704484060988, + 0.31929405861207, 0.249999271336529, "facGenderm", "", + 1.53721479989599e-12, "facGenderm", 0.0353551329627125, 7.07108842159332, + 0.755490283884371, 1.33490866286834, 1.04519947337636, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.147813527073546, + 7.07106781138041, 0.00480662440050895, 0.00849302762838349, + 0.00664982601444622, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000940426267256038, 7.07107643201948, -0.170523421099736, + 0.0272962452851993, -0.0716135879072685, "contcor2", "", + 0.155878384824315, "facExperimexperimental", 0.0504651279169699, + -1.41907076952414, 0.180704694253768, 0.31929479175216, 0.249999743002964, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353552663700899, 7.07107508075404, + 0.721530139719321, 1.27488290328563, 0.998206521502473, "contcor2", + "", 1.53543844305659e-12, "contcor2", 0.141164013198988, + 7.07125349358963, 0.0796445822789274, 0.140727295626039, 0.110185938952483, + "debCollin1:facExperimexperimental", "", 1.53721479989599e-12, + "debCollin1:facExperimexperimental", 0.0155826111675838, 7.07108313025875, + 0.318532248291879, 0.562827432769594, 0.440679840530737, "debCollin1:contcor2", + "", 1.53721479989599e-12, "debCollin1:contcor2", 0.0623213452912106, + 7.07108998484484)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.175783430172798, 1.32274378011761, 16, 0.573480174972405, 0, - "m", "facGender", "contNormal", "", "", "", 0.133578077760397, - 0.382284374128963, 1.50014024580283, -0.362716053039095, 1.00606619822194, - 16, 0.321675072591422, 1, "m", "facGender", "contNormal", "", - "", "", 0.356938046380561, 0.349185562096501, 0.921215272075092, - 0.0235481261613413, 1.18422554836211, 50, 0.603886837261728, - 0, "m", "facGender", "contNormal", "", "", "", 0.0414008984745873, - 0.296096619977726, 2.0394925052071, -0.236088085491044, 0.940251555252534, + list(-0.17578343016102, 1.32274378010583, 16, 0.573480174972405, 0, + "m", "facGender", "contNormal", "", "", "", 0.13357807775429, + 0.382284374122954, 1.50014024582642, -0.362716052882624, 1.00606619806547, + 16, 0.321675072591423, 1, "m", "facGender", "contNormal", "", + "", "", 0.356938046270622, 0.349185562016668, 0.921215272285708, + 0.0235481261829692, 1.18422554834049, 50, 0.603886837261728, + 0, "m", "facGender", "contNormal", "", "", "", 0.0414008984670091, + 0.296096619966692, 2.03949250528311, -0.236088085362761, 0.940251555124252, 50, 0.352081734880745, 1, "m", "facGender", "contNormal", "", - "", "", 0.240697421752358, 0.300092157310643, 1.17324537247498, - -0.0534551055573028, 1.33251133080305, 84, 0.639528112622876, - 0, "m", "facGender", "contNormal", "", "", "", 0.0704856635299571, - 0.353569363338481, 1.80877694431528, -0.392737323202819, 1.16818334368661, + "", "", 0.240697421649771, 0.300092157245192, 1.17324537273087, + -0.0534551056208324, 1.33251133086658, 84, 0.639528112622876, + 0, "m", "facGender", "contNormal", "", "", "", 0.0704856635557287, + 0.353569363370895, 1.80877694414946, -0.392737323231743, 1.16818334371553, 84, 0.387723010241893, 1, "m", "facGender", "contNormal", "", - "", "", 0.33021257516287, 0.398201364719395, 0.973685789638401, - -0.0361714029143399, 0.0456722151469467, 16, 0.00475040611630338, + "", "", 0.330212575180792, 0.398201364734152, 0.973685789602317, + -0.0361683652307732, 0.0456681779052385, 16, 0.00474990633723261, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.820017615999381, 0.020878857649135, 0.227522319282644, - -0.0368270025396428, 0.0435667725957297, 16, 0.00336988502804347, + "", 0.820020935465126, 0.020877052788094, 0.22751804986293, + -0.0368235212239229, 0.0435625822046312, 16, 0.00336953049035413, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.869485098803298, 0.0205089929635208, 0.164312554694297, - -0.029345078777716, 0.0321960169103273, 50, 0.00142546906630562, + "", 0.869486364046365, 0.0205070358594927, 0.16431094739586, + -0.0293420832873263, 0.0321927214794322, 50, 0.00142531909605299, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.927654033346503, 0.0156995475869637, 0.090796824456857, - -0.0311480112557322, 0.0312379072118236, 50, 4.49479780457052e-05, + "", 0.92765424869642, 0.0156979427306158, 0.0907965534409283, + -0.0311447342020665, 0.0312346207004155, 50, 4.49432491745002e-05, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.997746585120974, 0.0159150675623756, 0.00282424047962985, - -0.0408893807530128, 0.0359456457426224, 84, -0.00247186750519522, + "", 0.997746585117755, 0.0159133931527626, 0.00282424048366441, + -0.0408853002079966, 0.0359420853163559, 84, -0.00247160744582038, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.899646115084083, 0.0196011322406177, -0.126108404088667, - -0.0438734778277331, 0.0361687006408228, 84, -0.00385238859345513, + "", 0.899646690241001, 0.0195991829774315, -0.126107677481579, + -0.0438693784065936, 0.0361654118211958, 84, -0.00385198329269887, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.850356088001227, 0.020419298288111, -0.188664102903975 + "", 0.850357996278172, 0.02041741349818, -0.188661668288309 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0207107614454878, 1.18515651927958, 0.602933640362535, "facGenderm", - "", 0.04238871250104, "contNormal", 0.297057947752891, - 2.0296835850495, -3.64059358152594, 3.2913756681398, -0.174608956693074, - "debCollin1", "", 0.921345637645099, "contNormal", - 1.76839199708368, -0.0987388299545732, -3.31785503492022, 3.38683688695613, - 0.0344909260179565, "facExperimexperimental", "", 0.983911530072433, - "contNormal", 1.71041202153767, 0.0201652733865545, -4.80316190223293, - 5.11832346541129, 0.157580781589179, "debCollin1:facExperimexperimental", - "", 0.950356292973744, "contNormal", 2.53103767362656, - 0.062259358377464, -1.08435620505954, 0.58074600029757, -0.251805102380983, - "facGenderm:facExperimexperimental", "", 0.553320926236516, - "contNormal", 0.424778776164057, -0.592791157446462, -1.83177667266866, - 1.39297613231767, -0.219400270175491, "contcor2", "", - 0.789702139996721, "contNormal", 0.822656138179775, -0.266697420699906, - -1.98257276721422, 2.77839544382222, 0.397911338304001, "debCollin1:contcor2", - "", 0.743199732002213, "contNormal", 1.21455502463064, - 0.327619029384864, -0.387148701032185, 0.450907690944793, 0.031879494956304, - "facGenderm:contcor2", "", 0.881464259843022, "contNormal", - 0.213793824424188, 0.149113263875442, -0.04072636692458, 0.0232049271355707, - -0.00876071989450466, "facGenderm", "", 0.591156482546981, - "debCollin1", 0.016309303274048, -0.537160891995003)) + list(0.0207107614680934, 1.18515651925698, 0.602933640362535, "facGenderm", + "", 0.0423887124930244, "contNormal", 0.297057947741357, + 2.02968358512831, -3.64059356871772, 3.29137565533157, -0.174608956693074, + "debCollin1", "", 0.921345637355382, "contNormal", + 1.76839199054875, -0.0987388303194535, -3.31785500784135, 3.38683685987726, + 0.0344909260179565, "facExperimexperimental", "", 0.983911529942495, + "contNormal", 1.71041200772166, 0.0201652735494414, -4.8031618633973, + 5.11832342657565, 0.157580781589179, "debCollin1:facExperimexperimental", + "", 0.950356292585606, "contNormal", 2.5310376538121, + 0.0622593588648671, -1.08435620485779, 0.580746000095823, -0.251805102380983, + "facGenderm:facExperimexperimental", "", 0.55332092614037, + "contNormal", 0.424778776061123, -0.592791157590109, -1.83177667577569, + 1.39297613542471, -0.219400270175491, "contcor2", "", + 0.789702140392446, "contNormal", 0.822656139765027, -0.266697420185982, + -1.98257277184721, 2.77839544845521, 0.397911338304001, "debCollin1:contcor2", + "", 0.74319973248438, "contNormal", 1.21455502699446, + 0.327619028747239, -0.387148701094977, 0.450907691007585, 0.031879494956304, + "facGenderm:contcor2", "", 0.881464259860654, "contNormal", + 0.213793824456226, 0.149113263853098, -0.0407254252393798, 0.0232058288399001, + -0.00875979819973984, "facGenderm", "", 0.59119528447559, + "debCollin1", 0.0163092930746589, -0.53710471444962)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.170579079787034, 1.32704024196445, 16, 0.578230581088709, 0, - "m", "Total", 0.13015687318591, 0.382052765653991, 1.5134835631903, - -0.35815859976861, 1.00824851500754, 16, 0.325044957619466, - 1, "m", "Total", 0.351086433295297, 0.348579648798192, 0.932484035542904, - 0.023364618952273, 1.18725999370379, 50, 0.605312306328034, - 0, "m", "Total", 0.0414845135488668, 0.296917541325295, 2.03865458277142, - -0.233846290398492, 0.938099656116074, 50, 0.352126682858791, - 1, "m", "Total", 0.238878629390655, 0.298971296350016, 1.17779428044672, - -0.0568896131255175, 1.33100210336088, 84, 0.637056245117681, - 0, "m", "Total", 0.071973399332891, 0.354060515252808, 1.79928633008627, - -0.391948323951254, 1.15968956724813, 84, 0.383870621648438, - 1, "m", "Total", 0.332156873396777, 0.395833266182059, 0.969778577103929, - -0.0361714029143399, 0.0456722151469467, 16, 0.00475040611630338, - 0, "m", "Total indirect", 0.820017615999381, 0.020878857649135, - 0.227522319282644, -0.0368270025396428, 0.0435667725957297, - 16, 0.00336988502804347, 1, "m", "Total indirect", 0.869485098803298, - 0.0205089929635208, 0.164312554694297, -0.029345078777716, 0.0321960169103273, - 50, 0.00142546906630562, 0, "m", "Total indirect", 0.927654033346503, - 0.0156995475869637, 0.090796824456857, -0.0311480112557322, - 0.0312379072118236, 50, 4.49479780457052e-05, 1, "m", "Total indirect", - 0.997746585120974, 0.0159150675623756, 0.00282424047962985, - -0.0408893807530128, 0.0359456457426224, 84, -0.00247186750519522, - 0, "m", "Total indirect", 0.899646115084083, 0.0196011322406177, - -0.126108404088667, -0.0438734778277331, 0.0361687006408228, - 84, -0.00385238859345513, 1, "m", "Total indirect", 0.850356088001227, - 0.020419298288111, -0.188664102903975)) + list(-0.170579551690795, 1.32703971431007, 16, 0.578230081309638, 0, + "m", "Total", 0.130157190925267, 0.382052751431632, 1.51348231138995, + -0.35815897804342, 1.00824818420697, 16, 0.325044603081777, + 1, "m", "Total", 0.351086975425324, 0.34857966090919, 0.932482986052521, + 0.0233647187109146, 1.18725959400465, 50, 0.605312156357781, + 0, "m", "Total", 0.0414844766206022, 0.296917413910252, 2.03865495252072, + -0.233846439292534, 0.938099795552374, 50, 0.35212667812992, + 1, "m", "Total", 0.238878751246802, 0.298971369905027, 1.17779397486047, + -0.0568891523530027, 1.33100216270711, 84, 0.637056505177056, + 0, "m", "Total", 0.0719732009259308, 0.354060412846263, 1.79928758500791, + -0.391948326495637, 1.15969038039403, 84, 0.383871026949194, + 1, "m", "Total", 0.332156617081639, 0.395833474270137, 0.969779091212536, + -0.0361683652307732, 0.0456681779052385, 16, 0.00474990633723261, + 0, "m", "Total indirect", 0.820020935465126, 0.020877052788094, + 0.22751804986293, -0.0368235212239229, 0.0435625822046312, 16, + 0.00336953049035413, 1, "m", "Total indirect", 0.869486364046365, + 0.0205070358594927, 0.16431094739586, -0.0293420832873263, 0.0321927214794322, + 50, 0.00142531909605299, 0, "m", "Total indirect", 0.92765424869642, + 0.0156979427306158, 0.0907965534409283, -0.0311447342020665, + 0.0312346207004155, 50, 4.49432491745002e-05, 1, "m", "Total indirect", + 0.997746585117755, 0.0159133931527626, 0.00282424048366441, + -0.0408853002079966, 0.0359420853163559, 84, -0.00247160744582038, + 0, "m", "Total indirect", 0.899646690241001, 0.0195991829774315, + -0.126107677481579, -0.0438693784065936, 0.0361654118211958, + 84, -0.00385198329269887, 1, "m", "Total indirect", 0.850357996278172, + 0.02041741349818, -0.188661668288309)) @@ -4721,7 +4724,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 18 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -4732,23 +4735,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contcor1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -4757,138 +4760,139 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1396.91998338157, 1464.65440821726, 23, "Model 1", 100, -672.459991690783, + list(1396.91998338159, 1464.65440821728, 23, "Model 1", 100, -672.459991690794, 17)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848655427757, 0.0642084576613961, -0.240320098883181, "contcor1", - "", 0.121932101500599, "contGamma", 0.155374567566883, - -1.54671451477882, -0.403935193340383, 0.194627075581708, -0.104654058879337, - "contcor2", "", 0.493110733178716, "contGamma", 0.152697262205702, - -0.685369582712985, 0.424979122490745, 0.896762888868099, 0.660871005679422, - "contcor2", "", 3.99654387361892e-08, "contcor1", 0.120355213182162, - 5.49100440443051, 1.68041125011154, 2.96919238145497, 2.32480181578326, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776738120999, 7.07106539553192, 0.732634590357398, 1.29452394348449, - 1.01357926692095, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341754634067, 7.07106780929594, 0.721541693500045, - 1.27492320066134, 0.998232447080694, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171345883471, 7.07106984660103, - 0.00468047849147274, 0.00827013923214876, 0.00647530886181075, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000915746607843513, 7.07107054107405, 0.710358046970133, 1.25516254912145, - 0.982760298045792, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.13898329419537, 7.07106781239707, 0.323891813736281, - 0.572298572282514, 0.448095193009398, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702355006606, - 7.07106718902326, 0.318532894692133, 0.562829687452924, 0.440681291072528, - "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", - 0.0623217555750446, 7.07106670866939)) + list(-0.403934540802683, 0.194628272558619, -0.104653134122032, "contcor2", + "", 0.493114947102751, "contGamma", 0.152697401095808, + -0.685362903173241, -0.544849316319249, 0.0642081778027136, + -0.240320569258268, "contcor1", "", 0.121931604610359, + "contGamma", 0.155374664770917, -1.54671657449813, 1.68041146288667, + 2.96919312351582, 2.32480229320125, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776873145347, 7.07106394364147, + 0.710358047519784, 1.25516255061065, 0.982760299065218, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.138983294435055, + 7.07106780753746, 0.00468047995617174, 0.00827014434093377, + 0.00647531214855276, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000915747537474373, 7.07106695193703, 0.424979284117908, + 0.896763614444132, 0.66087144928102, "contcor2", "", + 3.99660899930154e-08, "contcor1", 0.120355357049313, 5.49100152650657, + 0.732634743983673, 1.29452447885269, 1.01357961141818, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341852019, + 7.07106540861374, 0.721542045796384, 1.27492442975644, 0.998233237776412, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171569560733, + 7.07106424390191, 0.323891733034872, 0.572298290616788, 0.44809501182583, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633701842333112, 7.07107005048415, 0.318532914189429, 0.562829755367733, + 0.440681334778581, "debCollin1:contcor2", "", 1.53743684450092e-12, + "debCollin1:contcor2", 0.0623217679266778, 7.07106600854211 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.149831863441207, 0.120439043164672, "", "", -0.0146964101382673, - "contGamma", "contNormal", "", "", "", 0.831208161423084, - 0.0689479267827729, -0.213152313985738, -0.0325359194023129, - 0.0381599592664842, 16, 16, 0.00281201993208567, "contGamma", - "debCollin1", "contNormal", "", "", 0.876095922296221, - 0.0180349943229664, 0.155920200568333, -0.0395946801992444, - 0.0407818806366346, 50, 16, 0.000593600218695108, "contGamma", - "debCollin1", "contNormal", "", "", 0.976904779021978, - 0.0205046014798943, 0.0289496101290806, -0.0757043123735975, - 0.0720492664843998, 84, 16, -0.00182752294459886, "contGamma", - "debCollin1", "contNormal", "", "", 0.961330117604415, - 0.0376929321210641, -0.0484844993944521, -0.0173893277292483, - 0.0868914123727865, 16, 50, 0.0347510423217691, "contGamma", - "debCollin1", "contNormal", "", "", 0.191451691679357, - 0.0266027184490603, 1.30629666243739, -0.0175030973019086, 0.0443748919451536, - 50, 50, 0.0134358973216225, "contGamma", "debCollin1", "contNormal", - "", "", 0.394683348298215, 0.0157854914006451, - 0.851154834563681, -0.057341771137327, 0.0376880224153352, 84, - 50, -0.0098268743609959, "contGamma", "debCollin1", "contNormal", - "", "", 0.685217838880612, 0.02424273973967, - -0.405353292017384, -0.0319588347375502, 0.176335792586511, - 16, 84, 0.0721884789244804, "contGamma", "debCollin1", "contNormal", - "", "", 0.174296882849354, 0.0531373609329209, - 1.35852585934046, -0.0223677767832182, 0.0793458581974273, 50, - 84, 0.0284890407071046, "contGamma", "debCollin1", "contNormal", - "", "", 0.272232754641171, 0.0259478326599238, - 1.09793527191601, -0.0596399566721842, 0.0212332725684941, 84, - 84, -0.019203342051845, "contGamma", "debCollin1", "contNormal", - "", "", 0.351963965575443, 0.0206313049317732, - -0.930786594224145)) + list(-0.149831840552595, 0.120439065985505, "", "", -0.0146963872835448, + "contGamma", "contNormal", "", "", "", 0.83120841992212, + 0.0689479267654822, -0.213151982561169, -0.0325359504256635, + 0.0381599916717358, 16, 16, 0.00281202062303619, "contGamma", + "debCollin1", "contNormal", "", "", 0.876096002366441, + 0.0180350105040296, 0.155920098987904, -0.0395947163366383, + 0.0407819165984741, 50, 16, 0.000593600130917898, "contGamma", + "debCollin1", "contNormal", "", "", 0.976904803147199, + 0.0205046198728939, 0.0289495798799279, -0.075704378714205, + 0.0720493309496882, 84, 16, -0.0018275238822584, "contGamma", + "debCollin1", "contNormal", "", "", 0.961330131986865, + 0.0376929654905283, -0.0484844813475244, -0.0173893229983169, + 0.0868914670231571, 16, 50, 0.0347510720124201, "contGamma", + "debCollin1", "contNormal", "", "", 0.191451524856229, + 0.0266027311838451, 1.30629715318566, -0.0175031082839526, 0.0443749274547604, + 50, 50, 0.0134359095854039, "contGamma", "debCollin1", "contNormal", + "", "", 0.39468327198742, 0.015785503260978, + 0.851154971955671, -0.0573418175945549, 0.0376880553616995, + 84, 50, -0.00982688111642771, "contGamma", "debCollin1", "contNormal", + "", "", 0.685217883008101, 0.0242427599960606, + -0.40535323197625, -0.0319588186196441, 0.176335903834107, 16, + 84, 0.0721885426072316, "contGamma", "debCollin1", "contNormal", + "", "", 0.174296699572715, 0.0531373852011449, + 1.35852643734672, -0.0223677818648081, 0.0793459167624252, 50, + 84, 0.0284890674488086, "contGamma", "debCollin1", "contNormal", + "", "", 0.272232604606439, 0.0259478488965966, + 1.09793561548546, -0.059639996901464, 0.0212332856482661, 84, + 84, -0.0192033556265989, "contGamma", "debCollin1", "contNormal", + "", "", 0.351963942591302, 0.020631318531271, + -0.930786638648046)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.149831863441207, 0.120439043164672, -0.0146964101382673, "contGamma", - "", 0.831208161423084, "contNormal", 0.0689479267827729, - -0.213152313985738, -4.39513841173346, 1.52254945881436, -1.43629447645955, - "debCollin1", "", 0.341394273135463, "contNormal", - 1.50964199271665, -0.951413966615282, -3.43497677333247, 0.849245293516781, - -1.29286573990784, "contcor1", "", 0.236836357586988, - "contNormal", 1.09293387548002, -1.18293134554001, -0.924280655888311, - 5.58380676294138, 2.32976305352654, "debCollin1:contcor1", "", - 0.160540942741672, "contNormal", 1.66025688996447, 1.40325456115191, - -1.18791413310551, 2.91802649220043, 0.865056179547458, "contcor2", - "", 0.408879950221596, "contNormal", 1.04745308018236, - 0.825866280709064, -4.58909576519455, 1.62263448180904, -1.48323064169276, - "debCollin1:contcor2", "", 0.349275030641351, "contNormal", - 1.58465418140357, -0.935996420606432, -0.133637726521832, 4.6368979766906, - 2.25163012508438, "debCollin1:contcor1:contcor2", "", - 0.0642912906280773, "contNormal", 1.21699575625925, 1.85015445904705, - -2.95950669311722, 0.224915134734884, -1.36729577919117, "contcor1:contcor2", - "", 0.0923556987360534, "contNormal", 0.812367434547374, - -1.68310018477413, -0.0194720850066961, 0.00121576872736687, - -0.00912815813966459, "contGamma", "", 0.0837016746274308, - "debCollin1", 0.00527761068500393, -1.72960051138327)) + list(-0.149831840552595, 0.120439065985505, -0.0146963872835448, "contGamma", + "", 0.83120841992212, "contNormal", 0.0689479267654822, + -0.213151982561169, -4.39513840862172, 1.52254945748474, -1.43629447556849, + "debCollin1", "", 0.341394273072636, "contNormal", + 1.50964199158363, -0.951413966739095, -3.43497672834481, 0.84924504244325, + -1.29286584295078, "contcor1", "", 0.236836287818278, + "contNormal", 1.09293379995282, -1.18293152156754, -0.924280652955925, + 5.5838063159996, 2.32976283152184, "debCollin1:contcor1", "", + 0.160540953686581, "contNormal", 1.66025677519855, 1.40325452443537, + -1.18791406578391, 2.91802632263208, 0.865056128424088, "contcor2", + "", 0.408879950879366, "contNormal", 1.04745301975014, + 0.825866279549644, -4.58909566284955, 1.62263423118908, -1.48323071583023, + "debCollin1:contcor2", "", 0.349274979169477, "contNormal", + 1.58465409135983, -0.935996520576575, -0.133637794305179, 4.63689786647728, + 2.25163003608605, "debCollin1:contcor1:contcor2", "", + 0.0642912987941446, "contNormal", 1.21699574543508, 1.85015440237311, + -2.9595067296297, 0.224915064923098, -1.3672958323533, "contcor1:contcor2", + "", 0.0923556826632148, "contNormal", 0.812367426052496, + -1.6831002678152, -0.0194720959504127, 0.00121576303399031, + -0.00912816645821119, "contGamma", "", 0.0837014713014606, + "debCollin1", 0.00527761202440101, -1.72960164862577)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.146428955391206, 0.122660174978842, 16, 16, -0.0118843902061816, - "Total", 0.862553472822664, 0.0686464477134756, -0.173124620457945, - -0.150644462098854, 0.122438842259709, 50, 16, -0.0141028099195722, - "Total", 0.839575580032013, 0.0696653883725949, -0.202436392719802, - -0.167116517430526, 0.134068651264794, 84, 16, -0.0165239330828661, - "Total", 0.829721199471843, 0.076834363047237, -0.215059153580897, - -0.123881333378165, 0.163990597745169, 16, 50, 0.0200546321835018, - "Total", 0.784789993617366, 0.0734380665650061, 0.273082246327248, - -0.137411818443659, 0.134890792810369, 50, 50, -0.0012605128166448, - "Total", 0.98552262661424, 0.069466228308764, -0.0181456924801223, - -0.163736612174863, 0.114690043176337, 84, 50, -0.0245232844992632, - "Total", 0.729899126391222, 0.0710285131633524, -0.345259719049225, - -0.116258058545612, 0.231242196118038, 16, 84, 0.0574920687862132, - "Total", 0.516641416936094, 0.0886496531070693, 0.648531232454744, - -0.130473564912409, 0.158058826050084, 50, 84, 0.0137926305688373, - "Total", 0.851360205688193, 0.0736065543138548, 0.18738318479121, - -0.170440335919156, 0.102640831538931, 84, 84, -0.0338997521901123, - "Total", 0.626533282431522, 0.0696648432349054, -0.486612050152822, - -0.0325359194023129, 0.0381599592664842, 16, 16, 0.00281201993208567, - "Total indirect", 0.876095922296221, 0.0180349943229664, 0.155920200568333, - -0.0395946801992444, 0.0407818806366346, 50, 16, 0.000593600218695108, - "Total indirect", 0.976904779021978, 0.0205046014798943, 0.0289496101290806, - -0.0757043123735975, 0.0720492664843998, 84, 16, -0.00182752294459886, - "Total indirect", 0.961330117604415, 0.0376929321210641, -0.0484844993944521, - -0.0173893277292483, 0.0868914123727865, 16, 50, 0.0347510423217691, - "Total indirect", 0.191451691679357, 0.0266027184490603, 1.30629666243739, - -0.0175030973019086, 0.0443748919451536, 50, 50, 0.0134358973216225, - "Total indirect", 0.394683348298215, 0.0157854914006451, 0.851154834563681, - -0.057341771137327, 0.0376880224153352, 84, 50, -0.0098268743609959, - "Total indirect", 0.685217838880612, 0.02424273973967, -0.405353292017384, - -0.0319588347375502, 0.176335792586511, 16, 84, 0.0721884789244804, - "Total indirect", 0.174296882849354, 0.0531373609329209, 1.35852585934046, - -0.0223677767832182, 0.0793458581974273, 50, 84, 0.0284890407071046, - "Total indirect", 0.272232754641171, 0.0259478326599238, 1.09793527191601, - -0.0596399566721842, 0.0212332725684941, 84, 84, -0.019203342051845, - "Total indirect", 0.351963965575443, 0.0206313049317732, -0.930786594224145 + list(-0.146428935419786, 0.122660202098769, 16, 16, -0.0118843666605086, + "Total", 0.862553746040685, 0.0686464495371079, -0.173124272859653, + -0.150644445866645, 0.122438871561392, 50, 16, -0.0141027871526269, + "Total", 0.839575843069003, 0.0696653917067057, -0.202436056227176, + -0.167116524509077, 0.134068702177471, 84, 16, -0.0165239111658032, + "Total", 0.829721454149881, 0.0768343778411897, -0.215058826921938, + -0.123881288657729, 0.16399065811548, 16, 50, 0.0200546847288753, + "Total", 0.78478945503285, 0.0734380705573945, 0.27308294698731, + -0.137411786130456, 0.134890830734174, 50, 50, -0.00126047769814091, + "Total", 0.985523030214936, 0.069466229740066, -0.0181451865583819, + -0.163736605932509, 0.114690069132564, 84, 50, -0.0245232683999725, + "Total", 0.729899315151847, 0.0710285181924941, -0.345259467943737, + -0.116258002648156, 0.231242313295529, 16, 84, 0.0574921553236868, + "Total", 0.516640859724632, 0.0886496687400184, 0.648532094263016, + -0.130473525978016, 0.158058886308543, 50, 84, 0.0137926801652637, + "Total", 0.851359688283538, 0.0736065597537673, 0.187383844747041, + -0.17044033034654, 0.102640844526253, 84, 84, -0.0338997429101437, + "Total", 0.626533386214394, 0.0696648451264468, -0.486611903731548, + -0.0325359504256635, 0.0381599916717358, 16, 16, 0.00281202062303619, + "Total indirect", 0.876096002366441, 0.0180350105040296, 0.155920098987904, + -0.0395947163366383, 0.0407819165984741, 50, 16, 0.000593600130917898, + "Total indirect", 0.976904803147199, 0.0205046198728939, 0.0289495798799279, + -0.075704378714205, 0.0720493309496882, 84, 16, -0.0018275238822584, + "Total indirect", 0.961330131986865, 0.0376929654905283, -0.0484844813475244, + -0.0173893229983169, 0.0868914670231571, 16, 50, 0.0347510720124201, + "Total indirect", 0.191451524856229, 0.0266027311838451, 1.30629715318566, + -0.0175031082839526, 0.0443749274547604, 50, 50, 0.0134359095854039, + "Total indirect", 0.39468327198742, 0.015785503260978, 0.851154971955671, + -0.0573418175945549, 0.0376880553616995, 84, 50, -0.00982688111642771, + "Total indirect", 0.685217883008101, 0.0242427599960606, -0.40535323197625, + -0.0319588186196441, 0.176335903834107, 16, 84, 0.0721885426072316, + "Total indirect", 0.174296699572715, 0.0531373852011449, 1.35852643734672, + -0.0223677818648081, 0.0793459167624252, 50, 84, 0.0284890674488086, + "Total indirect", 0.272232604606439, 0.0259478488965966, 1.09793561548546, + -0.059639996901464, 0.0212332856482661, 84, 84, -0.0192033556265989, + "Total indirect", 0.351963942591302, 0.020631318531271, -0.930786638648046 )) @@ -4905,7 +4909,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 18 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -4916,23 +4920,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facExperim", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facExperim", 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) @@ -4941,120 +4945,121 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(955.366585863485, 1023.10101069918, 23, "Model 1", 100, -451.683292931742, + list(955.366585857674, 1023.10101069336, 23, "Model 1", 100, -451.683292928837, 17)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962253148254882, 0.089621892867691, 0.0399996806925711, "facExperimexperimental", - "", 0.11413068993625, "facGenderm", 0.0253179204141166, - 1.57989598032974, -0.163252273164669, 0.0341988382149617, -0.0645267174748534, - "contcor2", "", 0.200184396598623, "facGenderm", 0.050371107055308, - -1.28102639086337, -0.170527800562394, 0.0272980175680692, -0.0716148914971626, - "contcor2", "", 0.155883718941212, "facExperimexperimental", - 0.0504666972686459, -1.41905247169118, 0.180704812987431, 0.319295205888345, - 0.250000009437888, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553417292605, 7.07106754482266, 0.180704591112584, - 0.319294432002136, 0.24999951155736, "facExperimexperimental", - "", 1.53721479989599e-12, "facExperimexperimental", - 0.035355200907448, 7.07108162705121, 0.721544336812233, 1.27493242069016, - 0.998238378751199, "contcor2", "", 1.53788093371077e-12, - "contcor2", 0.141173023648135, 7.07102782780403, 0.00480662769103481, - 0.00849303910553143, 0.00664983339828312, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000940428355718412, 7.0710685804483, - 0.752060493743068, 1.32884841739014, 1.04045445556661, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.147142480218184, - 7.07106781144244, 0.0796443913020487, 0.140726629516203, 0.110185510409126, - "debCollin1:facExperimexperimental", "", 1.53699275529107e-12, - "debCollin1:facExperimexperimental", 0.0155824899579693, 7.07111063163393, - 0.318533426961026, 0.56283154390333, 0.440682485432178, "debCollin1:contcor2", - "", 1.53765888910584e-12, "debCollin1:contcor2", 0.0623220933826584, - 7.07104754531243)) + list(-0.163250773331483, 0.0341991879627659, -0.0645257926843587, "contcor2", + "", 0.200188224384437, "facGenderm", 0.050370813660789, + -1.28101549279893, -0.00962232307995721, 0.0896223265717556, + 0.0400000017458992, "facExperimexperimental", "", 0.114128606944409, + "facGenderm", 0.0253179778900383, 1.57990507455328, 0.180704812268451, + 0.319295203378812, 0.250000007823631, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553412724785, 7.07106759052096, + 0.752060497737714, 1.32884843134243, 1.04045446454007, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.147142482758446, + 7.0710677503527, 0.00480662801867925, 0.00849304024833638, 0.00664983413350782, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000940428563671344, 7.07106779865075, -0.170527262077567, + 0.0272978541543239, -0.0716147039616214, "contcor2", "", + 0.155883334465219, "facExperimexperimental", 0.0504665182095972, + -1.41905379055856, 0.180704805442169, 0.319295179569532, 0.24999999250585, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553369400014, 7.07106802376413, + 0.721541918090642, 1.27492398428524, 0.998232951187941, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171488496627, + 7.07106627420587, 0.0796446896791447, 0.140727670230879, 0.110186179955012, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.015582679333281, 7.07106766419046, + 0.318532861373503, 0.56282957116442, 0.440681216268961, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217344088712, + 7.07106790991736)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0393124070952489, 0.866239581585079, "", 0.452775994340164, - "", "m", "facGender", "contNormal", "", "", "", 0.0318475581749429, - 0.210954686160696, 2.14631873119547, -0.0405388501179339, 0.050085864678084, - 16, 0.00477350728007508, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.836419316164305, 0.0231189745094436, - 0.206475736115597, -0.0447186669191563, 0.0457106778571771, - 16, 0.000496005469010433, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.982846143650779, 0.0230691343028822, - 0.0215008271441058, -0.0295132413255326, 0.0314629197034827, - 50, 0.000974839188975022, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.950030287432815, 0.0155554289543041, - 0.0626687436160535, -0.033648903438917, 0.0301542928283708, - 50, -0.00174730530527313, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.914510849214756, 0.0162766246651876, - -0.107350592719034, -0.0476763963164938, 0.0407208305639136, - 84, -0.00347778287629009, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.877435933844351, 0.0225507273546028, - -0.154220430303781, -0.0502585475059402, 0.0415049277831083, - 84, -0.00437680986141595, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.851686184666792, 0.0234094799733227, - -0.186967410912319)) + list(0.0393123793826361, 0.866239557464535, "", 0.452775968423586, + "", "m", "facGender", "contNormal", "", "", "", 0.0318475687131721, + 0.210954687077057, 2.14631859901836, -0.0405372071230431, 0.0500838399233141, + 16, 0.00477331640013549, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.836419238027667, 0.0231180388418268, + 0.206475836155239, -0.0447164189105295, 0.0457085167347158, + 16, 0.000496048912093169, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.982843805077971, 0.023068009503875, + 0.0215037587881105, -0.0295117874423371, 0.0314614622973269, + 50, 0.000974837427494912, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.950027994829945, 0.0155546862648021, + 0.0626716226158043, -0.0336472677686654, 0.0301528836965764, + 50, -0.00174719203604453, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.914512305824122, 0.0162758479156988, + -0.107348756580558, -0.0476741353152993, 0.040719009391484, + 84, -0.00347756296190764, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.877438007652768, 0.0225496859646445, + -0.154217800077575, -0.0502563995865229, 0.0415031700960695, + 84, -0.00437661474522669, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.85168648048746, 0.0234084836268371, + -0.186967033618916)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0393124070952489, 0.866239581585079, 0.452775994340164, "facGenderm", - "", 0.0318475581749429, "contNormal", 0.210954686160696, - 2.14631873119547, -3.58859403121418, 3.33887322023709, -0.124860405488548, - "debCollin1", "", 0.94367422061007, "contNormal", 1.76724350704764, - -0.0706526321871398, -3.50807115279506, 3.14569678928536, -0.181187181754851, - "facExperimexperimental", "", 0.914993160524451, "contNormal", - 1.69742097165165, -0.10674263178129, -4.66938098247916, 5.30192392048212, - 0.316271469001482, "debCollin1:facExperimexperimental", "", - 0.901051689292224, "contNormal", 2.54374697229481, 0.124332912214205, - -2.30073487245524, 2.00374601541704, -0.1484944285191, "contcor2", - "", 0.892431403521147, "contNormal", 1.09810203703371, - -0.1352282606817, -2.77294342594672, 3.68210868209984, 0.454582628076558, - "debCollin1:contcor2", "", 0.782507994584521, "contNormal", - 1.64672722533761, 0.276052172504381, -4.91510609566927, 4.54285013662243, - -0.186127979523422, "debCollin1:facExperimexperimental:contcor2", - "", 0.938510361570209, "contNormal", 2.41278827235981, - -0.0771422762849308, -3.21052591065211, 3.06452016443573, -0.0730028731081862, - "facExperimexperimental:contcor2", "", 0.963626033006228, - "contNormal", 1.60080647516603, -0.0456038092303536, -0.0407267963903413, - 0.0232044931813612, -0.00876115160449008, "facGenderm", "", - 0.591138173913386, "debCollin1", 0.0163093021290147, -0.53718739987677 + list(0.0393123793826361, 0.866239557464535, 0.452775968423586, "facGenderm", + "", 0.0318475687131721, "contNormal", 0.210954687077057, + 2.14631859901836, -3.58859928622067, 3.33886797924072, -0.124865653489978, + "debCollin1", "", 0.943671857234656, "contNormal", + 1.76724351062172, -0.0706556016414794, -3.50807257338228, 3.14569539000572, + -0.181188591688281, "facExperimexperimental", "", 0.914992501811576, + "contNormal", 1.69742097708735, -0.1067434620722, -4.66937903864069, + 5.30192589560122, 0.316273428480263, "debCollin1:facExperimexperimental", + "", 0.901051079713319, "contNormal", 2.54374698027471, + 0.124333682136148, -2.30073461124022, 2.00374620920801, -0.148494201016104, + "contcor2", "", 0.892431565646357, "contNormal", 1.09810201983338, + -0.135228055621494, -2.77294370499849, 3.68210830033744, 0.454582297669472, + "debCollin1:contcor2", "", 0.782508145317074, "contNormal", + 1.64672719913543, 0.276051976252131, -4.91510088932915, 4.54285521957889, + -0.186122834875134, "debCollin1:facExperimexperimental:contcor2", + "", 0.938512056998118, "contNormal", 2.41278824088381, + -0.077140145049346, -3.21052924988621, 3.06451674474678, -0.0730062525697163, + "facExperimexperimental:contcor2", "", 0.963624349877291, + "contNormal", 1.60080645464145, -0.0456059209144483, -0.040726368346826, + 0.0232049247586506, -0.00876072179408774, "facGenderm", "", + 0.591156396560274, "debCollin1", 0.0163093030305043, -0.53716101648869 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0414774275871795, 0.873621575653298, 16, 0.457549501620239, - 0, "m", "Total", 0.0311345311368554, 0.212285571222218, 2.1553490375532, - 0.0374784622651567, 0.869065537353192, 16, 0.453271999809174, - 1, "m", "Total", 0.0326281271794273, 0.212143458157264, 2.13662963612651, - 0.0385346475128719, 0.868967019545406, 50, 0.453750833529139, - 0, "m", "Total", 0.0322046813525745, 0.21184888563843, 2.1418608465261, - 0.0379306736707378, 0.864126704399043, 50, 0.451028689034891, - 1, "m", "Total", 0.0323605904431219, 0.210768166467658, 2.13992794354977, - 0.0322710736398888, 0.866325349287859, 84, 0.449298211463874, - 0, "m", "Total", 0.034717930195997, 0.212772857620569, 2.11163311189387, - 0.0356985040196386, 0.861099864937857, 84, 0.448399184478748, - 1, "m", "Total", 0.0332128841978341, 0.210565440852199, 2.12950037130495, - -0.0405388501179339, 0.050085864678084, 16, 0.00477350728007508, - 0, "m", "Total indirect", 0.836419316164305, 0.0231189745094436, - 0.206475736115597, -0.0447186669191563, 0.0457106778571771, - 16, 0.000496005469010433, 1, "m", "Total indirect", 0.982846143650779, - 0.0230691343028822, 0.0215008271441058, -0.0295132413255326, - 0.0314629197034827, 50, 0.000974839188975022, 0, "m", "Total indirect", - 0.950030287432815, 0.0155554289543041, 0.0626687436160535, -0.033648903438917, - 0.0301542928283708, 50, -0.00174730530527313, 1, "m", "Total indirect", - 0.914510849214756, 0.0162766246651876, -0.107350592719034, -0.0476763963164938, - 0.0407208305639136, 84, -0.00347778287629009, 0, "m", "Total indirect", - 0.877435933844351, 0.0225507273546028, -0.154220430303781, -0.0502585475059402, - 0.0415049277831083, 84, -0.00437680986141595, 1, "m", "Total indirect", - 0.851686184666792, 0.0234094799733227, -0.186967410912319)) + list(0.0414774152137801, 0.873621154433662, 16, 0.457549284823721, + 0, "m", "Total", 0.031134528188191, 0.212285466922792, 2.15534907526256, + 0.0374787111339805, 0.869065323537377, 16, 0.453272017335679, + 1, "m", "Total", 0.0326280236871748, 0.2121433401233, 2.13663090753748, + 0.0385347557973412, 0.86896685590482, 50, 0.453750805851081, + 0, "m", "Total", 0.0322046354146019, 0.211848816268519, 2.14186141722855, + 0.0379307984516581, 0.864126754323424, 50, 0.451028776387541, + 1, "m", "Total", 0.0323605412729351, 0.210768147371251, 2.1399285518845, + 0.0322715413454991, 0.866325269577857, 84, 0.449298405461678, + 0, "m", "Total", 0.0347177329662411, 0.212772717971164, 2.11163540958559, + 0.0356987259794284, 0.861099981377289, 84, 0.448399353678359, + 1, "m", "Total", 0.0332127952874148, 0.210565413933246, 2.12950144709193, + -0.0405372071230431, 0.0500838399233141, 16, 0.00477331640013549, + 0, "m", "Total indirect", 0.836419238027667, 0.0231180388418268, + 0.206475836155239, -0.0447164189105295, 0.0457085167347158, + 16, 0.000496048912093169, 1, "m", "Total indirect", 0.982843805077971, + 0.023068009503875, 0.0215037587881105, -0.0295117874423371, + 0.0314614622973269, 50, 0.000974837427494912, 0, "m", "Total indirect", + 0.950027994829945, 0.0155546862648021, 0.0626716226158043, -0.0336472677686654, + 0.0301528836965764, 50, -0.00174719203604453, 1, "m", "Total indirect", + 0.914512305824122, 0.0162758479156988, -0.107348756580558, -0.0476741353152993, + 0.040719009391484, 84, -0.00347756296190764, 0, "m", "Total indirect", + 0.877438007652768, 0.0225496859646445, -0.154217800077575, -0.0502563995865229, + 0.0415031700960695, 84, -0.00437661474522669, 1, "m", "Total indirect", + 0.85168648048746, 0.0234084836268371, -0.186967033618916)) @@ -5070,7 +5075,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 21 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -5081,23 +5086,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -5106,132 +5111,132 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1196.38264813361, 1253.69639222535, 11, "Model 1", 100, -576.191324066806, + list(1196.38264813823, 1253.69639222997, 11, "Model 1", 100, -576.191324069116, 21)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848082473303, 0.0642096778375548, -0.240319202317874, "contcor1", - "", 0.121933890073668, "contGamma", 0.155374732677495, - -1.54670710080444, -0.40393609513252, 0.194627685979944, -0.104654204576288, - "contcor2", "", 0.493111223578708, "contGamma", 0.152697647975641, - -0.685368805372711, 0.424979934428612, 0.896764987326017, 0.660872460877315, - "contcor1", "", 3.99660911032385e-08, "contcor2", 0.120355541382083, - 5.49100152172718, 1.6804121793832, 2.96919562266868, 2.32480390102594, - "contGamma", "", 1.53765888910584e-12, "contGamma", - 0.328777327912971, 7.07105905320005, 0.732634759704522, 1.29452453389181, - 1.01357964679816, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341862049354, 7.071065160638, 0.721542417774503, - 1.27492572714816, 0.998234072461331, "contcor2", "", - 1.53765888910584e-12, "contcor2", 0.141171805639969, 7.07105833162699, - 0.0046546989118094, 0.00822461275711741, 0.00643965583446341, - "debCollin1", "", 1.53788093371077e-12, "debCollin1", - 0.000910709041968893, 7.07103535564037, 0.79715517737422, 1.40852817649916, - 1.10284167693669, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.155965365676965, 7.07106781143252, 0.3185330056736, - 0.562830074469893, 0.440681540071747, "debCollin1:contcor2", - "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623218259935584, - 7.07106271432574)) + list(-0.403936021740963, 0.19462776907431, -0.104654126333327, "contcor2", + "", 0.493111553847949, "contGamma", 0.152697650450893, + -0.685368281858291, -0.544847986234292, 0.0642097690657529, + -0.24031910858427, "contcor1", "", 0.12193403254076, + "contGamma", 0.155374731399203, -1.546706510255, 1.68041213877921, + 2.96919548104407, 2.32480380991164, "contGamma", "", + 1.53765888910584e-12, "contGamma", 0.328777302141932, 7.07105933033063, + 0.797155177375442, 1.40852817649941, 1.10284167693742, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.155965365676716, + 7.07106781144853, 0.00465469903949094, 0.00822461320246849, + 0.00643965612097972, "debCollin1", "", 1.53788093371077e-12, + "debCollin1", 0.000910709123008531, 7.07103504103076, 0.424979957385054, + 0.896765070078541, 0.660872513731797, "contcor1", "", + 3.99661490568803e-08, "contcor2", 0.120355556636466, 5.49100126492676, + 0.732634782234572, 1.29452461247133, 1.01357969735295, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341876347951, + 7.07106480797396, 0.721542445594215, 1.27492582417172, 0.998234134882968, + "contcor2", "", 1.53765888910584e-12, "contcor2", 0.141171823294337, + 7.07105788951733, 0.318533011067269, 0.562830093284256, 0.440681552175762, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623218294172678, 7.07106252008803)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.178613622020603, 0.0960685363549185, "", "", -0.0412725428328423, - "contGamma", "contNormal", "", "", "", 0.555867125751785, - 0.0700732667901501, -0.588991276180145, -0.0180243258240925, - 0.0250910933642123, 16, 16, 0.00353338377005991, "contGamma", - "debCollin1", "contNormal", "", "", 0.748024784986812, - 0.0109990335354103, 0.321244931082767, -0.0212620770293893, - 0.0269988168258479, 50, 16, 0.00286836989822931, "contGamma", - "debCollin1", "contNormal", "", "", 0.8157772524997, - 0.0123116787440772, 0.232979592617229, -0.0498459331913346, - 0.0472169487096567, 84, 16, -0.00131449224083895, "contGamma", - "debCollin1", "contNormal", "", "", 0.957663100841287, - 0.0247613942568871, -0.0530863580298325, -0.0180243258240925, - 0.0250910933642123, 16, 50, 0.00353338377005991, "contGamma", - "debCollin1", "contNormal", "", "", 0.748024784986812, - 0.0109990335354103, 0.321244931082767, -0.0212620770293893, - 0.0269988168258479, 50, 50, 0.00286836989822931, "contGamma", - "debCollin1", "contNormal", "", "", 0.8157772524997, - 0.0123116787440772, 0.232979592617229, -0.0498459331913346, - 0.0472169487096567, 84, 50, -0.00131449224083895, "contGamma", - "debCollin1", "contNormal", "", "", 0.957663100841287, - 0.0247613942568871, -0.0530863580298325, -0.0180243258240925, - 0.0250910933642123, 16, 84, 0.00353338377005991, "contGamma", - "debCollin1", "contNormal", "", "", 0.748024784986812, - 0.0109990335354103, 0.321244931082767, -0.0212620770293893, - 0.0269988168258479, 50, 84, 0.00286836989822931, "contGamma", - "debCollin1", "contNormal", "", "", 0.8157772524997, - 0.0123116787440772, 0.232979592617229, -0.0498459331913346, - 0.0472169487096567, 84, 84, -0.00131449224083895, "contGamma", - "debCollin1", "contNormal", "", "", 0.957663100841287, - 0.0247613942568871, -0.0530863580298325)) + list(-0.178612583267193, 0.09606957511842, "", "", -0.0412715040743864, + "contGamma", "contNormal", "", "", "", 0.555877070048917, + 0.0700732667927244, -0.588976452267693, -0.0180243232452597, + 0.0250910871661221, 16, 16, 0.00353338196043118, "contGamma", + "debCollin1", "contNormal", "", "", 0.748024860104148, + 0.0109990312963582, 0.321244831951801, -0.021262077987932, 0.0269988132585185, + 50, 16, 0.00286836763529322, "contGamma", "debCollin1", "contNormal", + "", "", 0.815777385448012, 0.0123116780785581, + 0.232979421407122, -0.0498459373781655, 0.0472169463329251, + 84, 16, -0.00131449552262019, "contGamma", "debCollin1", "contNormal", + "", "", 0.957662996030389, 0.0247613947186556, + -0.0530864895760426, -0.0180243232452597, 0.0250910871661221, + 16, 50, 0.00353338196043118, "contGamma", "debCollin1", "contNormal", + "", "", 0.748024860104148, 0.0109990312963582, + 0.321244831951801, -0.021262077987932, 0.0269988132585185, 50, + 50, 0.00286836763529322, "contGamma", "debCollin1", "contNormal", + "", "", 0.815777385448012, 0.0123116780785581, + 0.232979421407122, -0.0498459373781655, 0.0472169463329251, + 84, 50, -0.00131449552262019, "contGamma", "debCollin1", "contNormal", + "", "", 0.957662996030389, 0.0247613947186556, + -0.0530864895760426, -0.0180243232452597, 0.0250910871661221, + 16, 84, 0.00353338196043118, "contGamma", "debCollin1", "contNormal", + "", "", 0.748024860104148, 0.0109990312963582, + 0.321244831951801, -0.021262077987932, 0.0269988132585185, 50, + 84, 0.00286836763529322, "contGamma", "debCollin1", "contNormal", + "", "", 0.815777385448012, 0.0123116780785581, + 0.232979421407122, -0.0498459373781655, 0.0472169463329251, + 84, 84, -0.00131449552262019, "contGamma", "debCollin1", "contNormal", + "", "", 0.957662996030389, 0.0247613947186556, + -0.0530864895760426)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.178613622020603, 0.0960685363549185, -0.0412725428328423, "contGamma", - "", 0.555867125751785, "contNormal", 0.0700732667901501, - -0.588991276180145, -2.8950867681457, 2.25712132364842, -0.318982722248641, - "debCollin1", "", 0.808245567856198, "contNormal", - 1.31436295065472, -0.242689983074877, -1.81452226972177, 1.39871382847291, - -0.207904220624431, "contcor2", "", 0.799782259782077, - "contNormal", 0.819718148787497, -0.25362891004909, -2.0586762195182, - 2.78324104159891, 0.362282411040353, "debCollin1:contcor2", - "", 0.769294965190481, "contNormal", 1.23520567196886, - 0.293297237263243, -0.0197475403783326, 0.00116002613868587, - -0.00929375711982337, "contGamma", "", 0.0814258096364042, - "debCollin1", 0.00533366089426508, -1.7424724413613, -0.0185477478955832, - 0.0350787348916913, 0.00826549349805405, "contcor1", "", - 0.545722851109469, "debCollin1", 0.0136804765828029, 0.604181692649817, - -0.0145563170998793, 0.00654289618351884, -0.00400671045818022, - "contGamma:contcor1", "", 0.456641340591314, "debCollin1", - 0.00538255127385657, -0.744388720947461)) + list(-0.178612583267193, 0.09606957511842, -0.0412715040743864, "contGamma", + "", 0.555877070048917, "contNormal", 0.0700732667927244, + -0.588976452267693, -2.89508653635535, 2.25712155204698, -0.318982492154184, + "debCollin1", "", 0.808245703357902, "contNormal", + 1.31436294978946, -0.242689808173062, -1.81452225039961, 1.3987138341727, + -0.207904208113458, "contcor2", "", 0.799782270743595, + "contNormal", 0.819718145312338, -0.253628895861808, -2.05867620034008, + 2.78324104028414, 0.36228241997203, "debCollin1:contcor2", "", + 0.769294958715176, "contNormal", 1.23520566674098, 0.293297245735515, + -0.0197475402237627, 0.00116002675831269, -0.00929375673272501, + "contGamma", "", 0.0814258291019969, "debCollin1", + 0.00533366101290423, -1.74247233002618, -0.0185477471109094, + 0.0350787368686701, 0.00826549487888038, "contcor1", "", + 0.545722792941137, "debCollin1", 0.0136804768869679, 0.604181780150817, + -0.0145563178979534, 0.00654289585465355, -0.00400671102164993, + "contGamma:contcor1", "", 0.456641287289442, "debCollin1", + 0.0053825513935549, -0.744388809078088)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.174965512292477, 0.0994871941669126, 16, 16, -0.0377391590627824, - "Total", 0.589874846253741, 0.0700147320624864, -0.539017403210244, - -0.173942990591134, 0.097134644721908, 50, 16, -0.038404172934613, - "Total", 0.578658749394111, 0.0691537287040139, -0.555344934457365, - -0.181429429944216, 0.0962553597968531, 84, 16, -0.0425870350736813, - "Total", 0.547721139996501, 0.0708392582545932, -0.601178444311561, - -0.174965512292477, 0.0994871941669126, 16, 50, -0.0377391590627824, - "Total", 0.589874846253741, 0.0700147320624864, -0.539017403210244, - -0.173942990591134, 0.097134644721908, 50, 50, -0.038404172934613, - "Total", 0.578658749394111, 0.0691537287040139, -0.555344934457365, - -0.181429429944216, 0.0962553597968531, 84, 50, -0.0425870350736813, - "Total", 0.547721139996501, 0.0708392582545932, -0.601178444311561, - -0.174965512292477, 0.0994871941669126, 16, 84, -0.0377391590627824, - "Total", 0.589874846253741, 0.0700147320624864, -0.539017403210244, - -0.173942990591134, 0.097134644721908, 50, 84, -0.038404172934613, - "Total", 0.578658749394111, 0.0691537287040139, -0.555344934457365, - -0.181429429944216, 0.0962553597968531, 84, 84, -0.0425870350736813, - "Total", 0.547721139996501, 0.0708392582545932, -0.601178444311561, - -0.0180243258240925, 0.0250910933642123, 16, 16, 0.00353338377005991, - "Total indirect", 0.748024784986812, 0.0109990335354103, 0.321244931082767, - -0.0212620770293893, 0.0269988168258479, 50, 16, 0.00286836989822931, - "Total indirect", 0.8157772524997, 0.0123116787440772, 0.232979592617229, - -0.0498459331913346, 0.0472169487096567, 84, 16, -0.00131449224083895, - "Total indirect", 0.957663100841287, 0.0247613942568871, -0.0530863580298325, - -0.0180243258240925, 0.0250910933642123, 16, 50, 0.00353338377005991, - "Total indirect", 0.748024784986812, 0.0109990335354103, 0.321244931082767, - -0.0212620770293893, 0.0269988168258479, 50, 50, 0.00286836989822931, - "Total indirect", 0.8157772524997, 0.0123116787440772, 0.232979592617229, - -0.0498459331913346, 0.0472169487096567, 84, 50, -0.00131449224083895, - "Total indirect", 0.957663100841287, 0.0247613942568871, -0.0530863580298325, - -0.0180243258240925, 0.0250910933642123, 16, 84, 0.00353338377005991, - "Total indirect", 0.748024784986812, 0.0109990335354103, 0.321244931082767, - -0.0212620770293893, 0.0269988168258479, 50, 84, 0.00286836989822931, - "Total indirect", 0.8157772524997, 0.0123116787440772, 0.232979592617229, - -0.0498459331913346, 0.0472169487096567, 84, 84, -0.00131449224083895, - "Total indirect", 0.957663100841287, 0.0247613942568871, -0.0530863580298325 + list(-0.174964474980866, 0.0994882307529551, 16, 16, -0.0377381221139552, + "Total", 0.58988506453833, 0.0700147318773887, -0.539002594197504, + -0.173941954031146, 0.0971356811529599, 50, 16, -0.0384031364390932, + "Total", 0.578668999210771, 0.0691537286711215, -0.555329946440477, + -0.181428394647318, 0.0962563954533045, 84, 16, -0.0425859995970066, + "Total", 0.547730875334362, 0.0708392583463177, -0.601163826261604, + -0.174964474980866, 0.0994882307529551, 16, 50, -0.0377381221139552, + "Total", 0.58988506453833, 0.0700147318773887, -0.539002594197504, + -0.173941954031146, 0.0971356811529599, 50, 50, -0.0384031364390932, + "Total", 0.578668999210771, 0.0691537286711215, -0.555329946440477, + -0.181428394647318, 0.0962563954533045, 84, 50, -0.0425859995970066, + "Total", 0.547730875334362, 0.0708392583463177, -0.601163826261604, + -0.174964474980866, 0.0994882307529551, 16, 84, -0.0377381221139552, + "Total", 0.58988506453833, 0.0700147318773887, -0.539002594197504, + -0.173941954031146, 0.0971356811529599, 50, 84, -0.0384031364390932, + "Total", 0.578668999210771, 0.0691537286711215, -0.555329946440477, + -0.181428394647318, 0.0962563954533045, 84, 84, -0.0425859995970066, + "Total", 0.547730875334362, 0.0708392583463177, -0.601163826261604, + -0.0180243232452597, 0.0250910871661221, 16, 16, 0.00353338196043118, + "Total indirect", 0.748024860104148, 0.0109990312963582, 0.321244831951801, + -0.021262077987932, 0.0269988132585185, 50, 16, 0.00286836763529322, + "Total indirect", 0.815777385448012, 0.0123116780785581, 0.232979421407122, + -0.0498459373781655, 0.0472169463329251, 84, 16, -0.00131449552262019, + "Total indirect", 0.957662996030389, 0.0247613947186556, -0.0530864895760426, + -0.0180243232452597, 0.0250910871661221, 16, 50, 0.00353338196043118, + "Total indirect", 0.748024860104148, 0.0109990312963582, 0.321244831951801, + -0.021262077987932, 0.0269988132585185, 50, 50, 0.00286836763529322, + "Total indirect", 0.815777385448012, 0.0123116780785581, 0.232979421407122, + -0.0498459373781655, 0.0472169463329251, 84, 50, -0.00131449552262019, + "Total indirect", 0.957662996030389, 0.0247613947186556, -0.0530864895760426, + -0.0180243232452597, 0.0250910871661221, 16, 84, 0.00353338196043118, + "Total indirect", 0.748024860104148, 0.0109990312963582, 0.321244831951801, + -0.021262077987932, 0.0269988132585185, 50, 84, 0.00286836763529322, + "Total indirect", 0.815777385448012, 0.0123116780785581, 0.232979421407122, + -0.0498459373781655, 0.0472169463329251, 84, 84, -0.00131449552262019, + "Total indirect", 0.957662996030389, 0.0247613947186556, -0.0530864895760426 )) @@ -5248,7 +5253,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 21 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -5259,23 +5264,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -5284,113 +5289,113 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(883.72732148945, 941.041065581188, 11, "Model 1", 100, -419.863660744725, + list(883.727321489437, 941.041065581175, 11, "Model 1", 100, -419.863660744719, 21)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962242251500414, 0.0896235609576928, 0.0400005692213443, - "facExperimexperimental", "", 0.114128336575717, "facGenderm", - 0.0253183181567459, 1.57990625497715, -0.163252799063927, 0.0341994327060555, - -0.0645266831789355, "contcor2", "", 0.200187188811268, - "facGenderm", 0.0503713928744253, -1.28101844115764, -0.170528909977366, - 0.0272982695351306, -0.0716153202211178, "facExperimexperimental", - "", 0.155884089267858, "contcor2", 0.0504670445663625, - -1.41905120136262, 0.180705591973443, 0.319297922972021, 0.250001757472732, - "facGenderm", "", 1.53810297831569e-12, "facGenderm", - 0.0353558361510152, 7.07101810306229, 0.180705480440038, 0.319297533943677, - 0.250001507191858, "facExperimexperimental", "", 1.53788093371077e-12, - "facExperimexperimental", 0.035355765360189, 7.07102518203048, - 0.721543800551682, 1.2749305502424, 0.998237175397041, "contcor2", - "", 1.53788093371077e-12, "contcor2", 0.141172683287999, - 7.07103635170401, 0.0047453604950704, 0.00838479569243842, 0.00656507809375441, - "debCollin1", "", 1.53765888910584e-12, "debCollin1", - 0.000928444406651201, 7.07105137014497, 0.758655053880218, 1.34050063270902, - 1.04957784329462, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.148432722085286, 7.07106781139242, 0.31853221609528, - 0.562827320476561, 0.440679768285921, "debCollin1:contcor2", - "", 1.53721479989599e-12, "debCollin1:contcor2", 0.0623213248580713, - 7.07109114399464)) + list(-0.163252798200008, 0.0341994315222669, -0.0645266833388705, "contcor2", + "", 0.200187183029878, "facGenderm", 0.0503713923520414, + -1.28101845761775, -0.00962242227330481, 0.0896235602583873, + 0.0400005689925412, "facExperimexperimental", "", 0.114128335214537, + "facGenderm", 0.0253183179166892, 1.57990626092004, 0.180705591414366, + 0.319297921021741, 0.250001756218054, "facGenderm", "", + 1.53810297831569e-12, "facGenderm", 0.0353558357961099, 7.07101813855466, + 0.758655053885549, 1.34050063270369, 1.04957784329462, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.148432722082566, + 7.07106781152199, 0.00474536048640077, 0.00838479566219912, + 0.00656507807429994, "debCollin1", "", 1.53765888910584e-12, + "debCollin1", 0.000928444401148632, 7.07105139109882, -0.170528909261275, + 0.0272982683368493, -0.071615320462213, "facExperimexperimental", + "", 0.155884083871978, "contcor2", 0.0504670440779933, + -1.41905121987205, 0.18070547994847, 0.319297532229072, 0.250001506088771, + "facExperimexperimental", "", 1.53788093371077e-12, + "facExperimexperimental", 0.0353557650481841, 7.07102521323073, + 0.721543798061516, 1.27493054154596, 0.998237169803737, "contcor2", + "", 1.53788093371077e-12, "contcor2", 0.141172681704737, + 7.07103639138593, 0.318532216903131, 0.562827323293121, 0.440679770098126, + "debCollin1:contcor2", "", 1.53721479989599e-12, "debCollin1:contcor2", + 0.0623213253705065, 7.07109111493122)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0770109554094963, 0.887908037142156, "", 0.482459496275826, - "", "m", "facGender", "contNormal", "", "", "", 0.019688077827914, - 0.206865301640467, 2.33223983166758, -0.0289108673078605, 0.0244708899497198, - 16, -0.00221998867907034, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.870504138263035, 0.0136180454535514, - -0.163018157535331, -0.0433035776853076, 0.044969023175739, - 16, 0.000832722745215685, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.970501924440653, 0.0225189344185224, - 0.0369787810443974, -0.0236113638306395, 0.0277977666045881, - 50, 0.00209320138697429, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.873191559689371, 0.013114815078424, - 0.159605863632645, -0.0289108673078605, 0.0244708899497198, - 50, -0.00221998867907034, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.870504138263035, 0.0136180454535514, - -0.163018157535331, -0.0433035776853076, 0.044969023175739, - 84, 0.000832722745215685, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.970501924440653, 0.0225189344185224, - 0.0369787810443974, -0.0236113638306395, 0.0277977666045881, - 84, 0.00209320138697429, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.873191559689371, 0.013114815078424, - 0.159605863632645)) + list(0.0770109553913481, 0.887908037160304, "", 0.482459496275826, + "", "m", "facGender", "contNormal", "", "", "", 0.0196880778334028, + 0.206865301649726, 2.33223983156319, -0.0289108675743309, 0.02447089011083, + 16, -0.00221998873175044, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.870504136245325, 0.0136180455626301, + -0.163018160097982, -0.0433035774633199, 0.0449690229451681, + 16, 0.000832722740924118, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.970501924441444, 0.0225189343030717, + 0.0369787810434054, -0.0236113639888827, 0.0277977668621741, + 50, 0.00209320143664574, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.873191557722712, 0.0131148151845048, + 0.159605866129083, -0.0289108675743309, 0.02447089011083, 50, + -0.00221998873175044, 1, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.870504136245325, 0.0136180455626301, + -0.163018160097982, -0.0433035774633199, 0.0449690229451681, + 84, 0.000832722740924118, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.970501924441444, 0.0225189343030717, + 0.0369787810434054, -0.0236113639888827, 0.0277977668621741, + 84, 0.00209320143664574, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.873191557722712, 0.0131148151845048, + 0.159605866129083)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0770109554094963, 0.887908037142156, 0.482459496275826, "facGenderm", - "", 0.019688077827914, "contNormal", 0.206865301640467, - 2.33223983166758, -2.54166343141144, 2.42331379099267, -0.0591748202093849, - "debCollin1", "", 0.96273682396461, "contNormal", 1.26659909609748, - -0.0467194555812556, -1.77529207186658, 1.35813922712127, -0.208576422372657, - "contcor2", "", 0.794146902112344, "contNormal", 0.799359407546251, - -0.26092946477344, -1.94483535662097, 2.77564752826818, 0.415406085823604, - "debCollin1:contcor2", "", 0.730126965349762, "contNormal", - 1.20422694552648, 0.344956644066781, -0.0404918398529747, 0.0505150747535492, - 0.00501161745028725, "facGenderm", "", 0.829093221445962, - "debCollin1", 0.0232164762527207, 0.215864690047438, -0.0488495362965288, - 0.0421573783104492, -0.00334607899303979, "facExperimexperimental", - "", 0.885401615613316, "debCollin1", 0.0232164762528365, - -0.144125187500449, -0.0871738833248512, 0.0415293295815808, - -0.0228222768716352, "facGenderm:facExperimexperimental", "", - 0.486992254335581, "debCollin1", 0.0328330555871502, -0.695100607101798 - )) + list(0.0770109553913481, 0.887908037160304, 0.482459496275826, "facGenderm", + "", 0.0196880778334028, "contNormal", 0.206865301649726, + 2.33223983156319, -2.54166343142578, 2.42331379100701, -0.0591748202093849, + "debCollin1", "", 0.962736823964825, "contNormal", + 1.2665990961048, -0.0467194555809858, -1.77529206027609, 1.35813921553078, + -0.208576422372657, "contcor2", "", 0.794146900623701, + "contNormal", 0.799359401632625, -0.260929466703784, -1.94483533899039, + 2.7756475106376, 0.415406085823604, "debCollin1:contcor2", "", + 0.730126963412559, "contNormal", 1.20422693653112, 0.344956646643544, + -0.0404918396670557, 0.0505150748054805, 0.0050116175692124, + "facGenderm", "", 0.829093217205227, "debCollin1", + 0.0232164762185395, 0.215864695487697, -0.048849536484131, 0.0421573779884007, + -0.00334607924786516, "facExperimexperimental", "", + 0.885401606778046, "debCollin1", 0.0232164762185384, -0.144125198689426, + -0.0871738832572145, 0.0415293294596738, -0.0228222768987703, + "facGenderm:facExperimexperimental", "", 0.486992253176195, + "debCollin1", 0.0328330555387963, -0.695100608951943)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.073450173355631, 0.887028841837881, 16, 0.480239507596756, 0, - "m", "Total", 0.0206755957764275, 0.207549392463243, 2.31385648445975, - 0.0774644536131626, 0.889119984428921, 16, 0.483292219021042, - 1, "m", "Total", 0.0195914207636234, 0.207058787104762, 2.33408215018916, - 0.0776001673990077, 0.891505227926593, 50, 0.4845526976628, - 0, "m", "Total", 0.0196113438846157, 0.207632657270125, 2.33370175979788, - 0.073450173355631, 0.887028841837881, 50, 0.480239507596756, - 1, "m", "Total", 0.0206755957764275, 0.207549392463243, 2.31385648445975, - 0.0774644536131626, 0.889119984428921, 84, 0.483292219021042, - 0, "m", "Total", 0.0195914207636234, 0.207058787104762, 2.33408215018916, - 0.0776001673990077, 0.891505227926593, 84, 0.4845526976628, - 1, "m", "Total", 0.0196113438846157, 0.207632657270125, 2.33370175979788, - -0.0289108673078605, 0.0244708899497198, 16, -0.00221998867907034, - 0, "m", "Total indirect", 0.870504138263035, 0.0136180454535514, - -0.163018157535331, -0.0433035776853076, 0.044969023175739, - 16, 0.000832722745215685, 1, "m", "Total indirect", 0.970501924440653, - 0.0225189344185224, 0.0369787810443974, -0.0236113638306395, - 0.0277977666045881, 50, 0.00209320138697429, 0, "m", "Total indirect", - 0.873191559689371, 0.013114815078424, 0.159605863632645, -0.0289108673078605, - 0.0244708899497198, 50, -0.00221998867907034, 1, "m", "Total indirect", - 0.870504138263035, 0.0136180454535514, -0.163018157535331, -0.0433035776853076, - 0.044969023175739, 84, 0.000832722745215685, 0, "m", "Total indirect", - 0.970501924440653, 0.0225189344185224, 0.0369787810443974, -0.0236113638306395, - 0.0277977666045881, 84, 0.00209320138697429, 1, "m", "Total indirect", - 0.873191559689371, 0.013114815078424, 0.159605863632645)) + list(0.0734501732531699, 0.887028841834981, 16, 0.480239507544076, + 0, "m", "Total", 0.0206755958058924, 0.207549392488642, 2.31385648392277, + 0.077464453600584, 0.889119984432917, 16, 0.48329221901675, + 1, "m", "Total", 0.0195914207672037, 0.20705878710899, 2.33408215012077, + 0.0776001674115976, 0.891505228013346, 50, 0.484552697712472, + 0, "m", "Total", 0.0196113438832231, 0.207632657289044, 2.33370175982446, + 0.0734501732531699, 0.887028841834981, 50, 0.480239507544076, + 1, "m", "Total", 0.0206755958058924, 0.207549392488642, 2.31385648392277, + 0.077464453600584, 0.889119984432917, 84, 0.48329221901675, + 0, "m", "Total", 0.0195914207672037, 0.20705878710899, 2.33408215012077, + 0.0776001674115976, 0.891505228013346, 84, 0.484552697712472, + 1, "m", "Total", 0.0196113438832231, 0.207632657289044, 2.33370175982446, + -0.0289108675743309, 0.02447089011083, 16, -0.00221998873175044, + 0, "m", "Total indirect", 0.870504136245325, 0.0136180455626301, + -0.163018160097982, -0.0433035774633199, 0.0449690229451681, + 16, 0.000832722740924118, 1, "m", "Total indirect", 0.970501924441444, + 0.0225189343030717, 0.0369787810434054, -0.0236113639888827, + 0.0277977668621741, 50, 0.00209320143664574, 0, "m", "Total indirect", + 0.873191557722712, 0.0131148151845048, 0.159605866129083, -0.0289108675743309, + 0.02447089011083, 50, -0.00221998873175044, 1, "m", "Total indirect", + 0.870504136245325, 0.0136180455626301, -0.163018160097982, -0.0433035774633199, + 0.0449690229451681, 84, 0.000832722740924118, 0, "m", "Total indirect", + 0.970501924441444, 0.0225189343030717, 0.0369787810434054, -0.0236113639888827, + 0.0277977668621741, 84, 0.00209320143664574, 1, "m", "Total indirect", + 0.873191557722712, 0.0131148151845048, 0.159605866129083)) @@ -5406,7 +5411,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 22 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -5417,25 +5422,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -5444,141 +5449,141 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1196.96798989104, 1259.49207435475, 9, "Model 1", 100, -574.483994945519, + list(1196.96798989139, 1259.49207435511, 9, "Model 1", 100, -574.483994945697, 22)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.54484841384287, 0.0642078353243691, -0.240320289259251, "contcor1", - "", 0.121931276641456, "contGamma", 0.15537434717459, - -1.54671793400495, -0.403937309809872, 0.194624924024086, -0.104656192892893, - "contcor2", "", 0.493101891194044, "contGamma", 0.152697253254483, - -0.685383598344591, 0.424979217380546, 0.896762506532529, 0.660870861956537, - "contcor2", "", 3.99644519699649e-08, "contcor1", 0.120355091438758, - 5.49100876461728, 1.6804110000517, 2.96919150922276, 2.32480125463723, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776579400641, 7.07106710239316, 0.732634025573911, 1.29452197329137, - 1.01357799943264, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341396104611, 7.07107665320162, 0.721541689020397, - 1.2749231852947, 0.998232437157548, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171343106124, 7.07106991542281, - 0.00465468509754833, 0.00822456457351142, 0.00643962483552987, + list(-0.403936563861922, 0.194624998717589, -0.104655782572167, "contcor2", + "", 0.493103101526996, "contGamma", 0.152697082012957, + -0.685381679810265, -0.544849810760668, 0.0642064697284168, + -0.240321670516126, "contcor1", "", 0.121929151246735, + "contGamma", 0.155374355165004, -1.54672674432605, 1.68041075615248, + 2.96919065851655, 2.32480070733451, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776424600097, 7.0710687670573, + 0.770394544691786, 1.36124364995977, 1.06581909732578, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.150729582259808, + 7.0710678112851, 0.00465468151960161, 0.00822455209386307, 0.00643961680673234, "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000910700274117751, 7.07106939411907, 0.770394544849361, 1.36124365050556, - 1.06581909767746, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.150729582358844, 7.07106780897229, 0.318532855200268, - 0.562829549629402, 0.440681202414835, "debCollin1:contcor2", - "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217304899771, - 7.07106813225778)) + 0.000910698003233771, 7.07107821019272, 0.424978716127986, 0.896761374237081, + 0.660870045182533, "contcor2", "", 3.99643256265847e-08, + "contcor1", 0.120354930455472, 5.49100932285477, 0.732634028448028, + 1.29452198330796, 1.01357800587799, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341397926704, 7.07107660828223, + 0.721541308983784, 1.27492185974375, 0.998231584363769, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171101899057, + 7.07107595630688, 0.318532803564218, 0.562829369524666, 0.440681086544442, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623216977167509, 7.07106999150306)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.181059001269902, 0.193865657220071, 16, "", 0.00640332797508458, - "contGamma", "contNormal", "", "", "", 0.946622827637529, - 0.0956458030472321, 0.0669483424371738, -0.161734540029548, - 0.112345435471853, 50, "", -0.0246945522788477, "contGamma", - "contNormal", "", "", "", 0.723949943883803, 0.0699196458871972, - -0.353184744652282, -0.271690455667496, 0.1544225833927, 84, - "", -0.0586339361373979, "contGamma", "contNormal", "", "", - "", 0.589618274961509, 0.108704303349786, -0.539389282029864, - -0.0178558323547383, 0.0222732611599399, 16, 16, 0.0022087144026008, + list(-0.181059400440225, 0.193865257924831, 16, "", 0.00640292874230287, + "contGamma", "contNormal", "", "", "", 0.946626150595184, + 0.0956458030153651, 0.0669441683842026, -0.161735102772282, + 0.112344872687213, 50, "", -0.0246951150425348, "contGamma", + "contNormal", "", "", "", 0.723943910202406, 0.0699196458765066, + -0.353192793426783, -0.271691196863747, 0.154421842115179, 84, + "", -0.0586346773742841, "contGamma", "contNormal", "", "", + "", 0.589613570833736, 0.108704303329054, -0.539396100969378, + -0.0178558084168814, 0.0222732318945292, 16, 16, 0.00220871173882389, "contGamma", "debCollin1", "contNormal", "", "", - 0.829179721672234, 0.0102372017626883, 0.215753723898548, -0.0213836290720688, - 0.0261011271405258, 50, 16, 0.0023587490342285, "contGamma", - "debCollin1", "contNormal", "", "", 0.845613891941909, - 0.0121136808092261, 0.194717779952729, -0.0478610457669893, - 0.0498001325852987, 84, 16, 0.000969543409154707, "contGamma", - "debCollin1", "contNormal", "", "", 0.96895770368833, - 0.024914023707228, 0.0389155690204077, -0.0178558323547383, - 0.0222732611599399, 16, 50, 0.0022087144026008, "contGamma", - "debCollin1", "contNormal", "", "", 0.829179721672234, - 0.0102372017626883, 0.215753723898548, -0.0213836290720688, - 0.0261011271405258, 50, 50, 0.0023587490342285, "contGamma", - "debCollin1", "contNormal", "", "", 0.845613891941909, - 0.0121136808092261, 0.194717779952729, -0.0478610457669893, - 0.0498001325852987, 84, 50, 0.000969543409154707, "contGamma", - "debCollin1", "contNormal", "", "", 0.96895770368833, - 0.024914023707228, 0.0389155690204077, -0.0178558323547383, - 0.0222732611599399, 16, 84, 0.0022087144026008, "contGamma", - "debCollin1", "contNormal", "", "", 0.829179721672234, - 0.0102372017626883, 0.215753723898548, -0.0213836290720688, - 0.0261011271405258, 50, 84, 0.0023587490342285, "contGamma", - "debCollin1", "contNormal", "", "", 0.845613891941909, - 0.0121136808092261, 0.194717779952729, -0.0478610457669893, - 0.0498001325852987, 84, 84, 0.000969543409154707, "contGamma", - "debCollin1", "contNormal", "", "", 0.96895770368833, - 0.024914023707228, 0.0389155690204077)) + 0.82917970152815, 0.0102371881901768, 0.215753749739922, -0.0213836135031751, + 0.0261011108045012, 50, 16, 0.00235874865066307, "contGamma", + "debCollin1", "contNormal", "", "", 0.845613814304146, + 0.0121136726700668, 0.194717879119484, -0.0478610259492383, + 0.0498001171596617, 84, 16, 0.000969545605211687, "contGamma", + "debCollin1", "contNormal", "", "", 0.968957622214962, + 0.0249140147164026, 0.0389156712094806, -0.0178558084168814, + 0.0222732318945292, 16, 50, 0.00220871173882389, "contGamma", + "debCollin1", "contNormal", "", "", 0.82917970152815, + 0.0102371881901768, 0.215753749739922, -0.0213836135031751, + 0.0261011108045012, 50, 50, 0.00235874865066307, "contGamma", + "debCollin1", "contNormal", "", "", 0.845613814304146, + 0.0121136726700668, 0.194717879119484, -0.0478610259492383, + 0.0498001171596617, 84, 50, 0.000969545605211687, "contGamma", + "debCollin1", "contNormal", "", "", 0.968957622214962, + 0.0249140147164026, 0.0389156712094806, -0.0178558084168814, + 0.0222732318945292, 16, 84, 0.00220871173882389, "contGamma", + "debCollin1", "contNormal", "", "", 0.82917970152815, + 0.0102371881901768, 0.215753749739922, -0.0213836135031751, + 0.0261011108045012, 50, 84, 0.00235874865066307, "contGamma", + "debCollin1", "contNormal", "", "", 0.845613814304146, + 0.0121136726700668, 0.194717879119484, -0.0478610259492383, + 0.0498001171596617, 84, 84, 0.000969545605211687, "contGamma", + "debCollin1", "contNormal", "", "", 0.968957622214962, + 0.0249140147164026, 0.0389156712094806)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.161576771446889, 0.112420069386009, -0.0245783510304395, "contGamma", - "", 0.725116156369051, "contNormal", 0.0698984376738935, - -0.351629476256797, -2.79883005609853, 2.28229496076271, -0.258267547667911, - "debCollin1", "", 0.842070880036059, "contNormal", - 1.29622917995956, -0.199245281359866, -0.0639245487756847, 0.675672402328318, - 0.305873926776317, "contcor1", "", 0.104983686205409, - "contNormal", 0.188676158576854, 1.62115833332342, -0.175211994835746, - 0.111365155051049, -0.0319234198923484, "contGamma:contcor1", - "", 0.662356099057595, "contNormal", 0.0731077591596781, - -0.436662541148648, -1.86123293007113, 1.40972896852858, -0.225751980771273, - "contcor2", "", 0.786743561544174, "contNormal", 0.834444388876693, - -0.270541672735285, -2.27532983326081, 2.60081080563381, 0.162740486186499, - "debCollin1:contcor2", "", 0.895912142212152, "contNormal", - 1.24393628591061, 0.130827027099194, -0.0197475165433759, 0.00115999965158082, - -0.00929375844589752, "contGamma", "", 0.0814250329116726, - "debCollin1", 0.00533364805676852, -1.74247688392254, -0.0185476630123441, - 0.0350786907022929, 0.00826551384497441, "contcor1", "", - 0.545720895682019, "debCollin1", 0.0136804436555046, 0.604184634147343, - -0.0145562816762821, 0.00654288082381329, -0.00400670042623443, - "contGamma:contcor1", "", 0.45664138421892, "debCollin1", - 0.00538253831869436, -0.744388648812506)) + list(-0.161577333578504, 0.11241950721236, -0.0245789131830723, "contGamma", + "", 0.725110124105029, "contNormal", 0.0698984376631705, + -0.351637518731309, -2.79883018438593, 2.28229483053546, -0.258267676925232, + "debCollin1", "", 0.842070801976855, "contNormal", + 1.29622917946469, -0.199245381153887, -0.063924624058081, 0.67567232680914, + 0.305873851375529, "contcor1", "", 0.104983771778692, + "contNormal", 0.188676158516449, 1.62115793421172, -0.175212162658103, + 0.111364987129251, -0.0319235877644257, "contGamma:contcor1", + "", 0.662354433425343, "contNormal", 0.0731077591343102, + -0.436664837528082, -1.86123300361569, 1.40972888696662, -0.225752058324533, + "contcor2", "", 0.786743489543468, "contNormal", 0.8344443868314, + -0.270541766338403, -2.27532987816698, 2.60081074867782, 0.16274043525542, + "debCollin1:contcor2", "", 0.895912174346189, "contNormal", + 1.24393628283662, 0.130826986479013, -0.0197475037041066, 0.00115999945730861, + -0.00929375212339899, "contGamma", "", 0.081425050247673, + "debCollin1", 0.00533364473182439, -1.74247678476703, -0.0185476428919074, + 0.0350786773921211, 0.00826551725010687, "contcor1", "", + 0.545720479831516, "debCollin1", 0.0136804351271314, 0.604185259700874, + -0.0145562764225168, 0.00654287292446469, -0.00400670174902605, + "contGamma:contcor1", "", 0.456640954925308, "debCollin1", + 0.00538253496324649, -0.744389358617264)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.177378274701007, 0.194602359456378, 16, 16, 0.00861204237768538, - "Total", 0.927688370898682, 0.0948947626312321, 0.0907536110412372, - -0.157341666062547, 0.112670059573308, 50, 16, -0.0223358032446192, - "Total", 0.745739132097981, 0.0688818079734304, -0.324262732087908, - -0.263778502381108, 0.148449716924622, 84, 16, -0.0576643927282432, - "Total", 0.583460058496844, 0.105162192406936, -0.548337681142145, - -0.177378274701007, 0.194602359456378, 16, 50, 0.00861204237768538, - "Total", 0.927688370898682, 0.0948947626312321, 0.0907536110412372, - -0.157341666062547, 0.112670059573308, 50, 50, -0.0223358032446192, - "Total", 0.745739132097981, 0.0688818079734304, -0.324262732087908, - -0.263778502381108, 0.148449716924622, 84, 50, -0.0576643927282432, - "Total", 0.583460058496844, 0.105162192406936, -0.548337681142145, - -0.177378274701007, 0.194602359456378, 16, 84, 0.00861204237768538, - "Total", 0.927688370898682, 0.0948947626312321, 0.0907536110412372, - -0.157341666062547, 0.112670059573308, 50, 84, -0.0223358032446192, - "Total", 0.745739132097981, 0.0688818079734304, -0.324262732087908, - -0.263778502381108, 0.148449716924622, 84, 84, -0.0576643927282432, - "Total", 0.583460058496844, 0.105162192406936, -0.548337681142145, - -0.0178558323547383, 0.0222732611599399, 16, 16, 0.0022087144026008, - "Total indirect", 0.829179721672234, 0.0102372017626883, 0.215753723898548, - -0.0213836290720688, 0.0261011271405258, 50, 16, 0.0023587490342285, - "Total indirect", 0.845613891941909, 0.0121136808092261, 0.194717779952729, - -0.0478610457669893, 0.0498001325852987, 84, 16, 0.000969543409154707, - "Total indirect", 0.96895770368833, 0.024914023707228, 0.0389155690204077, - -0.0178558323547383, 0.0222732611599399, 16, 50, 0.0022087144026008, - "Total indirect", 0.829179721672234, 0.0102372017626883, 0.215753723898548, - -0.0213836290720688, 0.0261011271405258, 50, 50, 0.0023587490342285, - "Total indirect", 0.845613891941909, 0.0121136808092261, 0.194717779952729, - -0.0478610457669893, 0.0498001325852987, 84, 50, 0.000969543409154707, - "Total indirect", 0.96895770368833, 0.024914023707228, 0.0389155690204077, - -0.0178558323547383, 0.0222732611599399, 16, 84, 0.0022087144026008, - "Total indirect", 0.829179721672234, 0.0102372017626883, 0.215753723898548, - -0.0213836290720688, 0.0261011271405258, 50, 84, 0.0023587490342285, - "Total indirect", 0.845613891941909, 0.0121136808092261, 0.194717779952729, - -0.0478610457669893, 0.0498001325852987, 84, 84, 0.000969543409154707, - "Total indirect", 0.96895770368833, 0.024914023707228, 0.0389155690204077 + list(-0.177378677294727, 0.19460195825698, 16, 16, 0.00861164048112676, + "Total", 0.927691736468442, 0.0948947629869332, 0.0907493755194116, + -0.157342229189444, 0.1126694964057, 50, 16, -0.0223363663918718, + "Total", 0.745732943001088, 0.0688818079630446, -0.324270907695328, + -0.263779241861761, 0.148448978323616, 84, 16, -0.0576651317690724, + "Total", 0.583455234743048, 0.10516219263134, -0.548344707600624, + -0.177378677294727, 0.19460195825698, 16, 50, 0.00861164048112676, + "Total", 0.927691736468442, 0.0948947629869332, 0.0907493755194116, + -0.157342229189444, 0.1126694964057, 50, 50, -0.0223363663918718, + "Total", 0.745732943001088, 0.0688818079630446, -0.324270907695328, + -0.263779241861761, 0.148448978323616, 84, 50, -0.0576651317690724, + "Total", 0.583455234743048, 0.10516219263134, -0.548344707600624, + -0.177378677294727, 0.19460195825698, 16, 84, 0.00861164048112676, + "Total", 0.927691736468442, 0.0948947629869332, 0.0907493755194116, + -0.157342229189444, 0.1126694964057, 50, 84, -0.0223363663918718, + "Total", 0.745732943001088, 0.0688818079630446, -0.324270907695328, + -0.263779241861761, 0.148448978323616, 84, 84, -0.0576651317690724, + "Total", 0.583455234743048, 0.10516219263134, -0.548344707600624, + -0.0178558084168814, 0.0222732318945292, 16, 16, 0.00220871173882389, + "Total indirect", 0.82917970152815, 0.0102371881901768, 0.215753749739922, + -0.0213836135031751, 0.0261011108045012, 50, 16, 0.00235874865066307, + "Total indirect", 0.845613814304146, 0.0121136726700668, 0.194717879119484, + -0.0478610259492383, 0.0498001171596617, 84, 16, 0.000969545605211687, + "Total indirect", 0.968957622214962, 0.0249140147164026, 0.0389156712094806, + -0.0178558084168814, 0.0222732318945292, 16, 50, 0.00220871173882389, + "Total indirect", 0.82917970152815, 0.0102371881901768, 0.215753749739922, + -0.0213836135031751, 0.0261011108045012, 50, 50, 0.00235874865066307, + "Total indirect", 0.845613814304146, 0.0121136726700668, 0.194717879119484, + -0.0478610259492383, 0.0498001171596617, 84, 50, 0.000969545605211687, + "Total indirect", 0.968957622214962, 0.0249140147164026, 0.0389156712094806, + -0.0178558084168814, 0.0222732318945292, 16, 84, 0.00220871173882389, + "Total indirect", 0.82917970152815, 0.0102371881901768, 0.215753749739922, + -0.0213836135031751, 0.0261011108045012, 50, 84, 0.00235874865066307, + "Total indirect", 0.845613814304146, 0.0121136726700668, 0.194717879119484, + -0.0478610259492383, 0.0498001171596617, 84, 84, 0.000969545605211687, + "Total indirect", 0.968957622214962, 0.0249140147164026, 0.0389156712094806 )) @@ -5595,7 +5600,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 22 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -5606,25 +5611,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -5633,121 +5638,121 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(887.33462490254, 949.858709366255, 9, "Model 1", 100, -419.66731245127, + list(887.334624902546, 949.85870936626, 9, "Model 1", 100, -419.667312451273, 22)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962232042907982, 0.0896216743286675, 0.0399996769497938, - "facExperimexperimental", "", 0.114129157392805, "facGenderm", - 0.0253178108221813, 1.57990267131428, -0.163250243526453, 0.0341989983504136, - -0.0645256225880198, "contcor2", "", 0.200187771092519, - "facGenderm", 0.0503706301325741, -1.2810167833555, -0.170526119295987, - 0.0272981720071304, -0.0716139736444284, "contcor2", "", - 0.155885828114334, "facExperimexperimental", 0.0504663077647167, - -1.41904523664196, 0.180704470695296, 0.319294011992914, 0.249999241344105, - "facGenderm", "", 1.53721479989599e-12, "facGenderm", - 0.0353551244795297, 7.07108926992613, 0.180704439340434, 0.319293902633188, - 0.249999170986811, "facExperimexperimental", "", 1.53721479989599e-12, - "facExperimexperimental", 0.0353551045799643, 7.07109125985969, - 0.721541673218058, 1.27492313017156, 0.998232401694808, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171333075124, - 7.07107016665773, 0.00474535288201745, 0.00838476913847931, - 0.00656506101024838, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000928439574698595, 7.07106977035057, 0.75568168339828, - 1.33524685500649, 1.04546426920239, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.147850974859678, 7.07106781131887, - 0.318532976479505, 0.562829972648737, 0.440681474564121, "debCollin1:contcor2", - "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623218074659063, - 7.07106376536335)) + list(-0.163250241924614, 0.0341989989731474, -0.064525621475733, "contcor2", + "", 0.200187776617403, "facGenderm", 0.0503706298827977, + -1.28101676762572, -0.00962232059153828, 0.0896216726302006, + 0.0399996760193312, "facExperimexperimental", "", 0.11412916020983, + "facGenderm", 0.0253178104303352, 1.57990265901527, 0.180704469824099, + 0.319294008956964, 0.249999239390531, "facGenderm", "", + 1.53721479989599e-12, "facGenderm", 0.0353551239272869, 7.07108932511995, + 0.755681683402257, 1.33524685500252, 1.04546426920239, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.147850974857649, + 7.07106781141591, 0.004745352897632, 0.00838476919294193, 0.00656506104528696, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000928439584608997, 7.07106973261138, -0.170526116866279, + 0.0272981735342046, -0.0716139716660372, "contcor2", "", + 0.155885837655125, "facExperimexperimental", 0.0504663075344487, + -1.41904520391457, 0.180704438575476, 0.319293899964827, 0.249999169270152, + "facExperimexperimental", "", 1.53721479989599e-12, + "facExperimexperimental", 0.0353551040943935, 7.07109130842003, + 0.721541674702175, 1.27492313536575, 0.998232405033964, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171334021589, + 7.07107014290383, 0.318532975278404, 0.562829968453055, 0.440681471865729, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623218067019687, 7.07106380874239)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0351291107062669, 1.18425461416693, "", 0.609691862436596, 0, - "m", "facGender", "contNormal", "", "", "", 0.0375441237093244, - 0.293149647780473, 2.07979735624028, -0.23765542360327, 0.932487101485949, - "", 0.347415838941339, 1, "m", "facGender", "contNormal", "", - "", "", 0.24449357386863, 0.298511231410157, 1.16382836685963, - -0.0291865473785372, 0.0246863621243192, "", -0.00225009262710903, + list(0.0351291106431221, 1.18425461423007, "", 0.609691862436597, 0, + "m", "facGender", "contNormal", "", "", "", 0.0375441237302983, + 0.293149647812691, 2.07979735601171, -0.237655423656425, 0.932487101539105, + "", 0.34741583894134, 1, "m", "facGender", "contNormal", "", + "", "", 0.244493573911489, 0.298511231437278, 1.16382836675389, + -0.0291865472409223, 0.0246863620422152, "", -0.00225009259935354, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.869949697699492, 0.0137433416960207, -0.163722381126602, - -0.042859313877257, 0.0460167745987393, "", 0.00157873036074112, + "", 0.869949698763731, 0.0137433416399689, -0.16372237977478, + -0.0428593138854086, 0.0460167746061444, "", 0.00157873036036788, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.944487556006922, 0.0226728881696397, 0.0696307567403402, - -0.0213676901386402, 0.0247127152820957, 16, 0.00167251257172773, + "", 0.944487556029726, 0.0226728881736084, 0.06963075671169, + -0.0213676899565311, 0.0247127150587248, 16, 0.00167251255109685, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.886862122067604, 0.0117554214731016, 0.142275849109683, - -0.0291865473785372, 0.0246863621243192, 16, -0.00225009262710903, + "", 0.886862122464952, 0.0117554213696609, 0.142275848606615, + -0.0291865472409223, 0.0246863620422152, 16, -0.00225009259935354, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.869949697699492, 0.0137433416960207, -0.163722381126602, - -0.042859313877257, 0.0460167745987393, 50, 0.00157873036074112, + "", 0.869949698763731, 0.0137433416399689, -0.16372237977478, + -0.0428593138854086, 0.0460167746061444, 50, 0.00157873036036788, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.944487556006922, 0.0226728881696397, 0.0696307567403402, - -0.0213676901386402, 0.0247127152820957, 50, 0.00167251257172773, + "", 0.944487556029726, 0.0226728881736084, 0.06963075671169, + -0.0213676899565311, 0.0247127150587248, 50, 0.00167251255109685, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.886862122067604, 0.0117554214731016, 0.142275849109683 + "", 0.886862122464952, 0.0117554213696609, 0.142275848606615 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0351291107062669, 1.18425461416693, 0.609691862436596, "facGenderm", - "", 0.0375441237093244, "contNormal", 0.293149647780473, - 2.07979735624028, -2.59209364730381, 2.39222238560679, -0.0999356308485124, - "debCollin1", "", 0.937355058956818, "contNormal", - 1.27153255677815, -0.0785946300122529, -0.436426934954704, 0.715401025523177, - 0.139487045284237, "facExperimexperimental", "", 0.634996833904749, - "contNormal", 0.293839062748947, 0.474705588764463, -1.084642418379, - 0.560090371388486, -0.262276023495257, "facGenderm:facExperimexperimental", - "", 0.531913147725242, "contNormal", 0.4195824011923, - -0.625088237137603, -1.76075415986742, 1.37675931740408, -0.19199742123167, - "contcor2", "", 0.810425922766226, "contNormal", 0.800400798693194, - -0.239876598755451, -1.9845787946841, 2.74014988891473, 0.377785547115312, - "debCollin1:contcor2", "", 0.753950711609478, "contNormal", - 1.20531007734501, 0.313434322184939, -0.0404917400422056, 0.0505150561576427, - 0.00501165805771856, "facGenderm", "", 0.829091639091023, - "debCollin1", 0.023216446046381, 0.215866719984034, -0.0488495587856216, - 0.0421572374144321, -0.00334616068559472, "facExperimexperimental", - "", 0.885398689005084, "debCollin1", 0.0232164460464334, - -0.144128893754984, -0.0871737985329066, 0.0415292469212961, - -0.0228222758058053, "facGenderm:facExperimexperimental", "", - 0.486991707953595, "debCollin1", 0.0328330128689598, -0.695101479017217 + list(0.0351291106431221, 1.18425461423007, 0.609691862436597, "facGenderm", + "", 0.0375441237302983, "contNormal", 0.293149647812691, + 2.07979735601171, -2.59209364859597, 2.39222238689894, -0.0999356308485124, + "debCollin1", "", 0.937355058989232, "contNormal", + 1.27153255743742, -0.0785946299715024, -0.436426934936896, 0.715401025505369, + 0.139487045284236, "facExperimexperimental", "", 0.634996833894286, + "contNormal", 0.293839062739861, 0.47470558877914, -1.08464241854719, + 0.560090371556672, -0.262276023495257, "facGenderm:facExperimexperimental", + "", 0.531913147809142, "contNormal", 0.419582401278111, + -0.625088237009763, -1.76075415137609, 1.37675930891275, -0.191997421231669, + "contcor2", "", 0.810425921759634, "contNormal", 0.8004007943608, + -0.23987660005385, -1.98457878164596, 2.74014987587658, 0.377785547115311, + "debCollin1:contcor2", "", 0.753950710295395, "contNormal", + 1.20531007069278, 0.313434323914817, -0.0404917402255011, 0.050515056217298, + 0.00501165799589844, "facGenderm", "", 0.829091641615891, + "debCollin1", 0.0232164461083594, 0.215866716744986, -0.0488495587106469, + 0.0421572377317154, -0.00334616048946574, "facExperimexperimental", + "", 0.885398695978865, "debCollin1", 0.023216446108248, + -0.144128884923389, -0.0871737986383484, 0.0415292471587997, + -0.0228222757397744, "facGenderm:facExperimexperimental", "", + 0.486991710374513, "debCollin1", 0.0328330129564475, -0.695101475153918 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0322737801525189, 1.18260975946646, 16, 0.607441769809487, 0, - "m", "Total", 0.0384578392745616, 0.293458448315286, 2.06994132660602, - -0.234846657099298, 0.932835795703459, 16, 0.348994569302081, - 1, "m", "Total", 0.24136566481911, 0.297883650417377, 1.17158014148507, - 0.0368285352366526, 1.18590021478, 50, 0.611364375008324, 0, - "m", "Total", 0.0370148383767157, 0.293135916937014, 2.0856003638056, - 0.0322737801525189, 1.18260975946646, 50, 0.607441769809487, - 1, "m", "Total", 0.0384578392745616, 0.293458448315286, 2.06994132660602, - -0.234846657099298, 0.932835795703459, 84, 0.348994569302081, - 0, "m", "Total", 0.24136566481911, 0.297883650417377, 1.17158014148507, - 0.0368285352366526, 1.18590021478, 84, 0.611364375008324, 1, - "m", "Total", 0.0370148383767157, 0.293135916937014, 2.0856003638056, - -0.0291865473785372, 0.0246863621243192, 16, -0.00225009262710903, - 0, "m", "Total indirect", 0.869949697699492, 0.0137433416960207, - -0.163722381126602, -0.042859313877257, 0.0460167745987393, - 16, 0.00157873036074112, 1, "m", "Total indirect", 0.944487556006922, - 0.0226728881696397, 0.0696307567403402, -0.0213676901386402, - 0.0247127152820957, 50, 0.00167251257172773, 0, "m", "Total indirect", - 0.886862122067604, 0.0117554214731016, 0.142275849109683, -0.0291865473785372, - 0.0246863621243192, 50, -0.00225009262710903, 1, "m", "Total indirect", - 0.869949697699492, 0.0137433416960207, -0.163722381126602, -0.042859313877257, - 0.0460167745987393, 84, 0.00157873036074112, 0, "m", "Total indirect", - 0.944487556006922, 0.0226728881696397, 0.0696307567403402, -0.0213676901386402, - 0.0247127152820957, 84, 0.00167251257172773, 1, "m", "Total indirect", - 0.886862122067604, 0.0117554214731016, 0.142275849109683)) + list(0.0322737801849972, 1.18260975948949, 16, 0.607441769837243, 0, + "m", "Total", 0.0384578392641117, 0.293458448312876, 2.0699413267176, + -0.234846657131958, 0.932835795735373, 16, 0.348994569301708, + 1, "m", "Total", 0.241365664845638, 0.29788365043385, 1.17158014141903, + 0.0368285351168655, 1.18590021485852, 50, 0.611364374987693, + 0, "m", "Total", 0.0370148384157283, 0.293135916987605, 2.08560036337528, + 0.0322737801849972, 1.18260975948949, 50, 0.607441769837243, + 1, "m", "Total", 0.0384578392641117, 0.293458448312876, 2.0699413267176, + -0.234846657131958, 0.932835795735373, 84, 0.348994569301708, + 0, "m", "Total", 0.241365664845638, 0.29788365043385, 1.17158014141903, + 0.0368285351168655, 1.18590021485852, 84, 0.611364374987693, + 1, "m", "Total", 0.0370148384157283, 0.293135916987605, 2.08560036337528, + -0.0291865472409223, 0.0246863620422152, 16, -0.00225009259935354, + 0, "m", "Total indirect", 0.869949698763731, 0.0137433416399689, + -0.16372237977478, -0.0428593138854086, 0.0460167746061444, + 16, 0.00157873036036788, 1, "m", "Total indirect", 0.944487556029726, + 0.0226728881736084, 0.06963075671169, -0.0213676899565311, 0.0247127150587248, + 50, 0.00167251255109685, 0, "m", "Total indirect", 0.886862122464952, + 0.0117554213696609, 0.142275848606615, -0.0291865472409223, + 0.0246863620422152, 50, -0.00225009259935354, 1, "m", "Total indirect", + 0.869949698763731, 0.0137433416399689, -0.16372237977478, -0.0428593138854086, + 0.0460167746061444, 84, 0.00157873036036788, 0, "m", "Total indirect", + 0.944487556029726, 0.0226728881736084, 0.06963075671169, -0.0213676899565311, + 0.0247127150587248, 84, 0.00167251255109685, 1, "m", "Total indirect", + 0.886862122464952, 0.0117554213696609, 0.142275848606615)) @@ -5763,7 +5768,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 28 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -5774,25 +5779,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -5801,138 +5806,139 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1198.22112680207, 1258.1400410798, 16, "Model 1", 100, -576.110563401035, + list(1198.22112680368, 1258.1400410814, 16, "Model 1", 100, -576.110563401838, 28)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848725044722, 0.0642085532195764, -0.240320085912573, "contcor1", - "", 0.121932222832289, "contGamma", 0.155374609704174, - -1.54671401183328, -0.403934332618116, 0.19462806873472, -0.104653131941698, - "contcor2", "", 0.493114658493391, "contGamma", 0.152697295989676, - -0.685363360650301, 0.424979282455905, 0.89676355791347, 0.660871420184687, - "contcor1", "", 3.99660000649504e-08, "contcor2", 0.120355343051949, - 5.49100192335821, 1.6804110342553, 2.96919162852331, 2.32480133138931, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776601109445, 7.07106686894489, 0.732634811299998, 1.29452471385778, - 1.01357976257889, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341894797531, 7.07106435289249, 0.721541922239405, - 1.27492399874601, 0.998232960492707, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171491127289, 7.07106620835108, - 0.00465468583327091, 0.00822456713966926, 0.00643962648647009, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.0009107007410741, 7.07106758129466, 0.795868641146372, 1.40625493980227, - 1.10106179047432, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.155713651748335, 7.07106781012279, 0.318532842584379, - 0.562829505626902, 0.440681174105641, "debCollin1:contcor2", - "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217224830416, - 7.07106858648772)) + list(-0.403929939688417, 0.194630182653246, -0.104649878517586, "contcor2", + "", 0.493126453933072, "contGamma", 0.152696714598592, + -0.685344663719116, -0.544845439030507, 0.0642096626758196, + -0.240317888177344, "contcor1", "", 0.12193430171945, + "contGamma", 0.155374054449591, -1.54670539446669, 1.68040868532371, + 2.96918343560434, 2.32479606046403, "contGamma", "", + 1.53721479989599e-12, "contGamma", 0.328775110268944, 7.07108290089935, + 0.795868640964029, 1.40625493916825, 1.10106179006614, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.15571365163311, + 7.07106781273388, 0.00465468767438245, 0.00822457356136631, + 0.00643963061787438, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910701909612284, 7.07106304478481, 0.424978256084018, + 0.896761040278643, 0.660869648181331, "contcor1", "", + 3.99654040972308e-08, "contcor2", 0.120354962620739, 5.49100455677807, + 0.732634384133996, 1.29452322391243, 1.01357880402321, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341623675369, + 7.07107104017953, 0.721541359600967, 1.27492203629643, 0.998231697948696, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171134026047, + 7.07107515169861, 0.318532931269119, 0.562829814953583, 0.440681373111351, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623217787702854, 7.07106539329819)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.198258043632664, 0.164307501432919, "", 16, -0.0169752710998727, - "contGamma", "contNormal", "", "", "", 0.854381780562041, - 0.0924929100548414, -0.183530511579835, -0.18193815043509, 0.093848285507496, - "", 50, -0.0440449324637969, "contGamma", "contNormal", "", - "", "", 0.531289603459688, 0.0703549754275982, -0.626038630475015, - -0.292840762720942, 0.141291301641394, "", 84, -0.0757747305397743, - "contGamma", "contNormal", "", "", "", 0.493851315149818, - 0.110750010660072, -0.684196146692498, -0.0180265057418691, - 0.0245003681307758, 16, 16, 0.00323693119445334, "contGamma", - "debCollin1", "contNormal", "", "", 0.765424484282791, - 0.0108488916653805, 0.298365150495751, -0.0210293202652443, - 0.0273853886799507, 50, 16, 0.00317803420735324, "contGamma", - "debCollin1", "contNormal", "", "", 0.79693825504087, - 0.0123509180084645, 0.25731157839241, -0.0487685203747223, 0.0498449060812074, - 84, 16, 0.000538192853242546, "contGamma", "debCollin1", "contNormal", - "", "", 0.982931832408096, 0.0251569486056325, - 0.0213934075105614, -0.0180265057418691, 0.0245003681307758, - 16, 50, 0.00323693119445334, "contGamma", "debCollin1", "contNormal", - "", "", 0.765424484282791, 0.0108488916653805, - 0.298365150495751, -0.0210293202652443, 0.0273853886799507, - 50, 50, 0.00317803420735324, "contGamma", "debCollin1", "contNormal", - "", "", 0.79693825504087, 0.0123509180084645, - 0.25731157839241, -0.0487685203747223, 0.0498449060812074, 84, - 50, 0.000538192853242546, "contGamma", "debCollin1", "contNormal", - "", "", 0.982931832408096, 0.0251569486056325, - 0.0213934075105614, -0.0180265057418691, 0.0245003681307758, - 16, 84, 0.00323693119445334, "contGamma", "debCollin1", "contNormal", - "", "", 0.765424484282791, 0.0108488916653805, - 0.298365150495751, -0.0210293202652443, 0.0273853886799507, - 50, 84, 0.00317803420735324, "contGamma", "debCollin1", "contNormal", - "", "", 0.79693825504087, 0.0123509180084645, - 0.25731157839241, -0.0487685203747223, 0.0498449060812074, 84, - 84, 0.000538192853242546, "contGamma", "debCollin1", "contNormal", - "", "", 0.982931832408096, 0.0251569486056325, - 0.0213934075105614)) + list(-0.198257291752067, 0.164308253269647, "", 16, -0.0169745192412099, + "contGamma", "contNormal", "", "", "", 0.854388158094762, + 0.0924929100436502, -0.183522382777221, -0.181938084652726, + 0.0938483512463, "", 50, -0.0440448667032129, "contGamma", "contNormal", + "", "", "", 0.531290216458725, 0.0703549754164858, + -0.626037695876903, -0.292841501221516, 0.141290563238618, "", + 84, -0.0757754689914489, "contGamma", "contNormal", "", "", + "", 0.493847105408405, 0.110750010685021, -0.684202814272935, + -0.0180266664740705, 0.0245005982500328, 16, 16, 0.00323696588798118, + "contGamma", "debCollin1", "contNormal", "", "", + 0.765424136515877, 0.0108489913742173, 0.298365606195784, -0.021029387334211, + 0.0273854763721997, 50, 16, 0.00317804451899438, "contGamma", + "debCollin1", "contNormal", "", "", 0.796938245490099, + 0.0123509574890919, 0.257311590765426, -0.0487685140025847, + 0.0498449039203219, 84, 16, 0.000538194958868613, "contGamma", + "debCollin1", "contNormal", "", "", 0.982931764164084, + 0.0251569464288009, 0.0213934930613225, -0.0180266664740705, + 0.0245005982500328, 16, 50, 0.00323696588798118, "contGamma", + "debCollin1", "contNormal", "", "", 0.765424136515877, + 0.0108489913742173, 0.298365606195784, -0.021029387334211, 0.0273854763721997, + 50, 50, 0.00317804451899438, "contGamma", "debCollin1", "contNormal", + "", "", 0.796938245490099, 0.0123509574890919, + 0.257311590765426, -0.0487685140025847, 0.0498449039203219, + 84, 50, 0.000538194958868613, "contGamma", "debCollin1", "contNormal", + "", "", 0.982931764164084, 0.0251569464288009, + 0.0213934930613225, -0.0180266664740705, 0.0245005982500328, + 16, 84, 0.00323696588798118, "contGamma", "debCollin1", "contNormal", + "", "", 0.765424136515877, 0.0108489913742173, + 0.298365606195784, -0.021029387334211, 0.0273854763721997, 50, + 84, 0.00317804451899438, "contGamma", "debCollin1", "contNormal", + "", "", 0.796938245490099, 0.0123509574890919, + 0.257311590765426, -0.0487685140025847, 0.0498449039203219, + 84, 84, 0.000538194958868613, "contGamma", "debCollin1", "contNormal", + "", "", 0.982931764164084, 0.0251569464288009, + 0.0213934930613225)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.180746014700651, 0.0943533250189816, -0.0431963448408347, "contGamma", - "", 0.538217569644356, "contNormal", 0.0701796925580218, - -0.615510602374351, -2.92780444902321, 2.22882822325467, -0.349488112884269, - "debCollin1", "", 0.79049252943065, "contNormal", 1.31549169090676, - -0.265671091121351, -1.80178079001542, 1.6407977205733, -0.0804915347210627, - "contcor2", "", 0.926974116911498, "contNormal", 0.878224941310998, - -0.0916525265166193, -2.19066146855156, 2.73046811733237, 0.269903324390404, - "debCollin1:contcor2", "", 0.82977385709186, "contNormal", - 1.25541326899402, 0.21499161356378, -0.166732474576653, 0.109970760666139, - -0.028380856955257, "contGamma:contcor2", "", 0.687640901219012, - "contNormal", 0.0705888570977305, -0.402058598511712, -0.0197475130592971, - 0.00116000581571124, -0.00929375362179295, "contGamma", "", - 0.0814252300972105, "debCollin1", 0.00533364874046774, -1.74247575609524, - -0.018547598585974, 0.035078762002586, 0.008265581708306, "contcor1", - "", 0.545717649495997, "debCollin1", 0.0136804454090886, - 0.604189517310215, -0.0145563053631017, 0.00654285984153714, - -0.00400672276078226, "contGamma:contcor1", "", 0.456638932325284, - "debCollin1", 0.00538253900864157, -0.744392702839596)) + list(-0.180745927408927, 0.0943534122644299, -0.0431962575722485, "contGamma", + "", 0.538218390531766, "contNormal", 0.0701796925462165, + -0.615509358975915, -2.92780443801911, 2.2288282323235, -0.349488102847809, + "debCollin1", "", 0.790492535230182, "contNormal", + 1.31549169041306, -0.26567108359162, -1.80178101234005, 1.64079749125286, + -0.0804917605435976, "contcor2", "", 0.926973912459222, + "contNormal", 0.878224939526322, -0.0916527838380581, -2.19066160960315, + 2.73046796451399, 0.269903177455421, "debCollin1:contcor2", + "", 0.829773947942926, "contNormal", 1.25541326599223, + 0.214991497036715, -0.166733193946768, 0.109970041373895, -0.0283815762864364, + "contGamma:contcor2", "", 0.687633401845397, "contNormal", + 0.0705888571175957, -0.402068788833837, -0.0197475468768656, + 0.00115997870486027, -0.00929378408600266, "contGamma", "", + 0.0814243292111749, "debCollin1", 0.00533365045139649, -1.74248090884345, + -0.0185477678023022, 0.0350786099887227, 0.00826542109321028, + "contcor1", "", 0.545725583090223, "debCollin1", 0.0136804497975532, + 0.604177583012556, -0.0145562790871735, 0.0065428928857799, + -0.00400669310069681, "contGamma:contcor1", "", 0.456642409478497, + "debCollin1", 0.00538254073528417, -0.744386953624287)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.193954284588197, 0.166477604777358, 16, 16, -0.0137383399054194, - "Total", 0.881227550860308, 0.0919486001295421, -0.149413257907832, - -0.176835330310604, 0.0951015337977164, 50, 16, -0.0408668982564437, - "Total", 0.555800876074594, 0.0693729237509779, -0.589090037535971, - -0.286360680745365, 0.135887605372302, 84, 16, -0.0752365376865317, - "Total", 0.484892125517138, 0.107718378870303, -0.698455903955996, - -0.193954284588197, 0.166477604777358, 16, 50, -0.0137383399054194, - "Total", 0.881227550860308, 0.0919486001295421, -0.149413257907832, - -0.176835330310604, 0.0951015337977164, 50, 50, -0.0408668982564437, - "Total", 0.555800876074594, 0.0693729237509779, -0.589090037535971, - -0.286360680745365, 0.135887605372302, 84, 50, -0.0752365376865317, - "Total", 0.484892125517138, 0.107718378870303, -0.698455903955996, - -0.193954284588197, 0.166477604777358, 16, 84, -0.0137383399054194, - "Total", 0.881227550860308, 0.0919486001295421, -0.149413257907832, - -0.176835330310604, 0.0951015337977164, 50, 84, -0.0408668982564437, - "Total", 0.555800876074594, 0.0693729237509779, -0.589090037535971, - -0.286360680745365, 0.135887605372302, 84, 84, -0.0752365376865317, - "Total", 0.484892125517138, 0.107718378870303, -0.698455903955996, - -0.0180265057418691, 0.0245003681307758, 16, 16, 0.00323693119445334, - "Total indirect", 0.765424484282791, 0.0108488916653805, 0.298365150495751, - -0.0210293202652443, 0.0273853886799507, 50, 16, 0.00317803420735324, - "Total indirect", 0.79693825504087, 0.0123509180084645, 0.25731157839241, - -0.0487685203747223, 0.0498449060812074, 84, 16, 0.000538192853242546, - "Total indirect", 0.982931832408096, 0.0251569486056325, 0.0213934075105614, - -0.0180265057418691, 0.0245003681307758, 16, 50, 0.00323693119445334, - "Total indirect", 0.765424484282791, 0.0108488916653805, 0.298365150495751, - -0.0210293202652443, 0.0273853886799507, 50, 50, 0.00317803420735324, - "Total indirect", 0.79693825504087, 0.0123509180084645, 0.25731157839241, - -0.0487685203747223, 0.0498449060812074, 84, 50, 0.000538192853242546, - "Total indirect", 0.982931832408096, 0.0251569486056325, 0.0213934075105614, - -0.0180265057418691, 0.0245003681307758, 16, 84, 0.00323693119445334, - "Total indirect", 0.765424484282791, 0.0108488916653805, 0.298365150495751, - -0.0210293202652443, 0.0273853886799507, 50, 84, 0.00317803420735324, - "Total indirect", 0.79693825504087, 0.0123509180084645, 0.25731157839241, - -0.0487685203747223, 0.0498449060812074, 84, 84, 0.000538192853242546, - "Total indirect", 0.982931832408096, 0.0251569486056325, 0.0213934075105614 + list(-0.193953495597698, 0.166478388891241, 16, 16, -0.0137375533532287, + "Total", 0.881234298819666, 0.0919485988854846, -0.149404705669717, + -0.176835254642555, 0.0951016102741182, 50, 16, -0.0408668221842186, + "Total", 0.555801612813024, 0.0693729239571943, -0.589088939215463, + -0.286361417111115, 0.135886869045955, 84, 16, -0.0752372740325803, + "Total", 0.484887851917986, 0.107718378880355, -0.698462739734953, + -0.193953495597698, 0.166478388891241, 16, 50, -0.0137375533532287, + "Total", 0.881234298819666, 0.0919485988854846, -0.149404705669717, + -0.176835254642555, 0.0951016102741182, 50, 50, -0.0408668221842186, + "Total", 0.555801612813024, 0.0693729239571943, -0.589088939215463, + -0.286361417111115, 0.135886869045955, 84, 50, -0.0752372740325803, + "Total", 0.484887851917986, 0.107718378880355, -0.698462739734953, + -0.193953495597698, 0.166478388891241, 16, 84, -0.0137375533532287, + "Total", 0.881234298819666, 0.0919485988854846, -0.149404705669717, + -0.176835254642555, 0.0951016102741182, 50, 84, -0.0408668221842186, + "Total", 0.555801612813024, 0.0693729239571943, -0.589088939215463, + -0.286361417111115, 0.135886869045955, 84, 84, -0.0752372740325803, + "Total", 0.484887851917986, 0.107718378880355, -0.698462739734953, + -0.0180266664740705, 0.0245005982500328, 16, 16, 0.00323696588798118, + "Total indirect", 0.765424136515877, 0.0108489913742173, 0.298365606195784, + -0.021029387334211, 0.0273854763721997, 50, 16, 0.00317804451899438, + "Total indirect", 0.796938245490099, 0.0123509574890919, 0.257311590765426, + -0.0487685140025847, 0.0498449039203219, 84, 16, 0.000538194958868613, + "Total indirect", 0.982931764164084, 0.0251569464288009, 0.0213934930613225, + -0.0180266664740705, 0.0245005982500328, 16, 50, 0.00323696588798118, + "Total indirect", 0.765424136515877, 0.0108489913742173, 0.298365606195784, + -0.021029387334211, 0.0273854763721997, 50, 50, 0.00317804451899438, + "Total indirect", 0.796938245490099, 0.0123509574890919, 0.257311590765426, + -0.0487685140025847, 0.0498449039203219, 84, 50, 0.000538194958868613, + "Total indirect", 0.982931764164084, 0.0251569464288009, 0.0213934930613225, + -0.0180266664740705, 0.0245005982500328, 16, 84, 0.00323696588798118, + "Total indirect", 0.765424136515877, 0.0108489913742173, 0.298365606195784, + -0.021029387334211, 0.0273854763721997, 50, 84, 0.00317804451899438, + "Total indirect", 0.796938245490099, 0.0123509574890919, 0.257311590765426, + -0.0487685140025847, 0.0498449039203219, 84, 84, 0.000538194958868613, + "Total indirect", 0.982931764164084, 0.0251569464288009, 0.0213934930613225 )) @@ -5949,7 +5955,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 28 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -5960,25 +5966,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -5994,113 +6000,114 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962234812516576, 0.0896224012887609, 0.0400000265817976, - "facExperimexperimental", "", 0.114128746016462, "facGenderm", - 0.0253180033400503, 1.57990446736856, -0.16325081251521, 0.03419929269364, - -0.0645257599107848, "contcor2", "", 0.200188780862983, - "facGenderm", 0.0503708503743719, -1.2810139084651, -0.170527464526241, - 0.0272978671120944, -0.0716147987070734, "facExperimexperimental", - "", 0.155883237615902, "contcor2", 0.0504665731612307, - -1.419054122781, 0.18070485127697, 0.319295339438415, 0.250000095357692, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.035355366030863, 7.07106511468325, 0.180704877749572, 0.319295431773593, - 0.250000154761583, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553828328495, 7.07106343448504, - 0.721542099525766, 1.27492461710963, 0.998233358317696, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171603649065, - 7.07106339033438, 0.00474535426877002, 0.00838477397539259, - 0.0065650641220813, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000928440454857807, 7.07106641867168, 0.758256192422096, - 1.33979586702951, 1.0490260297258, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.148354683860145, 7.0710678114803, - 0.318532754787, 0.562829199392322, 0.440680977089661, "debCollin1:contcor2", - "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623216667582419, - 7.07107174779439)) + list(-0.163250812541718, 0.0341992927628621, -0.0645257598894278, "contcor2", + "", 0.200188781230052, "facGenderm", 0.0503708503987933, + -1.28101390742003, -0.00962234809567379, 0.089622401355736, + 0.0400000266300311, "facExperimexperimental", "", 0.11412874571678, + "facGenderm", 0.0253180033496125, 1.57990446867696, 0.180704851294336, + 0.319295339499363, 0.25000009539685, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553660419811, 7.07106511356716, + 0.758256192425586, 1.33979586702602, 1.0490260297258, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.148354683858364, + 7.07106781156517, 0.00474535426971094, 0.00838477397867451, + 0.00656506412419273, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000928440455455009, 7.07106641639752, -0.170527464759418, + 0.0272978669943029, -0.0716147988825575, "facExperimexperimental", + "", 0.155883236843508, "contcor2", 0.0504665731906662, + -1.41905412543055, 0.180704877768291, 0.319295431838871, 0.250000154803581, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553828447268, 7.0710634332975, + 0.721542099666102, 1.27492461761198, 0.998233358639043, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171603741419, + 7.07106338798478, 0.318532755010625, 0.562829200173779, 0.440680977592202, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623216669005485, 7.07107173971182)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.135444582762512, 1.00628609571759, 16, 0.43542075647754, "", - "m", "facGender", "contNormal", "", "", "", 0.13493029810259, - 0.291263178172132, 1.49493924776242, 0.0757137061439992, 0.886683891071008, + list(-0.135444582794549, 1.00628609574963, 16, 0.43542075647754, "", + "m", "facGender", "contNormal", "", "", "", 0.134930298124487, + 0.291263178188478, 1.49493924767853, 0.0757137061531458, 0.886683891061862, 50, 0.481198798607504, "", "m", "facGender", "contNormal", "", - "", "", 0.0200219729812672, 0.206883950757218, 2.32593585363323, - -0.0691339820255702, 1.13884936305542, 84, 0.534857690514926, - "", "m", "facGender", "contNormal", "", "", "", 0.0826305247516859, - 0.30816467920059, 1.73562295296917, -0.0303424105849761, 0.0255524279872925, - 16, -0.00239499129884181, "", "m", "facGender", "debCollin1", - "contNormal", "", "", 0.866613392056803, 0.0142591494061013, - -0.167961722724991, -0.0432540528715142, 0.0450103493320848, - 16, 0.000878148230285331, "", "m", "facGender", "debCollin1", - "contNormal", "", "", 0.968890694620871, 0.0225168428858431, - 0.0389996161867543, -0.0246862544664141, 0.0292273891561552, - 50, 0.00227056734487058, "", "m", "facGender", "debCollin1", - "contNormal", "", "", 0.868875231292622, 0.0137537332440375, - 0.165087347891884, -0.0303424105849761, 0.0255524279872925, - 50, -0.00239499129884181, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.866613392056803, 0.0142591494061013, - -0.167961722724991, -0.0432540528715142, 0.0450103493320848, - 84, 0.000878148230285331, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.968890694620871, 0.0225168428858431, - 0.0389996161867543, -0.0246862544664141, 0.0292273891561552, - 84, 0.00227056734487058, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.868875231292622, 0.0137537332440375, - 0.165087347891884)) + "", "", 0.0200219729784676, 0.206883950752551, 2.32593585368569, + -0.0691339820116323, 1.13884936304148, 84, 0.534857690514926, + "", "m", "facGender", "contNormal", "", "", "", 0.0826305247445993, + 0.308164679193479, 1.73562295300922, -0.030342410751377, 0.0255524281101448, + 16, -0.00239499132061609, "", "m", "facGender", "debCollin1", + "contNormal", "", "", 0.866613391539271, 0.0142591494798918, + -0.167961723382836, -0.0432540526396979, 0.0450103490909045, + 16, 0.000878148225603298, "", "m", "facGender", "debCollin1", + "contNormal", "", "", 0.968890694620027, 0.0225168427651785, + 0.038999616187813, -0.0246862546049003, 0.0292273893359275, + 50, 0.00227056736551364, "", "m", "facGender", "debCollin1", + "contNormal", "", "", 0.868875230878319, 0.0137537333252273, + 0.16508734841826, -0.030342410751377, 0.0255524281101448, 50, + -0.00239499132061609, 0, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.866613391539271, 0.0142591494798918, + -0.167961723382836, -0.0432540526396979, 0.0450103490909045, + 84, 0.000878148225603298, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.968890694620027, 0.0225168427651785, + 0.038999616187813, -0.0246862546049003, 0.0292273893359275, + 84, 0.00227056736551364, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.868875230878319, 0.0137537333252273, + 0.16508734841826)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.073767679865626, 0.885759790572938, 0.479763735219282, "facGenderm", - "", 0.0205538609864906, "contNormal", 0.207144650899762, - 2.31608073457538, -2.54476291303984, 2.41928296099942, -0.0627399760202099, - "debCollin1", "", 0.96048617496326, "contNormal", 1.26636150286307, - -0.0495434959751726, -1.86353517510114, 1.35827907444682, -0.25262805032716, - "contcor2", "", 0.758563008786937, "contNormal", 0.821906492915488, - -0.307368359423748, -1.92803333317114, 2.82671941062047, 0.449343038724664, - "debCollin1:contcor2", "", 0.711048134943742, "contNormal", - 1.21296941711595, 0.370448778331984, -0.362156661865156, 0.458147523953568, - 0.0479954310442059, "facGenderm:contcor2", "", 0.818595125271111, - "contNormal", 0.209265117188168, 0.229352276619754, -0.0404917926652499, - 0.050515025101477, 0.00501161621811355, "facGenderm", "", - 0.829093083763508, "debCollin1", 0.0232164515482369, 0.215864866674431, - -0.0488495909410583, 0.0421572268261069, -0.00334618205747573, - "facExperimexperimental", "", 0.88539798907375, "debCollin1", - 0.0232164515483487, -0.144129780147808, -0.0871738227531328, - 0.0415292532006448, -0.022822284776244, "facGenderm:facExperimexperimental", - "", 0.48699163996797, "debCollin1", 0.0328330206496066, - -0.695101587508595)) + list(0.0737676798736817, 0.885759790564882, 0.479763735219282, "facGenderm", + "", 0.0205538609839819, "contNormal", 0.207144650895652, + 2.31608073462134, -2.54476291299629, 2.41928296095587, -0.0627399760202098, + "debCollin1", "", 0.960486174962567, "contNormal", + 1.26636150284085, -0.0495434959760417, -1.86353518855783, 1.35827908790351, + -0.25262805032716, "contcor2", "", 0.758563010741059, + "contNormal", 0.82190649978127, -0.307368356856152, -1.92803335321365, + 2.82671943066298, 0.449343038724664, "debCollin1:contcor2", + "", 0.711048137270347, "contNormal", 1.21296942734191, + 0.370448775208911, -0.36215666188734, 0.458147523975752, 0.047995431044206, + "facGenderm:contcor2", "", 0.818595125280752, "contNormal", + 0.209265117199486, 0.22935227660735, -0.0404917926273081, 0.0505150251546623, + 0.0050116162636771, "facGenderm", "", 0.829093082261863, + "debCollin1", 0.0232164515521256, 0.215864868600829, -0.0488495909117637, + 0.0421572268701035, -0.0033461820208301, "facExperimexperimental", + "", 0.885397990338531, "debCollin1", 0.0232164515520993, + -0.14412977854609, -0.0871738227146612, 0.0415292532609687, + -0.0228222847268463, "facGenderm:facExperimexperimental", "", + 0.486991640984724, "debCollin1", 0.0328330206551813, -0.695101585886061 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.139902729661894, 1.00595426001929, 16, 0.433025765178698, 0, - "m", "Total", 0.138509947695741, 0.292315827923258, 1.48136270367262, - 0.0762223526994046, 0.887931540976173, 16, 0.482076946837789, - 1, "m", "Total", 0.0199089692971641, 0.207072475484097, 2.32805903204074, - -0.0690489717749763, 1.14330548749457, 50, 0.537128257859796, - 0, "m", "Total", 0.082438959087817, 0.309279779840967, 1.73670667424812, - -0.139902729661894, 1.00595426001929, 50, 0.433025765178698, - 1, "m", "Total", 0.138509947695741, 0.292315827923258, 1.48136270367262, - 0.0762223526994046, 0.887931540976173, 84, 0.482076946837789, - 0, "m", "Total", 0.0199089692971641, 0.207072475484097, 2.32805903204074, - -0.0690489717749763, 1.14330548749457, 84, 0.537128257859796, - 1, "m", "Total", 0.082438959087817, 0.309279779840967, 1.73670667424812, - -0.0303424105849761, 0.0255524279872925, 16, -0.00239499129884181, - 0, "m", "Total indirect", 0.866613392056803, 0.0142591494061013, - -0.167961722724991, -0.0432540528715142, 0.0450103493320848, - 16, 0.000878148230285331, 1, "m", "Total indirect", 0.968890694620871, - 0.0225168428858431, 0.0389996161867543, -0.0246862544664141, - 0.0292273891561552, 50, 0.00227056734487058, 0, "m", "Total indirect", - 0.868875231292622, 0.0137537332440375, 0.165087347891884, -0.0303424105849761, - 0.0255524279872925, 50, -0.00239499129884181, 1, "m", "Total indirect", - 0.866613392056803, 0.0142591494061013, -0.167961722724991, -0.0432540528715142, - 0.0450103493320848, 84, 0.000878148230285331, 0, "m", "Total indirect", - 0.968890694620871, 0.0225168428858431, 0.0389996161867543, -0.0246862544664141, - 0.0292273891561552, 84, 0.00227056734487058, 1, "m", "Total indirect", - 0.868875231292622, 0.0137537332440375, 0.165087347891884)) + list(-0.139902729746908, 1.00595426006076, 16, 0.433025765156924, 0, + "m", "Total", 0.138509947759129, 0.292315827955523, 1.48136270343462, + 0.0762223526966022, 0.887931540969612, 16, 0.482076946833107, + 1, "m", "Total", 0.0199089692977923, 0.207072475483139, 2.32805903202892, + -0.0690489717741938, 1.14330548753507, 50, 0.53712825788044, + 0, "m", "Total", 0.0824389590860783, 0.309279779851101, 1.73670667425796, + -0.139902729746908, 1.00595426006076, 50, 0.433025765156924, + 1, "m", "Total", 0.138509947759129, 0.292315827955523, 1.48136270343462, + 0.0762223526966022, 0.887931540969612, 84, 0.482076946833107, + 0, "m", "Total", 0.0199089692977923, 0.207072475483139, 2.32805903202892, + -0.0690489717741938, 1.14330548753507, 84, 0.53712825788044, + 1, "m", "Total", 0.0824389590860783, 0.309279779851101, 1.73670667425796, + -0.030342410751377, 0.0255524281101448, 16, -0.00239499132061609, + 0, "m", "Total indirect", 0.866613391539271, 0.0142591494798918, + -0.167961723382836, -0.0432540526396979, 0.0450103490909045, + 16, 0.000878148225603298, 1, "m", "Total indirect", 0.968890694620027, + 0.0225168427651785, 0.038999616187813, -0.0246862546049003, + 0.0292273893359275, 50, 0.00227056736551364, 0, "m", "Total indirect", + 0.868875230878319, 0.0137537333252273, 0.16508734841826, -0.030342410751377, + 0.0255524281101448, 50, -0.00239499132061609, 1, "m", "Total indirect", + 0.866613391539271, 0.0142591494798918, -0.167961723382836, -0.0432540526396979, + 0.0450103490909045, 84, 0.000878148225603298, 0, "m", "Total indirect", + 0.968890694620027, 0.0225168427651785, 0.038999616187813, -0.0246862546049003, + 0.0292273893359275, 84, 0.00227056736551364, 1, "m", "Total indirect", + 0.868875230878319, 0.0137537333252273, 0.16508734841826)) @@ -6116,7 +6123,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 29 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -6127,27 +6134,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -6156,158 +6163,158 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1198.91216990468, 1264.04142455438, 14, "Model 1", 100, -574.456084952338, + list(1198.9121699047, 1264.04142455441, 14, "Model 1", 100, -574.456084952352, 29)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848313902713, 0.0642086131297476, -0.240319850386483, "contcor1", - "", 0.121932373343228, "contGamma", 0.155374520102569, - -1.54671338793412, -0.40393470594941, 0.194627640273111, -0.104653532838149, - "contcor2", "", 0.493112962359973, "contGamma", 0.152697281925562, - -0.685366049208174, 0.424979245068899, 0.896763198488638, 0.660871221778768, - "contcor2", "", 3.99655248894959e-08, "contcor1", 0.120355260897932, - 5.49100402299175, 1.68041105838834, 2.96919171268232, 2.32480138553533, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776616422473, 7.07106670429382, 0.732634555616109, 1.29452382204058, - 1.01357918882834, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341732515643, 7.07106835560071, 0.721541854627245, - 1.27492376291624, 0.998232808771742, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171448213845, 7.07106728309276, - 0.00465468545710031, 0.00822456582760762, 0.00643962564235396, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000910700502321999, 7.07106850818128, 0.769964635542683, 1.36048403332848, - 1.06522433443558, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.150645471662677, 7.07106773724212, 0.318532876477623, - 0.562829623844158, 0.44068125016089, "debCollin1:contcor2", - "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217439946645, - 7.07106736612856)) + list(-0.403935110967608, 0.194627435288523, -0.104653837839543, "contcor2", + "", 0.493111846740592, "contGamma", 0.152697332955482, + -0.685367817590199, -0.544848845167012, 0.0642083332770456, + -0.240320255944983, "contcor1", "", 0.121931897677982, + "contGamma", 0.155374584239359, -1.54671535966759, 1.68041132168163, + 2.9691926310392, 2.32480197636042, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776783533606, 7.07106490724212, + 0.769964636041352, 1.36048403507066, 1.065224335556, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.150645471979905, + 7.07106772978942, 0.00465468645666783, 0.00822456931404296, + 0.00643962788535539, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910701136738712, 7.0710660452409, 0.424979293021199, + 0.896763331600413, 0.660871312310806, "contcor2", "", + 3.99655790683795e-08, "contcor1", 0.120355282622688, 5.49100378404352, + 0.732634594484303, 1.29452395759921, 1.01357927604175, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341757182023, + 7.0710677472347, 0.721541878706891, 1.27492384690129, 0.998232862804092, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171463496117, + 7.07106690036933, 0.318532873476458, 0.562829613376113, 0.440681243426286, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623217420898129, 7.07106747419243)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.179641370076937, 0.198135275357551, 16, 16, 0.00924695264030705, - "contGamma", "contNormal", "", "", "", 0.923560873914872, - 0.0963733641062649, 0.095949256582047, -0.253471002568666, 0.255842529156523, - 50, 16, 0.0011857632939285, "contGamma", "contNormal", "", "", - "", 0.99271843204229, 0.129929308840007, 0.00912621874552284, - -0.481391755921172, 0.466167755267355, 84, 16, -0.00761200032690871, - "contGamma", "contNormal", "", "", "", 0.974878898350124, - 0.241728806922667, -0.0314898353399143, -0.289015150202656, - 0.254388143179567, 16, 50, -0.0173135035115446, "contGamma", - "contNormal", "", "", "", 0.900607649528723, 0.138625836410393, - -0.124893771318999, -0.162492608177849, 0.111743222462002, 50, - 50, -0.0253746928579231, "contGamma", "contNormal", "", "", - "", 0.716824552444996, 0.0699594055816812, -0.362705952787104, - -0.328338967267451, 0.25999405430993, 84, 50, -0.0341724564787603, - "contGamma", "contNormal", "", "", "", 0.819892503628492, - 0.150087712380961, -0.227683238931791, -0.540489592885683, 0.443596723044875, - 16, 84, -0.048446434920404, "contGamma", "contNormal", "", "", - "", 0.846976574774275, 0.251047040581589, -0.192977518508764, - -0.353829629040001, 0.240814380506436, 50, 84, -0.0565076242667826, - "contGamma", "contNormal", "", "", "", 0.709519456193403, - 0.151697687875112, -0.372501552649263, -0.285373928248714, 0.154763152473475, - 84, 84, -0.0653053878876198, "contGamma", "contNormal", "", - "", "", 0.560822840353068, 0.112281930737997, -0.581619744676514, - -0.0178571749763038, 0.0222266466188765, 16, 16, 0.00218473582128636, + list(-0.179641321269042, 0.198135324313693, 16, 16, 0.0092470015223257, + "contGamma", "contNormal", "", "", "", 0.923560471104347, + 0.0963733641440836, 0.0959497637594233, -0.253470947204717, + 0.255842584775245, 50, 16, 0.00118581878526412, "contGamma", + "contNormal", "", "", "", 0.992718091292669, 0.129929308905001, + 0.00912664582962682, -0.481391693495552, 0.466167818250865, + 84, 16, -0.00761193762234363, "contGamma", "contNormal", "", + "", "", 0.974879105233945, 0.241728807064988, -0.0314895759209087, + -0.289015084908431, 0.25438820883259, 16, 50, -0.0173134380379206, + "contGamma", "contNormal", "", "", "", 0.900608023510926, + 0.138625836501925, -0.124893298931907, -0.162492536165, 0.111743294615036, + 50, 50, -0.0253746207749821, "contGamma", "contNormal", "", + "", "", 0.716825322351051, 0.0699594056174433, -0.362704922247872, + -0.32833888812935, 0.25999413376417, 84, 50, -0.0341723771825899, + "contGamma", "contNormal", "", "", "", 0.819892914485673, + 0.150087712461611, -0.227682710477252, -0.540489508278865, 0.443596808281121, + 16, 84, -0.0484463499988718, "contGamma", "contNormal", "", + "", "", 0.846976839791801, 0.25104704074216, -0.192977180115933, + -0.353829537671399, 0.240814472199532, 50, 84, -0.0565075327359334, + "contGamma", "contNormal", "", "", "", 0.709519905501389, + 0.151697687957893, -0.372500949069299, -0.285373829556801, 0.154763251269719, + 84, 84, -0.0653052891435412, "contGamma", "contNormal", "", + "", "", 0.560823432940642, 0.112281930764612, -0.581618865108823, + -0.0178571768616958, 0.0222266488051953, 16, 16, 0.00218473597174976, "contGamma", "debCollin1", "contNormal", "", "", - 0.830818087416301, 0.010225652591414, 0.213652459024549, -0.0213709551107379, - 0.0261026403015682, 50, 16, 0.00236584259541517, "contGamma", - "debCollin1", "contNormal", "", "", 0.845119522290275, - 0.0121108336139775, 0.19534927741759, -0.0477632054084346, 0.049888265068536, - 84, 16, 0.00106252983005068, "contGamma", "debCollin1", "contNormal", - "", "", 0.965978862516964, 0.0249115471629155, - 0.0426521011762936, -0.0178571749763038, 0.0222266466188765, - 16, 50, 0.00218473582128636, "contGamma", "debCollin1", "contNormal", - "", "", 0.830818087416301, 0.010225652591414, - 0.213652459024549, -0.0213709551107379, 0.0261026403015682, - 50, 50, 0.00236584259541517, "contGamma", "debCollin1", "contNormal", - "", "", 0.845119522290275, 0.0121108336139775, - 0.19534927741759, -0.0477632054084346, 0.049888265068536, 84, - 50, 0.00106252983005068, "contGamma", "debCollin1", "contNormal", - "", "", 0.965978862516964, 0.0249115471629155, - 0.0426521011762936, -0.0178571749763038, 0.0222266466188765, - 16, 84, 0.00218473582128636, "contGamma", "debCollin1", "contNormal", - "", "", 0.830818087416301, 0.010225652591414, - 0.213652459024549, -0.0213709551107379, 0.0261026403015682, - 50, 84, 0.00236584259541517, "contGamma", "debCollin1", "contNormal", - "", "", 0.845119522290275, 0.0121108336139775, - 0.19534927741759, -0.0477632054084346, 0.049888265068536, 84, - 84, 0.00106252983005068, "contGamma", "debCollin1", "contNormal", - "", "", 0.965978862516964, 0.0249115471629155, - 0.0426521011762936)) + 0.830818092866484, 0.0102256536301348, 0.213652452036061, -0.0213709617449345, + 0.0261026480780367, 50, 16, 0.00236584316655113, "contGamma", + "debCollin1", "contNormal", "", "", 0.845119531793056, + 0.0121108372902352, 0.195349265278188, -0.0477632245327319, + 0.0498882844506729, 84, 16, 0.0010625299589705, "contGamma", + "debCollin1", "contNormal", "", "", 0.965978871798838, + 0.0249115569861659, 0.0426520895326033, -0.0178571768616958, + 0.0222266488051953, 16, 50, 0.00218473597174976, "contGamma", + "debCollin1", "contNormal", "", "", 0.830818092866484, + 0.0102256536301348, 0.213652452036061, -0.0213709617449345, + 0.0261026480780367, 50, 50, 0.00236584316655113, "contGamma", + "debCollin1", "contNormal", "", "", 0.845119531793056, + 0.0121108372902352, 0.195349265278188, -0.0477632245327319, + 0.0498882844506729, 84, 50, 0.0010625299589705, "contGamma", + "debCollin1", "contNormal", "", "", 0.965978871798838, + 0.0249115569861659, 0.0426520895326033, -0.0178571768616958, + 0.0222266488051953, 16, 84, 0.00218473597174976, "contGamma", + "debCollin1", "contNormal", "", "", 0.830818092866484, + 0.0102256536301348, 0.213652452036061, -0.0213709617449345, + 0.0261026480780367, 50, 84, 0.00236584316655113, "contGamma", + "debCollin1", "contNormal", "", "", 0.845119531793056, + 0.0121108372902352, 0.195349265278188, -0.0477632245327319, + 0.0498882844506729, 84, 84, 0.0010625299589705, "contGamma", + "debCollin1", "contNormal", "", "", 0.965978871798838, + 0.0249115569861659, 0.0426520895326033)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.161473237519976, 0.112449344975185, -0.0245119462723954, "contGamma", - "", 0.725757510403683, "contNormal", 0.0698794938722925, - -0.350774525030075, -2.79872513552067, 2.28099168969195, -0.258866722914359, - "debCollin1", "", 0.841666026702635, "contNormal", - 1.29586994079503, -0.199762888824739, -0.225570703793758, 0.758946802716719, - 0.266688049461481, "contcor1", "", 0.288309307389546, - "contNormal", 0.251157040199776, 1.06183784157255, -0.251164560087079, - 0.234614188792647, -0.00827518564721555, "contGamma:contcor1", - "", 0.946760407019901, "contNormal", 0.123925427383229, - -0.0667755263947988, -1.87023507545667, 1.5319198710741, -0.169157602191284, - "contcor2", "", 0.845469941674309, "contNormal", 0.867912618131386, - -0.194901650992792, -2.28051659231782, 2.59510112108025, 0.157292264381216, - "debCollin1:contcor2", "", 0.899367204553731, "contNormal", - 1.24380288409795, 0.12646076511978, -0.258825154979583, 0.203131181081802, - -0.0278469869488904, "contGamma:contcor2", "", 0.813203412849314, - "contNormal", 0.117848169585063, -0.23629545581351, -0.0197475166671338, - 0.00116000083758488, -0.00929375791477444, "contGamma", "", - 0.0814250694067007, "debCollin1", 0.00533364839089761, -1.7424766751845, - -0.0185475984337779, 0.0350787586405597, 0.00826558010339088, - "contcor1", "", 0.54571770116262, "debCollin1", 0.0136804445125868, - 0.604189439589192, -0.0145563055396064, 0.00654285828233848, - -0.00400672362863395, "contGamma:contcor1", "", 0.456638805306261, - "debCollin1", 0.00538253865590704, -0.74439291285661)) + list(-0.161473166051625, 0.112449416583086, -0.0245118747342695, "contGamma", + "", 0.725758278623228, "contNormal", 0.0698794939078924, + -0.350773501115769, -2.79872512084433, 2.28099170728299, -0.258866706780672, + "debCollin1", "", 0.841666036529772, "contNormal", + 1.29586994153859, -0.199762876260035, -0.22557070012982, 0.758946806930505, + 0.266688053400342, "contcor1", "", 0.288309300537962, + "contNormal", 0.251157040340045, 1.06183785666239, -0.251164553453605, + 0.234614195728716, -0.00827517886244439, "contGamma:contcor1", + "", 0.946760450638972, "contNormal", 0.123925427460423, + -0.066775471604382, -1.87023506485268, 1.53191987459685, -0.169157595127918, + "contcor2", "", 0.845469947728008, "contNormal", 0.867912616324916, + -0.194901643260122, -2.28051658268173, 2.59510112074986, 0.157292269034065, + "debCollin1:contcor2", "", 0.899367201388141, "contNormal", + 1.24380288155544, 0.126460769119109, -0.258825137706534, 0.203131198599286, + -0.0278469695536237, "contGamma:contcor2", "", 0.81320352747752, + "contNormal", 0.11784816964742, -0.236295308081039, -0.0197475213221638, + 0.00115999982372788, -0.00929376074921794, "contGamma", "", + 0.08142502955033, "debCollin1", 0.00533364931978534, -1.74247690314818, + -0.0185475943218726, 0.0350787720914214, 0.00826558888477438, + "contcor1", "", 0.54571734439758, "debCollin1", 0.0136804468950175, + 0.604189976263479, -0.0145563097507707, 0.00654285774561049, + -0.00400672600258012, "contGamma:contcor1", "", 0.456638616964961, + "debCollin1", 0.00538253959328048, -0.744393224265751)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.175969808365041, 0.198833185288228, 16, 16, 0.0114316884615934, - "Total", 0.904831814658574, 0.0956147655287717, 0.119559865031029, - -0.250066836414305, 0.257170048192993, 50, 16, 0.00355160588934366, - "Total", 0.978103355666708, 0.129399542187591, 0.0274468195891675, - -0.477943660095758, 0.464844719102042, 84, 16, -0.00654947049685803, - "Total", 0.978275167082413, 0.240511659049451, -0.0272314054243475, - -0.285960646931991, 0.255703111551474, 16, 50, -0.0151287676902582, - "Total", 0.912818370510176, 0.138182069353325, -0.109484304013241, - -0.15809268281501, 0.112074982289994, 50, 50, -0.023008850262508, - "Total", 0.738499564831788, 0.0689215891812431, -0.333840971107059, - -0.322832772220889, 0.256612918923469, 84, 50, -0.0331099266487097, - "Total", 0.822767115940479, 0.147820494589429, -0.223987389168683, - -0.53792954561209, 0.445406147413855, 16, 84, -0.0462616990991177, - "Total", 0.85368736377257, 0.250855551628084, -0.184415687828607, - -0.350479939008041, 0.242196375665307, 50, 84, -0.0541417816713674, - "Total", 0.720275428606326, 0.151195715673426, -0.358090713286548, - -0.277402929422232, 0.148917213307094, 84, 84, -0.0642428580575691, - "Total", 0.554721341380095, 0.108757136889271, -0.590700159043144, - -0.0178571749763038, 0.0222266466188765, 16, 16, 0.00218473582128636, - "Total indirect", 0.830818087416301, 0.010225652591414, 0.213652459024549, - -0.0213709551107379, 0.0261026403015682, 50, 16, 0.00236584259541517, - "Total indirect", 0.845119522290275, 0.0121108336139775, 0.19534927741759, - -0.0477632054084346, 0.049888265068536, 84, 16, 0.00106252983005068, - "Total indirect", 0.965978862516964, 0.0249115471629155, 0.0426521011762936, - -0.0178571749763038, 0.0222266466188765, 16, 50, 0.00218473582128636, - "Total indirect", 0.830818087416301, 0.010225652591414, 0.213652459024549, - -0.0213709551107379, 0.0261026403015682, 50, 50, 0.00236584259541517, - "Total indirect", 0.845119522290275, 0.0121108336139775, 0.19534927741759, - -0.0477632054084346, 0.049888265068536, 84, 50, 0.00106252983005068, - "Total indirect", 0.965978862516964, 0.0249115471629155, 0.0426521011762936, - -0.0178571749763038, 0.0222266466188765, 16, 84, 0.00218473582128636, - "Total indirect", 0.830818087416301, 0.010225652591414, 0.213652459024549, - -0.0213709551107379, 0.0261026403015682, 50, 84, 0.00236584259541517, - "Total indirect", 0.845119522290275, 0.0121108336139775, 0.19534927741759, - -0.0477632054084346, 0.049888265068536, 84, 84, 0.00106252983005068, - "Total indirect", 0.965978862516964, 0.0249115471629155, 0.0426521011762936 + list(-0.175969759387681, 0.198833234375832, 16, 16, 0.0114317374940755, + "Total", 0.904831408434972, 0.0956147655568957, 0.119560377808729, + -0.250066780503028, 0.257170104406659, 50, 16, 0.00355166195181524, + "Total", 0.978103010125718, 0.129399542264732, 0.0274472528237316, + -0.477943597599363, 0.464844782272616, 84, 16, -0.00654940766337314, + "Total", 0.978275375467397, 0.240511659221438, -0.0272311441556483, + -0.285960581476038, 0.255703177343696, 16, 50, -0.0151287020661708, + "Total", 0.912818747223434, 0.138182069439109, -0.109483829034977, + -0.158092610229789, 0.112075055012927, 50, 50, -0.023008777608431, + "Total", 0.738500360466881, 0.0689215892163746, -0.333839916781323, + -0.322832692828799, 0.25661299838156, 84, 50, -0.0331098472236194, + "Total", 0.822767534049388, 0.147820494606266, -0.223986851835468, + -0.537929460849635, 0.445406232795391, 16, 84, -0.0462616140271221, + "Total", 0.853687629885909, 0.250855551786015, -0.184415348585086, + -0.350479847043212, 0.242196467904448, 50, 84, -0.0541416895693823, + "Total", 0.720275884583597, 0.151195715743405, -0.358090103963437, + -0.277402830079623, 0.148917311710482, 84, 84, -0.0642427591845707, + "Total", 0.554721949752536, 0.108757136649669, -0.59069925122717, + -0.0178571768616958, 0.0222266488051953, 16, 16, 0.00218473597174976, + "Total indirect", 0.830818092866484, 0.0102256536301348, 0.213652452036061, + -0.0213709617449345, 0.0261026480780367, 50, 16, 0.00236584316655113, + "Total indirect", 0.845119531793056, 0.0121108372902352, 0.195349265278188, + -0.0477632245327319, 0.0498882844506729, 84, 16, 0.0010625299589705, + "Total indirect", 0.965978871798838, 0.0249115569861659, 0.0426520895326033, + -0.0178571768616958, 0.0222266488051953, 16, 50, 0.00218473597174976, + "Total indirect", 0.830818092866484, 0.0102256536301348, 0.213652452036061, + -0.0213709617449345, 0.0261026480780367, 50, 50, 0.00236584316655113, + "Total indirect", 0.845119531793056, 0.0121108372902352, 0.195349265278188, + -0.0477632245327319, 0.0498882844506729, 84, 50, 0.0010625299589705, + "Total indirect", 0.965978871798838, 0.0249115569861659, 0.0426520895326033, + -0.0178571768616958, 0.0222266488051953, 16, 84, 0.00218473597174976, + "Total indirect", 0.830818092866484, 0.0102256536301348, 0.213652452036061, + -0.0213709617449345, 0.0261026480780367, 50, 84, 0.00236584316655113, + "Total indirect", 0.845119531793056, 0.0121108372902352, 0.195349265278188, + -0.0477632245327319, 0.0498882844506729, 84, 84, 0.0010625299589705, + "Total indirect", 0.965978871798838, 0.0249115569861659, 0.0426520895326033 )) @@ -6324,7 +6331,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 29 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -6335,27 +6342,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -6364,133 +6371,133 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(889.313169784859, 954.442424434561, 14, "Model 1", 100, -419.656584892429, + list(889.31316978486, 954.442424434562, 14, "Model 1", 100, -419.65658489243, 29)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962231689826301, 0.0896223925778612, 0.0400000378397991, - "facExperimexperimental", "", 0.114128498547006, "facGenderm", - 0.0253179931516482, 1.57990554781374, -0.163250850673636, 0.0341991867445267, - -0.0645258319645547, "contcor2", "", 0.200188123950153, - "facGenderm", 0.0503708330805116, -1.28101577874279, -0.17052746652535, - 0.0272977603902778, -0.0716148530675359, "contcor2", "", - 0.155882704613327, "facExperimexperimental", 0.0504665464457632, - -1.41905595114381, 0.180704837796205, 0.319295292418428, 0.250000065107316, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.035355357474782, 7.0710659702885, 0.180704843644348, 0.31929531281617, - 0.250000078230259, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553611864824, 7.07106559912172, - 0.721541981504427, 1.27492420543648, 0.998233093470455, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171528736514, - 7.07106526652115, 0.00474535448132225, 0.00838477471676307, - 0.00656506459904266, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.0009284405897629, 7.07106590494844, 0.755519568409719, - 1.33496040696641, 1.04523998768806, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.147819256661665, 7.07106781141821, - 0.318532863509418, 0.562829578614597, 0.440681221062007, "debCollin1:contcor2", - "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217357645755, - 7.07106783300629)) + list(-0.163250851571598, 0.0341991876423515, -0.0645258319646234, "contcor2", + "", 0.200188128041839, "facGenderm", 0.0503708335386289, + -1.28101576709345, -0.00962231710968488, 0.0896223937350757, + 0.0400000383126954, "facExperimexperimental", "", 0.114128499259206, + "facGenderm", 0.0253179935007965, 1.57990554470428, 0.180704838409114, + 0.31929529455749, 0.250000066483302, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553578641136, 7.07106593134097, + 0.755519568408052, 1.33496040696807, 1.04523998768806, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.147819256662515, + 7.07106781137754, 0.00474535451465546, 0.00838477483302746, + 0.00656506467384146, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000928440610919201, 7.07106582438453, -0.170527471236785, + 0.0272977583366349, -0.0716148564500749, "contcor2", "", + 0.15588269063201, "facExperimexperimental", 0.0504665471237838, + -1.41905599910409, 0.180704844538884, 0.319295315936558, 0.250000080237721, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553617543123, 7.0710655423354, + 0.721541983165883, 1.27492421122344, 0.998233097194663, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171529788958, + 7.07106524018659, 0.318532863881254, 0.562829579908031, 0.440681221894642, + "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", + 0.0623217359996812, 7.0710678196913)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.175482581170277, 1.32297873645118, 16, 0.57374807764045, 0, - "m", "facGender", "contNormal", "", "", "", 0.13337960774978, - 0.382267564465757, 1.50090703730592, -0.363072059171158, 1.00492534413716, + list(-0.175482581189691, 1.32297873647059, 16, 0.57374807764045, 0, + "m", "facGender", "contNormal", "", "", "", 0.133379607759841, + 0.382267564475663, 1.50090703726703, -0.363072059027039, 1.00492534399304, 16, 0.320926642483002, 1, "m", "facGender", "contNormal", "", - "", "", 0.357782243334385, 0.348985342102944, 0.919599203075797, - 0.0233150064530619, 1.18386387735802, 50, 0.60358944190554, - 0, "m", "facGender", "contNormal", "", "", "", 0.0414785879109525, - 0.296063825677211, 2.03871391759834, -0.235957380348608, 0.937493393844792, + "", "", 0.357782243233094, 0.348985342029413, 0.919599203269558, + 0.023315006552205, 1.18386387725888, 50, 0.60358944190554, 0, + "m", "facGender", "contNormal", "", "", "", 0.0414785878761681, + 0.296063825626627, 2.03871391794667, -0.235957380312315, 0.937493393808498, 50, 0.350768006748092, 1, "m", "facGender", "contNormal", "", - "", "", 0.241299367173489, 0.299355188016063, 1.17174520699895, - -0.0537692189237937, 1.33090542135171, 84, 0.63856810121396, - 0, "m", "facGender", "contNormal", "", "", "", 0.0706459384626275, - 0.353239817465434, 1.80774666286438, -0.392244909489302, 1.16373824160232, + "", "", 0.241299367144379, 0.299355187997546, 1.17174520707143, + -0.0537692188032339, 1.33090542123115, 84, 0.63856810121396, + 0, "m", "facGender", "contNormal", "", "", "", 0.0706459384136116, + 0.353239817403923, 1.80774666317917, -0.392244909653621, 1.16373824176664, 84, 0.385746666056511, 1, "m", "facGender", "contNormal", "", - "", "", 0.33115174467542, 0.396941771217488, 0.971796606019469, - -0.0299389527461722, 0.0252558973239065, 16, -0.00234152771113284, + "", "", 0.331151744777551, 0.396941771301325, 0.971796605814218, + -0.0299389522670278, 0.0252558970563767, 16, -0.00234152760532555, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.867924909427806, 0.0140805776293464, -0.166294861813956, - -0.0428931392010744, 0.0459615780154078, 16, 0.00153421940716667, + "", 0.867924913570812, 0.0140805774388648, -0.166294856549173, + -0.042893140008774, 0.0459615788817701, 16, 0.00153421943649805, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.946037303751614, 0.022667436217542, 0.0676838523970067, - -0.0221215354336881, 0.0257353556623201, 50, 0.001806910114316, + "", 0.946037303736653, 0.0226674366446064, 0.0676838524158004, + -0.022121535078026, 0.0257353551433592, 50, 0.00180691003266662, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.882340498915573, 0.0122086149218805, 0.148002875500448, - -0.0299389527461722, 0.0252558973239065, 50, -0.00234152771113284, + "", 0.882340502058913, 0.0122086146987583, 0.14800287151747, + -0.0299389522670278, 0.0252558970563767, 50, -0.00234152760532555, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.867924909427806, 0.0140805776293464, -0.166294861813956, - -0.0428931392010744, 0.0459615780154078, 84, 0.00153421940716667, + "", 0.867924913570812, 0.0140805774388648, -0.166294856549173, + -0.042893140008774, 0.0459615788817701, 84, 0.00153421943649805, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.946037303751614, 0.022667436217542, 0.0676838523970067, - -0.0221215354336881, 0.0257353556623201, 84, 0.001806910114316, + "", 0.946037303736653, 0.0226674366446064, 0.0676838524158004, + -0.022121535078026, 0.0257353551433592, 84, 0.00180691003266662, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.882340498915573, 0.0122086149218805, 0.148002875500448 + "", 0.882340502058913, 0.0122086146987583, 0.14800287151747 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0204863773191789, 1.1848215549475, 0.602653966133338, "facGenderm", - "", 0.0424649336863043, "contNormal", 0.297029737998363, - 2.02893478004771, -2.59010002764162, 2.39392698307478, -0.0980865222834209, - "debCollin1", "", 0.938508300425158, "contNormal", - 1.27145882527173, -0.077144867245275, -0.436456167429937, 0.715250741093526, - 0.139397286831794, "facExperimexperimental", "", 0.63517905702607, - "contNormal", 0.293808181580881, 0.474449983256917, -1.08477365690181, - 0.579130786586909, -0.252821435157448, "facGenderm:facExperimexperimental", - "", 0.551434313087722, "contNormal", 0.424473219052335, - -0.595612217236907, -1.83221550045824, 1.39245950108293, -0.219877999687653, - "contcor2", "", 0.789250054254937, "contNormal", 0.822636289997416, - -0.267284585376539, -1.98043774736572, 2.77951805665668, 0.399540154645482, - "debCollin1:contcor2", "", 0.742132954077297, "contNormal", - 1.21429675278942, 0.329030077472973, -0.387333899835587, 0.449907530083207, - 0.0312868151238099, "facGenderm:contcor2", "", 0.883539708222058, - "contNormal", 0.213585922119704, 0.146483507963953, -0.0404918114275949, - 0.0505150096466222, 0.00501159910951364, "facGenderm", "", - 0.829093664312984, "debCollin1", 0.0232164523919999, 0.215864121912122, - -0.048849605333457, 0.0421572157405918, -0.00334619479643256, - "facExperimexperimental", "", 0.88539755993072, "debCollin1", - 0.023216452391957, -0.144130323614464, -0.0871738495335664, - 0.0415292310982006, -0.0228223092176829, "facGenderm:facExperimexperimental", - "", 0.486991189315165, "debCollin1", 0.0328330218429932, - -0.695102306660005)) + list(0.0204863774153177, 1.18482155485136, 0.602653966133338, "facGenderm", + "", 0.0424649336521727, "contNormal", 0.297029737949312, + 2.02893478038277, -2.59010002717834, 2.3939269826115, -0.0980865222834208, + "debCollin1", "", 0.93850830041375, "contNormal", 1.27145882503536, + -0.0771448672596163, -0.436456167327803, 0.715250740991392, + 0.139397286831794, "facExperimexperimental", "", 0.635179056966076, + "contNormal", 0.293808181528771, 0.474449983341066, -1.08477365667398, + 0.579130786359085, -0.252821435157448, "facGenderm:facExperimexperimental", + "", 0.551434312978737, "contNormal", 0.424473218936096, + -0.59561221740001, -1.83221551610126, 1.39245951672595, -0.219877999687653, + "contcor2", "", 0.78925005625142, "contNormal", 0.822636297978697, + -0.267284582783323, -1.98043777044073, 2.77951807973169, 0.399540154645482, + "debCollin1:contcor2", "", 0.742132956488514, "contNormal", + 1.2142967645626, 0.329030074282871, -0.387333899895966, 0.449907530143586, + 0.0312868151238099, "facGenderm:contcor2", "", 0.883539708238736, + "contNormal", 0.213585922150511, 0.146483507942825, -0.0404918119126747, + 0.0505150096787808, 0.00501159888305305, "facGenderm", "", + 0.829093672872922, "debCollin1", 0.0232164525239509, 0.215864110930941, + -0.0488496056517389, 0.0421572159401147, -0.00334619485581213, + "facExperimexperimental", "", 0.885397558558652, "debCollin1", + 0.0232164525240524, -0.144130325352051, -0.0871738500132525, + 0.0415292313497937, -0.0228223093317294, "facGenderm:facExperimexperimental", + "", 0.486991189613435, "debCollin1", 0.0328330220295474, + -0.695102306184027)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.17909700535665, 1.32191010521528, 16, 0.571406549929317, 0, - "m", "Total", 0.13563455206165, 0.382917013376696, 1.4922464397454, - -0.360794894604935, 1.00571661838527, 16, 0.322460861890169, - 1, "m", "Total", 0.35496583057686, 0.348606281485037, 0.92500014777849, - 0.0253656274445384, 1.18542707659517, 50, 0.605396352019856, - 0, "m", "Total", 0.0407882392253354, 0.295939481108085, 2.04567619620428, - -0.239170905172086, 0.936023863246004, 50, 0.348426479036959, - 1, "m", "Total", 0.24515584483408, 0.299800092677181, 1.16219603511643, - -0.0540304842502298, 1.33423512549248, 84, 0.640102320621126, - 0, "m", "Total", 0.0706995157202452, 0.354155897938221, 1.80740268437598, - -0.393047063635854, 1.16815421597751, 84, 0.387553576170827, - 1, "m", "Total", 0.330510881596838, 0.398272950913364, 0.973085355864731, - -0.0299389527461722, 0.0252558973239065, 16, -0.00234152771113284, - 0, "m", "Total indirect", 0.867924909427806, 0.0140805776293464, - -0.166294861813956, -0.0428931392010744, 0.0459615780154078, - 16, 0.00153421940716667, 1, "m", "Total indirect", 0.946037303751614, - 0.022667436217542, 0.0676838523970067, -0.0221215354336881, - 0.0257353556623201, 50, 0.001806910114316, 0, "m", "Total indirect", - 0.882340498915573, 0.0122086149218805, 0.148002875500448, -0.0299389527461722, - 0.0252558973239065, 50, -0.00234152771113284, 1, "m", "Total indirect", - 0.867924909427806, 0.0140805776293464, -0.166294861813956, -0.0428931392010744, - 0.0459615780154078, 84, 0.00153421940716667, 0, "m", "Total indirect", - 0.946037303751614, 0.022667436217542, 0.0676838523970067, -0.0221215354336881, - 0.0257353556623201, 84, 0.001806910114316, 1, "m", "Total indirect", - 0.882340498915573, 0.0122086149218805, 0.148002875500448)) + list(-0.179097005242781, 1.32191010531303, 16, 0.571406550035125, 0, + "m", "Total", 0.135634551985038, 0.382917013372584, 1.49224644003775, + -0.36079489445684, 1.00571661829584, 16, 0.3224608619195, 1, + "m", "Total", 0.354965830449459, 0.348606281424442, 0.925000148023413, + 0.0253656274526687, 1.18542707642375, 50, 0.605396351938207, + 0, "m", "Total", 0.0407882392213244, 0.295939481062278, 2.04567619624502, + -0.239170904977403, 0.936023863262935, 50, 0.348426479142766, + 1, "m", "Total", 0.245155844619367, 0.299800092631835, 1.16219603564515, + -0.0540304841616978, 1.33423512546261, 84, 0.640102320650458, + 0, "m", "Total", 0.0706995156833239, 0.354155897908016, 1.80740268461295, + -0.393047063804042, 1.1681542159824, 84, 0.387553576089178, + 1, "m", "Total", 0.330510881752331, 0.398272950957517, 0.973085355551845, + -0.0299389522670278, 0.0252558970563767, 16, -0.00234152760532555, + 0, "m", "Total indirect", 0.867924913570812, 0.0140805774388648, + -0.166294856549173, -0.042893140008774, 0.0459615788817701, + 16, 0.00153421943649805, 1, "m", "Total indirect", 0.946037303736653, + 0.0226674366446064, 0.0676838524158004, -0.022121535078026, + 0.0257353551433592, 50, 0.00180691003266662, 0, "m", "Total indirect", + 0.882340502058913, 0.0122086146987583, 0.14800287151747, -0.0299389522670278, + 0.0252558970563767, 50, -0.00234152760532555, 1, "m", "Total indirect", + 0.867924913570812, 0.0140805774388648, -0.166294856549173, -0.042893140008774, + 0.0459615788817701, 84, 0.00153421943649805, 0, "m", "Total indirect", + 0.946037303736653, 0.0226674366446064, 0.0676838524158004, -0.022121535078026, + 0.0257353551433592, 84, 0.00180691003266662, 1, "m", "Total indirect", + 0.882340502058913, 0.0122086146987583, 0.14800287151747)) @@ -6506,7 +6513,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 58 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -6517,23 +6524,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -6549,76 +6556,76 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848782712142, 0.0642081688215972, -0.240320306945272, "contcor1", - "", 0.121931679478449, "contGamma", 0.15537452635301, - -1.54671626415302, 1.68041070591206, 2.96919048327082, 2.32480059459144, + list(-0.544848784410071, 0.0642081680150801, -0.240320308197495, "contcor1", + "", 0.121931678080305, "contGamma", 0.155374526580415, + -1.54671626994864, 1.68041070667254, 2.96919048594889, 2.32480059631071, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776392710399, 7.07106910999911, 0.732634685887756, 1.29452427624606, - 1.01357948106691, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341815153343, 7.07106631782642, 0.00465468502949408, - 0.00822456433614216, 0.00643962468281812, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000910700230924352, 7.07106956180517, - 0.761632487970235, 1.34576159085651, 1.05369703941337, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.149015264436953, - 7.07106780902426, 0.323891792959398, 0.572298499801492, 0.448095146380445, + 0.328776393199592, 7.07106910470725, 0.761632488027225, 1.34576159079952, + 1.05369703941337, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.149015264407875, 7.07106781040404, 0.00465468502787171, + 0.00822456433048346, 0.00643962467917758, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000910700229894659, 7.07106956580263, + 0.73263468605535, 1.29452427692894, 1.01357948149214, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341815284797, + 7.07106631430841, 0.323891792990055, 0.572298499787913, 0.448095146388984, "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", - 0.0633702223105869, 7.07106792499896)) + 0.0633702222993019, 7.07106792639293)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.154211848629982, 0.117652727965415, "", -0.0182795603322832, - "contGamma", "contNormal", "", "", "", 0.792113507696594, - 0.0693544827200475, -0.263567106484947, -0.0232783700689727, - 0.0451693480545924, 16, 0.0109454889928099, "contGamma", "debCollin1", - "contNormal", "", "", 0.530766411414661, 0.0174614734412142, - 0.62683650550218, -0.0219985213892134, 0.0247266069688974, 50, - 0.00136404278984198, "contGamma", "debCollin1", "contNormal", - "", "", 0.908893658673861, 0.0119198946324199, - 0.114434131500797, -0.0845460897661474, 0.0328913082466424, - 84, -0.0258273907597525, "contGamma", "debCollin1", "contNormal", - "", "", 0.388638439155159, 0.029959070406171, - -0.86208919067237)) + list(-0.154211847679032, 0.117652728817713, "", -0.0182795594306594, + "contGamma", "contNormal", "", "", "", 0.792113517641469, + 0.0693544826948806, -0.263567093580365, -0.0232783703482827, + 0.0451693479641342, 16, 0.0109454888079257, "contGamma", "debCollin1", + "contNormal", "", "", 0.530766419489684, 0.0174614734893916, + 0.62683649318458, -0.0219985212231931, 0.0247266067841391, 50, + 0.00136404278047299, "contGamma", "debCollin1", "contNormal", + "", "", 0.908893658615922, 0.011919894542934, + 0.114434131573889, -0.084546089196102, 0.0328913077047015, 84, + -0.0258273907457002, "contGamma", "debCollin1", "contNormal", + "", "", 0.388638434921643, 0.0299590701224958, + -0.862089198366235)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.154211848629982, 0.117652727965415, -0.0182795603322832, "contGamma", - "", 0.792113507696594, "contNormal", 0.0693544827200475, - -0.263567106484947, -2.6574989089829, 2.3503816450774, -0.15355863195275, - "debCollin1", "", 0.904326056969127, "contNormal", - 1.27754402467643, -0.120198309402013, -2.74314929707612, 0.527114510985855, - -1.10801739304513, "contcor1", "", 0.18413386160872, - "contNormal", 0.834266301283442, -1.32813394397035, -0.533830897095958, - 4.39043808564476, 1.9283035942744, "debCollin1:contcor1", "", - 0.12478091972143, "contNormal", 1.25621415025549, 1.53501184004512, - -0.0197475292126143, 0.00115998673444257, -0.00929377123908586, - "contGamma", "", 0.0814246099408673, "debCollin1", - 0.0053336479935276, -1.74247930316434, -0.0185475839165002, - 0.0350787691621807, 0.00826559262284025, "contcor1", "", - 0.545717062882036, "debCollin1", 0.0136804434932679, 0.604190399741624, - -0.0145563104582105, 0.00654285179171277, -0.00400672933324885, - "contGamma:contcor1", "", 0.456638130769671, "debCollin1", - 0.00538253825487375, -0.744394028155928)) + list(-0.154211847679032, 0.117652728817713, -0.0182795594306594, "contGamma", + "", 0.792113517641469, "contNormal", 0.0693544826948806, + -0.263567093580365, -2.6574989040748, 2.35038164056732, -0.153558631753742, + "debCollin1", "", 0.904326056913455, "contNormal", + 1.27754402227379, -0.120198309472292, -2.7431493224699, 0.527114536326796, + -1.10801739307155, "contcor1", "", 0.184133868403913, + "contNormal", 0.834266314226212, -1.32813392339741, -0.533830935271661, + 4.39043812371216, 1.92830359422025, "debCollin1:contcor1", "", + 0.124780925569896, "contNormal", 1.25621416970562, 1.53501181623522, + -0.0197475291582069, 0.00115998678294148, -0.00929377118763271, + "contGamma", "", 0.0814246115413959, "debCollin1", + 0.00533364799202031, -1.74247929400987, -0.018547583758509, + 0.0350787693049542, 0.00826559277322263, "contcor1", "", + 0.545717055460571, "debCollin1", 0.0136804434893858, 0.604190410905585, + -0.0145563104955979, 0.00654285174836407, -0.00400672937361689, + "contGamma:contcor1", "", 0.456638126106558, "debCollin1", + 0.00538253825335298, -0.744394035866063)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.146208793987558, 0.131540651308612, 16, -0.00733407133947334, - "Total", 0.917560538318064, 0.0708557523217319, -0.103507070338789, - -0.150831017897368, 0.116999982812486, 50, -0.0169155175424412, - "Total", 0.804465132744912, 0.0683254903718819, -0.24757257431119, - -0.184093076916658, 0.0958791747325862, 84, -0.0441069510920357, - "Total", 0.536873879537097, 0.0714228051784699, -0.617547168328408, - -0.0232783700689727, 0.0451693480545924, 16, 0.0109454889928099, - "Total indirect", 0.530766411414661, 0.0174614734412142, 0.62683650550218, - -0.0219985213892134, 0.0247266069688974, 50, 0.00136404278984198, - "Total indirect", 0.908893658673861, 0.0119198946324199, 0.114434131500797, - -0.0845460897661474, 0.0328913082466424, 84, -0.0258273907597525, - "Total indirect", 0.388638439155159, 0.029959070406171, -0.86208919067237 + list(-0.14620879325511, 0.131540652009643, 16, -0.00733407062273369, + "Total", 0.917560546336635, 0.0708557523137172, -0.103507060235021, + -0.150831017022475, 0.116999983722103, 50, -0.0169155166501864, + "Total", 0.80446514287476, 0.0683254903807404, -0.247572561220206, + -0.184093075980991, 0.0958791756282714, 84, -0.0441069501763597, + "Total", 0.536873887932374, 0.0714228051682704, -0.617547155596098, + -0.0232783703482827, 0.0451693479641342, 16, 0.0109454888079257, + "Total indirect", 0.530766419489684, 0.0174614734893916, 0.62683649318458, + -0.0219985212231931, 0.0247266067841391, 50, 0.00136404278047299, + "Total indirect", 0.908893658615922, 0.011919894542934, 0.114434131573889, + -0.084546089196102, 0.0328913077047015, 84, -0.0258273907457002, + "Total indirect", 0.388638434921643, 0.0299590701224958, -0.862089198366235 )) @@ -6635,7 +6642,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 58 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -6646,23 +6653,23 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -6671,79 +6678,79 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(457.262904452698, 504.155967800484, 7, "Model 1", 100, -210.631452226349, + list(457.262904452747, 504.155967800532, 7, "Model 1", 100, -210.631452226373, 58)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962232539339932, 0.0896223163016561, 0.0399999954541284, - "facExperimexperimental", "", 0.114128634852414, "facGenderm", - 0.0253179758602414, 1.57990495270766, 0.180704804723486, 0.319295177059286, - 0.249999990891386, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553364829616, 7.07106806950815, 0.180704804725301, - 0.319295177065732, 0.249999990895517, "facExperimexperimental", - "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553364841429, 7.0710680693887, 0.00474535302249299, 0.00838476962844968, - 0.00656506132547134, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000928439663857078, 7.07106943083158, 0.762423372129836, - 1.34715903822204, 1.05479120517594, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.149170002792021, 7.07106781144577, - 0.0796446847167718, 0.140727652922479, 0.110186168819625, "debCollin1:facExperimexperimental", + list(-0.00962233535916119, 0.0896222642435326, 0.0399999644421857, + "facExperimexperimental", "", 0.114128761930109, "facGenderm", + 0.0253179651221968, 1.57990439789005, 0.180704782733048, 0.319295100361202, + 0.249999941547125, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.035355322526673, 7.07106946510015, 0.762423372129477, + 1.3471590382224, 1.05479120517594, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.149170002792204, 7.0710678114371, + 0.00474535248804715, 0.00838476776433453, 0.00656506012619084, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000928439324649489, 7.07107072254756, 0.180704782675835, 0.319295100158652, + 0.249999941417243, "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553224895967, 7.0710694688418, + 0.0796446732879355, 0.140727613059342, 0.110186143173639, "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826761837263, 7.07106837878708)) + 0.0155826689299448, 7.07107002458975)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0581216477891692, 0.876434140299787, 0.467277894044478, "", - "m", "facGender", "contNormal", "", "", "", 0.0251961761197259, - 0.208757022824236, 2.23838167321396, -0.0188161934453592, 0.0176251719168027, - -0.000595510764278248, 0, "m", "facGender", "debCollin1", "contNormal", - "", "", 0.948924081012459, 0.00929643749824148, - -0.0640579538550004, -0.0670190515778879, 0.0603864836764719, - -0.00331628395070801, 1, "m", "facGender", "debCollin1", "contNormal", - "", "", 0.918730324348602, 0.0325020092867314, - -0.102033198054061)) + list(0.0581216477905165, 0.876434140298439, 0.467277894044478, "", + "m", "facGender", "contNormal", "", "", "", 0.0251961761192456, + 0.208757022823549, 2.23838167322133, -0.0188162552525946, 0.0176252294352311, + -0.000595512908681713, 0, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.94892406435944, 0.0092964679390212, + -0.0640579747693308, -0.0670188985007854, 0.0603863459893579, + -0.00331627625571377, 1, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.918730327440083, 0.0325019351108234, + -0.102033194159243)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0581216477891692, 0.876434140299787, 0.467277894044478, "facGenderm", - "", 0.0251961761197259, "contNormal", 0.208757022824236, - 2.23838167321396, -3.59074803228823, 3.35309576770416, -0.118826132292034, - "debCollin1", "", 0.946518378306628, "contNormal", - 1.77142127476947, -0.0670795445355017, -3.51918447627222, 3.11340999625946, - -0.202887240006382, "facExperimexperimental", "", 0.904555760938448, - "contNormal", 1.69201947710487, -0.119908336016044, -4.66097027973103, - 5.27101506208692, 0.305022391177944, "debCollin1:facExperimexperimental", - "", 0.904177874406978, "contNormal", 2.53371628768696, - 0.120385377265898, -0.0404917847206719, 0.0505150136652055, - 0.00501161447226681, "facGenderm", "", 0.829093106547036, - "debCollin1", 0.0232164466040518, 0.215864837446406, -0.0488496073528206, - 0.042157191032604, -0.00334620816010829, "facExperimexperimental", - "", 0.885397077030237, "debCollin1", 0.0232164466039363, - -0.144130935159602, -0.0871738293062623, 0.0415292192389208, - -0.0228223050336708, "facGenderm:facExperimexperimental", "", - 0.486991160576684, "debCollin1", 0.0328330136574897, -0.695102352520864 + list(0.0581216477905165, 0.876434140298439, 0.467277894044478, "facGenderm", + "", 0.0251961761192456, "contNormal", 0.208757022823549, + 2.23838167322133, -3.59074802855153, 3.35309576396746, -0.118826132292034, + "debCollin1", "", 0.946518378249154, "contNormal", + 1.77142127286296, -0.0670795446076969, -3.51918446853673, 3.11340998852397, + -0.202887240006382, "facExperimexperimental", "", 0.904555760716883, + "contNormal", 1.69201947315812, -0.119908336295738, -4.6609702683656, + 5.27101505072148, 0.305022391177944, "debCollin1:facExperimexperimental", + "", 0.904177874188732, "contNormal", 2.53371628188817, + 0.120385377541418, -0.0404917625166687, 0.0505150275543314, + 0.00501163251883135, "facGenderm", "", 0.829092485246085, + "debCollin1", 0.0232164444828706, 0.215865634487184, -0.0488496086641415, + 0.0421571814068935, -0.00334621362862405, "facExperimexperimental", + "", 0.885396880636724, "debCollin1", 0.0232164444828795, + -0.144131183872347, -0.0871738001458994, 0.0415292366400889, + -0.0228222817529052, "facGenderm:facExperimexperimental", "", + 0.486991565111556, "debCollin1", 0.03283301065764, -0.69510170696438 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0574926278847326, 0.875872138675666, 0.4666823832802, 0, "m", - "Total", 0.0253946454404903, 0.208774119638475, 2.23534595230641, - 0.0547198687779226, 0.873203351409617, 0.46396161009377, 1, - "m", "Total", 0.0262811759469663, 0.208800643554623, 2.2220315138655, - -0.0188161934453592, 0.0176251719168027, -0.000595510764278248, - 0, "m", "Total indirect", 0.948924081012459, 0.00929643749824148, - -0.0640579538550004, -0.0670190515778879, 0.0603864836764719, - -0.00331628395070801, 1, "m", "Total indirect", 0.918730324348602, - 0.0325020092867314, -0.102033198054061)) + list(0.0574926244184669, 0.875872137853125, 0.466682381135796, 0, "m", + "Total", 0.0253946465880046, 0.208774120312907, 2.23534593481386, + 0.0547198877952801, 0.873203347782248, 0.463961617788764, 1, + "m", "Total", 0.0262811693022551, 0.208800637777801, 2.22203161219506, + -0.0188162552525946, 0.0176252294352311, -0.000595512908681713, + 0, "m", "Total indirect", 0.94892406435944, 0.0092964679390212, + -0.0640579747693308, -0.0670188985007854, 0.0603863459893579, + -0.00331627625571377, 1, "m", "Total indirect", 0.918730327440083, + 0.0325019351108234, -0.102033194159243)) @@ -6759,7 +6766,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 59 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -6770,25 +6777,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -6797,90 +6804,90 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(960.578646230407, 1010.07687976418, 6, "Model 1", 100, -461.289323115204, + list(960.578646230477, 1010.07687976425, 6, "Model 1", 100, -461.289323115238, 59)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544847939846542, 0.0642099164024831, -0.240319011722029, "contcor1", - "", 0.121934244781348, "contGamma", 0.155374757151967, - -1.54670563048399, 1.68041134829273, 2.96919272385225, 2.32480203607249, + list(-0.544847938845424, 0.0642099165500673, -0.240319011147679, "contcor1", + "", 0.121934245150212, "contGamma", 0.155374756934225, + -1.54670562895499, 1.68041134734222, 2.96919272055218, 2.3248020339472, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776800422168, 7.07106472563548, 0.732635212506669, 1.29452611320707, - 1.01358066285687, "contcor1", "", 1.53765888910584e-12, - "contcor1", 0.143342149430429, 7.07105807248138, 0.00465468153330013, - 0.00822455214164267, 0.0064396168374714, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000910698011928081, 7.0710781764394, - 0.761497827519685, 1.34552365320518, 1.05351074036243, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.148988917728137, - 7.07106781112939, 0.323891566328712, 0.572297709274598, 0.448094637801655, + 0.328776799822779, 7.07106473206241, 0.761497827491687, 1.34552365323319, + 1.05351074036244, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.148988917742425, 7.07106781045131, 0.00465468153247964, + 0.00822455213878081, 0.00643961683563023, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000910698011407315, 7.07107817846114, + 0.732635212361412, 1.29452611252474, 1.01358066244308, "contcor1", + "", 1.53765888910584e-12, "contcor1", 0.143342149293418, + 7.07105807635337, 0.323891566343795, 0.572297709254619, 0.448094637799207, "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", - 0.0633700784568702, 7.07107595119404)) + 0.0633700784479257, 7.07107595215349)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.197089948245092, 0.178060935853361, 16, -0.00951450619586591, - "contGamma", "contNormal", "", "", "", 0.920807601435419, - 0.0957035147221059, -0.0994164762233985, -0.155658625676306, - 0.117369398820623, 50, -0.0191446134278416, "contGamma", "contNormal", - "", "", "", 0.783420921035747, 0.0696512861079435, - -0.274863746208101, -0.245502644897921, 0.186193341864943, 84, - -0.0296546515164891, "contGamma", "contNormal", "", "", - "", 0.787719564380739, 0.11012855087339, -0.269273056635255, - -0.023172578106807, 0.0445488723194967, 16, 0.0106881471063448, + list(-0.197089958615584, 0.178060924691355, 16, -0.00951451696211449, + "contGamma", "contNormal", "", "", "", 0.920807511952657, + 0.0957035145201856, -0.0994165889290064, -0.155658629595387, + 0.117369395039315, 50, -0.0191446172780363, "contGamma", "contNormal", + "", "", "", 0.783420878671738, 0.0696512861430904, + -0.274863801347558, -0.245502640934687, 0.186193345297307, 84, + -0.0296546478186899, "contGamma", "contNormal", "", "", + "", 0.787719589962729, 0.110128550737962, -0.269273023389274, + -0.0231725779094465, 0.044548872163044, 16, 0.0106881471267987, "contGamma", "debCollin1", "contNormal", "", "", - 0.536138281570805, 0.017276197664978, 0.618663163828674, -0.0219696261639075, - 0.0250246157540351, 50, 0.00152749479506379, "contGamma", "debCollin1", - "contNormal", "", "", 0.898613658537253, 0.0119885473122535, - 0.127412834539389, -0.0852940839382829, 0.0360454313067229, - 84, -0.02462432631578, "contGamma", "debCollin1", "contNormal", - "", "", 0.426322705842423, 0.0309545267673581, - -0.795500008798281)) + 0.536138278660937, 0.0172761975747179, 0.618663168244837, -0.021969626247824, + 0.0250246158523172, 50, 0.00152749480224659, "contGamma", "debCollin1", + "contNormal", "", "", 0.898613658454031, 0.0119885473587336, + 0.127412834644542, -0.0852940847265604, 0.0360454319020386, + 84, -0.0246243264122609, "contGamma", "debCollin1", "contNormal", + "", "", 0.426322709304451, 0.030954527120322, + -0.795500002844324)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.155574235259747, 0.117356976684443, -0.0191086292876519, "contGamma", - "", 0.78374310440314, "contNormal", 0.0696265885743403, - -0.27444442818349, -2.68756698190679, 2.34581782718813, -0.17087457735933, - "debCollin1", "", 0.894134325396912, "contNormal", - 1.28405033174018, -0.133074672491814, -2.93402485776752, 0.846753057883976, - -1.04363589994177, "contcor1", "", 0.279231861379268, - "contNormal", 0.96450188510447, -1.08204651132303, -0.155641345824309, - 0.135869840225574, -0.00988575279936737, "contGamma:contcor1", - "", 0.894246416027259, "contNormal", 0.0743664649833585, - -0.132932939619754, -0.790592940674985, 4.51341610213889, 1.86141158073195, - "debCollin1:contcor1", "", 0.168921885310218, "contNormal", - 1.35308839464685, 1.37567625891713, -0.0197475383313292, 0.00115996487999638, - -0.00929378672566643, "contGamma", "", 0.081423916721435, - "debCollin1", 0.00533364474455688, -1.74248326815373, -0.0185474808226072, - 0.035078839589717, 0.00826567938355488, "contcor1", "", - 0.545712602287282, "debCollin1", 0.0136804351598605, 0.604197109738661, - -0.0145563395604243, 0.00654280983703343, -0.00400676486169545, - "contGamma:contcor1", "", 0.456633864419207, "debCollin1", - 0.00538253497612332, -0.744401082291015)) + list(-0.155574239204293, 0.117356972876915, -0.0191086331636894, "contGamma", + "", 0.783743061733278, "contNormal", 0.0696265886092946, + -0.274444483714638, -2.68756699101378, 2.34581783485002, -0.170874578081877, + "debCollin1", "", 0.89413432530251, "contNormal", 1.28405033601803, + -0.133074672611181, -2.93402483440854, 0.84675303984065, -1.04363589728395, + "contcor1", "", 0.279231857338791, "contNormal", 0.964501874542463, + -1.08204652041659, -0.15564133822425, 0.135869846824817, -0.00988574569971652, + "contGamma:contcor1", "", 0.894246491169053, "contNormal", + 0.0743664647280434, -0.132932844607694, -0.790592909320566, + 4.51341608173276, 1.8614115862061, "debCollin1:contcor1", "", + 0.168921879898951, "contNormal", 1.35308838144238, 1.37567627638769, + -0.0197475383337128, 0.00115996487462415, -0.00929378672954433, + "contGamma", "", 0.0814239165507711, "debCollin1", + 0.00533364474379445, -1.74248326912988, -0.0185474807897646, + 0.0350788396146202, 0.00826567941242778, "contcor1", "", + 0.54571260082481, "debCollin1", 0.0136804351578352, 0.604197111938637, + -0.0145563395691862, 0.00654280982512268, -0.00400676487203175, + "contGamma:contcor1", "", 0.456633863190595, "debCollin1", + 0.00538253497532002, -0.744401084322452)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.185877072908425, 0.188224354729382, 16, 0.00117364091047894, - "Total", 0.990188100850379, 0.0954357913177669, 0.0122977018817933, - -0.151919274913335, 0.116685037647779, 50, -0.0176171186327778, - "Total", 0.797102533687855, 0.0685227674283383, -0.257098761389081, - -0.259206035105647, 0.150648079441109, 84, -0.054278977832269, - "Total", 0.603666487696113, 0.104556542308847, -0.519135164894186, - -0.023172578106807, 0.0445488723194967, 16, 0.0106881471063448, - "Total indirect", 0.536138281570805, 0.017276197664978, 0.618663163828674, - -0.0219696261639075, 0.0250246157540351, 50, 0.00152749479506379, - "Total indirect", 0.898613658537253, 0.0119885473122535, 0.127412834539389, - -0.0852940839382829, 0.0360454313067229, 84, -0.02462432631578, - "Total indirect", 0.426322705842423, 0.0309545267673581, -0.795500008798281 + list(-0.18587708349122, 0.188224343820588, 16, 0.00117363016468424, + "Total", 0.990188190674536, 0.0954357912346023, 0.0122975892953954, + -0.151919278732511, 0.116685033780932, 50, -0.0176171224757897, + "Total", 0.797102490359051, 0.068522767416177, -0.257098817518433, + -0.25920603122472, 0.150648082762818, 84, -0.0542789742309508, + "Total", 0.60366651121976, 0.104556542166186, -0.519135131158772, + -0.0231725779094465, 0.044548872163044, 16, 0.0106881471267987, + "Total indirect", 0.536138278660937, 0.0172761975747179, 0.618663168244837, + -0.021969626247824, 0.0250246158523172, 50, 0.00152749480224659, + "Total indirect", 0.898613658454031, 0.0119885473587336, 0.127412834644542, + -0.0852940847265604, 0.0360454319020386, 84, -0.0246243264122609, + "Total indirect", 0.426322709304451, 0.030954527120322, -0.795500002844324 )) @@ -6897,7 +6904,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 59 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -6908,25 +6915,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -6935,84 +6942,84 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(458.755117567599, 508.253351101372, 6, "Model 1", 100, -210.377558783799, + list(458.755117566862, 508.253351100636, 6, "Model 1", 100, -210.377558783431, 59)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962230047087934, 0.0896223724452585, 0.0400000359871896, - "facExperimexperimental", "", 0.114128382001409, "facGenderm", - 0.0253179838249496, 1.5799060566494, 0.180704819803801, 0.319295229661589, - 0.250000024732695, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553460550733, 7.07106711226267, 0.180704819808691, - 0.319295229678817, 0.250000024743754, "facExperimexperimental", + list(-0.00962229701459108, 0.0896223730616471, 0.040000038023528, "facExperimexperimental", + "", 0.114128353224434, "facGenderm", 0.0253179831004721, + 1.57990618228915, 0.180704818023647, 0.319295223453153, 0.2500000207384, + "facGenderm", "", 1.53743684450092e-12, "facGenderm", + 0.0353553449253889, 7.07106722522379, 0.758561699059668, 1.34033568000956, + 1.04944868953461, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.148414456984631, 7.07106781142817, 0.00474535458264157, + 0.0083847750701593, 0.00656506482640044, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000928440654069415, 7.07106566006706, + 0.180704818028592, 0.319295223469949, 0.25000002074927, "facExperimexperimental", "", 1.53743684450092e-12, "facExperimexperimental", - 0.035355346058221, 7.07106711194594, 0.00474535429765052, 0.00838477407612619, - 0.00656506418688836, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000928440473188014, 7.07106634886962, 0.75856169906011, - 1.34033568000912, 1.04944868953461, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.148414456984405, 7.07106781143893, - 0.079644677174216, 0.140727626614468, 0.110186151894342, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826713965325, 7.07106946494816)) + 0.0353553449284122, 7.07106722492659, 0.0796446775516357, 0.140727627930877, + 0.110186152741257, "debCollin1:facExperimexperimental", "", + 1.53743684450092e-12, "debCollin1:facExperimexperimental", 0.015582671636075, + 7.07106941059887)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0394515150885608, 1.19060350294847, 0.615027509018516, 0, "m", - "facGender", "contNormal", "", "", "", 0.0362328060443888, - 0.293666617585846, 2.09430514804335, -0.260888183343639, 0.896654610578501, + list(0.0394515150444559, 1.19060350299258, 0.615027509018516, 0, "m", + "facGender", "contNormal", "", "", "", 0.0362328060586754, + 0.293666617608349, 2.09430514788287, -0.260888183332439, 0.896654610567301, 0.317883213617431, 1, "m", "facGender", "contNormal", "", "", - "", 0.281709693175039, 0.295296955212619, 1.07648659427778, - -0.0193101999638056, 0.0178505006722907, -0.000729849645757428, + "", 0.281709693165728, 0.295296955206904, 1.07648659429861, + -0.0193107414549469, 0.0178509955296693, -0.000729872962638828, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.938632448608744, 0.00947994476664245, -0.0769888078172761, - -0.0648264180318342, 0.0617527105345801, -0.00153685374862704, + "", 0.93863220000306, 0.00948020914612291, -0.0769891203230808, + -0.0648258600494145, 0.0617521791070005, -0.00153684047120697, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.962040135354011, 0.0322911873801902, -0.0475935966842105 + "", 0.96204013659811, 0.0322909094643694, -0.047593595123196 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0394515150885608, 1.19060350294847, 0.615027509018516, "facGenderm", - "", 0.0362328060443888, "contNormal", 0.293666617585846, - 2.09430514804335, -3.6095458781124, 3.31825726898034, -0.145644304566028, - "debCollin1", "", 0.934321266688544, "contNormal", - 1.76732919628584, -0.0824092675388996, -3.35825808438251, 3.34465481548294, - -0.00680163444978712, "facExperimexperimental", "", - 0.996826293844328, "contNormal", 1.7099581810526, -0.00397766128151755, - -1.1133942907304, 0.519105699928227, -0.297144295401085, "facGenderm:facExperimexperimental", - "", 0.475538121629732, "contNormal", 0.416461731831701, - -0.713497238015535, -4.72553742266515, 5.18939845058605, 0.231930513960453, - "debCollin1:facExperimexperimental", "", 0.926940300869094, - "contNormal", 2.52936685353888, 0.0916950871068602, -0.0404922303470359, - 0.0505145878697985, 0.00501117876138128, "facGenderm", "", - 0.829107772561659, "debCollin1", 0.0232164516630623, 0.215846023074841, - -0.0488491679685573, 0.0421576502487047, -0.00334575885992631, - "facExperimexperimental", "", 0.885412383489096, "debCollin1", - 0.0232164516631714, -0.144111551087444, -0.0871738337971317, - 0.0415292427931901, -0.0228222955019708, "facGenderm:facExperimexperimental", - "", 0.486991437412933, "debCollin1", 0.0328330208119933, - -0.695101910745728)) + list(0.0394515150444559, 1.19060350299258, 0.615027509018516, "facGenderm", + "", 0.0362328060586754, "contNormal", 0.293666617608349, + 2.09430514788287, -3.60954587452738, 3.31825726539532, -0.145644304566028, + "debCollin1", "", 0.934321266620723, "contNormal", + 1.76732919445672, -0.0824092676241904, -3.35825807859813, 3.34465480969855, + -0.00680163444978706, "facExperimexperimental", "", + 0.99682629383885, "contNormal", 1.70995817810133, -0.00397766128838269, + -1.11339429082395, 0.519105700021784, -0.297144295401085, "facGenderm:facExperimexperimental", + "", 0.475538121680319, "contNormal", 0.416461731879435, + -0.713497237933756, -4.7255374139946, 5.1893984419155, 0.231930513960453, + "debCollin1:facExperimexperimental", "", 0.926940300741671, + "contNormal", 2.52936684911505, 0.0916950872672338, -0.0404920724683194, + 0.0505147501804841, 0.00501133885608233, "facGenderm", "", + 0.829102405438948, "debCollin1", 0.0232164527936875, 0.215852908306686, + -0.0488493370985629, 0.042157485550176, -0.00334592577419345, + "facExperimexperimental", "", 0.885406711915349, "debCollin1", + 0.023216452793671, -0.144118733551991, -0.0871738431490365, + 0.0415292397086967, -0.0228223017201699, "facGenderm:facExperimexperimental", + "", 0.486991339944899, "debCollin1", 0.0328330224108521, + -0.695102066285148)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.038945344423192, 1.18964997432232, 0.614297659372758, 0, "m", - "Total", 0.0363819210373773, 0.293552493560021, 2.09263308215489, - -0.258981182497387, 0.891673902234994, 0.316346359868804, 1, - "m", "Total", 0.281170002126905, 0.293539854254619, 1.07769475007779, - -0.0193101999638056, 0.0178505006722907, -0.000729849645757428, - 0, "m", "Total indirect", 0.938632448608744, 0.00947994476664245, - -0.0769888078172761, -0.0648264180318342, 0.0617527105345801, - -0.00153685374862704, 1, "m", "Total indirect", 0.962040135354011, - 0.0322911873801902, -0.0475935966842105)) + list(0.0389453210650601, 1.18964995104669, 0.614297636055877, 0, "m", + "Total", 0.0363819281467614, 0.293552493581067, 2.09263300257483, + -0.258981169237731, 0.891673915530178, 0.316346373146224, 1, + "m", "Total", 0.281169981949439, 0.293539854263683, 1.0776947952766, + -0.0193107414549469, 0.0178509955296693, -0.000729872962638828, + 0, "m", "Total indirect", 0.93863220000306, 0.00948020914612291, + -0.0769891203230808, -0.0648258600494145, 0.0617521791070005, + -0.00153684047120697, 1, "m", "Total indirect", 0.96204013659811, + 0.0322909094643694, -0.047593595123196)) @@ -7028,7 +7035,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 60 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -7039,25 +7046,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -7066,136 +7073,136 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1196.87892000904, 1259.40300447275, 15, "Model 1", 100, -574.439460004519, + list(1196.8789200093, 1259.40300447301, 15, "Model 1", 100, -574.439460004649, 60)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544846720217117, 0.0642095673051939, -0.240318576455962, "contcor1", - "", 0.121933959533552, "contGamma", 0.155374356959227, - -1.54670681288178, -0.403933567140923, 0.194628249368486, -0.104652658886218, - "contcor2", "", 0.493116190467199, "contGamma", 0.152697146792183, - -0.685360932307712, 0.424979113362143, 0.896762757051221, 0.660870935206682, - "contcor2", "", 3.99652479998736e-08, "contcor1", 0.120355181883557, - 5.49100524683742, 1.68041050897462, 2.96918979643821, 2.32480015270642, + list(-0.403934807506377, 0.19462685648273, -0.104653975511823, "contcor2", + "", 0.493110640631274, "contGamma", 0.152697107883228, + -0.685369729411349, -0.544847703743568, 0.064208780845899, -0.240319461448834, + "contcor1", "", 0.121932706169991, "contGamma", 0.155374407232385, + -1.54671200830007, 1.68041103110277, 2.96919161750548, 2.32480132430412, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776267734846, 7.07107045384839, 0.732634426545364, 1.29452337205693, - 1.01357889930115, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341650648602, 7.07107037427598, 0.721541730034434, - 1.27492332838523, 0.998232529209832, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171369146525, 7.07106926315733, - 0.00462621201189298, 0.00817425453857733, 0.00640023327523516, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000905129521427653, 7.07106897269257, 0.761632488071136, 1.34576159075561, + 0.328776599102956, 7.07106689054873, 0.761632488086725, 1.34576159074002, 1.05369703941337, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.149015264385471, 7.07106781146716, 0.323891775047576, - 0.572298437281581, 0.448095106164579, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702109307634, - 7.0710685601813)) + "contNormal", 0.149015264377517, 7.07106781184458, 0.0046262091032987, + 0.00817424439358308, 0.00640022674844089, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000905127675373332, 7.07107618359037, + 0.424978876677683, 0.896761873181854, 0.660870374929769, "contcor2", + "", 3.99645967430473e-08, "contcor1", 0.120355016782332, + 5.49100812411487, 0.732634267262909, 1.29452281604103, 1.01357854165197, + "contcor1", "", 1.53743684450092e-12, "contcor1", 0.143341549439231, + 7.07107287187287, 0.721541339192594, 1.27492196495162, 0.998231652072106, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.14117112103182, + 7.07107547759081, 0.323891514921114, 0.572297530030417, 0.448094522475766, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633700458448976, 7.0710777702845)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.154211868839643, 0.117652707704098, "", "", -0.0182795805677728, - "contGamma", "contNormal", "", "", "", 0.792113282807157, - 0.0693544827068698, -0.263567398304048, -0.0238489745351989, - 0.042690031780011, 16, 16, 0.00942052862240607, "contGamma", - "debCollin1", "contNormal", "", "", 0.578908588115149, - 0.0169745482162073, 0.554979637891708, -0.0219513917765559, - 0.0246576621301181, 50, 16, 0.00135313517678114, "contGamma", - "debCollin1", "contNormal", "", "", 0.909394942379237, - 0.0118902832588558, 0.113801761263621, -0.114566136111851, 0.0603750258968596, - 84, 16, -0.0270955551074955, "contGamma", "debCollin1", "contNormal", - "", "", 0.543762379306674, 0.04462866751344, - -0.607133410365335, -0.0355938877553156, 0.0557480876744999, - 16, 50, 0.0100770999595921, "contGamma", "debCollin1", "contNormal", - "", "", 0.665409064993194, 0.0233019525231865, - 0.432457320886092, -0.0225861619050029, 0.0253874592099394, - 50, 50, 0.00140064865246823, "contGamma", "debCollin1", "contNormal", - "", "", 0.908883378604548, 0.0122383935351241, - 0.114447100303514, -0.0967822154854486, 0.041356713728694, 84, - 50, -0.0277127508783773, "contGamma", "debCollin1", "contNormal", - "", "", 0.431635161999922, 0.0352401703051089, - -0.786396621765465, -0.0683989305221845, 0.0900923352117064, - 16, 84, 0.010846702344761, "contGamma", "debCollin1", "contNormal", - "", "", 0.788492273475872, 0.0404321882912262, - 0.268268990702012, -0.0236594911008135, 0.0265721745785706, - 50, 84, 0.00145634173887856, "contGamma", "debCollin1", "contNormal", - "", "", 0.909516419096589, 0.012814435896681, - 0.113648525040088, -0.0923681412112868, 0.0354957430992253, - 84, 84, -0.0284361990560307, "contGamma", "debCollin1", "contNormal", - "", "", 0.383334061861697, 0.0326189372149402, - -0.871769637025646)) + list(-0.154211982074721, 0.117652594513822, "", "", -0.0182796937804493, + "contGamma", "contNormal", "", "", "", 0.792112024854786, + 0.0693544827182988, -0.263569030637818, -0.023848964971719, + 0.0426899895938639, 16, 16, 0.00942051231107242, "contGamma", + "debCollin1", "contNormal", "", "", 0.578908950160149, + 0.0169745350145293, 0.554979108588775, -0.0219513738228535, + 0.0246576424273749, 50, 16, 0.00135313430226066, "contGamma", + "debCollin1", "contNormal", "", "", 0.909394927797909, + 0.0118902736524432, 0.113801779657327, -0.114566078439958, 0.0603749950005431, + 84, 16, -0.0270955417197076, "contGamma", "debCollin1", "contNormal", + "", "", 0.543762374399966, 0.044628644919094, + -0.607133417759566, -0.0355938777808866, 0.0557480273746847, + 16, 50, 0.0100770747968991, "contGamma", "debCollin1", "contNormal", + "", "", 0.665409607908755, 0.023301934595754, + 0.432456573744538, -0.0225861336307029, 0.0253874279202285, + 50, 50, 0.00140064714476282, "contGamma", "debCollin1", "contNormal", + "", "", 0.908883363620796, 0.0122383783399442, + 0.114447119206253, -0.0967821470363974, 0.0413566887270344, + 84, 50, -0.0277127291546815, "contGamma", "debCollin1", "contNormal", + "", "", 0.431635211460378, 0.0352401464652038, + -0.786396537314199, -0.0683989153054638, 0.0900922489192959, + 16, 84, 0.0108466668069161, "contGamma", "debCollin1", "contNormal", + "", "", 0.788492817743329, 0.0404321623955639, + 0.268268283570857, -0.0236594509281149, 0.0265721299060813, + 50, 84, 0.00145633948898321, "contGamma", "debCollin1", "contNormal", + "", "", 0.909516406106486, 0.0128144142521027, + 0.113648541426249, -0.0923680484587451, 0.0354957133360025, + 84, 84, -0.0284361675613713, "contGamma", "debCollin1", "contNormal", + "", "", 0.383334132919535, 0.0326189059603444, + -0.871769506798967)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.154211868839643, 0.117652707704098, -0.0182795805677728, "contGamma", - "", 0.792113282807157, "contNormal", 0.0693544827068698, - -0.263567398304048, -2.65749890908761, 2.35038163624934, -0.153558636419135, - "debCollin1", "", 0.904326054033888, "contNormal", - 1.27754402245104, -0.12019831310746, -2.74314936229324, 0.527114577389623, - -1.10801739245181, "contcor1", "", 0.184133879499504, - "contNormal", 0.834266334860816, -1.3281338898047, -0.533830995332554, - 4.39043818631432, 1.92830359549088, "debCollin1:contcor1", "", - 0.124780934713662, "contNormal", 1.25621420099779, 1.53501177900971, - -0.0199697926565322, 0.000908047260877268, -0.00953087269782747, - "contGamma", "", 0.073538644043093, "debCollin1", 0.00532607743869051, - -1.78947317374544, -0.033699448141346, 0.042065142443795, 0.00418284715122449, - "contcor1", "", 0.828665656926029, "debCollin1", 0.0193280568374629, - 0.216413226968425, -0.023391286784863, 0.0139845161480401, -0.00470338531841146, - "contGamma:contcor1", "", 0.621811060963312, "debCollin1", - 0.00953481880986555, -0.493285233018264, -0.0310213687884763, - 0.0494312493260325, 0.00920494026877808, "contcor2", "", - 0.653795044540448, "debCollin1", 0.0205240042034213, 0.448496315706447, - -0.0182406680820452, 0.0175607846733177, -0.000339941704363758, - "contGamma:contcor2", "", 0.970309215069602, "debCollin1", - 0.0091331914866192, -0.0372204726969535)) + list(-0.154211982074721, 0.117652594513822, -0.0182796937804493, "contGamma", + "", 0.792112024854786, "contNormal", 0.0693544827182988, + -0.263569030637818, -2.6574989375922, 2.35038161477667, -0.153558661407767, + "debCollin1", "", 0.904326038673376, "contNormal", + 1.27754402424493, -0.12019833249858, -2.74314931312399, 0.527114534850563, + -1.10801738913671, "contcor1", "", 0.184133868510067, + "contNormal", 0.834266311465409, -1.32813392307602, -0.533830919236701, + 4.39043812381241, 1.92830360228785, "debCollin1:contcor1", "", + 0.124780922772301, "contNormal", 1.25621416564057, 1.53501182762461, + -0.0199697755518384, 0.000908053720217641, -0.00953086091581037, + "contGamma", "", 0.0735388531817942, "debCollin1", + 0.00532607472298922, -1.78947187403733, -0.0336994426280086, + 0.0420651093255477, 0.00418283334876952, "contcor1", "", + 0.828666127513604, "debCollin1", 0.0193280469822857, 0.216412623200011, + -0.023391277858464, 0.0139845060169439, -0.00470338592076005, + "contGamma:contcor1", "", 0.62181083863728, "debCollin1", + 0.00953481394817032, -0.493285547712508, -0.0310213534390351, + 0.0494312236537185, 0.0092049351073417, "contcor2", "", + 0.653795060991892, "debCollin1", 0.0205239937384955, 0.448496292906024, + -0.0182406543666076, 0.0175607801341184, -0.000339937116244635, + "contGamma:contcor2", "", 0.970309600482933, "debCollin1", + 0.0091331868297385, -0.0372199893182704)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.147683777314975, 0.129965673424241, 16, 16, -0.0088590519453667, - "Total", 0.90046462989647, 0.0708302430374434, -0.125074425350814, - -0.150864376358687, 0.117011485576704, 50, 16, -0.0169264453909916, - "Total", 0.804373476861831, 0.0683369347723635, -0.247691024588316, - -0.199274314911969, 0.108524043561433, 84, 16, -0.0453751356752682, - "Total", 0.563352272530683, 0.0785214322562242, -0.577869434770422, - -0.150433028069666, 0.134028066853305, 16, 50, -0.00820248060818063, - "Total", 0.910005389818184, 0.0725679393006105, -0.113031742216106, - -0.150795571822097, 0.117037707991488, 50, 50, -0.0168789319153045, - "Total", 0.804881128498322, 0.0683260717865787, -0.247035011291547, - -0.190036703939707, 0.0980520410474066, 84, 50, -0.0459923314461501, - "Total", 0.531444561167309, 0.0734933772404801, -0.625802394352583, - -0.163631660602083, 0.14876590415606, 16, 84, -0.00743287822301181, - "Total", 0.925691540617363, 0.0796947207250477, -0.0932668833692981, - -0.150780690701665, 0.117134213043877, 50, 84, -0.0168232388288942, - "Total", 0.805570074883638, 0.0683468946008245, -0.246144889642013, - -0.188137970843097, 0.0947064115954896, 84, 84, -0.0467157796238035, - "Total", 0.517352420908711, 0.072155505067855, -0.647431953804107, - -0.0238489745351989, 0.042690031780011, 16, 16, 0.00942052862240607, - "Total indirect", 0.578908588115149, 0.0169745482162073, 0.554979637891708, - -0.0219513917765559, 0.0246576621301181, 50, 16, 0.00135313517678114, - "Total indirect", 0.909394942379237, 0.0118902832588558, 0.113801761263621, - -0.114566136111851, 0.0603750258968596, 84, 16, -0.0270955551074955, - "Total indirect", 0.543762379306674, 0.04462866751344, -0.607133410365335, - -0.0355938877553156, 0.0557480876744999, 16, 50, 0.0100770999595921, - "Total indirect", 0.665409064993194, 0.0233019525231865, 0.432457320886092, - -0.0225861619050029, 0.0253874592099394, 50, 50, 0.00140064865246823, - "Total indirect", 0.908883378604548, 0.0122383935351241, 0.114447100303514, - -0.0967822154854486, 0.041356713728694, 84, 50, -0.0277127508783773, - "Total indirect", 0.431635161999922, 0.0352401703051089, -0.786396621765465, - -0.0683989305221845, 0.0900923352117064, 16, 84, 0.010846702344761, - "Total indirect", 0.788492273475872, 0.0404321882912262, 0.268268990702012, - -0.0236594911008135, 0.0265721745785706, 50, 84, 0.00145634173887856, - "Total indirect", 0.909516419096589, 0.012814435896681, 0.113648525040088, - -0.0923681412112868, 0.0354957430992253, 84, 84, -0.0284361990560307, - "Total indirect", 0.383334061861697, 0.0326189372149402, -0.871769637025646 + list(-0.1476839025914, 0.129965539652646, 16, 16, -0.00885918146937688, + "Total", 0.900463179180081, 0.0708302408702683, -0.125076257831782, + -0.150864490431186, 0.117011371474809, 50, 16, -0.0169265594781886, + "Total", 0.804372185029079, 0.0683369347648647, -0.247692694096244, + -0.199274393358887, 0.108523922358573, 84, 16, -0.0453752355001569, + "Total", 0.563351359955478, 0.0785214213488956, -0.577870786349375, + -0.150433158097164, 0.134027920130063, 16, 50, -0.00820261898355021, + "Total", 0.910003872809482, 0.072567935041414, -0.113033655689239, + -0.15079568638101, 0.117037593109637, 50, 50, -0.0168790466356865, + "Total", 0.804879828869155, 0.0683260717041951, -0.24703669060269, + -0.190036779682526, 0.0980519338122642, 84, 50, -0.0459924229351308, + "Total", 0.531443699672355, 0.0734933692065765, -0.625803707622308, + -0.163631787372775, 0.148765733425708, 16, 84, -0.00743302697353321, + "Total", 0.925690047399546, 0.0796947095106428, -0.0932687629978822, + -0.150780805621315, 0.117134097038383, 50, 84, -0.0168233542914661, + "Total", 0.805568766417665, 0.0683468943238182, -0.246146580000539, + -0.188138034764248, 0.0947063120806066, 84, 84, -0.0467158613418206, + "Total", 0.517351635424146, 0.0721554959876545, -0.647433167804896, + -0.023848964971719, 0.0426899895938639, 16, 16, 0.00942051231107242, + "Total indirect", 0.578908950160149, 0.0169745350145293, 0.554979108588775, + -0.0219513738228535, 0.0246576424273749, 50, 16, 0.00135313430226066, + "Total indirect", 0.909394927797909, 0.0118902736524432, 0.113801779657327, + -0.114566078439958, 0.0603749950005431, 84, 16, -0.0270955417197076, + "Total indirect", 0.543762374399966, 0.044628644919094, -0.607133417759566, + -0.0355938777808866, 0.0557480273746847, 16, 50, 0.0100770747968991, + "Total indirect", 0.665409607908755, 0.023301934595754, 0.432456573744538, + -0.0225861336307029, 0.0253874279202285, 50, 50, 0.00140064714476282, + "Total indirect", 0.908883363620796, 0.0122383783399442, 0.114447119206253, + -0.0967821470363974, 0.0413566887270344, 84, 50, -0.0277127291546815, + "Total indirect", 0.431635211460378, 0.0352401464652038, -0.786396537314199, + -0.0683989153054638, 0.0900922489192959, 16, 84, 0.0108466668069161, + "Total indirect", 0.788492817743329, 0.0404321623955639, 0.268268283570857, + -0.0236594509281149, 0.0265721299060813, 50, 84, 0.00145633948898321, + "Total indirect", 0.909516406106486, 0.0128144142521027, 0.113648541426249, + -0.0923680484587451, 0.0354957133360025, 84, 84, -0.0284361675613713, + "Total indirect", 0.383334132919535, 0.0326189059603444, -0.871769506798967 )) @@ -7212,7 +7219,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 60 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -7223,25 +7230,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -7250,119 +7257,120 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(749.460734616045, 811.98481907976, 15, "Model 1", 100, -350.730367308023, + list(749.460734616191, 811.984819079905, 15, "Model 1", 100, -350.730367308095, 60)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962241106535974, 0.0896222738026267, 0.0399999313686335, - "facExperimexperimental", "", 0.114129372033843, "facGenderm", - 0.0253179868739466, 1.57990173420128, -0.163250888474146, 0.0341990872303936, - -0.0645259006218762, "contcor2", "", 0.200187504570115, - "facGenderm", 0.050370817336951, -1.28101754216605, -0.170527487380643, - 0.0272976759352919, -0.0716149057226758, "contcor2", "", - 0.155882267456438, "facExperimexperimental", 0.0504665302210538, - -1.41905745072997, 0.180704831502558, 0.319295270466486, 0.250000050984522, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553534802454, 7.07106636974251, 0.180704836789214, 0.31929528890593, - 0.250000062847572, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553568356102, 7.07106603420757, - 0.721541849469314, 1.27492374492359, 0.99823279719645, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171444939621, - 7.0710673650992, 0.00473838075286613, 0.00837245010231375, 0.00655541542758994, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000927075542742798, 7.07106931997733, 0.762423372129589, 1.34715903822228, - 1.05479120517594, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.149170002792147, 7.07106781143981, 0.0796446821021354, - 0.140727643802752, 0.110186162952444, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826745242339, 7.07106875530795)) + list(-0.163250916129621, 0.0341988923496761, -0.0645260118899727, "contcor2", + "", 0.200186347630685, "facGenderm", 0.0503707746766666, + -1.28102083607349, -0.00962234763340342, 0.0896222354356104, + 0.0399999439011035, "facExperimexperimental", "", 0.11412888747384, + "facGenderm", 0.0253179609043438, 1.57990384977017, 0.180704791458036, + 0.319295130793426, 0.249999961125731, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553280643351, 7.07106891133389, + 0.762423372129898, 1.34715903822198, 1.05479120517594, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.14917000279199, + 7.07106781144726, 0.00473838543310206, 0.00837246642673235, + 0.0065554259299172, "debCollin1", "", 1.53765888910584e-12, + "debCollin1", 0.000927078513252146, 7.07105799154064, -0.170527285745186, + 0.0272976235250651, -0.0716148311100604, "contcor2", "", + 0.155882167207303, "facExperimexperimental", 0.0504664654122904, + -1.41905779461661, 0.180704757844767, 0.319295013548931, 0.249999885696849, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553067294465, 7.07107104486327, + 0.7215416007263, 1.27492287732407, 0.998232239025184, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171287065163, + 7.07107131894615, 0.07964470002853, 0.140727706328964, 0.110186203178747, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.0155826859019475, 7.07106617383439 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0581216477750737, 0.876434140313882, "", 0.467277894044478, - "", "m", "facGender", "contNormal", "", "", "", 0.0251961761247501, - 0.208757022831428, 2.23838167313684, -0.0352135525930009, 0.0329312897864334, - 16, -0.00114113140328377, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.94766297667838, 0.0173842078009984, - -0.0656418409367054, -0.0498539759508892, 0.0449861161782882, - 16, -0.00243392988630046, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.919868695074559, 0.0241943456301401, - -0.100599120286534, -0.0210858662121282, 0.0197394496518428, - 50, -0.000673208280142693, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.948461034754266, 0.0104148127684988, - -0.0646394990583908, -0.0640772689736427, 0.0577429719234073, - 50, -0.00316714852511768, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.9188262011312, 0.031077163115739, - -0.101912407941563, -0.00758194855537576, 0.0073324874399881, - 84, -0.000124730557693829, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.973847910513748, 0.00380477297363805, - -0.0327826544600805, -0.0815251893436663, 0.0734720027186823, - 84, -0.00402659331249202, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.918888582809418, 0.0395408265878727, - -0.101833817346828)) + list(0.0581216477797352, 0.87643414030922, "", 0.467277894044478, "", + "m", "facGender", "contNormal", "", "", "", 0.0251961761230886, + 0.208757022829049, 2.23838167316235, -0.0352137054840705, 0.0329314324263703, + 16, -0.00114113652885009, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.947662968585852, 0.0173842831929467, + -0.0656418511010612, -0.049853682662464, 0.0449858529954206, + 16, -0.00243391483352167, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.919868720397814, 0.0241942036705691, + -0.100599088387538, -0.0210859877198981, 0.0197395629068892, + 50, -0.000673212406504418, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.948461015249545, 0.0104148726580728, + -0.0646395235550571, -0.0640770023961489, 0.0577427323200361, + 50, -0.00316713503805641, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.918826209485732, 0.0310770339855945, + -0.101912397416192, -0.00758199825874262, 0.00733253123307381, + 84, -0.000124733512834406, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.973847455023122, 0.00380479682521218, + -0.0327832256397685, -0.0815249597520988, 0.0734717964307148, + 84, -0.00402658166069201, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.918888589400002, 0.0395407153920705, + -0.101833809043817)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0581216477750737, 0.876434140313882, 0.467277894044478, "facGenderm", - "", 0.0251961761247501, "contNormal", 0.208757022831428, - 2.23838167313684, -3.59074803770331, 3.35309577311924, -0.118826132292034, - "debCollin1", "", 0.946518378389916, "contNormal", - 1.77142127753232, -0.0670795444308792, -3.51918448168987, 3.11341000167711, - -0.202887240006382, "facExperimexperimental", "", 0.904555761093624, - "contNormal", 1.69201947986903, -0.119908335820156, -4.66097028790644, - 5.27101507026233, 0.305022391177944, "debCollin1:facExperimexperimental", - "", 0.904177874563967, "contNormal", 2.53371629185817, - 0.12038537706771, -0.0402674755759551, 0.0518453474990043, 0.00578893596152458, - "facGenderm", "", 0.805409475781848, "debCollin1", - 0.023498600944082, 0.24635236690474, -0.0489096585520255, 0.0420350276424625, - -0.00343731545478154, "facExperimexperimental", "", - 0.882219411921894, "debCollin1", 0.0232006013661088, -0.148156308560292, - -0.0882812825845963, 0.0429308376502496, -0.0226752224671733, - "facGenderm:facExperimexperimental", "", 0.498141812111379, - "debCollin1", 0.0334730947277171, -0.677416374303669, -0.0174100597793841, - 0.0258806555123191, 0.00423529786646747, "contcor2", "", - 0.701347815911175, "debCollin1", 0.0110437527508604, 0.38350169204372, - -0.0370220255022479, 0.0287647795031713, -0.00412862299953828, - "facGenderm:contcor2", "", 0.805678105417273, "debCollin1", - 0.0167826566009215, -0.246005331439099)) + list(0.0581216477797352, 0.87643414030922, 0.467277894044478, "facGenderm", + "", 0.0251961761230886, "contNormal", 0.208757022829049, + 2.23838167316235, -3.59074804391899, 3.35309577933492, -0.118826132292034, + "debCollin1", "", 0.94651837848552, "contNormal", 1.77142128070364, + -0.0670795443107886, -3.51918449469016, 3.11341001467739, -0.202887240006382, + "facExperimexperimental", "", 0.904555761465987, "contNormal", + 1.69201948650195, -0.119908335350101, -4.66097030719103, 5.27101508954692, + 0.305022391177944, "debCollin1:facExperimexperimental", "", + 0.904177874934282, "contNormal", 2.53371630169743, 0.120385376600213, + -0.040267477478781, 0.0518454193811352, 0.00578897095117711, + "facGenderm", "", 0.80540847597916, "debCollin1", 0.023498619767121, + 0.246353658578577, -0.048909682530164, 0.042035076513865, -0.00343730300814949, + "facExperimexperimental", "", 0.882219928955145, "debCollin1", + 0.0232006199505169, -0.14815565340412, -0.0882812974281377, + 0.0429309279110038, -0.022675184758567, "facGenderm:facExperimexperimental", + "", 0.498142870856259, "debCollin1", 0.03347312154053, + -0.677414705142194, -0.0174100658759026, 0.025880684093391, + 0.0042353091087442, "contcor2", "", 0.701347289001978, + "debCollin1", 0.0110437615973471, 0.383502402819126, -0.0370220606673852, + 0.0287647970357582, -0.00412863181581353, "facGenderm:contcor2", + "", 0.80567785130974, "debCollin1", 0.0167826700444655, + -0.246005659699842)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0562756429896958, 0.875997882292692, 16, 0.466136762641194, - 0, "m", "Total", 0.0258089001719735, 0.2091166587164, 2.22907522290397, - 0.056517481800642, 0.873170446515713, 16, 0.464843964158177, - 1, "m", "Total", 0.0256647415514002, 0.208333666117522, 2.23124746384464, - 0.0573600141758646, 0.875849357352806, 50, 0.466604685764335, - 0, "m", "Total", 0.0254387664643043, 0.208802138619148, 2.2346738824137, - 0.0550751123046838, 0.873146378734037, 50, 0.46411074551936, - 1, "m", "Total", 0.0261574762684427, 0.208695484427825, 2.22386577645319, - 0.0580069168972354, 0.876299410076333, 84, 0.467153163486784, - 0, "m", "Total", 0.0252315643645875, 0.208751920860201, 2.2378388738259, - 0.0526753714182566, 0.873827230045715, 84, 0.463251300731986, - 1, "m", "Total", 0.0270067587827412, 0.20948136422521, 2.21142010624846, - -0.0352135525930009, 0.0329312897864334, 16, -0.00114113140328377, - 0, "m", "Total indirect", 0.94766297667838, 0.0173842078009984, - -0.0656418409367054, -0.0498539759508892, 0.0449861161782882, - 16, -0.00243392988630046, 1, "m", "Total indirect", 0.919868695074559, - 0.0241943456301401, -0.100599120286534, -0.0210858662121282, - 0.0197394496518428, 50, -0.000673208280142693, 0, "m", "Total indirect", - 0.948461034754266, 0.0104148127684988, -0.0646394990583908, - -0.0640772689736427, 0.0577429719234073, 50, -0.00316714852511768, - 1, "m", "Total indirect", 0.9188262011312, 0.031077163115739, - -0.101912407941563, -0.00758194855537576, 0.0073324874399881, - 84, -0.000124730557693829, 0, "m", "Total indirect", 0.973847910513748, - 0.00380477297363805, -0.0327826544600805, -0.0815251893436663, - 0.0734720027186823, 84, -0.00402659331249202, 1, "m", "Total indirect", - 0.918888582809418, 0.0395408265878727, -0.101833817346828)) + list(0.0562756287927517, 0.875997886238504, 16, 0.466136757515628, + 0, "m", "Total", 0.0258089050845858, 0.209116663344739, 2.22907514905772, + 0.0565175070088313, 0.873170451413081, 16, 0.464843979210956, + 1, "m", "Total", 0.0256647330941757, 0.208333660936095, 2.2312475915908, + 0.0573600067836874, 0.875849356492259, 50, 0.466604681637973, + 0, "m", "Total", 0.0254387689342497, 0.208802140285411, 2.2346738448187, + 0.0550751436642897, 0.873146374348553, 50, 0.464110759006421, + 1, "m", "Total", 0.0261574653794245, 0.208695475309012, 2.22386593824912, + 0.058006914942936, 0.876299406120351, 84, 0.467153160531643, + 0, "m", "Total", 0.0252315649309678, 0.208751920349558, 2.2378388651438, + 0.0526754071554693, 0.873827217612102, 84, 0.463251312383786, + 1, "m", "Total", 0.0270067459594558, 0.209481351936509, 2.21142029159804, + -0.0352137054840705, 0.0329314324263703, 16, -0.00114113652885009, + 0, "m", "Total indirect", 0.947662968585852, 0.0173842831929467, + -0.0656418511010612, -0.049853682662464, 0.0449858529954206, + 16, -0.00243391483352167, 1, "m", "Total indirect", 0.919868720397814, + 0.0241942036705691, -0.100599088387538, -0.0210859877198981, + 0.0197395629068892, 50, -0.000673212406504418, 0, "m", "Total indirect", + 0.948461015249545, 0.0104148726580728, -0.0646395235550571, + -0.0640770023961489, 0.0577427323200361, 50, -0.00316713503805641, + 1, "m", "Total indirect", 0.918826209485732, 0.0310770339855945, + -0.101912397416192, -0.00758199825874262, 0.00733253123307381, + 84, -0.000124733512834406, 0, "m", "Total indirect", 0.973847455023122, + 0.00380479682521218, -0.0327832256397685, -0.0815249597520988, + 0.0734717964307148, 84, -0.00402658166069201, 1, "m", "Total indirect", + 0.918888589400002, 0.0395407153920705, -0.101833809043817)) @@ -7378,7 +7386,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 61 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -7389,27 +7397,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -7418,144 +7426,144 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1198.86123794218, 1263.99049259188, 14, "Model 1", 100, -574.430618971091, + list(1198.86123794128, 1263.99049259098, 14, "Model 1", 100, -574.430618970638, 61)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544850055511698, 0.0642046010615742, -0.240322727225062, "contcor1", - "", 0.121926515727105, "contGamma", 0.155373940893154, - -1.54673766941604, -0.40393702448639, 0.194622099951898, -0.104657462267246, - "contcor2", "", 0.493094400681021, "contGamma", 0.152696460026727, - -0.685395471832996, 0.424977722304005, 0.896755041144161, 0.660866381724083, - "contcor2", "", 3.99571513653996e-08, "contcor1", 0.120353568372041, - 5.4910410273935, 1.68041294493909, 2.96919829291552, 2.3248056189273, - "contGamma", "", 1.53765888910584e-12, "contGamma", - 0.328777813812449, 7.07105382802225, 0.732631743019847, 1.29451401163626, - 1.01357287732805, "contcor1", "", 1.53699275529107e-12, - "contcor1", 0.143339947327724, 7.07111238858407, 0.721538481174889, - 1.27491199655334, 0.998225238864112, "contcor2", "", - 1.53677071068614e-12, "contcor2", 0.141169307125893, 7.07112090572144, - 0.00462620441670993, 0.00817422804710797, 0.00640021623190895, + list(-0.403937081194162, 0.194622171959785, -0.104657454617189, "contcor2", + "", 0.493094525268435, "contGamma", 0.152696492862957, + -0.685395274344101, -0.544850156406702, 0.0642046350707873, + -0.240322760667957, "contcor1", "", 0.121926546449999, + "contGamma", 0.155373975308127, -1.54673754205854, 1.68041291737563, + 2.96919819677408, 2.32480555707486, "contGamma", "", + 1.53765888910584e-12, "contGamma", 0.328777796317745, 7.07105401615402, + 0.761497827536096, 1.34552365318594, 1.05351074036102, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.14898891771904, + 7.0710678115516, 0.00462620419230516, 0.00817422726440222, 0.00640021572835369, "debCollin1", "", 1.53721479989599e-12, "debCollin1", - 0.000905124700857872, 7.0710878024242, 0.761497827470135, 1.34552365325187, - 1.053510740361, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.148988917752687, 7.07106780995463, 0.323890599279156, - 0.572294336291013, 0.448092467785085, "debCollin1:contcor1", - "", 1.53699275529107e-12, "debCollin1:contcor1", 0.063369464686911, - 7.07111019477553)) + 0.000905124558431536, 7.07108835876075, 0.424977787134788, 0.896755347591593, + 0.660866567363191, "contcor2", "", 3.99574386911183e-08, + "contcor1", 0.120353630010073, 5.49103975765316, 0.732631854321465, + 1.29451440043431, 1.01357312737789, "contcor1", "", + 1.53699275529107e-12, "contcor1", 0.143340018118931, 7.07111064083244, + 0.721538589376329, 1.27491237423658, 0.998225481806454, "contcor2", + "", 1.53699275529107e-12, "contcor2", 0.141169375872514, + 7.07111918315714, 0.323890645390401, 0.572294497139443, 0.448092571264922, + "debCollin1:contcor1", "", 1.53699275529107e-12, "debCollin1:contcor1", + 0.0633694939571389, 7.07110856160533)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.197083751641928, 0.178067132143756, 16, "", -0.00950830974908584, - "contGamma", "contNormal", "", "", "", 0.920859006929239, - 0.0957035146423166, -0.0993517300239422, -0.155656286149742, - 0.117371738409265, 50, "", -0.0191422738702386, "contGamma", - "contNormal", "", "", "", 0.783446728300991, 0.06965128612378, - -0.27483015656337, -0.245504514620016, 0.186191472093567, 84, - "", -0.0296565212632247, "contGamma", "contNormal", "", "", - "", 0.787706500331561, 0.110128550860818, -0.269290034522518, - -0.0236252035630213, 0.0420224671176733, 16, 16, 0.00919863177732597, + list(-0.197083607546651, 0.178067276126508, 16, "", -0.00950816571007154, + "contGamma", "contNormal", "", "", "", 0.920860201853389, + 0.0957035146136107, -0.0993502249991487, -0.155656229235988, + 0.117371795227466, 50, "", -0.0191422170042611, "contGamma", + "contNormal", "", "", "", 0.783447355507895, 0.0696512860994038, + -0.274829340221256, -0.245504552429941, 0.186191433358866, 84, + "", -0.0296565595355375, "contGamma", "contNormal", "", "", + "", 0.787706232477497, 0.110128550624902, -0.269290382623374, + -0.0236251887888871, 0.0420226237766831, 16, 16, 0.00919871749389798, "contGamma", "debCollin1", "contNormal", "", "", - 0.58282353868201, 0.0167471624985242, 0.549265093602368, -0.021954242825116, - 0.0249847711876894, 50, 16, 0.00151526418128672, "contGamma", - "debCollin1", "contNormal", "", "", 0.899303415416492, - 0.0119744583020541, 0.126541355196568, -0.112761926367508, 0.0610949530168969, - 84, 16, -0.0258334866753056, "contGamma", "debCollin1", "contNormal", - "", "", 0.560254053476262, 0.044352059720425, - -0.582464193053222, -0.0350385407516562, 0.0547181475628596, - 16, 50, 0.0098398034056017, "contGamma", "debCollin1", "contNormal", - "", "", 0.667390607798634, 0.0228975351135289, - 0.429731993282888, -0.0225556956012239, 0.0256926434093449, - 50, 50, 0.00156847390406051, "contGamma", "debCollin1", "contNormal", - "", "", 0.898599763437687, 0.0123084759187275, - 0.127430391416216, -0.0968912045024092, 0.0440472792136955, - 84, 50, -0.0264219626443568, "contGamma", "debCollin1", "contNormal", - "", "", 0.462415529433845, 0.0359543554952564, - -0.734875157137577, -0.0669792494269835, 0.088161959363396, - 16, 84, 0.0105913549682063, "contGamma", "debCollin1", "contNormal", - "", "", 0.788999484691611, 0.0395775662242045, - 0.267610062433018, -0.0236709468035401, 0.0269326345363017, - 50, 84, 0.00163084386638079, "contGamma", "debCollin1", "contNormal", - "", "", 0.899470083390859, 0.0129093140840843, - 0.12633079153225, -0.0932789714188982, 0.0390554778068479, 84, - 84, -0.0271117468060252, "contGamma", "debCollin1", "contNormal", - "", "", 0.421924369070983, 0.033759408404844, - -0.803087141839103)) + 0.582820841278767, 0.0167471986943107, 0.549269024736833, -0.021954319680585, + 0.0249848586675431, 50, 16, 0.00151526949347902, "contGamma", + "debCollin1", "contNormal", "", "", 0.899303414941018, + 0.0119745002251007, 0.126541355797276, -0.1127620150975, 0.0610949656303777, + 84, 16, -0.0258335247335613, "contGamma", "debCollin1", "contNormal", + "", "", 0.560253704275325, 0.0443520855738268, + -0.582464711621279, -0.0350385147554982, 0.0547182593904106, + 16, 50, 0.00983987231745619, "contGamma", "debCollin1", "contNormal", + "", "", 0.6673887172648, 0.0228975570096948, + 0.429734591916946, -0.022555753155167, 0.0256927087956874, 50, + 50, 0.00156847782026019, "contGamma", "debCollin1", "contNormal", + "", "", 0.898599768606489, 0.0123085072816215, + 0.127430384885271, -0.0968912666707144, 0.0440472961068337, + 84, 50, -0.0264219852819403, "contGamma", "debCollin1", "contNormal", + "", "", 0.462415397032116, 0.0359543756643626, + -0.734875374518862, -0.066979214956111, 0.088162023320816, 16, + 84, 0.0105914041823525, "contGamma", "debCollin1", "contNormal", + "", "", 0.788998566587046, 0.0395775737464212, + 0.267611255056033, -0.0236709806557068, 0.0269326729482325, + 50, 84, 0.00163084614626286, "contGamma", "debCollin1", "contNormal", + "", "", 0.899470086397366, 0.0129093325191418, + 0.126330787733964, -0.0932789850324305, 0.0390554822960027, + 84, 84, -0.0271117513682139, "contGamma", "debCollin1", "contNormal", + "", "", 0.421924354460373, 0.0337594130229613, + -0.803087167119108)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.155571881321062, 0.117359330684494, -0.019106275318284, "contGamma", - "", 0.783769082844098, "contNormal", 0.0696265885899951, - -0.274410619638336, -2.68756653802397, 2.34581827558483, -0.170874131219574, - "debCollin1", "", 0.894134600270278, "contNormal", - 1.2840503328917, -0.133074324925225, -2.93402634270064, 0.846751592712145, - -1.04363737499425, "contcor1", "", 0.279231184371397, - "contNormal", 0.964501890145707, -1.08204803500861, -0.15564530495404, - 0.135865880803194, -0.00988971207542317, "contGamma:contcor1", - "", 0.894204310315396, "contNormal", 0.0743664649087016, - -0.132986179826681, -0.790595996656582, 4.51341308155051, 1.86140854244696, - "debCollin1:contcor1", "", 0.168922583650334, "contNormal", - 1.35308840367589, 1.3756740042928, -0.0199697388206988, 0.000908073298663523, - -0.00953083276101763, "contGamma", "", 0.0735394672309044, - "debCollin1", 0.00532607034722164, -1.78946805800066, -0.0336990383446277, - 0.0420654513623252, 0.00418320650884879, "contcor1", "", - 0.828650941003975, "debCollin1", 0.0193280311027584, 0.216432107678665, - -0.0233914241574298, 0.0139843290107285, -0.00470354757335065, - "contGamma:contcor1", "", 0.621798574701853, "debCollin1", - 0.0095348061145443, -0.493302906933357, -0.031021241398793, - 0.0494312695942091, 0.00920501409770806, "contcor2", "", - 0.653792018131803, "debCollin1", 0.0205239768760042, 0.448500510077567, - -0.018240663303072, 0.017560741783306, -0.000339960759883025, - "contGamma:contcor2", "", 0.970307511996785, "debCollin1", - 0.00913317932594041, -0.0372226086613077)) + list(-0.155571824082615, 0.117359387829468, -0.0191062181265732, "contGamma", + "", 0.783769713942302, "contNormal", 0.0696265885661495, + -0.274409798326125, -2.68756652546112, 2.34581828497954, -0.170874120240791, + "debCollin1", "", 0.894134606965906, "contNormal", + 1.28405033208349, -0.133074316458867, -2.93402635679949, 0.84675154042907, + -1.04363740818521, "contcor1", "", 0.279231164225492, + "contNormal", 0.964501880404654, -1.08204808034937, -0.155645394131797, + 0.1358657910066, -0.00988980156259832, "contGamma:contcor1", + "", 0.894203358428722, "contNormal", 0.0743664647508322, + -0.132987383435995, -0.790596038079488, 4.51341298623202, 1.86140847407626, + "debCollin1:contcor1", "", 0.168922594971462, "contNormal", + 1.35308838992677, 1.37567396774205, -0.0199697632053938, 0.0009080480926541, + -0.00953085755636983, "contGamma", "", 0.073538706779452, + "debCollin1", 0.0053260701376988, -1.78947278386532, -0.0336990341842909, + 0.0420654525413289, 0.00418320917851902, "contcor1", "", + 0.828650826710004, "debCollin1", 0.0193280303422003, 0.216432254319548, + -0.0233914125869585, 0.0139843391105652, -0.00470353673819667, + "contGamma:contcor1", "", 0.621799363814483, "debCollin1", + 0.00953480573937552, -0.493301789964388, -0.0310212448322439, + 0.0494312629958695, 0.00920500908181281, "contcor2", "", + 0.653792181739959, "debCollin1", 0.0205239760686197, 0.448500283328963, + -0.0182406537020437, 0.017560749976016, -0.000339951863013852, + "contGamma:contcor2", "", 0.970308287531348, "debCollin1", + 0.00913317896666892, -0.0372216359993042)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.18767563768044, 0.187056281736921, 16, 16, -0.000309677971759863, - "Total", 0.997415318615663, 0.0955966340129713, -0.00323942338511462, - -0.151958637452524, 0.11670461807462, 50, 16, -0.0176270096889518, - "Total", 0.797034673072234, 0.0685378041755678, -0.257186670932704, - -0.268713900772571, 0.157733884895511, 84, 16, -0.0554900079385304, - "Total", 0.610004701841313, 0.108789699461788, -0.510066745409302, - -0.189305242021853, 0.189968229334885, 16, 50, 0.000331493656515861, - "Total", 0.99726636797262, 0.0967552144703677, 0.0034261063688447, - -0.151872143310645, 0.116724543378289, 50, 50, -0.0175737999661781, - "Total", 0.797584959415183, 0.0685208220170346, -0.256473863693712, - -0.262660200480341, 0.150503232665178, 84, 50, -0.0560784839075816, - "Total", 0.594691344318279, 0.105400771750017, -0.532050031289952, - -0.198593644832474, 0.200759735270715, 16, 84, 0.00108304521912045, - "Total", 0.991517981938092, 0.101877734298497, 0.0106308333864903, - -0.151851475833007, 0.116828615825291, 50, 84, -0.0175114300038578, - "Total", 0.798349070705501, 0.0685420991859065, -0.255484296685481, - -0.261356539561211, 0.147820003422711, 84, 84, -0.0567682680692499, - "Total", 0.586549981563949, 0.104383689244153, -0.543842323262489, - -0.0236252035630213, 0.0420224671176733, 16, 16, 0.00919863177732597, - "Total indirect", 0.58282353868201, 0.0167471624985242, 0.549265093602368, - -0.021954242825116, 0.0249847711876894, 50, 16, 0.00151526418128672, - "Total indirect", 0.899303415416492, 0.0119744583020541, 0.126541355196568, - -0.112761926367508, 0.0610949530168969, 84, 16, -0.0258334866753056, - "Total indirect", 0.560254053476262, 0.044352059720425, -0.582464193053222, - -0.0350385407516562, 0.0547181475628596, 16, 50, 0.0098398034056017, - "Total indirect", 0.667390607798634, 0.0228975351135289, 0.429731993282888, - -0.0225556956012239, 0.0256926434093449, 50, 50, 0.00156847390406051, - "Total indirect", 0.898599763437687, 0.0123084759187275, 0.127430391416216, - -0.0968912045024092, 0.0440472792136955, 84, 50, -0.0264219626443568, - "Total indirect", 0.462415529433845, 0.0359543554952564, -0.734875157137577, - -0.0669792494269835, 0.088161959363396, 16, 84, 0.0105913549682063, - "Total indirect", 0.788999484691611, 0.0395775662242045, 0.267610062433018, - -0.0236709468035401, 0.0269326345363017, 50, 84, 0.00163084386638079, - "Total indirect", 0.899470083390859, 0.0129093140840843, 0.12633079153225, - -0.0932789714188982, 0.0390554778068479, 84, 84, -0.0271117468060252, - "Total indirect", 0.421924369070983, 0.033759408404844, -0.803087141839103 + list(-0.187675391454866, 0.187056495022519, 16, 16, -0.000309448216173562, + "Total", 0.997417236002948, 0.0955966256097619, -0.00323702028392478, + -0.151958574431145, 0.116704679409581, 50, 16, -0.017626947510782, + "Total", 0.797035372126913, 0.0685378037453513, -0.257185765337245, + -0.268713967158867, 0.157733798620669, 84, 16, -0.0554900842690988, + "Total", 0.610004193639467, 0.108789694388086, -0.51006747083183, + -0.189305016237816, 0.189968429452585, 16, 50, 0.000331706607384652, + "Total", 0.997264611714585, 0.0967552079227123, 0.00342830752479617, + -0.15187208227536, 0.116724603907358, 50, 50, -0.0175737391840009, + "Total", 0.797585643915084, 0.0685208218878955, -0.256472977115666, + -0.26266025583462, 0.150503166199664, 84, 50, -0.0560785448174778, + "Total", 0.594690934173908, 0.105400768915466, -0.532050623486952, + -0.198593441665867, 0.200759918610429, 16, 84, 0.00108323847228095, + "Total", 0.991516468085162, 0.101877729240523, 0.0106327308270047, + -0.151851416779743, 0.116828675063747, 50, 84, -0.0175113708579982, + "Total", 0.798349737239014, 0.0685420992331503, -0.255483433596514, + -0.261356580946363, 0.14781995913886, 84, 84, -0.0567683109037514, + "Total", 0.586549696504738, 0.104383688504675, -0.543842737471465, + -0.0236251887888871, 0.0420226237766831, 16, 16, 0.00919871749389798, + "Total indirect", 0.582820841278767, 0.0167471986943107, 0.549269024736833, + -0.021954319680585, 0.0249848586675431, 50, 16, 0.00151526949347902, + "Total indirect", 0.899303414941018, 0.0119745002251007, 0.126541355797276, + -0.1127620150975, 0.0610949656303777, 84, 16, -0.0258335247335613, + "Total indirect", 0.560253704275325, 0.0443520855738268, -0.582464711621279, + -0.0350385147554982, 0.0547182593904106, 16, 50, 0.00983987231745619, + "Total indirect", 0.6673887172648, 0.0228975570096948, 0.429734591916946, + -0.022555753155167, 0.0256927087956874, 50, 50, 0.00156847782026019, + "Total indirect", 0.898599768606489, 0.0123085072816215, 0.127430384885271, + -0.0968912666707144, 0.0440472961068337, 84, 50, -0.0264219852819403, + "Total indirect", 0.462415397032116, 0.0359543756643626, -0.734875374518862, + -0.066979214956111, 0.088162023320816, 16, 84, 0.0105914041823525, + "Total indirect", 0.788998566587046, 0.0395775737464212, 0.267611255056033, + -0.0236709806557068, 0.0269326729482325, 50, 84, 0.00163084614626286, + "Total indirect", 0.899470086397366, 0.0129093325191418, 0.126330787733964, + -0.0932789850324305, 0.0390554822960027, 84, 84, -0.0271117513682139, + "Total indirect", 0.421924354460373, 0.0337594130229613, -0.803087167119108 )) @@ -7572,7 +7580,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 61 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -7583,27 +7591,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -7612,125 +7620,126 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(750.952947729768, 816.082202379471, 14, "Model 1", 100, -350.476473864884, + list(750.952947729691, 816.082202379394, 14, "Model 1", 100, -350.476473864846, 61)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962224441784168, 0.0896223081008322, 0.0400000318414952, - "facExperimexperimental", "", 0.114127980511256, "facGenderm", - 0.0253179531107465, 1.57990780955024, -0.163250648257316, 0.0341991295275318, - -0.0645257593648919, "contcor2", "", 0.200188038548477, - "facGenderm", 0.0503707668463059, -1.28101602188779, -0.170527350572136, - 0.027297682467087, -0.0716148340525248, "contcor2", "", - 0.155882409029224, "facExperimexperimental", 0.0504664969865881, - -1.41905696509027, 0.180704730598575, 0.319294918515748, 0.249999824557161, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353552894365291, 7.07107277415925, 0.180704770990455, 0.319295059403694, - 0.249999915197075, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553150737518, 7.07107021039328, - 0.721541831522909, 1.27492368232682, 0.998232756924864, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171433549013, - 7.07106765037056, 0.00473838112582504, 0.00837245140317262, - 0.00655541626449883, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000927075779456323, 7.07106841723684, 0.758561699061248, - 1.34033568000798, 1.04944868953461, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.148414456983825, 7.07106781146658, - 0.0796446773821165, 0.140727627339565, 0.110186152360841, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826715284726, 7.07106943501367)) + list(-0.16325076342164, 0.03419919372385, -0.0645257848488949, "contcor2", + "", 0.200188269567437, "facGenderm", 0.0503708126024126, + -1.28101536415961, -0.00962235005405438, 0.0896223290735499, + 0.0399999895097478, "facExperimexperimental", "", 0.11412882511675, + "facGenderm", 0.0253179854095365, 1.57990412201916, 0.180704833050562, + 0.319295275865363, 0.250000054457962, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.035355354462629, 7.07106627150961, + 0.758561699061003, 1.34033568000822, 1.04944868953461, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.14841445698395, + 7.07106781146062, 0.0047383809721679, 0.00837245086722544, 0.00655541591969667, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000927075681931562, 7.07106878916127, -0.170527181342903, + 0.0272979135035686, -0.071614633919667, "contcor2", "", + 0.155883694342413, "facExperimexperimental", 0.0504665127540328, + -1.41905255607233, 0.180704820341124, 0.319295231535983, 0.250000025938554, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553463961692, 7.07106707815036, + 0.72154182740798, 1.27492366797649, 0.998232747692237, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171430937895, + 7.07106771575751, 0.0796446920634618, 0.140727678547273, 0.110186185305367, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.0155826808465935, 7.07106732083618 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.039451515200102, 1.19060350283693, "", 0.615027509018516, 0, - "m", "facGender", "contNormal", "", "", "", 0.0362328060082577, - 0.293666617528936, 2.09430514844921, -0.260888183320162, 0.896654610555023, + list(0.0394515151717839, 1.19060350286525, "", 0.615027509018516, 0, + "m", "facGender", "contNormal", "", "", "", 0.0362328060174308, + 0.293666617543385, 2.09430514834617, -0.260888183317154, 0.896654610552016, "", 0.317883213617431, 1, "m", "facGender", "contNormal", "", - "", "", 0.281709693155521, 0.29529695520064, 1.07648659432145, - -0.0357576352088553, 0.0329602721170154, "", -0.00139868154591997, + "", "", 0.281709693153019, 0.295296955199106, 1.07648659432704, + -0.0357576168927836, 0.0329602553194581, "", -0.00139868078666278, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.936407413397748, 0.0175304005246802, -0.0797860575946814, - -0.0477218060568078, 0.0454659731231758, "", -0.00112791646681602, + "", 0.936407415419232, 0.0175303915669572, -0.0797860550530502, + -0.0477218797305967, 0.0454660432815357, "", -0.00112791822453049, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.962158076033123, 0.0237728294792754, -0.0474456129759108, - -0.0215577583028228, 0.0199074657955391, 16, -0.000825146253641861, + "", 0.962158075469433, 0.0237728661718243, -0.0474456136831876, + -0.0215577522284188, 0.0199074602321282, 16, -0.000825145998145273, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.937823709807349, 0.0105780576646904, -0.0780054599622958, - -0.061925213988326, 0.0589898050634176, 16, -0.00146770446245416, + "", 0.937823711605162, 0.0105780546958055, -0.0780054577022058, + -0.0619252753490134, 0.0589898635055769, 16, -0.00146770592171829, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.962049922556566, 0.0308462349322503, -0.0475813163479363, - -0.008917010350421, 0.00861126063359005, 50, -0.000152874858415474, + "", 0.962049922425841, 0.0308462654947625, -0.0475813165119613, + -0.00891701379869271, 0.00861126341188543, 50, -0.000152875193403641, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.972727148902378, 0.00447157986633219, -0.0341881086741876, - -0.0787424861008131, 0.075010509805128, 50, -0.00186598814784254, + "", 0.972727098848199, 0.00447158145477135, -0.0341881714444713, + -0.0787425327709998, 0.0750105542564457, 50, -0.00186598925727705, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.962056302471345, 0.0392234237768462, -0.0475733112555067 + "", 0.962056302399027, 0.0392234470225551, -0.0475733113462474 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.039451515200102, 1.19060350283693, 0.615027509018516, "facGenderm", - "", 0.0362328060082577, "contNormal", 0.293666617528936, - 2.09430514844921, -3.60954587064797, 3.31825726151592, -0.145644304566028, - "debCollin1", "", 0.934321266547332, "contNormal", - 1.76732919247739, -0.0824092677164848, -3.35825806932573, 3.34465480042616, + list(0.0394515151717839, 1.19060350286525, 0.615027509018516, "facGenderm", + "", 0.0362328060174308, "contNormal", 0.293666617543385, + 2.09430514834617, -3.60954586889574, 3.31825725976368, -0.145644304566028, + "debCollin1", "", 0.934321266514183, "contNormal", + 1.76732919158338, -0.082409267758172, -3.35825807032066, 3.34465480142109, -0.00680163444978701, "facExperimexperimental", "", - 0.99682629383007, "contNormal", 1.70995817337043, -0.00397766129938756, - -1.11339429056795, 0.519105699765776, -0.297144295401085, "facGenderm:facExperimexperimental", - "", 0.475538121541893, "contNormal", 0.416461731748816, - -0.713497238157536, -4.725537399624, 5.1893984275449, 0.231930513960453, - "debCollin1:facExperimexperimental", "", 0.92694030053048, - "contNormal", 2.52936684178297, 0.0916950875330376, -0.0402674781538881, - 0.0518453507994649, 0.00578893632278844, "facGenderm", "", - 0.805409476050982, "debCollin1", 0.0234986024436998, 0.246352366557038, - -0.0489096424464359, 0.0420350495518283, -0.00343729644730381, - "facExperimexperimental", "", 0.882220065928568, "debCollin1", - 0.0232006028466911, -0.148155479838923, -0.088281275962143, - 0.0429308526459836, -0.0226752116580797, "facGenderm:facExperimexperimental", - "", 0.498142044358058, "debCollin1", 0.0334730968637973, - -0.677416008155612, -0.0174100196262428, 0.0258806984288795, - 0.00423533940131835, "contcor2", "", 0.701345046018345, - "debCollin1", 0.0110437534558273, 0.383505428499363, -0.0370220665346427, - 0.0287647426701657, -0.0041286619322385, "facGenderm:contcor2", - "", 0.805676321796795, "debCollin1", 0.016782657672214, - -0.246007635553103)) + 0.996826293831012, "contNormal", 1.70995817387806, -0.00397766129820673, + -1.11339429062865, 0.519105699826476, -0.297144295401085, "facGenderm:facExperimexperimental", + "", 0.475538121574714, "contNormal", 0.416461731779786, + -0.713497238104477, -4.72553740188827, 5.18939842980917, 0.231930513960453, + "debCollin1:facExperimexperimental", "", 0.926940300563756, + "contNormal", 2.52936684293824, 0.0916950874911567, -0.0402674788056402, + 0.0518453477258586, 0.00578893446010921, "facGenderm", "", + 0.805409532393497, "debCollin1", 0.0234986018258685, 0.246352293766536, + -0.0489096746829854, 0.0420350149239737, -0.00343732987950587, + "facExperimexperimental", "", 0.882218925647711, "debCollin1", + 0.0232006022366531, -0.148156924740318, -0.0882812893947666, + 0.0429308357632993, -0.0226752268157337, "facGenderm:facExperimexperimental", + "", 0.498141745830688, "debCollin1", 0.0334730959836636, + -0.677416478798382, -0.0174100614522484, 0.0258806554642774, + 0.00423529700601454, "contcor2", "", 0.701347884339835, + "debCollin1", 0.0110437531653636, 0.383501599736731, -0.0370220620431139, + 0.028764745431398, -0.00412865830585793, "facGenderm:contcor2", + "", 0.805676484055347, "debCollin1", 0.0167826572308037, + -0.246007425944444)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.03803060687691, 1.18922704806828, 16, 0.613628827472596, 0, - "m", "Total", 0.036666187593297, 0.293677957929805, 2.08946163953941, - -0.258823203740407, 0.892333798041636, 16, 0.316755297150615, - 1, "m", "Total", 0.280758330477552, 0.293667896671118, 1.07861737949978, - 0.0388449021132654, 1.18955982341648, 50, 0.614202362764874, - 0, "m", "Total", 0.0364126051938256, 0.293555118966448, 2.09228973736641, - -0.258919506615524, 0.891750524925477, 50, 0.316415509154977, - 1, "m", "Total", 0.281071102285855, 0.293543667286067, 1.07791631848293, - 0.0393415773666859, 1.19040769095352, 84, 0.6148746341601, 0, - "m", "Total", 0.0362652559373391, 0.293644710480981, 2.0939407801794, - -0.25948010430035, 0.891514555239526, 84, 0.316017225469588, - 1, "m", "Total", 0.281812838239467, 0.293626482072828, 1.07625587187741, - -0.0357576352088553, 0.0329602721170154, 16, -0.00139868154591997, - 0, "m", "Total indirect", 0.936407413397748, 0.0175304005246802, - -0.0797860575946814, -0.0477218060568078, 0.0454659731231758, - 16, -0.00112791646681602, 1, "m", "Total indirect", 0.962158076033123, - 0.0237728294792754, -0.0474456129759108, -0.0215577583028228, - 0.0199074657955391, 50, -0.000825146253641861, 0, "m", "Total indirect", - 0.937823709807349, 0.0105780576646904, -0.0780054599622958, - -0.061925213988326, 0.0589898050634176, 50, -0.00146770446245416, - 1, "m", "Total indirect", 0.962049922556566, 0.0308462349322503, - -0.0475813163479363, -0.008917010350421, 0.00861126063359005, - 84, -0.000152874858415474, 0, "m", "Total indirect", 0.972727148902378, - 0.00447157986633219, -0.0341881086741876, -0.0787424861008131, - 0.075010509805128, 84, -0.00186598814784254, 1, "m", "Total indirect", - 0.962056302471345, 0.0392234237768462, -0.0475733112555067 + list(0.0380306081680547, 1.18922704829565, 16, 0.613628828231853, 0, + "m", "Total", 0.0366661871871585, 0.293677957658428, 2.08946164405554, + -0.258823203401601, 0.892333794187402, 16, 0.3167552953929, + 1, "m", "Total", 0.280758331394722, 0.293667895601446, 1.07861737744322, + 0.0388449024003371, 1.1895598236404, 50, 0.614202363020371, + 0, "m", "Total", 0.0364126051057503, 0.293555118950338, 2.09228973835158, + -0.258919507798546, 0.891750523189971, 50, 0.316415507695713, + 1, "m", "Total", 0.281071104273558, 0.293543667145125, 1.07791631402929, + 0.03934157720258, 1.19040769044764, 84, 0.614874633825112, 0, + "m", "Total", 0.036265255983585, 0.293644710393795, 2.09394077966032, + -0.259480106509797, 0.891514555230105, 84, 0.316017224360154, + 1, "m", "Total", 0.281812840848592, 0.293626482634069, 1.07625586604186, + -0.0357576168927836, 0.0329602553194581, 16, -0.00139868078666278, + 0, "m", "Total indirect", 0.936407415419232, 0.0175303915669572, + -0.0797860550530502, -0.0477218797305967, 0.0454660432815357, + 16, -0.00112791822453049, 1, "m", "Total indirect", 0.962158075469433, + 0.0237728661718243, -0.0474456136831876, -0.0215577522284188, + 0.0199074602321282, 50, -0.000825145998145273, 0, "m", "Total indirect", + 0.937823711605162, 0.0105780546958055, -0.0780054577022058, + -0.0619252753490134, 0.0589898635055769, 50, -0.00146770592171829, + 1, "m", "Total indirect", 0.962049922425841, 0.0308462654947625, + -0.0475813165119613, -0.00891701379869271, 0.00861126341188543, + 84, -0.000152875193403641, 0, "m", "Total indirect", 0.972727098848199, + 0.00447158145477135, -0.0341881714444713, -0.0787425327709998, + 0.0750105542564457, 84, -0.00186598925727705, 1, "m", "Total indirect", + 0.962056302399027, 0.0392234470225551, -0.0475733113462474 )) @@ -7747,7 +7756,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 62 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -7758,27 +7767,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -7787,146 +7796,145 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1199.76473287768, 1267.49915771337, 13, "Model 1", 100, -573.882366438838, + list(1199.76473287636, 1267.49915771205, 13, "Model 1", 100, -573.882366438182, 62)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848937913804, 0.0642077402106356, -0.240320598851584, "contcor1", - "", 0.121931058751358, "contGamma", 0.155374456604458, - -1.54671883721129, -0.403933743833606, 0.194628265653594, -0.104652739090006, - "contcor2", "", 0.493115998501912, "contGamma", 0.152697196022116, - -0.685361236593034, 0.424978854156179, 0.896761739587416, 0.660870296871797, - "contcor2", "", 3.99644510817865e-08, "contcor1", 0.12035498844688, - 5.49100876831109, 1.68041155961728, 2.96919346090066, 2.32480251025897, + list(-0.403934587411241, 0.194627671683067, -0.104653457864087, "contcor2", + "", 0.493113209178308, "contGamma", 0.152697259698569, + -0.685365657973679, -0.54484808815608, 0.0642088851206344, -0.240319601517723, + "contcor1", "", 0.121932788081389, "contGamma", 0.15537453189979, + -1.54671166876126, 1.68041098568654, 2.96919145915973, 2.32480122242314, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776934537862, 7.07106328345926, 0.732634079180343, 1.29452215961894, - 1.01357811939964, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341429962668, 7.0710758199051, 0.721541419777604, - 1.27492224644359, 0.998231833110595, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171172284536, 7.07107419281478, - 0.00462620002260642, 0.008174212720858, 0.00640020637173221, - "debCollin1", "", 1.53721479989599e-12, "debCollin1", - 0.000905121911993755, 7.0710986961239, 0.753193576837034, 1.33085051120172, - 1.04202204401938, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.147364170699352, 7.07106781162754, 0.323892096380017, - 0.572299557982061, 0.448095827181039, "debCollin1:contcor1", - "", 1.53765888910584e-12, "debCollin1:contcor1", 0.0633704148549285, - 7.0710571834956)) + 0.328776570293875, 7.07106720027259, 0.753193576836614, 1.33085051121601, + 1.04202204402631, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.147364170703105, 7.07106781149454, 0.00462621249043408, + 0.00817425620770093, 0.0064002343490675, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000905129825153258, 7.07106778630768, + 0.424979174749564, 0.896763143831824, 0.660871159290694, "contcor2", + "", 3.99656836513884e-08, "contcor1", 0.120355264893547, + 5.49100332150178, 0.732634645355734, 1.2945241349593, 1.01357939015752, + "contcor1", "", 1.53743684450092e-12, "contcor1", 0.143341789450132, + 7.07106695155453, 0.721541823795232, 1.2749236553074, 0.998232739551318, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171428627561, + 7.0710677738118, 0.323891735924702, 0.5722983008148, 0.448095018369751, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633701860976776, 7.07106994571652)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.183783800001178, 0.172835274097978, "", 16, -0.00547426295159987, - "contGamma", "contNormal", "", "", "", 0.952018124518395, - 0.0909759253006998, -0.0601726548370458, -0.151286725888812, - 0.121035195367631, "", 50, -0.0151257652605905, "contGamma", - "contNormal", "", "", "", 0.827641609753482, 0.0694711544203065, - -0.217727276692112, -0.241498467005744, 0.188620852229055, "", - 84, -0.0264388073883443, "contGamma", "contNormal", "", "", - "", 0.809592120153771, 0.109726332378433, -0.240952256539114, - -0.0233878220055953, 0.0416922047357785, 16, 16, 0.00915219136509161, + list(-0.183783612374873, 0.172835461575669, "", 16, -0.00547407539960193, + "contGamma", "contNormal", "", "", "", 0.95201976640736, + 0.0909759252627874, -0.0601705933057548, -0.151286201238682, + 0.121035720137267, "", 50, -0.0151252405507075, "contGamma", + "contNormal", "", "", "", 0.827647495028196, 0.0694711544507932, + -0.217719723679283, -0.24149754728268, 0.188621772327342, "", + 84, -0.0264378874776691, "contGamma", "contNormal", "", "", + "", 0.809598618143966, 0.109726332474155, -0.240943872646946, + -0.0233878757695529, 0.0416922759894217, 16, 16, 0.00915220010993444, "contGamma", "debCollin1", "contNormal", "", "", - 0.581456345993643, 0.0166023527102326, 0.551258699584836, -0.0224390039726656, - 0.0239564126001832, 50, 16, 0.000758704313758788, "contGamma", - "debCollin1", "contNormal", "", "", 0.948888541398985, - 0.0118357829375463, 0.0641025877005546, -0.118491951120062, - 0.0622598723529721, 84, 16, -0.0281160393835451, "contGamma", - "debCollin1", "contNormal", "", "", 0.542029535893431, - 0.0461110063498059, -0.60974681771749, -0.034762142155311, 0.0543422323534684, - 16, 50, 0.00979004509907866, "contGamma", "debCollin1", "contNormal", - "", "", 0.666694537309026, 0.0227311254726167, - 0.430688973622197, -0.0231840189907873, 0.0247547078235187, - 50, 50, 0.000785344416365697, "contGamma", "debCollin1", "contNormal", - "", "", 0.948797236607138, 0.0122294917642469, - 0.0642172570622816, -0.0999112865838791, 0.0423983640311969, - 84, 50, -0.0287564612763411, "contGamma", "debCollin1", "contNormal", - "", "", 0.428303260798277, 0.0363041493970288, - -0.792098472322135, -0.0665724728388061, 0.0876478879994241, - 16, 84, 0.010537707580309, "contGamma", "debCollin1", "contNormal", - "", "", 0.788819119336337, 0.0393426517157205, - 0.26784436535828, -0.0241611134918251, 0.0257942549031149, 50, - 84, 0.00081657070564492, "contGamma", "debCollin1", "contNormal", - "", "", 0.948910378647849, 0.0127439506003635, - 0.0640751625027196, -0.095259533046235, 0.0362452649784638, - 84, 84, -0.0295071340338856, "contGamma", "debCollin1", "contNormal", - "", "", 0.37909985961747, 0.03354775880118, - -0.879556044526221)) + 0.581456710793708, 0.0166023846030638, 0.551258167350581, -0.0224390522516942, + 0.0239564618477204, 50, 16, 0.000758704798013139, "contGamma", + "debCollin1", "contNormal", "", "", 0.948888616113786, + 0.0118358078172294, 0.0641024938668478, -0.11849224665717, 0.0622600154244945, + 84, 16, -0.0281161156163379, "contGamma", "debCollin1", "contNormal", + "", "", 0.542029420847713, 0.0461111182418186, + -0.609746991363117, -0.0347622341662128, 0.0543422847179635, + 16, 50, 0.00979002527587537, "contGamma", "debCollin1", "contNormal", + "", "", 0.66669567896892, 0.0227311623037519, + 0.430687403708322, -0.0231840321277267, 0.0247547194619839, + 50, 50, 0.000785343667128629, "contGamma", "debCollin1", "contNormal", + "", "", 0.948797311814579, 0.0122294980846193, + 0.0642171626091782, -0.0999114640753121, 0.0423984462544462, + 84, 50, -0.028756508910433, "contGamma", "debCollin1", "contNormal", + "", "", 0.428303338629966, 0.0363042156519918, + -0.792098338829013, -0.0665726671924679, 0.0876479757344094, + 16, 84, 0.0105376542709707, "contGamma", "debCollin1", "contNormal", + "", "", 0.788820539502753, 0.0393427236784324, + 0.267842520439108, -0.0241610855505054, 0.0257942225716385, + 50, 84, 0.000816568510566581, "contGamma", "debCollin1", "contNormal", + "", "", 0.948910454240523, 0.0127439352243676, + 0.0640750675666668, -0.0952596004963116, 0.0362453042044909, + 84, 84, -0.0295071481459103, "contGamma", "debCollin1", "contNormal", + "", "", 0.379100018317407, 0.0335477860149718, + -0.8795557516893)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.15061545035741, 0.120969036043063, -0.0148232071571739, "contGamma", - "", 0.8305848899946, "contNormal", 0.069283029826746, - -0.213951485583725, -2.5946079131973, 2.41619000727046, -0.0892089529634197, - "debCollin1", "", 0.944362540742637, "contNormal", - 1.27828826447636, -0.0697878212939422, -2.70115764493903, 0.664852232232853, - -1.01815270635309, "contcor1", "", 0.235739930853371, - "contNormal", 0.858691767737199, -1.18570218628752, -0.593539408114541, - 4.46390526656191, 1.93518292922368, "debCollin1:contcor1", "", - 0.133634344237159, "contNormal", 1.29018816533593, 1.49992301992618, - -0.53307420307188, 0.294744052284854, -0.119165075393513, "contcor2", - "", 0.572565869894674, "contNormal", 0.211182006885448, - -0.564276650037483, -0.146760895399031, 0.126522895170491, -0.0101190001142699, - "contGamma:contcor2", "", 0.884596459545949, "contNormal", - 0.0697165337539745, -0.145144911391884, -0.0199697648776644, - 0.000908031159491311, -0.00953086685908652, "contGamma", "", - 0.0735382152466169, "debCollin1", 0.00532606624454252, -1.78947583854267, - -0.0336993321269533, 0.0420650992197421, 0.00418288354639439, - "contcor1", "", 0.828663834746481, "debCollin1", 0.019328016214664, - 0.216415564843166, -0.0233912670793, 0.01398445729889, -0.00470340489020503, - "contGamma:contcor1", "", 0.621808878331919, "debCollin1", - 0.0095347987700297, -0.493288322454065, -0.0310211980336643, - 0.0494312509881467, 0.00920502647724118, "contcor2", "", - 0.653791333645229, "debCollin1", 0.0205239610667364, 0.448501458724748, - -0.0182406209603665, 0.0175607565489212, -0.000339932205722626, - "contGamma:contcor2", "", 0.970309981933128, "debCollin1", - 0.00913317229083913, -0.0372195109100908)) + list(-0.150614936271201, 0.120969550237973, -0.0148226930166143, "contGamma", + "", 0.830590677087381, "contNormal", 0.0692830298544764, + -0.213944064625179, -2.59460779845206, 2.41619013226026, -0.0892088330959038, + "debCollin1", "", 0.944362615493377, "contNormal", + 1.27828826708982, -0.069787727379364, -2.70115752909032, 0.664852300994572, + -1.01815261404787, "contcor1", "", 0.235739966766988, + "contNormal", 0.858691755724989, -1.18570209537909, -0.593539156522498, + 4.46390544804736, 1.93518314576243, "debCollin1:contcor1", "", + 0.133634295370484, "contNormal", 1.29018814745126, 1.49992320855322, + -0.533074077360399, 0.294744178398143, -0.119164949481128, "contcor2", + "", 0.572566275785915, "contNormal", 0.211182006987952, + -0.564276053536733, -0.146760541932523, 0.126523248682145, -0.0101186466251893, + "contGamma:contcor2", "", 0.884600462751045, "contNormal", + 0.0697165337654915, -0.145139840991318, -0.0199697930093762, + 0.000908048659476838, -0.00953087217494968, "contGamma", "", + 0.073538683996258, "debCollin1", 0.00532607788549555, -1.78947292545327, + -0.0336994194179787, 0.0420651775251497, 0.0041828790535855, + "contcor1", "", 0.828664384596442, "debCollin1", 0.0193280584594283, + 0.216414859379995, -0.0233913235506993, 0.0139844825186055, + -0.00470342051604691, "contGamma:contcor1", "", 0.621808482240082, + "debCollin1", 0.00953481960998272, -0.493288883108239, -0.0310213895230923, + 0.0494312353433139, 0.00920492291011079, "contcor2", "", + 0.653795681959719, "debCollin1", 0.0205240059258757, 0.448495432293051, + -0.0182406448452724, 0.0175608109146367, -0.000339916965317856, + "contGamma:contcor2", "", 0.970311377290878, "debCollin1", + 0.00913319225309915, -0.0372177608768186)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.175588008611627, 0.18294386543861, 16, 16, 0.00367792841349174, - "Total", 0.967924264767223, 0.0914638934384232, 0.0402118068149794, - -0.148249856796754, 0.11951573490309, 50, 16, -0.0143670609468317, - "Total", 0.833413890506173, 0.0683088040933265, -0.210325171660198, - -0.272902155781283, 0.163792462237504, 84, 16, -0.0545548467718894, - "Total", 0.62434342201583, 0.111403735339878, -0.48970392783913, - -0.177377254804496, 0.186008819099454, 16, 50, 0.00431578214747878, - "Total", 0.9628676424387, 0.0927022324824061, 0.0465553205344636, - -0.14820790387821, 0.119527062189761, 50, 50, -0.0143404208442248, - "Total", 0.833699524289928, 0.0683009912885722, -0.209959190542879, - -0.265949063962711, 0.155558526633341, 84, 50, -0.0551952686646854, - "Total", 0.607738777445379, 0.107529422458997, -0.513303869791847, - -0.187069009057491, 0.197195898314909, 16, 84, 0.00506344462870914, - "Total", 0.95880538900277, 0.098028563382652, 0.0516527474644723, - -0.148183721497768, 0.119565332387877, 50, 84, -0.0143091945549456, - "Total", 0.834064975340113, 0.0683045851856502, -0.209490980964946, - -0.264506487364336, 0.152614604519876, 84, 84, -0.0559459414222299, - "Total", 0.599057509891868, 0.106410397123215, -0.525756344630955, - -0.0233878220055953, 0.0416922047357785, 16, 16, 0.00915219136509161, - "Total indirect", 0.581456345993643, 0.0166023527102326, 0.551258699584836, - -0.0224390039726656, 0.0239564126001832, 50, 16, 0.000758704313758788, - "Total indirect", 0.948888541398985, 0.0118357829375463, 0.0641025877005546, - -0.118491951120062, 0.0622598723529721, 84, 16, -0.0281160393835451, - "Total indirect", 0.542029535893431, 0.0461110063498059, -0.60974681771749, - -0.034762142155311, 0.0543422323534684, 16, 50, 0.00979004509907866, - "Total indirect", 0.666694537309026, 0.0227311254726167, 0.430688973622197, - -0.0231840189907873, 0.0247547078235187, 50, 50, 0.000785344416365697, - "Total indirect", 0.948797236607138, 0.0122294917642469, 0.0642172570622816, - -0.0999112865838791, 0.0423983640311969, 84, 50, -0.0287564612763411, - "Total indirect", 0.428303260798277, 0.0363041493970288, -0.792098472322135, - -0.0665724728388061, 0.0876478879994241, 16, 84, 0.010537707580309, - "Total indirect", 0.788819119336337, 0.0393426517157205, 0.26784436535828, - -0.0241611134918251, 0.0257942549031149, 50, 84, 0.00081657070564492, - "Total indirect", 0.948910378647849, 0.0127439506003635, 0.0640751625027196, - -0.095259533046235, 0.0362452649784638, 84, 84, -0.0295071340338856, - "Total indirect", 0.37909985961747, 0.03354775880118, -0.879556044526221 + list(-0.175587821859148, 0.182944071279813, 16, 16, 0.00367812471033251, + "Total", 0.967922555464166, 0.0914638983080852, 0.0402139508414915, + -0.148249330974302, 0.119516259468913, 50, 16, -0.0143665357526944, + "Total", 0.833419890101675, 0.068308803772752, -0.21031748411945, + -0.272901363718225, 0.163793357530211, 84, 16, -0.054554003094007, + "Total", 0.624348863681552, 0.111403761674457, -0.489696238924359, + -0.177377109163912, 0.186009008916458, 16, 50, 0.00431594987627344, + "Total", 0.962866204878126, 0.0927022437521081, 0.0465571242031053, + -0.148207379836038, 0.11952758606888, 50, 50, -0.0143398968835789, + "Total", 0.833705511608448, 0.0683009912469765, -0.209951519323135, + -0.265948211293556, 0.155559418517352, 84, 50, -0.0551943963881021, + "Total", 0.607744484379737, 0.10752943246297, -0.513295710056958, + -0.18706894240452, 0.197196100147258, 16, 84, 0.0050635788713688, + "Total", 0.958804312296442, 0.0980285978678209, 0.0516540987171559, + -0.148183199006333, 0.119565854926051, 50, 84, -0.0143086720401409, + "Total", 0.834070946537136, 0.0683045851975736, -0.209483331151965, + -0.264505593237613, 0.152615521990454, 84, 84, -0.0559450356235795, + "Total", 0.599063445475421, 0.10641040307839, -0.525747802894481, + -0.0233878757695529, 0.0416922759894217, 16, 16, 0.00915220010993444, + "Total indirect", 0.581456710793708, 0.0166023846030638, 0.551258167350581, + -0.0224390522516942, 0.0239564618477204, 50, 16, 0.000758704798013139, + "Total indirect", 0.948888616113786, 0.0118358078172294, 0.0641024938668478, + -0.11849224665717, 0.0622600154244945, 84, 16, -0.0281161156163379, + "Total indirect", 0.542029420847713, 0.0461111182418186, -0.609746991363117, + -0.0347622341662128, 0.0543422847179635, 16, 50, 0.00979002527587537, + "Total indirect", 0.66669567896892, 0.0227311623037519, 0.430687403708322, + -0.0231840321277267, 0.0247547194619839, 50, 50, 0.000785343667128629, + "Total indirect", 0.948797311814579, 0.0122294980846193, 0.0642171626091782, + -0.0999114640753121, 0.0423984462544462, 84, 50, -0.028756508910433, + "Total indirect", 0.428303338629966, 0.0363042156519918, -0.792098338829013, + -0.0665726671924679, 0.0876479757344094, 16, 84, 0.0105376542709707, + "Total indirect", 0.788820539502753, 0.0393427236784324, 0.267842520439108, + -0.0241610855505054, 0.0257942225716385, 50, 84, 0.000816568510566581, + "Total indirect", 0.948910454240523, 0.0127439352243676, 0.0640750675666668, + -0.0952596004963116, 0.0362453042044909, 84, 84, -0.0295071481459103, + "Total indirect", 0.379100018317407, 0.0335477860149718, -0.8795557516893 )) @@ -7943,7 +7951,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 62 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -7954,27 +7962,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -7983,128 +7991,129 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(753.030601947742, 820.765026783433, 13, "Model 1", 100, -350.515300973871, + list(753.030601954069, 820.765026789759, 13, "Model 1", 100, -350.515300977034, 62)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962251158901783, 0.0896222076277666, 0.0399998480193744, - "facExperimexperimental", "", 0.114130251318578, "facGenderm", - 0.0253179956365561, 1.57989789529861, -0.163250598302739, 0.0341993496862825, - -0.0645256243082283, "contcor2", "", 0.200189368161418, - "facGenderm", 0.0503708102665359, -1.28101223638835, -0.170527250884853, - 0.0272980080562638, -0.0716146214142946, "contcor2", "", - 0.155884109726645, "facExperimexperimental", 0.050466554615681, - -1.41905113118307, 0.180704820658921, 0.319295232644463, 0.250000026651692, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553465978776, 7.07106705797929, 0.180704899064782, 0.3192955061201, - 0.250000202592441, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553963614901, 7.07106208162177, - 0.721541892846463, 1.27492389622146, 0.998232894533963, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171472470925, - 7.07106667559592, 0.00473838556556633, 0.0083724668887617, 0.00655542622716402, - "debCollin1", "", 1.53765888910584e-12, "debCollin1", - 0.000927078597326416, 7.07105767091278, 0.759150982985598, 1.34137691142337, - 1.05026394720448, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.1485297518297, 7.07106781144215, 0.0796446989503474, - 0.140727702568336, 0.110186200759342, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826852176377, 7.07106632909614)) + list(-0.163249002390499, 0.0342013015086902, -0.0645238504409043, "contcor2", + "", 0.2002025487947, "facGenderm", 0.0503709010616144, + -1.28097471121229, -0.00962333923659579, 0.0896219438768893, + 0.0399993023201467, "facExperimexperimental", "", 0.114137244376135, + "facGenderm", 0.0253181394903986, 1.57986736487156, 0.180705213365921, + 0.319296602398766, 0.250000907882344, "facGenderm", "", + 1.53765888910584e-12, "facGenderm", 0.0353555958492186, 7.0710421328642, + 0.759150982985707, 1.34137691142326, 1.05026394720448, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.148529751829645, + 7.07106781144478, 0.00473837298748958, 0.00837242301722418, + 0.00655539800235688, "debCollin1", "", 1.53721479989599e-12, + "debCollin1", 0.000927070614154015, 7.07108811591328, -0.170525383438868, + 0.0273000874159674, -0.0716126480114501, "contcor2", "", + 0.155895952584317, "facExperimexperimental", 0.0504666086762964, + -1.41901050793385, 0.180705233383673, 0.319296672221077, 0.250000952802375, + "facExperimexperimental", "", 1.53765888910584e-12, + "facExperimexperimental", 0.0353556085546968, 7.07104086231782, + 0.721541548045792, 1.27492269360977, 0.998232120827779, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.14117125363756, + 7.07107215602559, 0.0796447030361019, 0.140727716819217, 0.110186209927659, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.0155826878108297, 7.07106574073067 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.14361020904034, 1.01999494403653, 16, 0.438192367498097, "", - "m", "facGender", "contNormal", "", "", "", 0.139897454044454, - 0.296843503823346, 1.47617300649728, 0.0679150327056879, 0.889736447515249, + list(-0.14361020903743, 1.01999494403362, 16, 0.438192367498097, "", + "m", "facGender", "contNormal", "", "", "", 0.139897454042472, + 0.296843503821862, 1.47617300650467, 0.0679150327076969, 0.88973644751324, 50, 0.478825740110468, "", "m", "facGender", "contNormal", "", - "", "", 0.0223770880750054, 0.209652172512348, 2.28390545336355, - -0.0768017820425038, 1.12971036140505, 84, 0.526454289681271, - "", "m", "facGender", "contNormal", "", "", "", 0.0871851118017952, - 0.307789365764974, 1.71043690340903, -0.0350111801968114, 0.0328538804008177, - 16, -0.00107864989799686, "", "m", "facGender", "debCollin1", - "contNormal", "", "", 0.950321151845348, 0.0173128335859587, - -0.0623034867539928, -0.0485078945298809, 0.0452387479712615, - 16, -0.00163457327930967, "", "m", "facGender", "debCollin1", - "contNormal", "", "", 0.945508496138255, 0.0239153992727938, - -0.0683481492683741, -0.0209347798859799, 0.0196620766933927, - 50, -0.000636351596293605, "", "m", "facGender", "debCollin1", - "contNormal", "", "", 0.951005235649467, 0.0103565312678181, - -0.0614444720763802, -0.062758571874601, 0.0585046489310939, - 50, -0.00212696147175355, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.945184093138401, 0.0309350635425456, - -0.0687556845916381, -0.00726315695143317, 0.00702733675591923, - 84, -0.000117910097756974, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.974198425894715, 0.00364560109779414, - -0.0323431156053573, -0.0798153039994503, 0.0744070719782492, - 84, -0.00270411601060053, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.945203319608379, 0.0393431657913579, - -0.0687315307807416)) + "", "", 0.022377088074349, 0.209652172511323, 2.28390545337472, + -0.0768017820322232, 1.12971036139477, 84, 0.526454289681271, + "", "m", "facGender", "contNormal", "", "", "", 0.0871851117964091, + 0.307789365759729, 1.71043690343818, -0.0350116164769208, 0.0328542885836238, + 16, -0.00107866394664847, "", "m", "facGender", "debCollin1", + "contNormal", "", "", 0.950321123018253, 0.0173130490141304, + -0.0623035229535879, -0.0485073653934533, 0.0452382550762953, + 16, -0.00163455515857896, "", "m", "facGender", "debCollin1", + "contNormal", "", "", 0.945508506141059, 0.0239151385457085, + -0.0683481367024017, -0.0209345488647484, 0.019661860469985, + 50, -0.000636344197381699, "", "m", "facGender", "debCollin1", + "contNormal", "", "", 0.951005265516174, 0.0103564171727013, + -0.0614444345732858, -0.0627587388896117, 0.0585048044346039, + 50, -0.00212696722750391, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.945184090597094, 0.0309351458191903, + -0.0687556877842312, -0.00726260198692106, 0.00702684686890383, + 84, -0.000117877559008615, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.974203658230439, 0.00364533454913923, + -0.0323365544148615, -0.0798162887252725, 0.0744079892187695, + 84, -0.00270414975325155, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.945203311640819, 0.0393436509957692, + -0.0687315407902114)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0658874068397994, 0.889216499799443, 0.477551953319621, "facGenderm", - "", 0.0229865222197734, "contNormal", 0.21003679135279, - 2.27365858259326, -3.57764851555158, 3.35300340343896, -0.112322556056313, - "debCollin1", "", 0.949345388626361, "contNormal", - 1.76805593716483, -0.0635288475298062, -3.45404156508648, 3.18282340375323, - -0.135609080666624, "facExperimexperimental", "", 0.936161923668138, - "contNormal", 1.69310890944692, -0.0800947180125125, -4.73027949875055, - 5.2050105828611, 0.237365542055272, "debCollin1:facExperimexperimental", - "", 0.925385917658142, "contNormal", 2.53455934904415, - 0.0936516014686297, -0.228515215656397, 0.321188551553271, 0.0463366679484374, - "contcor2", "", 0.741078120977112, "contNormal", 0.140233129676275, - 0.33042597034955, -0.369790588934884, 0.454993718757429, 0.0426015649112727, - "facGenderm:contcor2", "", 0.839548373761432, "contNormal", - 0.210408026422451, 0.202471196729627, -0.0402676131531765, 0.0518452857955034, - 0.00578883632116345, "facGenderm", "", 0.805412914972107, - "debCollin1", 0.0234986202999787, 0.246347923719109, -0.0489095889439207, - 0.0420351721628111, -0.00343720839055479, "facExperimexperimental", - "", 0.882223150052019, "debCollin1", 0.0232006204767262, - -0.148151571808299, -0.088281350995459, 0.0429308773196283, - -0.0226752368379154, "facGenderm:facExperimexperimental", "", - 0.498141893726266, "debCollin1", 0.0334731222997138, -0.677416245633866, - -0.0174101625355719, 0.0258805884152555, 0.00423521293984179, - "contcor2", "", 0.701353750825899, "debCollin1", 0.011043761847743, - 0.383493686139868, -0.0370219171148328, 0.0287649420799568, - -0.00412848751743799, "facGenderm:contcor2", "", 0.805684511414542, - "debCollin1", 0.0167826704249945, -0.24599705606382)) + list(0.0658874068416855, 0.889216499797557, 0.477551953319621, "facGenderm", + "", 0.0229865222191465, "contNormal", 0.210036791351828, + 2.27365858260368, -3.57764851110618, 3.35300339899356, -0.112322556056313, + "debCollin1", "", 0.949345388561467, "contNormal", + 1.76805593489672, -0.0635288476113025, -3.4540415537633, 3.18282339243006, + -0.135609080666624, "facExperimexperimental", "", 0.936161923450775, + "contNormal", 1.69310890366969, -0.0800947182858122, -4.73027948158249, + 5.20501056569303, 0.237365542055272, "debCollin1:facExperimexperimental", + "", 0.925385917401031, "contNormal", 2.53455934028478, + 0.0936516017922874, -0.228515215652721, 0.321188551549596, 0.0463366679484375, + "contcor2", "", 0.741078120973773, "contNormal", 0.1402331296744, + 0.330425970353969, -0.369790588928191, 0.454993718750737, 0.0426015649112727, + "facGenderm:contcor2", "", 0.839548373758863, "contNormal", + 0.210408026419037, 0.202471196732913, -0.040267573889726, 0.0518451267597172, + 0.00578877643499562, "facGenderm", "", 0.805414477109753, + "debCollin1", 0.0234985697125091, 0.246345905551607, -0.0489094318250622, + 0.0420351334967165, -0.00343714916417283, "facExperimexperimental", + "", 0.882224912960143, "debCollin1", 0.0232005705306674, + -0.148149337949663, -0.0882811899175233, 0.042930755925354, + -0.0226752169960847, "facGenderm:facExperimexperimental", "", + 0.498141344699807, "debCollin1", 0.0334730502391525, -0.677417111200763, + -0.0174100131547759, 0.0258806446003535, 0.00423531572278881, + "contcor2", "", 0.701346239446859, "debCollin1", 0.0110437380728933, + 0.38350381861956, -0.0370220464975003, 0.0287646710722186, -0.00412868771264087, + "facGenderm:contcor2", "", 0.805674867411747, "debCollin1", + 0.0167826342954861, -0.246009514355642)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.145651123385784, 1.01987855858598, 16, 0.4371137176001, 0, - "m", "Total", 0.141532557678635, 0.297334464093554, 1.47010780917265, - 0.0667448896656013, 0.887637443996716, 16, 0.477191166831159, - 1, "m", "Total", 0.0226858368096772, 0.209415213954494, 2.27868433157322, - -0.07724122941283, 1.12887710558279, 50, 0.525817938084978, - 0, "m", "Total", 0.087464433396498, 0.30768890257916, 1.70892721082035, - -0.147665837320681, 1.01979664937337, 50, 0.436065406026343, - 1, "m", "Total", 0.143151849452702, 0.297827535583012, 1.46415409566723, - 0.0678046313902036, 0.889611028635219, 84, 0.478707830012711, - 0, "m", "Total", 0.0224077135468204, 0.209648341430587, 2.28338477064083, - -0.0785176150729263, 1.12601796241427, 84, 0.523750173670671, - 1, "m", "Total", 0.0882982445714293, 0.307285130489238, 1.70444359880607, - -0.0350111801968114, 0.0328538804008177, 16, -0.00107864989799686, - 0, "m", "Total indirect", 0.950321151845348, 0.0173128335859587, - -0.0623034867539928, -0.0485078945298809, 0.0452387479712615, - 16, -0.00163457327930967, 1, "m", "Total indirect", 0.945508496138255, - 0.0239153992727938, -0.0683481492683741, -0.0209347798859799, - 0.0196620766933927, 50, -0.000636351596293605, 0, "m", "Total indirect", - 0.951005235649467, 0.0103565312678181, -0.0614444720763802, - -0.062758571874601, 0.0585046489310939, 50, -0.00212696147175355, - 1, "m", "Total indirect", 0.945184093138401, 0.0309350635425456, - -0.0687556845916381, -0.00726315695143317, 0.00702733675591923, - 84, -0.000117910097756974, 0, "m", "Total indirect", 0.974198425894715, - 0.00364560109779414, -0.0323431156053573, -0.0798153039994503, - 0.0744070719782492, 84, -0.00270411601060053, 1, "m", "Total indirect", - 0.945203319608379, 0.0393431657913579, -0.0687315307807416 + list(-0.145651161667018, 1.01987856876991, 16, 0.437113703551448, 0, + "m", "Total", 0.141532587026881, 0.297334476457343, 1.47010770079385, + 0.0667449313085385, 0.88763743859524, 16, 0.477191184951889, + 1, "m", "Total", 0.0226858238938605, 0.209415201953147, 2.27868454869218, + -0.0772412207400212, 1.1288771117078, 50, 0.52581794548389, + 0, "m", "Total", 0.0874644282728902, 0.307688901929201, 1.708927238477, + -0.147665856524699, 1.01979665706588, 50, 0.436065400270593, + 1, "m", "Total", 0.143151863946398, 0.297827542444499, 1.46415404260959, + 0.0678046537991213, 0.889611071303798, 84, 0.47870786255146, + 0, "m", "Total", 0.0224077077253899, 0.209648346598963, 2.28338486955578, + -0.0785176966441142, 1.12601797650015, 84, 0.52375013992802, + 1, "m", "Total", 0.0882982903391583, 0.307285154892001, 1.70444335364036, + -0.0350116164769208, 0.0328542885836238, 16, -0.00107866394664847, + 0, "m", "Total indirect", 0.950321123018253, 0.0173130490141304, + -0.0623035229535879, -0.0485073653934533, 0.0452382550762953, + 16, -0.00163455515857896, 1, "m", "Total indirect", 0.945508506141059, + 0.0239151385457085, -0.0683481367024017, -0.0209345488647484, + 0.019661860469985, 50, -0.000636344197381699, 0, "m", "Total indirect", + 0.951005265516174, 0.0103564171727013, -0.0614444345732858, + -0.0627587388896117, 0.0585048044346039, 50, -0.00212696722750391, + 1, "m", "Total indirect", 0.945184090597094, 0.0309351458191903, + -0.0687556877842312, -0.00726260198692106, 0.00702684686890383, + 84, -0.000117877559008615, 0, "m", "Total indirect", 0.974203658230439, + 0.00364533454913923, -0.0323365544148615, -0.0798162887252725, + 0.0744079892187695, 84, -0.00270414975325155, 1, "m", "Total indirect", + 0.945203311640819, 0.0393436509957692, -0.0687315407902114 )) @@ -8121,7 +8130,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 63 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -8132,29 +8141,29 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -8163,164 +8172,164 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1201.5568092802, 1271.89640430188, 12, "Model 1", 100, -573.7784046401, + list(1201.55680927986, 1271.89640430154, 12, "Model 1", 100, -573.77840463993, 63)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848267165125, 0.06420968125923, -0.240319292952947, "contcor1", - "", 0.121933864594267, "contGamma", 0.155374780666514, - -1.5467072064208, -0.403933549604809, 0.194629764997692, -0.104651892303558, - "contcor2", "", 0.493120439783504, "contGamma", 0.152697528965811, - -0.685354196707334, 0.424979622845377, 0.896764892019949, 0.660872257432663, - "contcor2", "", 3.99670432305044e-08, "contcor1", 0.120355596555844, - 5.49099731416333, 1.68041155818309, 2.96919345589958, 2.32480250704133, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776933627925, 7.07106329324277, 0.732635165174089, 1.29452594786441, - 1.01358055651925, "contcor1", "", 1.53765888910584e-12, - "contcor1", 0.143342119325264, 7.07105881572246, 0.721542429019908, - 1.27492576606382, 0.998234097541864, "contcor2", "", - 1.53765888910584e-12, "contcor2", 0.141171812698837, 7.0710581557198, - 0.00462621046319623, 0.00817424913681725, 0.00640022980000674, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000905128538485272, 7.07107281217482, 0.751629146913411, 1.32808626959469, - 1.03985770825405, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.147058090666027, 7.07106765458825, 0.323891827583711, - 0.572298620392304, 0.448095223988007, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702442412191, - 7.07106670257307)) + list(-0.40393529707712, 0.194628129712769, -0.104653583682175, "contcor2", + "", 0.493113532854618, "contGamma", 0.152697557585568, + -0.685365144910912, -0.544849279809404, 0.0642086589968685, + -0.240320310406268, "contcor1", "", 0.121932278946659, + "contGamma", 0.155374778212876, -1.54671377922747, 1.68041199879066, + 2.96919499282256, 2.32480349580661, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.32877721330536, 7.07106028557823, + 0.751629149321986, 1.32808627760484, 1.03985771346341, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.147058092095027, + 7.07106762130077, 0.00462621129532281, 0.00817425203922343, + 0.00640023166727312, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000905129066627528, 7.07107074919173, 0.424979770811041, + 0.896764685238495, 0.660872228024768, "contcor2", "", + 3.99661641559135e-08, "contcor1", 0.120355506057467, 5.49100119864244, + 0.732634871955916, 1.29452492528019, 1.01357989861805, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341933259078, + 7.07106340463607, 0.721542255618959, 1.27492516166524, 0.998233708642097, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171702748441, + 7.07106090815442, 0.323891952500197, 0.572299056320188, 0.448095504410192, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633703235823193, 7.07106227456938)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.209495536859009, 0.168873196562446, 16, 16, -0.0203111701482816, - "contGamma", "contNormal", "", "", "", 0.833335810606077, - 0.0965244097355817, -0.210425219940965, -0.218426482872836, - 0.292836422352626, 50, 16, 0.0372049697398947, "contGamma", - "contNormal", "", "", "", 0.775448034603853, 0.130426607136212, - 0.285255980791092, -0.386809523848263, 0.586762576478348, 84, - 16, 0.0999765263150426, "contGamma", "contNormal", "", "", - "", 0.687287360529945, 0.248364793436518, 0.402539043202178, - -0.347626216874369, 0.205318507722262, 16, 50, -0.0711538545760534, - "contGamma", "contNormal", "", "", "", 0.613964225153659, - 0.141059919712349, -0.504422905678319, -0.149807424343367, 0.122531994967612, - 50, 50, -0.0136377146878771, "contGamma", "contNormal", "", - "", "", 0.844379295017385, 0.0694756182917537, -0.196294974023942, - -0.258621287898775, 0.356888971673317, 84, 50, 0.0491338418872708, - "contGamma", "contNormal", "", "", "", 0.754346811014232, - 0.157020808654434, 0.312912933695322, -0.627709283215469, 0.366210713945416, - 16, 84, -0.130749284635027, "contGamma", "contNormal", "", "", - "", 0.606089793591451, 0.253555678828999, -0.515663010344982, - -0.36745736358096, 0.220991074087259, 50, 84, -0.0732331447468506, - "contGamma", "contNormal", "", "", "", 0.625663216534658, - 0.150117155802307, -0.487839943112785, -0.235996565486953, 0.215073389143548, - 84, 84, -0.0104615881717026, "contGamma", "contNormal", "", - "", "", 0.927560752849386, 0.115070980433437, -0.0909142177488796, - -0.0248324882116126, 0.0446237382592549, 16, 16, 0.00989562502382118, + list(-0.20949509262697, 0.168873642642365, 16, 16, -0.0203107249923027, + "contGamma", "contNormal", "", "", "", 0.833339410561124, + 0.0965244102069883, -0.210420607064556, -0.218426026229327, + 0.292836878877692, 50, 16, 0.0372054263241824, "contGamma", + "contNormal", "", "", "", 0.775445352761002, 0.130426607105997, + 0.285259481556136, -0.386809054412888, 0.586763045156642, 84, + 16, 0.0999769953718769, "contGamma", "contNormal", "", "", + "", 0.687285970701251, 0.248364793243382, 0.402540932095419, + -0.347625696752551, 0.205319028510415, 16, 50, -0.0711533341210677, + "contGamma", "contNormal", "", "", "", 0.613966817780844, + 0.141059919882335, -0.504419215468291, -0.149806892756492, 0.122532527147327, + 50, 50, -0.0136371828045826, "contGamma", "contNormal", "", + "", "", 0.844385287151156, 0.0694756184429912, -0.196287317913876, + -0.25862074361457, 0.356889516100794, 84, 50, 0.0491343862431119, + "contGamma", "contNormal", "", "", "", 0.754344177143147, + 0.157020808690984, 0.312916400397658, -0.627708674420751, 0.366211322584656, + 16, 84, -0.130748675918047, "contGamma", "contNormal", "", "", + "", 0.606091470566301, 0.253555678789335, -0.51566060970253, + -0.367456743679001, 0.220991694475876, 50, 84, -0.0732325246015623, + "contGamma", "contNormal", "", "", "", 0.625666143163415, + 0.150117155926457, -0.487835811633944, -0.235995933889142, 0.215074022781406, + 84, 84, -0.0104609555538679, "contGamma", "contNormal", "", + "", "", 0.927565121561819, 0.115070980953867, -0.0909087197063329, + -0.0248325055604732, 0.0446236487291072, 16, 16, 0.00989557158431702, "contGamma", "debCollin1", "contNormal", "", "", - 0.576514456785037, 0.0177187507063215, 0.558483224231533, -0.0228856326702364, - 0.0235230968199597, 50, 16, 0.000318732074861623, "contGamma", - "debCollin1", "contNormal", "", "", 0.978522101785064, - 0.0118391791523371, 0.0269218051995358, -0.131956850430316, - 0.0679234868112827, 84, 16, -0.0320166818095164, "contGamma", - "debCollin1", "contNormal", "", "", 0.530075276160649, - 0.0509908189176508, -0.627891108421357, -0.0372063868126804, - 0.0583771561780609, 16, 50, 0.0105853846826902, "contGamma", - "debCollin1", "contNormal", "", "", 0.664207245045633, - 0.0243840049472062, 0.434111816562072, -0.0236817623816606, - 0.0243416127651469, 50, 50, 0.000329925191743137, "contGamma", - "debCollin1", "contNormal", "", "", 0.978515341533349, - 0.0122510861234211, 0.0269302809905483, -0.109779539138069, - 0.0442874234788054, 84, 50, -0.0327460578296317, "contGamma", - "debCollin1", "contNormal", "", "", 0.404755386421777, - 0.0393035187973184, -0.833158425292595, -0.0717265177819474, - 0.0945142955319276, 16, 84, 0.0113938888749901, "contGamma", - "debCollin1", "contNormal", "", "", 0.788186860119483, - 0.0424091500214191, 0.268665815495842, -0.0246332547487223, - 0.0253193452342709, 50, 84, 0.00034304524277431, "contGamma", - "debCollin1", "contNormal", "", "", 0.978523722825756, - 0.0127432443598487, 0.0269197727899792, -0.103898163722159, - 0.0366961667660008, 84, 84, -0.0336009984780789, "contGamma", - "debCollin1", "contNormal", "", "", 0.348844155405007, - 0.0358665596911855, -0.936833606774294)) + 0.576516119493873, 0.0177187322923895, 0.558480788637872, -0.0228856917988943, + 0.0235231553690925, 50, 16, 0.000318731785099078, "contGamma", + "debCollin1", "contNormal", "", "", 0.978522175753902, + 0.0118392091727332, 0.0269217124597432, -0.131957213522466, + 0.0679235014268183, 84, 16, -0.032016856047824, "contGamma", + "debCollin1", "contNormal", "", "", 0.530073814857065, + 0.0509909152734229, -0.627893338963295, -0.0372064530208746, + 0.0583769336660566, 16, 50, 0.010585240322591, "contGamma", + "debCollin1", "contNormal", "", "", 0.664211028510558, + 0.0243839650730525, 0.434106606160172, -0.0236817157588478, + 0.024341562535426, 50, 50, 0.000329923388289083, "contGamma", + "debCollin1", "contNormal", "", "", 0.978515415626322, + 0.0122510614156881, 0.0269301880950985, -0.109779726313816, + 0.0442874543030979, 84, 50, -0.0327461360053589, "contGamma", + "debCollin1", "contNormal", "", "", 0.404754929584071, + 0.0393035744105953, -0.833159235423925, -0.0717266884382752, + 0.0945139643222711, 16, 84, 0.011393637941998, "contGamma", + "debCollin1", "contNormal", "", "", 0.788191214133848, + 0.0424091090631847, 0.268660158010458, -0.0246330840942494, + 0.0253191674243323, 50, 84, 0.000343041665041469, "contGamma", + "debCollin1", "contNormal", "", "", 0.9785237969752, + 0.0127431554642327, 0.0269196798237543, -0.103898078051727, + 0.0366961499442924, 84, 84, -0.0336009640537171, "contGamma", + "debCollin1", "contNormal", "", "", 0.348844297833667, + 0.0358665335447509, -0.936833329928384)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.148356725942528, 0.123839126125583, -0.0122587999084725, "contGamma", - "", 0.859869273855506, "contNormal", 0.0694389933221113, - -0.17654057643962, -2.55322004165715, 2.46854638239091, -0.0423368296331188, - "debCollin1", "", 0.973636629910696, "contNormal", - 1.28108640354086, -0.0330475989098798, -3.22917814963388, 0.713616031528072, - -1.2577810590529, "contcor1", "", 0.211121860053145, - "contNormal", 1.00583332455653, -1.2504865650653, -0.194609340105404, - 0.312695323410014, 0.0590429916523049, "contGamma:contcor1", - "", 0.648229317602671, "contNormal", 0.1294168330431, - 0.456223431403561, -0.538518371556429, 4.8347825367378, 2.14813208259069, - "debCollin1:contcor1", "", 0.117090311094523, "contNormal", - 1.37076521575859, 1.56710431363105, -0.561889717884395, 0.465447610559944, - -0.0482210536622253, "contcor2", "", 0.85401880901027, - "contNormal", 0.262080664886663, -0.183993175090114, -0.283640984529406, - 0.177030197304051, -0.0533053936126775, "contGamma:contcor2", - "", 0.65012791851582, "contNormal", 0.117520318094407, - -0.453584490554696, -0.0199697965294414, 0.000908037719791055, - -0.00953087940482518, "contGamma", "", 0.0735383632355378, - "debCollin1", 0.00532607599270042, -1.78947491884975, -0.0336995280922641, - 0.0420650419245447, 0.00418275691614031, "contcor1", "", - 0.828669249929457, "debCollin1", 0.019328051590343, 0.216408617112248, - -0.0233912481557226, 0.0139845446305101, -0.00470335176260623, - "contGamma:contcor1", "", 0.621813452675479, "debCollin1", - 0.00953481622138167, -0.493281847641598, -0.0310212078707533, - 0.0494313884014511, 0.0092050902653489, "contcor2", "", - 0.65378968341629, "debCollin1", 0.0205239986313025, 0.448503745820252, - -0.0182407010453799, 0.0175607419903771, -0.000339979527501447, - "contGamma:contcor2", "", 0.970305905033667, "debCollin1", - 0.00913318900708233, -0.0372246240867029)) + list(-0.148356196750271, 0.123839655893518, -0.0122582704283765, "contGamma", + "", 0.859875264038712, "contNormal", 0.0694389934689706, + -0.176532950954339, -2.55321992168833, 2.46854650020978, -0.0423367107392713, + "debCollin1", "", 0.973636703908299, "contNormal", + 1.28108640299239, -0.0330475061169802, -3.22917816986654, 0.713616111207797, + -1.25778102932937, "contcor1", "", 0.211121882410075, + "contNormal", 1.00583335004485, -1.2504865038262, -0.194609328443171, + 0.312695335211161, 0.0590430033839952, "contGamma:contcor1", + "", 0.648229252512716, "contNormal", 0.129416833078538, + 0.456223521929056, -0.538518394339082, 4.8347826704411, 2.14813213805101, + "debCollin1:contcor1", "", 0.11709031230492, "contNormal", + 1.37076525567921, 1.56710430845186, -0.561889680917876, 0.465447648187472, + -0.0482210163652023, "contcor2", "", 0.854018920745259, + "contNormal", 0.26208066505529, -0.183993032660495, -0.283640905519675, + 0.177030276186974, -0.0533053146663504, "contGamma:contcor2", + "", 0.65012840202279, "contNormal", 0.117520318062057, + -0.453583818912081, -0.0199697799418425, 0.000908057352939843, + -0.00953086129445131, "contGamma", "", 0.0735389523920391, + "debCollin1", 0.00532607676964067, -1.7894712574889, -0.0336994192202608, + 0.0420651618484117, 0.00418287131407543, "contcor1", "", + 0.828664661355617, "debCollin1", 0.0193280544097478, 0.216414504295159, + -0.0233913006136411, 0.013984497624475, -0.00470340149458303, + "contGamma:contcor1", "", 0.621809818614806, "debCollin1", + 0.00953481761219382, -0.493286991517067, -0.0310213427211381, + 0.0494312652868592, 0.00920496128286055, "contcor2", "", + 0.653794265118261, "debCollin1", 0.0205240016251822, 0.448497395925286, + -0.0182406588525575, 0.0175607894054864, -0.000339934723535559, + "contGamma:contcor2", "", 0.970309820771409, "debCollin1", + 0.00913319033932287, -0.037219713036306)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.199820595710048, 0.178989505461128, 16, 16, -0.0104155451244605, - "Total", 0.914170137068872, 0.0966370056182618, -0.107780089602572, - -0.216647887923485, 0.291695291552998, 50, 16, 0.0375237018147563, - "Total", 0.772311883680793, 0.129681765452383, 0.2893521821195, - -0.413966666553048, 0.5498863555641, 84, 16, 0.0679598445055262, - "Total", 0.782249844491653, 0.245885391190833, 0.276388296906921, - -0.337688962868951, 0.216552023082224, 16, 50, -0.0605684698933632, - "Total", 0.668376734933398, 0.141390604705739, -0.428376906792484, - -0.147107535606151, 0.120491956613883, 50, 50, -0.013307789496134, - "Total", 0.845440705645669, 0.0682664309984327, -0.1949389956601, - -0.280740151961404, 0.313515720076682, 84, 50, 0.0163877840576391, - "Total", 0.91391653726386, 0.151598671385163, 0.108099786811476, - -0.620246430594848, 0.381535639074775, 16, 84, -0.119355395760037, - "Total", 0.640476790455143, 0.255561346425636, -0.467032270057189, - -0.366254492457911, 0.220474293449759, 50, 84, -0.0728900995040762, - "Total", 0.626274007348856, 0.149678461067579, -0.486977879009371, - -0.259310078223426, 0.171184904923863, 84, 84, -0.0440625866497815, - "Total", 0.688259920750873, 0.109822166770149, -0.401217604292962, - -0.0248324882116126, 0.0446237382592549, 16, 16, 0.00989562502382118, - "Total indirect", 0.576514456785037, 0.0177187507063215, 0.558483224231533, - -0.0228856326702364, 0.0235230968199597, 50, 16, 0.000318732074861623, - "Total indirect", 0.978522101785064, 0.0118391791523371, 0.0269218051995358, - -0.131956850430316, 0.0679234868112827, 84, 16, -0.0320166818095164, - "Total indirect", 0.530075276160649, 0.0509908189176508, -0.627891108421357, - -0.0372063868126804, 0.0583771561780609, 16, 50, 0.0105853846826902, - "Total indirect", 0.664207245045633, 0.0243840049472062, 0.434111816562072, - -0.0236817623816606, 0.0243416127651469, 50, 50, 0.000329925191743137, - "Total indirect", 0.978515341533349, 0.0122510861234211, 0.0269302809905483, - -0.109779539138069, 0.0442874234788054, 84, 50, -0.0327460578296317, - "Total indirect", 0.404755386421777, 0.0393035187973184, -0.833158425292595, - -0.0717265177819474, 0.0945142955319276, 16, 84, 0.0113938888749901, - "Total indirect", 0.788186860119483, 0.0424091500214191, 0.268665815495842, - -0.0246332547487223, 0.0253193452342709, 50, 84, 0.00034304524277431, - "Total indirect", 0.978523722825756, 0.0127432443598487, 0.0269197727899792, - -0.103898163722159, 0.0366961667660008, 84, 84, -0.0336009984780789, - "Total indirect", 0.348844155405007, 0.0358665596911855, -0.936833606774294 + list(-0.199820213925695, 0.178989907109724, 16, 16, -0.0104151534079856, + "Total", 0.914173357033691, 0.096637010685764, -0.107776030467796, + -0.216647430664555, 0.291695746883118, 50, 16, 0.0375241581092815, + "Total", 0.772309190527387, 0.129681764960331, 0.289355701788606, + -0.413966328952306, 0.549886607600412, 84, 16, 0.0679601393240529, + "Total", 0.782248904829867, 0.245885369362771, 0.276389520450836, + -0.337688620644867, 0.216552433047914, 16, 50, -0.0605680937984766, + "Total", 0.668378709330982, 0.141390621987078, -0.428374194463986, + -0.147107006365344, 0.120492487532757, 50, 50, -0.0133072594162935, + "Total", 0.845446785469348, 0.0682664314265192, -0.194931229569502, + -0.280739666112894, 0.3135161665884, 84, 50, 0.016388250237753, + "Total", 0.913914092312085, 0.151598661350083, 0.108102869061013, + -0.620246124772608, 0.381536048820509, 16, 84, -0.119355037976049, + "Total", 0.640477826735487, 0.255561372937219, -0.46703082161548, + -0.366253874647796, 0.220474908774755, 50, 84, -0.0728894829365209, + "Total", 0.626276925101196, 0.149678460433608, -0.486973761791543, + -0.25930941936654, 0.17118558015137, 84, 84, -0.0440619196075849, + "Total", 0.688264403434, 0.109822170946405, -0.40121151519658, + -0.0248325055604732, 0.0446236487291072, 16, 16, 0.00989557158431702, + "Total indirect", 0.576516119493873, 0.0177187322923895, 0.558480788637872, + -0.0228856917988943, 0.0235231553690925, 50, 16, 0.000318731785099078, + "Total indirect", 0.978522175753902, 0.0118392091727332, 0.0269217124597432, + -0.131957213522466, 0.0679235014268183, 84, 16, -0.032016856047824, + "Total indirect", 0.530073814857065, 0.0509909152734229, -0.627893338963295, + -0.0372064530208746, 0.0583769336660566, 16, 50, 0.010585240322591, + "Total indirect", 0.664211028510558, 0.0243839650730525, 0.434106606160172, + -0.0236817157588478, 0.024341562535426, 50, 50, 0.000329923388289083, + "Total indirect", 0.978515415626322, 0.0122510614156881, 0.0269301880950985, + -0.109779726313816, 0.0442874543030979, 84, 50, -0.0327461360053589, + "Total indirect", 0.404754929584071, 0.0393035744105953, -0.833159235423925, + -0.0717266884382752, 0.0945139643222711, 16, 84, 0.011393637941998, + "Total indirect", 0.788191214133848, 0.0424091090631847, 0.268660158010458, + -0.0246330840942494, 0.0253191674243323, 50, 84, 0.000343041665041469, + "Total indirect", 0.9785237969752, 0.0127431554642327, 0.0269196798237543, + -0.103898078051727, 0.0366961499442924, 84, 84, -0.0336009640537171, + "Total indirect", 0.348844297833667, 0.0358665335447509, -0.936833329928384 )) @@ -8337,7 +8346,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 63 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -8348,29 +8357,29 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -8379,139 +8388,140 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(754.654502610865, 824.994097632543, 12, "Model 1", 100, -350.327251305432, + list(754.65450260915, 824.994097630829, 12, "Model 1", 100, -350.327251304575, 63)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962261093819383, 0.0896218349899659, 0.039999612025886, "facExperimexperimental", - "", 0.114131389833148, "facGenderm", 0.0253179259187891, - 1.57989292464914, -0.163250111623162, 0.0341992961356391, -0.0645254077437614, - "contcor2", "", 0.200189647224799, "facGenderm", 0.0503706724501717, - -1.28101144187805, -0.17052678164046, 0.0272980658353569, -0.0716143579025518, - "contcor2", "", 0.155884771471276, "facExperimexperimental", - 0.0504664496481146, -1.41904886121164, 0.180704641269625, 0.319294606943334, - 0.24999962410648, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353552327407261, 7.07107844374341, 0.180704797466914, - 0.319295151749718, 0.249999974608316, "facExperimexperimental", + list(-0.163250782251345, 0.0341993377053022, -0.0645257222730214, "contcor2", + "", 0.200189076919888, "facGenderm", 0.0503708541366343, + -1.28101306557143, -0.0096225297095742, 0.0896223417762498, + 0.0399999060333378, "facExperimexperimental", "", 0.114130281688094, + "facGenderm", 0.0253180344814126, 1.5798977627076, 0.180704966891509, + 0.319295742696041, 0.250000354793775, "facGenderm", "", + 1.53765888910584e-12, "facGenderm", 0.03535543941055, 7.07105777673279, + 0.75630118355666, 1.3363414767871, 1.04632133017188, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.147972181582347, + 7.0710678114156, 0.00473837946740346, 0.00837244561869801, 0.00655541254305073, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000927074726872433, 7.0710724314166, -0.170527071805608, 0.0272981148221518, + -0.0716144784917283, "contcor2", "", 0.155884784103684, + "facExperimexperimental", 0.0504665361680572, -1.41904881787898, + 0.180704919868158, 0.319295578681229, 0.250000249274694, "facExperimexperimental", "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553318775209, 7.07106853004163, 0.721541421518916, 1.27492225225929, - 0.998231836889102, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.141171173323941, 7.07107416751783, 0.00473838921894151, - 0.00837247963158869, 0.0065554344252651, "debCollin1", "", - 1.53765888910584e-12, "debCollin1", 0.000927080916106731, 7.07104882796487, - 0.756301183558079, 1.33634147678568, 1.04632133017188, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.147972181581623, - 7.07106781145021, 0.0796447242121806, 0.14072779068025, 0.110186257446215, - "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, - "debCollin1:facExperimexperimental", 0.0155827012511161, 7.07106269128554 - )) + 0.0353554095652412, 7.07106076124983, 0.721541680317046, 1.27492315493093, + 0.998232417623987, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.141171337580406, 7.07107005383039, 0.0796446679278583, + 0.140727594363685, 0.110186131145772, "debCollin1:facExperimexperimental", + "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", + 0.0155826655279488, 7.07107079646572)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.161366436353673, 1.33152243745725, 16, 0.585078000551786, 0, - "m", "facGender", "contNormal", "", "", "", 0.12447492829389, - 0.380845996555711, 1.53625876559845, -0.359834842992371, 1.00920730483864, + list(-0.161366436427761, 1.33152243753133, 16, 0.585078000551787, 0, + "m", "facGender", "contNormal", "", "", "", 0.124474928331272, + 0.380845996593512, 1.53625876544596, -0.359834843090484, 1.00920730493675, 16, 0.324686230923135, 1, "m", "facGender", "contNormal", "", - "", "", 0.352546048460177, 0.349251863460207, 0.929662128947034, - 0.0271162727619306, 1.18765979862106, 50, 0.607388035691498, - 0, "m", "facGender", "contNormal", "", "", "", 0.0402130570350507, - 0.296062462120058, 2.05155368682029, -0.24070133247017, 0.934693864595862, - 50, 0.346996266062846, 1, "m", "facGender", "contNormal", "", - "", "", 0.247179173844201, 0.299851223373848, 1.15722811519171, - -0.0588887745340271, 1.32596641707701, 84, 0.633538821271491, - 0, "m", "facGender", "contNormal", "", "", "", 0.0729289222784604, - 0.35328587732596, 1.79327525364665, -0.402842727057081, 1.14913683034276, + "", "", 0.352546048529189, 0.349251863510265, 0.929662128813785, + 0.0271162727039604, 1.18765979867904, 50, 0.607388035691498, + 0, "m", "facGender", "contNormal", "", "", "", 0.0402130570549875, + 0.296062462149635, 2.05155368661534, -0.240701332649706, 0.934693864775399, + 50, 0.346996266062847, 1, "m", "facGender", "contNormal", "", + "", "", 0.247179173988598, 0.29985122346545, 1.15722811483819, + -0.0588887745254681, 1.32596641706845, 84, 0.633538821271491, + 0, "m", "facGender", "contNormal", "", "", "", 0.0729289222749177, + 0.353285877321594, 1.79327525366882, -0.402842727232724, 1.1491368305184, 84, 0.37314705164284, 1, "m", "facGender", "contNormal", "", - "", "", 0.345946988481685, 0.395920427528684, 0.942479916916653, - -0.0354530304939376, 0.032868752124858, 16, -0.0012921391845398, + "", "", 0.345946988590855, 0.395920427618299, 0.942479916703326, + -0.0354521902143406, 0.0328679762207562, 16, -0.0012921069967922, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.940902300025973, 0.0174293464465952, -0.0741358368484447, - -0.0470138676666278, 0.045944736912738, 16, -0.000534565376944914, + "", 0.940902374057579, 0.0174289341472592, -0.0741357438082573, + -0.0470149493722204, 0.0459457939594068, 16, -0.000534577706406826, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.982015738852068, 0.0237143654966651, -0.0225418376477367, - -0.0213124660323288, 0.0197879341423478, 50, -0.000762265944990481, + "", 0.982015737829262, 0.0237149111067575, -0.0225418389299591, + -0.0213126873942693, 0.019788137912272, 50, -0.00076227474099866, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.942044296643037, 0.0104849886270542, -0.0727006935442565, - -0.0611393760345112, 0.0597481360156187, 50, -0.000695620009446261, + "", 0.942044227476786, 0.0104850970810534, -0.0727007804606878, + -0.0611393646856295, 0.0597481249217859, 50, -0.000695619881921796, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.982004167242887, 0.0308392177110588, -0.0225563441966563, - -0.00835369928821007, 0.00807135293359531, 84, -0.00014117317730738, + "", 0.98200416720106, 0.0308392119857713, -0.0225563442490925, + -0.00835439112266048, 0.0080719310975245, 84, -0.000141230012567991, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.973122961037564, 0.00419014133712764, -0.0336917459219059, - -0.0777345829315063, 0.0759657814130614, 84, -0.000884400759222426, + "", 0.973114222682755, 0.00419046532225942, -0.0337027040452497, + -0.0777332894700393, 0.0759645174096435, 84, -0.000884386030197888, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.9820048473692, 0.0392099971114104, -0.022555491567865 + "", 0.982004847638234, 0.0392093446849104, -0.0225554912305954 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0245871638422182, 1.18879014459115, 0.606688654216684, "facGenderm", - "", 0.0410771766886315, "contNormal", 0.296996013684949, - 2.04275015913262, -3.59409023653645, 3.32499652738674, -0.134546854574857, - "debCollin1", "", 0.939239335712578, "contNormal", - 1.76510558829143, -0.0762259524117727, -3.32425475934529, 3.38379641698087, - 0.0297708288177852, "facExperimexperimental", "", 0.986119957363962, - "contNormal", 1.71126898995043, 0.0173969311619721, -1.09180242589577, - 0.571018886638469, -0.260391769628651, "facGenderm:facExperimexperimental", - "", 0.539316790972909, "contNormal", 0.424196905058043, - -0.61384646263042, -4.78681036884629, 5.13769493890529, 0.1754422850295, - "debCollin1:facExperimexperimental", "", 0.944754603103547, - "contNormal", 2.5318080806675, 0.0692952543951298, -0.228143894894298, - 0.320527905246737, 0.0461920051762192, "contcor2", "", - 0.741389442133635, "contNormal", 0.139969867933515, 0.330013922697706, - -0.392771929896251, 0.439553299449012, 0.0233906847763803, "facGenderm:contcor2", - "", 0.912281672522468, "contNormal", 0.212331766274926, - 0.110161023886055, -0.0402675910633744, 0.0518453654822956, - 0.00578888720946057, "facGenderm", "", 0.805411357959594, - "debCollin1", 0.0234986349933584, 0.246349935266314, -0.0489095571882686, - 0.0420352607843328, -0.00343714820196791, "facExperimexperimental", - "", 0.882225270490223, "debCollin1", 0.0232006349835922, - -0.14814888490762, -0.0882813109593347, 0.0429309993999546, - -0.0226751557796901, "facGenderm:facExperimexperimental", "", - 0.498143698407132, "debCollin1", 0.0334731432297418, -0.677413400470338, - -0.0174100355458486, 0.0258807424743374, 0.00423535346424438, - "contcor2", "", 0.701344495843253, "debCollin1", 0.0110437687533185, - 0.383506170660421, -0.0370224143836073, 0.0287644859474298, - -0.00412896421808876, "facGenderm:contcor2", "", 0.805662642656433, - "debCollin1", 0.016782680919128, -0.246025306563672)) + list(0.0245871637829731, 1.1887901446504, 0.606688654216684, "facGenderm", + "", 0.0410771767092233, "contNormal", 0.296996013715177, + 2.04275015892471, -3.59409022933062, 3.32499652018091, -0.134546854574857, + "debCollin1", "", 0.939239335586265, "contNormal", + 1.76510558461492, -0.0762259525705425, -3.32425475063667, 3.38379640827224, + 0.0297708288177852, "facExperimexperimental", "", 0.986119957327927, + "contNormal", 1.71126898550718, 0.0173969312071427, -1.09180242626442, + 0.571018887007116, -0.260391769628652, "facGenderm:facExperimexperimental", + "", 0.539316791152785, "contNormal", 0.424196905246132, + -0.61384646235824, -4.78681035418941, 5.13769492424841, 0.1754422850295, + "debCollin1:facExperimexperimental", "", 0.944754602940631, + "contNormal", 2.53180807318937, 0.0692952545998055, -0.228143894878074, + 0.320527905230512, 0.0461920051762192, "contcor2", "", + 0.741389442118888, "contNormal", 0.139969867925237, 0.330013922717224, + -0.39277192988155, 0.439553299434311, 0.0233906847763803, "facGenderm:contcor2", + "", 0.912281672519382, "contNormal", 0.212331766267426, + 0.110161023889946, -0.0402674583686036, 0.051845344439893, 0.00578894303564468, + "facGenderm", "", 0.805409200808216, "debCollin1", + 0.023498595773971, 0.24635272215104, -0.048909648933143, 0.0420350172513538, + -0.0034373158408946, "facExperimexperimental", "", + 0.882219373062661, "debCollin1", 0.0232005962614254, -0.148156357800583, + -0.0882812637192368, 0.0429308276463562, -0.0226752180364403, + "facGenderm:facExperimexperimental", "", 0.498141801532596, + "debCollin1", 0.0334730873629764, -0.677416390981631, -0.0174101052427423, + 0.0258806005244948, 0.00423524764087628, "contcor2", "", + 0.70135112477828, "debCollin1", 0.0110437503211051, 0.383497228544053, + -0.0370220401235268, 0.0287647504078905, -0.00412864485781816, + "facGenderm:contcor2", "", 0.805677055302557, "debCollin1", + 0.0167826529085063, -0.246006687996602)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.162991457492319, 1.33056318022681, 16, 0.583785861367246, 0, - "m", "Total", 0.125477364907223, 0.381015837408264, 1.53218266552451, - -0.359288419650063, 1.00759175074244, 16, 0.32415166554619, - 1, "m", "Total", 0.35257846481062, 0.34870032846886, 0.929599541731253, - 0.0265396598642635, 1.18671187962875, 50, 0.606625769746507, - 0, "m", "Total", 0.0404000847089072, 0.295967739436994, 2.04963477066948, - -0.238380372526911, 0.930981664633712, 50, 0.3463006460534, - 1, "m", "Total", 0.245696064481406, 0.298312123688089, 1.1608668188608, - -0.0589553389409698, 1.32575063512934, 84, 0.633397648094184, - 0, "m", "Total", 0.0729619148375513, 0.353247810927316, 1.79306885563266, - -0.399272750464709, 1.14379805223194, 84, 0.372262650883617, - 1, "m", "Total", 0.344314610360438, 0.39364774426168, 0.945674543574047, - -0.0354530304939376, 0.032868752124858, 16, -0.0012921391845398, - 0, "m", "Total indirect", 0.940902300025973, 0.0174293464465952, - -0.0741358368484447, -0.0470138676666278, 0.045944736912738, - 16, -0.000534565376944914, 1, "m", "Total indirect", 0.982015738852068, - 0.0237143654966651, -0.0225418376477367, -0.0213124660323288, - 0.0197879341423478, 50, -0.000762265944990481, 0, "m", "Total indirect", - 0.942044296643037, 0.0104849886270542, -0.0727006935442565, - -0.0611393760345112, 0.0597481360156187, 50, -0.000695620009446261, - 1, "m", "Total indirect", 0.982004167242887, 0.0308392177110588, - -0.0225563441966563, -0.00835369928821007, 0.00807135293359531, - 84, -0.00014117317730738, 0, "m", "Total indirect", 0.973122961037564, - 0.00419014133712764, -0.0336917459219059, -0.0777345829315063, - 0.0759657814130614, 84, -0.000884400759222426, 1, "m", "Total indirect", - 0.9820048473692, 0.0392099971114104, -0.022555491567865)) + list(-0.16299139961875, 1.33056318672874, 16, 0.583785893554994, 0, + "m", "Total", 0.125477331065188, 0.381015824303012, 1.53218280270356, + -0.359288443362157, 1.00759174979561, 16, 0.324151653216728, + 1, "m", "Total", 0.352578491143774, 0.348700334276432, 0.929599490890528, + 0.0265396497961575, 1.18671187210484, 50, 0.606625760950499, + 0, "m", "Total", 0.0404000880501698, 0.295967740086036, 2.04963473645525, + -0.238380372486464, 0.930981664848313, 50, 0.346300646180925, + 1, "m", "Total", 0.245696064377852, 0.298312123732517, 1.1608668191154, + -0.058955353656616, 1.32575053617446, 84, 0.633397591258923, + 0, "m", "Total", 0.072961923121077, 0.353247789437322, 1.79306880382137, + -0.399272746621436, 1.14379807784672, 84, 0.372262665612642, + 1, "m", "Total", 0.344314598077725, 0.393647749815737, 0.945674567648094, + -0.0354521902143406, 0.0328679762207562, 16, -0.0012921069967922, + 0, "m", "Total indirect", 0.940902374057579, 0.0174289341472592, + -0.0741357438082573, -0.0470149493722204, 0.0459457939594068, + 16, -0.000534577706406826, 1, "m", "Total indirect", 0.982015737829262, + 0.0237149111067575, -0.0225418389299591, -0.0213126873942693, + 0.019788137912272, 50, -0.00076227474099866, 0, "m", "Total indirect", + 0.942044227476786, 0.0104850970810534, -0.0727007804606878, + -0.0611393646856295, 0.0597481249217859, 50, -0.000695619881921796, + 1, "m", "Total indirect", 0.98200416720106, 0.0308392119857713, + -0.0225563442490925, -0.00835439112266048, 0.0080719310975245, + 84, -0.000141230012567991, 0, "m", "Total indirect", 0.973114222682755, + 0.00419046532225942, -0.0337027040452497, -0.0777332894700393, + 0.0759645174096435, 84, -0.000884386030197888, 1, "m", "Total indirect", + 0.982004847638234, 0.0392093446849104, -0.0225554912305954 + )) @@ -8527,7 +8537,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 64 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -8538,25 +8548,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -8572,131 +8582,132 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848195500082, 0.0642086041361395, -0.240319795681971, "contcor1", - "", 0.121932380232169, "contGamma", 0.155374487602931, - -1.54671335937804, -0.403934309003177, 0.194627835183611, -0.104653236909783, - "contcor2", "", 0.493114039049832, "contGamma", 0.152697230384887, - -0.685364342535845, 0.424979123201235, 0.896762895139091, 0.660871009170163, - "contcor2", "", 3.9965446729795e-08, "contcor1", 0.120355214600683, - 5.49100436871651, 1.6804109324718, 2.96919127352552, 2.32480110299866, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776536512776, 7.07106756357087, 0.732634518740055, 1.29452369362665, - 1.01357910618335, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341709163715, 7.0710689309956, 0.721541769787792, - 1.27492346668928, 0.998232618238535, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171394287469, 7.07106863452677, - 0.00465468610796629, 0.00822456809779124, 0.00643962710287876, + list(-0.403934308802528, 0.194627835311713, -0.104653236745408, "contcor2", + "", 0.493114039676545, "contGamma", 0.15269723036638, + -0.685364341542436, -0.544848197386971, 0.0642086032718568, + -0.240319797057557, "contcor1", "", 0.121932378722853, + "contGamma", 0.155374487863805, -1.54671336563446, 1.680410933589, + 2.96919127736431, 2.32480110547665, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.32877653720707, 7.07106755617554, + 0.744754613895095, 1.31593935093783, 1.03034698241646, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.145713069614587, + 7.0710677164495, 0.00465468610928258, 0.00822456810238239, 0.00643962710583249, "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000910700915420825, 7.07106690444368, 0.744754614042639, 1.31593935095675, - 1.0303469824997, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.145713069581774, 7.071067718613, 0.323891791875206, - 0.572298495939023, 0.448095143907115, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702216018297, - 7.07106796505469, 0.318532862775507, 0.562829576137551, 0.440681219456529, - "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", - 0.0623217353198899, 7.07106785769949)) + 0.000910700916256263, 7.07106690120034, 0.424979122616891, 0.896762894168309, + 0.6608710083926, "contcor2", "", 3.99654471738842e-08, + "contcor1", 0.1203552145021, 5.49100436675361, 0.732634519119757, + 1.2945236939667, 1.01357910654323, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341709153601, 7.07106893400514, + 0.721541769046732, 1.27492346521025, 0.998232617128492, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171394099209, + 7.07106863609335, 0.323891791993516, 0.572298496280101, 0.448095144136809, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633702216586593, 7.07106796233809, 0.318532862782915, 0.562829576002948, + 0.440681219392932, "debCollin1:contcor2", "", 1.53743684450092e-12, + "debCollin1:contcor2", 0.0623217352836619, 7.07106786078948 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.146732359124473, 0.122660944556098, "", "", -0.0120357072841874, - "contGamma", "contNormal", "", "", "", 0.860976738282718, - 0.0687240443716085, -0.175130951535787, -0.0197123960617198, - 0.0335574821122979, 16, 16, 0.00692254302528905, "contGamma", - "debCollin1", "contNormal", "", "", 0.610469323102829, - 0.0135895043465604, 0.50940364333753, -0.0596847893861401, 0.026564315679089, - 50, 16, -0.0165602368535256, "contGamma", "debCollin1", "contNormal", - "", "", 0.451663422395782, 0.0220027270259941, - -0.752644744170175, -0.190922426763855, 0.0520274368673578, - 84, 16, -0.0694474949482487, "contGamma", "debCollin1", "contNormal", - "", "", 0.262493993598183, 0.0619781448913272, - -1.1205158700703, -0.0304623607151841, 0.0618356408128377, 16, - 50, 0.0156866400488268, "contGamma", "debCollin1", "contNormal", - "", "", 0.505272398804618, 0.0235458412134245, - 0.666217014998095, -0.0249283744808502, 0.0219931780803527, - 50, 50, -0.00146759820024873, "contGamma", "debCollin1", "contNormal", - "", "", 0.90241884376002, 0.0119700037682616, - -0.122606327338013, -0.130019219987446, 0.0351231051014406, - 84, 50, -0.0474480574430029, "contGamma", "debCollin1", "contNormal", - "", "", 0.260056066716109, 0.042128918284088, - -1.126258621763, -0.0503104050140313, 0.102229418960113, 16, - 84, 0.0259595069730407, "contGamma", "debCollin1", "contNormal", - "", "", 0.504707921516913, 0.0389139354542631, - 0.667100530182864, -0.0247317508796848, 0.0571783326598615, - 50, 84, 0.0162232908900883, "contGamma", "debCollin1", "contNormal", - "", "", 0.437519021482305, 0.0208958134398496, - 0.776389535482239, -0.0787611676171151, 0.03543848768784, 84, - 84, -0.0216613399646376, "contGamma", "debCollin1", "contNormal", - "", "", 0.45716074544629, 0.0291331004563725, - -0.743530198479078)) + list(-0.146732359310128, 0.12266094470753, "", "", -0.0120357073012991, + "contGamma", "contNormal", "", "", "", 0.860976738259262, + 0.0687240444576019, -0.175130951565639, -0.0197123962020109, + 0.0335574822868509, 16, 16, 0.00692254304242001, "contGamma", + "debCollin1", "contNormal", "", "", 0.610469324329333, + 0.0135895044268792, 0.509403641587374, -0.0596847908706986, + 0.0265643171061592, 50, 16, -0.0165602368822697, "contGamma", + "debCollin1", "contNormal", "", "", 0.451663436882794, + 0.0220027277687702, -0.752644720068511, -0.190922433924827, + 0.0520274438218142, 84, 16, -0.0694474950515063, "contGamma", + "debCollin1", "contNormal", "", "", 0.262494020615128, + 0.0619781484922679, -1.12051580663418, -0.0304623612655607, + 0.0618356414390588, 16, 50, 0.0156866400867491, "contGamma", + "debCollin1", "contNormal", "", "", 0.505272403202971, + 0.0235458415135825, 0.666217008115857, -0.0249283747652428, + 0.0219931783596482, 50, 50, -0.0014675982027973, "contGamma", + "debCollin1", "contNormal", "", "", 0.902418844757832, + 0.0119700039120622, -0.122606326078005, -0.130019225635424, + 0.0351231106070907, 84, 50, -0.0474480575141668, "contGamma", + "debCollin1", "contNormal", "", "", 0.260056098189298, + 0.0421289211294536, -1.12625854738527, -0.050310405882919, 0.102229419953586, + 16, 84, 0.0259595070353335, "contGamma", "debCollin1", "contNormal", + "", "", 0.504707925696546, 0.038913935929364, + 0.667100523639008, -0.0247317505301088, 0.0571783323665988, + 50, 84, 0.016223290918245, "contGamma", "debCollin1", "contNormal", + "", "", 0.437519017090334, 0.0208958132758571, + 0.776389542922902, -0.0787611692258322, 0.0354384892294666, + 84, 84, -0.0216613399981828, "contGamma", "debCollin1", "contNormal", + "", "", 0.457160757162672, 0.0291331012600464, + -0.743530179119294)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.146732359124473, 0.122660944556098, -0.0120357072841874, "contGamma", - "", 0.860976738282718, "contNormal", 0.0687240443716085, - -0.175130951535787, -2.33172274895364, 2.72584287263185, 0.1970600618391, - "debCollin1", "", 0.878608199958378, "contNormal", - 1.29021901970621, 0.152733806299005, -3.92782153905832, 0.322249076532253, - -1.80278623126303, "contcor1", "", 0.0963630895830572, - "contNormal", 1.08422161047718, -1.66274700102095, -0.0857620194714466, - 6.36779060014585, 3.1410142903372, "debCollin1:contcor1", "", - 0.0564078136164343, "contNormal", 1.64634469575005, 1.90787160091417, - -1.07379976689497, 3.00630220330311, 0.966251218204069, "contcor2", - "", 0.353242248953516, "contNormal", 1.04086146540993, - 0.928318753565851, -4.80094213754561, 1.4010455905967, -1.69994827347445, - "debCollin1:contcor2", "", 0.282624721886001, "contNormal", - 1.58216879928988, -1.07444178790369, -0.0197475135693202, 0.00116000630633417, - -0.009293753631493, "contGamma", "", 0.0814252443599166, - "debCollin1", 0.00533364899573925, -1.742475674518, -0.0185476077208394, - 0.0350787554337773, 0.00826557385646897, "contcor1", "", - 0.545718050257345, "debCollin1", 0.0136804460637069, 0.60418891445337, - -0.0145563053760028, 0.00654286083834025, -0.00400672226883126, - "contGamma:contcor1", "", 0.456639009147802, "debCollin1", - 0.00538253926622391, -0.744392575818988)) + list(-0.146732359310128, 0.12266094470753, -0.0120357073012991, "contGamma", + "", 0.860976738259262, "contNormal", 0.0687240444576019, + -0.175130951565639, -2.33172277920389, 2.72584290287656, 0.197060061836332, + "debCollin1", "", 0.878608201400816, "contNormal", + 1.29021903513888, 0.152733804469968, -3.92782184591991, 0.322249383488819, + -1.80278623121555, "contcor1", "", 0.0963631376820606, + "contNormal", 1.08422176706632, -1.66274676083428, -0.0857624883412096, + 6.36779106920783, 3.14101429043331, "debCollin1:contcor1", "", + 0.0564078494557634, "contNormal", 1.64634493502275, 1.90787132369069, + -1.07379980953043, 3.00630224596023, 0.966251218214897, "contcor2", + "", 0.353242259011531, "contNormal", 1.04086148716864, + 0.928318734170197, -4.8009422051351, 1.40104565822796, -1.69994827345357, + "debCollin1:contcor2", "", 0.282624732386253, "contNormal", + 1.58216883378561, -1.07444176446464, -0.0197475135879791, 0.00116000629247764, + -0.00929375364775073, "contGamma", "", 0.0814252438969656, + "debCollin1", 0.00533364899696438, -1.7424756771659, -0.0185476077126365, + 0.0350787554542636, 0.00826557387081357, "contcor1", "", + 0.545718049652301, "debCollin1", 0.0136804460668405, 0.604188915363524, + -0.014556305381868, 0.00654286083726396, -0.00400672227230203, + "contGamma:contcor1", "", 0.456639008859999, "debCollin1", + 0.00538253926744561, -0.74439257629485)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.140911167468105, 0.130684838950309, 16, 16, -0.00511316425889836, - "Total", 0.941171137478644, 0.0692859686608348, -0.0737979760942373, - -0.165281757277899, 0.108089869002473, 50, 16, -0.028595944137713, - "Total", 0.681774620682036, 0.0697389412348117, -0.410042705429527, - -0.254697078749648, 0.0917306742847761, 84, 16, -0.0814832022324361, - "Total", 0.35652572218276, 0.088376050725167, -0.922005470529948, - -0.137699026773362, 0.145000892302641, 16, 50, 0.00365093276463939, - "Total", 0.959625158532497, 0.0721186514920435, 0.0506239743687135, - -0.146083825554599, 0.119077214585727, 50, 50, -0.0135033054844361, - "Total", 0.84177619788745, 0.0676443654658662, -0.199622028995896, - -0.209023383571298, 0.0900558541169175, 84, 50, -0.0594837647271903, - "Total", 0.435606867425769, 0.0762971258776474, -0.77963309945096, - -0.140368024024915, 0.168215623402621, 16, 84, 0.0139237996888533, - "Total", 0.859607698163818, 0.0787217647522109, 0.176873571529813, - -0.133447825815141, 0.141822993026943, 50, 84, 0.00418758360590092, - "Total", 0.952448509673842, 0.0702234380359501, 0.0596322783820002, - -0.172090941674101, 0.104696847176451, 84, 84, -0.033697047248825, - "Total", 0.633202051089031, 0.0706104272919859, -0.477224802924391, - -0.0197123960617198, 0.0335574821122979, 16, 16, 0.00692254302528905, - "Total indirect", 0.610469323102829, 0.0135895043465604, 0.50940364333753, - -0.0596847893861401, 0.026564315679089, 50, 16, -0.0165602368535256, - "Total indirect", 0.451663422395782, 0.0220027270259941, -0.752644744170175, - -0.190922426763855, 0.0520274368673578, 84, 16, -0.0694474949482487, - "Total indirect", 0.262493993598183, 0.0619781448913272, -1.1205158700703, - -0.0304623607151841, 0.0618356408128377, 16, 50, 0.0156866400488268, - "Total indirect", 0.505272398804618, 0.0235458412134245, 0.666217014998095, - -0.0249283744808502, 0.0219931780803527, 50, 50, -0.00146759820024873, - "Total indirect", 0.90241884376002, 0.0119700037682616, -0.122606327338013, - -0.130019219987446, 0.0351231051014406, 84, 50, -0.0474480574430029, - "Total indirect", 0.260056066716109, 0.042128918284088, -1.126258621763, - -0.0503104050140313, 0.102229418960113, 16, 84, 0.0259595069730407, - "Total indirect", 0.504707921516913, 0.0389139354542631, 0.667100530182864, - -0.0247317508796848, 0.0571783326598615, 50, 84, 0.0162232908900883, - "Total indirect", 0.437519021482305, 0.0208958134398496, 0.776389535482239, - -0.0787611676171151, 0.03543848768784, 84, 84, -0.0216613399646376, - "Total indirect", 0.45716074544629, 0.0291331004563725, -0.743530198479078 + list(-0.140911167767563, 0.130684839249805, 16, 16, -0.00511316425887912, + "Total", 0.941171137608366, 0.0692859688136319, -0.0737979759312122, + -0.165281757238593, 0.108089868871455, 50, 16, -0.0285959441835688, + "Total", 0.681774620012295, 0.0697389411913608, -0.41004270634254, + -0.254697082030419, 0.0917306773248083, 84, 16, -0.0814832023528055, + "Total", 0.356525730247129, 0.0883760523376464, -0.922005455069363, + -0.137699027509282, 0.145000893080182, 16, 50, 0.00365093278544993, + "Total", 0.959625158518521, 0.0721186518781376, 0.050623974386253, + -0.14608382562257, 0.119077214614377, 50, 50, -0.0135033055040964, + "Total", 0.841776197717019, 0.0676443654905149, -0.199622029213799, + -0.209023385388115, 0.0900558557571829, 84, 50, -0.059483764815466, + "Total", 0.435606872050534, 0.0762971267595723, -0.779633091596114, + -0.140368025286578, 0.168215624754647, 16, 84, 0.0139237997340344, + "Total", 0.859607698889759, 0.0787217654189806, 0.176873570605636, + -0.133447826338987, 0.141822993572879, 50, 84, 0.00418758361694587, + "Total", 0.952448509733151, 0.0702234383088584, 0.0596322783075352, + -0.17209094182904, 0.104696847230076, 84, 84, -0.033697047299482, + "Total", 0.63320205083426, 0.0706104273451918, -0.47722480328221, + -0.0197123962020109, 0.0335574822868509, 16, 16, 0.00692254304242001, + "Total indirect", 0.610469324329333, 0.0135895044268792, 0.509403641587374, + -0.0596847908706986, 0.0265643171061592, 50, 16, -0.0165602368822697, + "Total indirect", 0.451663436882794, 0.0220027277687702, -0.752644720068511, + -0.190922433924827, 0.0520274438218142, 84, 16, -0.0694474950515063, + "Total indirect", 0.262494020615128, 0.0619781484922679, -1.12051580663418, + -0.0304623612655607, 0.0618356414390588, 16, 50, 0.0156866400867491, + "Total indirect", 0.505272403202971, 0.0235458415135825, 0.666217008115857, + -0.0249283747652428, 0.0219931783596482, 50, 50, -0.0014675982027973, + "Total indirect", 0.902418844757832, 0.0119700039120622, -0.122606326078005, + -0.130019225635424, 0.0351231106070907, 84, 50, -0.0474480575141668, + "Total indirect", 0.260056098189298, 0.0421289211294536, -1.12625854738527, + -0.050310405882919, 0.102229419953586, 16, 84, 0.0259595070353335, + "Total indirect", 0.504707925696546, 0.038913935929364, 0.667100523639008, + -0.0247317505301088, 0.0571783323665988, 50, 84, 0.016223290918245, + "Total indirect", 0.437519017090334, 0.0208958132758571, 0.776389542922902, + -0.0787611692258322, 0.0354384892294666, 84, 84, -0.0216613399981828, + "Total indirect", 0.457160757162672, 0.0291331012600464, -0.743530179119294 )) @@ -8713,7 +8724,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 64 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -8724,25 +8735,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -8751,121 +8762,122 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(954.948223312074, 1022.68264814776, 16, "Model 1", 100, -451.474111656037, + list(954.948223312035, 1022.68264814773, 16, "Model 1", 100, -451.474111656018, 64)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962229970428812, 0.0896222687901848, 0.0399999845429483, - "facExperimexperimental", "", 0.114128466657115, "facGenderm", - 0.0253179571862803, 1.5799056870443, -0.163250622704269, 0.0341991421990958, - -0.0645257402525866, "contcor2", "", 0.200188142465628, - "facGenderm", 0.050370763560153, -1.28101572602785, -0.170527287054638, - 0.0272978487421583, -0.07161471915624, "contcor2", "", - 0.155883287606748, "facExperimexperimental", 0.0504665232007363, - -1.41905395129726, 0.180704706819205, 0.319294835578446, 0.249999771198825, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353552743449427, 7.07107428327976, 0.180704819907077, 0.319295230022058, - 0.250000024964568, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553461206851, 7.07106710569867, - 0.721541901356914, 1.27492392590547, 0.998232913631191, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171477872441, - 7.07106654031893, 0.00474535350743821, 0.00838477131991031, - 0.00656506241367426, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000928439971647277, 7.07106825875479, 0.758591156314973, - 1.34038772930761, 1.04948944281129, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.148420220366744, 7.07106781150181, - 0.079644675436139, 0.140727620552113, 0.110186147994126, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.01558267029338, 7.07106971524236, 0.31853278881394, 0.562829318074784, - 0.440681053444362, "debCollin1:contcor2", "", 1.53743684450092e-12, - "debCollin1:contcor2", 0.0623216883544351, 7.07107052264257 - )) + list(-0.163250747729539, 0.0341991311829232, -0.0645258082733079, "contcor2", + "", 0.200187927953732, "facGenderm", 0.0503707926446408, + -1.28101633675945, -0.00962235883697641, 0.0896222923553689, + 0.0399999667591962, "facExperimexperimental", "", 0.114128929076173, + "facGenderm", 0.025317978283064, 1.57990366813584, 0.180704813616799, + 0.319295208081932, 0.250000010849366, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553421283033, 7.07106750493672, + 0.758591156310088, 1.34038772931249, 1.04948944281129, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.148420220369237, + 7.07106781138306, 0.00474535372344241, 0.00838477207332055, + 0.00656506289838148, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000928440108743174, 7.07106773668856, -0.170527157891627, + 0.0272978746887565, -0.071614641601435, "contcor2", "", + 0.15588351976082, "facExperimexperimental", 0.0504664968695348, + -1.41905315493905, 0.180704810856887, 0.319295198455404, 0.250000004656146, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553403765835, 7.07106768010994, + 0.721541720421518, 1.27492329481285, 0.998232507617183, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171363034304, + 7.07106941635618, 0.079644713804455, 0.140727754378652, 0.110186234091554, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.015582694645415, 7.07106419004201, + 0.318532845244808, 0.562829514906861, 0.440681180075834, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217241717283, + 7.07106849068443)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0715438299845629, 0.89228957589471, "", 0.481916702939636, "", - "m", "facGender", "contNormal", "", "", "", 0.0213542773605142, - 0.20937776213851, 2.30166135131788, -0.034519170517936, 0.0292662052076017, - 16, -0.00262648265516714, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.871770178403145, 0.0162720785250822, - -0.161410397025715, -0.0734243120109146, 0.0852820766397347, - 16, 0.00592888231441005, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.883574907433269, 0.0404870675947377, - 0.146438916588285, -0.0190873283460819, 0.0177441350514605, - 50, -0.000671596647310668, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.943017956803194, 0.00939595413182698, - -0.0714772164580672, -0.0644286397540538, 0.0623914532564063, - 50, -0.00101859324882376, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.974883499419583, 0.0323526590311865, - -0.0314840658952293, -0.0243048101707133, 0.027544469794489, - 84, 0.00161982981188784, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.902532380524236, 0.01322710018505, - 0.122462957808292, -0.0883233870186384, 0.0699991850466873, - 84, -0.00916210098597558, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.820543818628052, 0.0403891534013263, - -0.226845581409853)) + list(0.0715438299628683, 0.892289575916405, "", 0.481916702939637, + "", "m", "facGender", "contNormal", "", "", "", 0.0213542773673816, + 0.209377762149579, 2.3016613511962, -0.0345192287747206, 0.0292662453442267, + 16, -0.00262649171524695, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.871769935993084, 0.0162721036259031, + -0.161410704825276, -0.0734242566599932, 0.085282011983107, + 16, 0.00592887766155686, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.883574910741222, 0.0404870369800045, + 0.146438912397689, -0.0190873872965796, 0.0177441893685987, + 50, -0.000671598963990435, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.94301793551601, 0.00939598302716303, + -0.0714772432058355, -0.064428589305684, 0.0623914044067746, + 50, -0.00101859244945474, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.974883499464634, 0.0323526336995982, + -0.0314840658387385, -0.0243048655364744, 0.0275445363354904, + 84, 0.00161983539950797, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.902532274006479, 0.0132271312842854, + 0.122463092313329, -0.0883233237259097, 0.0699991361343792, + 84, -0.00916209379576526, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.820543832046014, 0.0403891247770664, + -0.226845564154627)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0715438299845629, 0.89228957589471, 0.481916702939636, "facGenderm", - "", 0.0213542773605142, "contNormal", 0.20937776213851, - 2.30166135131788, -3.61764354350599, 3.32517001551835, -0.146236763993818, - "debCollin1", "", 0.934196953456254, "contNormal", - 1.77115845336658, -0.0825656020306112, -3.43286868438988, 3.20124665947526, - -0.115811012457313, "facExperimexperimental", "", 0.945443543563861, - "contNormal", 1.69240746161516, -0.0684297458407492, -4.77223996528273, - 5.15463710199349, 0.191198568355379, "debCollin1:facExperimexperimental", - "", 0.939816464969328, "contNormal", 2.53241313248054, - 0.0755005436921334, -1.77567671544694, 1.36743846032993, -0.204119127558505, - "contcor2", "", 0.799057825972215, "contNormal", 0.801829829672728, - -0.254566642453072, -1.95652755758447, 2.77446184977747, 0.408967146096502, - "debCollin1:contcor2", "", 0.734718593272208, "contNormal", - 1.20690723010203, 0.338855494354715, -0.0404918110569187, 0.0505149948696889, - 0.00501159190638513, "facGenderm", "", 0.829093878156107, - "debCollin1", 0.0232164485277428, 0.215863847581876, -0.0488495843419951, - 0.0421572215843871, -0.00334618137880402, "facExperimexperimental", - "", 0.885397997349034, "debCollin1", 0.0232164485276853, - -0.14412976966799, -0.0871738338302386, 0.041529225379324, -0.0228223042254573, - "facGenderm:facExperimexperimental", "", 0.486991212094614, - "debCollin1", 0.0328330163780447, -0.695102270308569)) + list(0.0715438299628683, 0.892289575916405, 0.481916702939637, "facGenderm", + "", 0.0213542773673816, "contNormal", 0.209377762149579, + 2.3016613511962, -3.61764354448872, 3.32517001650108, -0.146236763993818, + "debCollin1", "", 0.93419695347484, "contNormal", 1.77115845386799, + -0.0825656020072375, -3.43286868718358, 3.20124666226896, -0.115811012457313, + "facExperimexperimental", "", 0.945443543609738, "contNormal", + 1.69240746304055, -0.0684297457831161, -4.77223996917426, 5.15463710588502, + 0.191198568355379, "debCollin1:facExperimexperimental", "", + 0.939816465016425, "contNormal", 2.53241313446605, 0.0755005436329381, + -1.77567672027214, 1.36743846515513, -0.204119127558505, "contcor2", + "", 0.799057826575962, "contNormal", 0.801829832134609, + -0.254566641671469, -1.95652756464591, 2.77446185683891, 0.408967146096502, + "debCollin1:contcor2", "", 0.734718594034274, "contNormal", + 1.20690723370487, 0.338855493343168, -0.0404917954492973, 0.0505150138371465, + 0.00501160919392463, "facGenderm", "", 0.829093303926141, + "debCollin1", 0.0232164493848596, 0.21586458423711, -0.0488496077015418, + 0.0421572015842074, -0.0033462030586672, "facExperimexperimental", + "", 0.885397264172664, "debCollin1", 0.0232164493846824, + -0.144130698162439, -0.087173839515796, 0.0415292244446935, + -0.0228223075355513, "facGenderm:facExperimexperimental", "", + 0.486991164997783, "debCollin1", 0.0328330175900381, -0.695102345465676 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0682196468459138, 0.890360793723025, 16, 0.479290220284469, - 0, "m", "Total", 0.022299236158368, 0.209733738314085, 2.28523185700677, - 0.0734886856259528, 0.90220248488214, 16, 0.487845585254047, - 1, "m", "Total", 0.0210227655757247, 0.211410466159832, 2.30757537275956, - 0.0708198823493951, 0.891670330235257, 50, 0.481245106292326, - 0, "m", "Total", 0.0215526506315085, 0.209404472316998, 2.29816059307374, - 0.0699357130251398, 0.891860506356486, 50, 0.480898109690813, - 1, "m", "Total", 0.021819134824125, 0.209678545068834, 2.29350174827349, - 0.0724950287427826, 0.894578036760266, 84, 0.483536532751524, - 0, "m", "Total", 0.0211306942147007, 0.209718906699809, 2.30564110961944, - 0.0598141041702392, 0.885695099737082, 84, 0.472754601953661, - 1, "m", "Total", 0.0248412035066181, 0.210687798878267, 2.24386321595591, - -0.034519170517936, 0.0292662052076017, 16, -0.00262648265516714, - 0, "m", "Total indirect", 0.871770178403145, 0.0162720785250822, - -0.161410397025715, -0.0734243120109146, 0.0852820766397347, - 16, 0.00592888231441005, 1, "m", "Total indirect", 0.883574907433269, - 0.0404870675947377, 0.146438916588285, -0.0190873283460819, - 0.0177441350514605, 50, -0.000671596647310668, 0, "m", "Total indirect", - 0.943017956803194, 0.00939595413182698, -0.0714772164580672, - -0.0644286397540538, 0.0623914532564063, 50, -0.00101859324882376, - 1, "m", "Total indirect", 0.974883499419583, 0.0323526590311865, - -0.0314840658952293, -0.0243048101707133, 0.027544469794489, - 84, 0.00161982981188784, 0, "m", "Total indirect", 0.902532380524236, - 0.01322710018505, 0.122462957808292, -0.0883233870186384, 0.0699991850466873, - 84, -0.00916210098597558, 1, "m", "Total indirect", 0.820543818628052, - 0.0403891534013263, -0.226845581409853)) + list(0.0682196358240214, 0.890360786624758, 16, 0.47929021122439, 0, + "m", "Total", 0.0222992393291472, 0.209733739315029, 2.28523180290261, + 0.0734886895845135, 0.902202471617873, 16, 0.487845580601193, + 1, "m", "Total", 0.0210227641310536, 0.211410461766172, 2.30757539870836, + 0.0708198787214028, 0.891670329229889, 50, 0.481245103975646, + 0, "m", "Total", 0.0215526516786928, 0.209404472986047, 2.29816057466791, + 0.0699357181067603, 0.891860502873603, 50, 0.480898110490182, + 1, "m", "Total", 0.0218191332305901, 0.209678542883972, 2.29350177598427, + 0.0724950309788322, 0.894578045699457, 84, 0.483536538339145, + 0, "m", "Total", 0.021130693776068, 0.209718908409826, 2.30564111746297, + 0.0598141181993234, 0.885695100088419, 84, 0.472754609143871, + 1, "m", "Total", 0.0248411989184198, 0.210687795388982, 2.24386328724476, + -0.0345192287747206, 0.0292662453442267, 16, -0.00262649171524695, + 0, "m", "Total indirect", 0.871769935993084, 0.0162721036259031, + -0.161410704825276, -0.0734242566599932, 0.085282011983107, + 16, 0.00592887766155686, 1, "m", "Total indirect", 0.883574910741222, + 0.0404870369800045, 0.146438912397689, -0.0190873872965796, + 0.0177441893685987, 50, -0.000671598963990435, 0, "m", "Total indirect", + 0.94301793551601, 0.00939598302716303, -0.0714772432058355, + -0.064428589305684, 0.0623914044067746, 50, -0.00101859244945474, + 1, "m", "Total indirect", 0.974883499464634, 0.0323526336995982, + -0.0314840658387385, -0.0243048655364744, 0.0275445363354904, + 84, 0.00161983539950797, 0, "m", "Total indirect", 0.902532274006479, + 0.0132271312842854, 0.122463092313329, -0.0883233237259097, + 0.0699991361343792, 84, -0.00916209379576526, 1, "m", "Total indirect", + 0.820543832046014, 0.0403891247770664, -0.226845564154627)) @@ -8881,7 +8893,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 65 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -8892,27 +8904,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -8921,145 +8933,147 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1403.04678020897, 1473.38637523065, 15, "Model 1", 100, -674.523390104486, + list(1403.04678020384, 1473.38637522551, 15, "Model 1", 100, -674.523390101918, 29)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.54484668907129, 0.0642055516851323, -0.240320568693079, "contcor1", - "", 0.121928387080121, "contGamma", 0.15537332460202, - -1.54672991202734, -0.403933315589287, 0.194627883424049, -0.104652716082619, - "contcor2", "", 0.493115508105338, "contGamma", 0.15269698926478, - -0.685362013923856, 0.424977323073246, 0.896758378060235, 0.66086785056674, - "contcor2", "", 3.99642297033154e-08, "contcor1", 0.120354521488236, - 5.49100974682814, 1.68040821481065, 2.96918179439248, 2.32479500460157, - "contGamma", "", 1.53721479989599e-12, "contGamma", - 0.328774811615801, 7.07108611263769, 0.73263216848931, 1.29451549656085, - 1.01357383252508, "contcor1", "", 1.53699275529107e-12, - "contcor1", 0.143340217601854, 7.07110571954349, 0.721542251882129, - 1.27492514825414, 0.998233700068134, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.14117170028047, 7.07106097103676, - 0.00465468338924208, 0.00822455861504423, 0.00643962100214315, + list(-0.403934142567775, 0.194627965352426, -0.104653088607675, "contcor2", + "", 0.493114625565281, "contGamma", 0.152697221133037, + -0.685363412844928, -0.544847891073679, 0.0642087043384954, + -0.240319593367592, "contcor1", "", 0.121932569240225, + "contGamma", 0.155374435504003, -1.5467125759012, 1.6804106859119, + 2.9691904137321, 2.324800549822, "contGamma", "", 1.53743684450092e-12, + "contGamma", 0.328776380072781, 7.07106924562939, 0.744388663163365, + 1.31529273522483, 1.0298406991941, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.145641470089422, 7.07106772927924, + 0.00465468600005604, 0.00822456772140635, 0.0064396268607312, "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000910699189873096, 7.07107360339312, 0.744388666207899, 1.31529274495201, - 1.02984070557995, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.145641471794208, 7.07106769035623, 0.323891416186573, - 0.572297185328702, 0.448094300757637, "debCollin1:contcor1", - "", 1.53721479989599e-12, "debCollin1:contcor1", 0.0633699830970165, - 7.07108127315776, 0.318533170075073, 0.562830647860083, 0.440681908967578, - "debCollin1:contcor2", "", 1.53765888910584e-12, "debCollin1:contcor2", - 0.0623219303293319, 7.07105679555902)) + 0.000910700846931139, 7.07106717033516, 0.424979190923154, 0.896763053662594, + 0.660871122292874, "contcor2", "", 3.99654731531029e-08, + "contcor1", 0.120355237764778, 5.49100425180064, 0.732634489480666, + 1.29452359245657, 1.01357904096862, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341690818815, 7.07106938099253, + 0.721541854381543, 1.27492376263334, 0.998232808507443, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171448204357, + 7.07106728169583, 0.323891793660537, 0.572298502294089, 0.448095147977313, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633702227675998, 7.07106789920291, 0.318532833347898, 0.562829473438742, + 0.44068115339332, "debCollin1:contcor2", "", 1.53743684450092e-12, + "debCollin1:contcor2", 0.0623217166279139, 7.07106891846972 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.214332594645504, 0.160730647583321, 16, "", -0.0268009735310914, - "contGamma", "contNormal", "", "", "", 0.7793953199679, - 0.0956811566914688, -0.280107123051545, -0.145835615543743, - 0.125268691995562, 50, "", -0.0102834617740905, "contGamma", - "contNormal", "", "", "", 0.881798456290866, 0.0691605329683968, - -0.148689741572546, -0.212949860464454, 0.228436466438632, 84, - "", 0.00774330298708917, "contGamma", "contNormal", "", "", - "", 0.945174407245916, 0.11260062184425, 0.0687678527903673, - -0.0202406826589298, 0.0348493983916433, 16, 16, 0.00730435786635676, + list(-0.21433183072444, 0.160731408606581, 16, "", -0.0268002110589296, + "contGamma", "contNormal", "", "", "", 0.779401431960111, + 0.0956811559522198, -0.280099156330352, -0.145834906753999, + 0.125269400241856, 50, "", -0.0102827532560717, "contGamma", + "contNormal", "", "", "", 0.881806540164116, 0.0691605328297589, + -0.148679497328094, -0.212949209575415, 0.228437114817452, 84, + "", 0.00774395262101828, "contGamma", "contNormal", "", "", + "", 0.945169814521002, 0.112600621203876, 0.0687736225450924, + -0.0202406591951906, 0.0348493108074396, 16, 16, 0.00730432580612451, "contGamma", "debCollin1", "contNormal", "", "", - 0.603244322981952, 0.0140538503475361, 0.519740689257968, -0.0607600723038735, - 0.0265459103585403, 50, 16, -0.0171070809726666, "contGamma", - "debCollin1", "contNormal", "", "", 0.442435942877486, - 0.022272343612197, -0.768086253989823, -0.198019710798753, 0.0536984002696761, - 84, 16, -0.0721606552645382, "contGamma", "debCollin1", "contNormal", - "", "", 0.261125262541102, 0.0642149838093835, - -1.12373547393145, -0.0313509251283666, 0.063714505999987, 16, - 50, 0.0161817904358102, "contGamma", "debCollin1", "contNormal", - "", "", 0.504618880650379, 0.024251831125015, - 0.667239943754978, -0.0255102614302318, 0.0218718107168498, - 50, 50, -0.00181922535669103, "contGamma", "debCollin1", "contNormal", - "", "", 0.880366312979328, 0.0120874854132079, - -0.150504864701071, -0.137012862848958, 0.0372595875748886, - 84, 50, -0.0498766376370346, "contGamma", "debCollin1", "contNormal", - "", "", 0.261913342931348, 0.0444580746887406, - -1.12188028802935, -0.0513792243261781, 0.104554232357893, 16, - 84, 0.0265875040158574, "contGamma", "debCollin1", "contNormal", - "", "", 0.503898029011322, 0.0397796739924953, - 0.668369077656928, -0.0247998786072625, 0.0570008545633303, - 50, 84, 0.0161004879780339, "contGamma", "debCollin1", "contNormal", - "", "", 0.440385361948436, 0.0208679174249697, - 0.77154263409001, -0.0848234230106755, 0.0373107258610538, 84, - 84, -0.0237563485748108, "contGamma", "debCollin1", "contNormal", - "", "", 0.445781736267872, 0.0311572431521977, - -0.762466321515201)) + 0.603245182882164, 0.0140538220184587, 0.519739455681934, -0.0607597191111348, + 0.0265457901631663, 50, 16, -0.0171069644739843, "contGamma", + "debCollin1", "contNormal", "", "", 0.442436576120981, + 0.0222722228477043, -0.76808518803715, -0.198018603955031, 0.0536984375824639, + 84, 16, -0.0721600831862836, "contGamma", "debCollin1", "contNormal", + "", "", 0.261127016896882, 0.064214710964846, + -1.12373133978267, -0.0313509731977465, 0.0637144120445977, + 16, 50, 0.0161817194234256, "contGamma", "debCollin1", "contNormal", + "", "", 0.504620545019069, 0.0242518194191852, + 0.667237337691228, -0.0255100893206878, 0.0218716606214033, + 50, 50, -0.00181921434964222, "contGamma", "debCollin1", "contNormal", + "", "", 0.880366223959598, 0.0120874032165469, + -0.150504977541564, -0.137012098702406, 0.0372596113628055, + 84, 50, -0.0498762436698001, "contGamma", "debCollin1", "contNormal", + "", "", 0.261915084509265, 0.0444578858182712, + -1.12187619253145, -0.0513793047812202, 0.104554079472363, 16, + 84, 0.0265873873455713, "contGamma", "debCollin1", "contNormal", + "", "", 0.503899702588109, 0.0397796555149905, + 0.66836645519849, -0.024799767113148, 0.0570005177785405, 50, + 84, 0.0161003753326962, "contGamma", "debCollin1", "contNormal", + "", "", 0.440386055076002, 0.020867803066005, + 0.771541464224608, -0.0848228575124552, 0.0373105307503943, + 84, 84, -0.0237561633810304, "contGamma", "debCollin1", "contNormal", + "", "", 0.44578244951787, 0.0311570491157547, + -0.762465126038461)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.145836051389486, 0.125145688206764, -0.0103451815913605, "contGamma", - "", 0.88104090555335, "contNormal", 0.0691292650614296, - -0.149649813030236, -2.31531091303859, 2.78532684773803, 0.235007967349722, - "debCollin1", "", 0.85667553469152, "contNormal", 1.30120701222313, - 0.180607670526004, -4.28111311831149, 0.442180566199083, -1.9194662760562, - "contcor1", "", 0.111161962550825, "contNormal", 1.20494399942226, - -1.59299210334798, -0.132929370856277, 0.166841358367314, 0.0169559937555186, - "contGamma:contcor1", "", 0.824528982129107, "contNormal", - 0.0764735300209963, 0.221723696432782, -0.159125673080037, 6.70675946401493, - 3.27381689546745, "debCollin1:contcor1", "", 0.0616068668747656, - "contNormal", 1.75153349532241, 1.8691146382358, -1.06801091068241, - 3.01245351139253, 0.972221300355061, "contcor2", "", - 0.350318595684225, "contNormal", 1.04095392932246, 0.93397149765107, - -4.82823721580331, 1.3843873180258, -1.72192494888875, "debCollin1:contcor2", - "", 0.277271705170649, "contNormal", 1.58488231998993, - -1.08646864639117, -0.0197475703279891, 0.00115993964406924, - -0.00929381534195995, "contGamma", "", 0.0814230772073317, - "debCollin1", 0.00533364646926529, -1.74248806993767, -0.0185474023599913, - 0.0350789353930259, 0.00826576651651728, "contcor1", "", - 0.545708498162156, "debCollin1", 0.013680439583588, 0.604203283528511, - -0.0145563422459356, 0.00654281397414819, -0.0040067641358937, - "contGamma:contcor1", "", 0.456634091553874, "debCollin1", - 0.00538253671662113, -0.744400706737572)) + list(-0.145835342397511, 0.125146396654041, -0.0103444728717351, "contGamma", + "", 0.881048994223862, "contNormal", 0.0691292649224734, + -0.149639561238445, -2.31531078346691, 2.78532703533894, 0.235008125936019, + "debCollin1", "", 0.856675440634364, "contNormal", + 1.30120702702678, 0.180607790347556, -4.28111297061572, 0.442180492222698, + -1.91946623919651, "contcor1", "", 0.111161952641512, + "contNormal", 1.20494394287221, -1.59299214751942, -0.132929424713328, + 0.166841301451492, 0.0169559383690824, "contGamma:contcor1", + "", 0.824529544209413, "contNormal", 0.0764735292406834, + 0.221722974438872, -0.1591254382185, 6.70675937360252, 3.27381696769201, + "debCollin1:contcor1", "", 0.0616068488220958, "contNormal", + 1.75153341234284, 1.86911476802088, -1.06801088513404, 3.01245353534186, + 0.972221325103909, "contcor2", "", 0.35031858323105, + "contNormal", 1.04095392891453, 0.933971521792231, -4.82823716170244, + 1.38438736525794, -1.72192489822225, "debCollin1:contcor2", + "", 0.277271718775925, "contNormal", 1.58488231823767, + -1.08646861562375, -0.0197475112768273, 0.00116000820574048, + -0.00929375153554343, "contGamma", "", 0.0814253073373292, + "debCollin1", 0.00533364889546024, -1.74247531431134, -0.0185476080893437, + 0.035078754057484, 0.00826557298407011, "contcor1", "", + 0.545718085101537, "debCollin1", 0.0136804458066132, 0.604188862037997, + -0.0145563055729172, 0.00654286024487521, -0.004006722664021, + "contGamma:contcor1", "", 0.45663895628116, "debCollin1", + 0.00538253916506118, -0.744392663230246)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.205600323483521, 0.166607092154051, 16, 16, -0.0194966156647346, - "Total", 0.837314347906967, 0.0949526161127186, -0.205329947324359, - -0.16454347522722, 0.109762389733706, 50, 16, -0.027390542746757, - "Total", 0.695486399304519, 0.0699772718082108, -0.39142055754656, - -0.295211407126735, 0.166376702571837, 84, 16, -0.064417352277449, - "Total", 0.58434496891388, 0.117754232562312, -0.547049145289628, - -0.200335112242471, 0.179096746051909, 16, 50, -0.0106191830952811, - "Total", 0.912641535642733, 0.0967956200438607, -0.109707268680848, - -0.145233690021939, 0.121028315760376, 50, 50, -0.0121026871307815, - "Total", 0.858584277647633, 0.0679252292089438, -0.178176610837081, - -0.257062012294916, 0.172795342995025, 84, 50, -0.0421333346499454, - "Total", 0.70081566519625, 0.109659503613485, -0.384219636799123, - -0.199321145408945, 0.198894206378477, 16, 84, -0.000213469515234006, - "Total", 0.998323375941562, 0.101587415617964, -0.00210133818185505, - -0.132519453675427, 0.144153506083314, 50, 84, 0.00581702620394346, - "Total", 0.934315783660471, 0.0705811336180414, 0.082416162871838, - -0.225081248980546, 0.193055157805103, 84, 84, -0.0160130455877217, - "Total", 0.880671171494568, 0.10666941078608, -0.150118440419954, - -0.0202406826589298, 0.0348493983916433, 16, 16, 0.00730435786635676, - "Total indirect", 0.603244322981952, 0.0140538503475361, 0.519740689257968, - -0.0607600723038735, 0.0265459103585403, 50, 16, -0.0171070809726666, - "Total indirect", 0.442435942877486, 0.022272343612197, -0.768086253989823, - -0.198019710798753, 0.0536984002696761, 84, 16, -0.0721606552645382, - "Total indirect", 0.261125262541102, 0.0642149838093835, -1.12373547393145, - -0.0313509251283666, 0.063714505999987, 16, 50, 0.0161817904358102, - "Total indirect", 0.504618880650379, 0.024251831125015, 0.667239943754978, - -0.0255102614302318, 0.0218718107168498, 50, 50, -0.00181922535669103, - "Total indirect", 0.880366312979328, 0.0120874854132079, -0.150504864701071, - -0.137012862848958, 0.0372595875748886, 84, 50, -0.0498766376370346, - "Total indirect", 0.261913342931348, 0.0444580746887406, -1.12188028802935, - -0.0513792243261781, 0.104554232357893, 16, 84, 0.0265875040158574, - "Total indirect", 0.503898029011322, 0.0397796739924953, 0.668369077656928, - -0.0247998786072625, 0.0570008545633303, 50, 84, 0.0161004879780339, - "Total indirect", 0.440385361948436, 0.0208679174249697, 0.77154263409001, - -0.0848234230106755, 0.0373107258610538, 84, 84, -0.0237563485748108, - "Total indirect", 0.445781736267872, 0.0311572431521977, -0.762466321515201 + list(-0.205599599081853, 0.166607828576243, 16, 16, -0.0194958852528051, + "Total", 0.837320362697699, 0.0949526191792352, -0.205322248310013, + -0.164542611056604, 0.109763175596493, 50, 16, -0.0273897177300559, + "Total", 0.695495029924224, 0.0699772518313566, -0.391408879503649, + -0.295210087657924, 0.166377826527393, 84, 16, -0.0644161305652653, + "Total", 0.584351937433178, 0.117754182685566, -0.547039001894932, + -0.200334430783813, 0.179097447512805, 16, 50, -0.010618491635504, + "Total", 0.912647205725132, 0.0967956251465663, -0.109700119395124, + -0.145232972600834, 0.121029037389407, 50, 50, -0.0121019676057139, + "Total", 0.858592598675163, 0.0679252302824138, -0.178166015122766, + -0.257061004895963, 0.1727964227984, 84, 50, -0.0421322910487818, + "Total", 0.700822766140891, 0.10965952208434, -0.384210055341819, + -0.199320502433847, 0.19889485500713, 16, 84, -0.000212823713358293, + "Total", 0.998328448190122, 0.101587417060224, -0.00209498104703386, + -0.132518813814942, 0.144154057968191, 50, 84, 0.00581762207662457, + "Total", 0.934309049616222, 0.0705811111748721, 0.0824246314599779, + -0.22508046818391, 0.193056046663886, 84, 84, -0.0160122107600122, + "Total", 0.880677376628804, 0.10666943835346, -0.150110575317309, + -0.0202406591951906, 0.0348493108074396, 16, 16, 0.00730432580612451, + "Total indirect", 0.603245182882164, 0.0140538220184587, 0.519739455681934, + -0.0607597191111348, 0.0265457901631663, 50, 16, -0.0171069644739843, + "Total indirect", 0.442436576120981, 0.0222722228477043, -0.76808518803715, + -0.198018603955031, 0.0536984375824639, 84, 16, -0.0721600831862836, + "Total indirect", 0.261127016896882, 0.064214710964846, -1.12373133978267, + -0.0313509731977465, 0.0637144120445977, 16, 50, 0.0161817194234256, + "Total indirect", 0.504620545019069, 0.0242518194191852, 0.667237337691228, + -0.0255100893206878, 0.0218716606214033, 50, 50, -0.00181921434964222, + "Total indirect", 0.880366223959598, 0.0120874032165469, -0.150504977541564, + -0.137012098702406, 0.0372596113628055, 84, 50, -0.0498762436698001, + "Total indirect", 0.261915084509265, 0.0444578858182712, -1.12187619253145, + -0.0513793047812202, 0.104554079472363, 16, 84, 0.0265873873455713, + "Total indirect", 0.503899702588109, 0.0397796555149905, 0.66836645519849, + -0.024799767113148, 0.0570005177785405, 50, 84, 0.0161003753326962, + "Total indirect", 0.440386055076002, 0.020867803066005, 0.771541464224608, + -0.0848228575124552, 0.0373105307503943, 84, 84, -0.0237561633810304, + "Total indirect", 0.44578244951787, 0.0311570491157547, -0.762465126038461 )) @@ -9076,7 +9090,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 65 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -9087,27 +9101,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -9116,128 +9130,127 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(956.560850590181, 1026.90044561186, 15, "Model 1", 100, -451.280425295091, + list(956.560850590253, 1026.90044561193, 15, "Model 1", 100, -451.280425295127, 29)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962235151587273, 0.0896222602219015, 0.0399999543530144, - "facExperimexperimental", "", 0.114128897451134, "facGenderm", - 0.0253179682179375, 1.57990380620965, -0.163250599337453, 0.0341992400871505, - -0.0645256796251513, "contcor2", "", 0.200188735040211, - "facGenderm", 0.0503707825710225, -1.28101403892565, -0.17052710713499, - 0.0272979101670909, -0.0716145984839496, "contcor2", "", - 0.155883736879948, "facExperimexperimental", 0.0504664929719372, - -1.41905241015603, 0.18070478718131, 0.319295115875688, 0.249999951528499, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553253497414, 7.07106918280212, 0.180704793637071, 0.319295138393848, - 0.24999996601546, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553294473675, 7.07106877302976, - 0.721541765127787, 1.27492345073326, 0.998232607930524, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171391405781, - 7.07106870584863, 0.00474535329371916, 0.00838477057447063, - 0.00656506193409489, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000928439836001766, 7.07106877529801, 0.755658265378201, - 1.33520547667758, 1.04543187102789, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.147846393064048, 7.07106781140746, - 0.0796447113271374, 0.14072774573792, 0.110186228532529, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826930730865, 7.07106454678464, 0.318532972689796, 0.562829959426735, - 0.440681466058265, "debCollin1:contcor2", "", 1.53743684450092e-12, - "debCollin1:contcor2", 0.062321805059665, 7.07106390189389 - )) + list(-0.163250426084035, 0.0341993124072561, -0.0645255568383896, "contcor2", + "", 0.200189361237577, "facGenderm", 0.0503707568222553, + -1.28101225610095, -0.00962232792348448, 0.0896222407784335, + 0.0399999564274745, "facExperimexperimental", "", 0.114128721765725, + "facGenderm", 0.0253179572392009, 1.57990457324656, 0.180704712707523, + 0.319294856112901, 0.249999784410212, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353552780812709, 7.07107390968724, + 0.755658265380774, 1.335205476675, 1.04543187102789, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.147846393062735, + 7.07106781147026, 0.00474535386020514, 0.00838477255034122, + 0.00656506320527318, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000928440195545261, 7.07106740614306, -0.170527182745848, + 0.0272979220979934, -0.0716146303239274, "contcor2", "", + 0.155883736019242, "facExperimexperimental", 0.0504665153044293, + -1.4190524131085, 0.180704818267916, 0.319295224304734, 0.250000021286325, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.035355345080318, 7.07106720973563, + 0.721541859547021, 1.27492378007379, 0.998232819810408, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171451335785, + 7.07106720491278, 0.079644728133601, 0.140727804357978, 0.110186266245789, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.0155827037400157, 7.07106212658307, + 0.318532956978432, 0.562829904625274, 0.440681430801854, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217950875183, + 7.07106446762335)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0353601423811067, 1.18476148862187, "", 0.61006081550149, 0, - "m", "facGender", "contNormal", "", "", "", 0.0374745181089187, - 0.293220017129676, 2.0805565100001, -0.237849469605329, 0.934914944994686, + list(0.0353601424563352, 1.18476148854664, "", 0.61006081550149, 0, + "m", "facGender", "contNormal", "", "", "", 0.0374745180839675, + 0.293220017091294, 2.08055651027245, -0.237849469500133, 0.934914944889491, "", 0.348532737694679, 1, "m", "facGender", "contNormal", "", - "", "", 0.244035324611168, 0.299180093065646, 1.16495965397739, - -0.0341650769106585, 0.0289963182028025, "", -0.00258437935392797, + "", "", 0.244035324526569, 0.299180093011974, 1.16495965418638, + -0.0341652414440963, 0.0289964324299921, "", -0.00258440450705211, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.872572310728322, 0.0161128968725114, -0.160391975097719, - -0.0729506665205528, 0.0863053166632494, "", 0.00667732507134832, + "", 0.872571638699448, 0.0161129679862231, -0.1603928282649, + -0.0729504469356413, 0.0863050547793705, "", 0.0066773039218646, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.869451112257992, 0.0406272728580712, 0.164355729577891, - -0.0195493083484164, 0.0179747913516262, 16, -0.000787258498395074, + "", 0.869451130904001, 0.0406271500321432, 0.164355705890807, + -0.0195494723364625, 0.0179749400152884, 16, -0.000787266160587047, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.934455555357992, 0.00957265031297205, -0.0822403903470962, - -0.0630819329241026, 0.0636629763452924, 16, 0.000290521710594861, + "", 0.93445546375561, 0.00957273007252649, -0.0822405055425602, + -0.0630817329963444, 0.0636627745771612, 16, 0.00029052079040839, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.992830970420113, 0.0323334791529698, 0.00898516702209501, - -0.0231427275647059, 0.0257812135381103, 50, 0.0013192429867022, + "", 0.992830970406013, 0.0323333766776457, 0.00898516703976816, + -0.0231428961923613, 0.0257814078454962, 50, 0.00131925582656743, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.915819133087903, 0.012480826558223, 0.10570157197105, - -0.0851235785298863, 0.0707319942359945, 50, -0.00719579214694589, + "", 0.915818938985677, 0.012480919145394, 0.105701816604932, + -0.0851233233170612, 0.0707317846064793, 50, -0.00719576935529096, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.856382038893699, 0.039759805280926, -0.180981574132556 + "", 0.856382065151386, 0.0397596866965173, -0.180981540680029 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0353601423811067, 1.18476148862187, 0.61006081550149, "facGenderm", - "", 0.0374745181089187, "contNormal", 0.293220017129676, - 2.0805565100001, -3.63371547234747, 3.29705790611479, -0.168328783116339, - "debCollin1", "", 0.924152866659037, "contNormal", - 1.76808692229329, -0.0952039071122187, -3.303668927023, 3.39520837313791, - 0.0457697230574501, "facExperimexperimental", "", 0.978633052087714, - "contNormal", 1.7089286724146, 0.0267826994749762, -1.08430324396611, - 0.561247088352492, -0.261528077806811, "facGenderm:facExperimexperimental", - "", 0.533287169553497, "contNormal", 0.419790961797895, - -0.62299597086781, -4.81559760962397, 5.09714942662319, 0.140775908499614, - "debCollin1:facExperimexperimental", "", 0.955605599573991, - "contNormal", 2.52880846649164, 0.0556688694952528, -1.76015023275358, - 1.37795261662591, -0.191098808063834, "contcor2", "", - 0.811331195600911, "contNormal", 0.80055115148351, -0.238709054018231, - -1.98723746703818, 2.73916201450088, 0.375962273731351, "debCollin1:contcor2", - "", 0.755183893065942, "contNormal", 1.20573630914147, - 0.311811356165471, -0.0404918094013569, 0.0505149932015597, - 0.00501159190010138, "facGenderm", "", 0.829093872221715, - "debCollin1", 0.0232164476798469, 0.215863855194855, -0.0488496146426915, - 0.0421571879603351, -0.0033462133411782, "facExperimexperimental", - "", 0.885396906085677, "debCollin1", 0.0232164476798749, - -0.144131151643792, -0.0871738589787854, 0.0415291955304585, - -0.0228223317241634, "facGenderm:facExperimexperimental", "", - 0.486990671351604, "debCollin1", 0.0328330151789617, -0.695103133226315 + list(0.0353601424563352, 1.18476148854664, 0.61006081550149, "facGenderm", + "", 0.0374745180839675, "contNormal", 0.293220017091294, + 2.08055651027245, -3.63371546478838, 3.2970578985557, -0.16832878311634, + "debCollin1", "", 0.92415286649409, "contNormal", 1.76808691843655, + -0.095203907319888, -3.30366891094612, 3.39520835706102, 0.0457697230574501, + "facExperimexperimental", "", 0.978633051985179, "contNormal", + 1.70892866421195, 0.0267826996035297, -1.0843032436789, 0.561247088065277, + -0.261528077806811, "facGenderm:facExperimexperimental", "", + 0.533287169410584, "contNormal", 0.419790961651354, -0.622995971085286, + -4.81559758679111, 5.09714940379034, 0.140775908499614, "debCollin1:facExperimexperimental", + "", 0.955605599369687, "contNormal", 2.52880845484201, + 0.0556688697517063, -1.76015023231646, 1.37795261618879, -0.191098808063834, + "contcor2", "", 0.811331195549341, "contNormal", 0.800551151260484, + -0.238709054084733, -1.98723746577701, 2.73916201323971, 0.375962273731351, + "debCollin1:contcor2", "", 0.755183892939471, "contNormal", + 1.205736308498, 0.311811356331876, -0.0404917650299098, 0.0505150463832778, + 0.00501164067668405, "facGenderm", "", 0.829092250801301, + "debCollin1", 0.0232164499274063, 0.215865935246541, -0.04884966426337, + 0.0421571471499306, -0.00334625855671967, "facExperimexperimental", + "", 0.885395379228961, "debCollin1", 0.0232164499274351, + -0.144133085255441, -0.0871738575721812, 0.0415292093966927, + -0.0228223240877443, "facGenderm:facExperimexperimental", "", + 0.486990859267239, "debCollin1", 0.0328330183574972, -0.695102833350469 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0322002428158382, 1.18275262947929, 16, 0.607476436147562, 0, - "m", "Total", 0.0384832486248525, 0.293513655286234, 2.0696700995228, - -0.232334868722909, 0.942754994254963, 16, 0.355210062766027, - 1, "m", "Total", 0.236045586242455, 0.299773330593529, 1.18492883293766, - 0.0347785925064743, 1.18376852149971, 50, 0.609273557003095, - 0, "m", "Total", 0.0376526906703707, 0.293115061821627, 2.07861565767597, - -0.235026621272866, 0.932673140083414, 50, 0.348823259405274, - 1, "m", "Total", 0.241603723670882, 0.297888065945841, 1.17098769397729, - 0.0369286765494852, 1.1858314404269, 84, 0.611380058488192, - 0, "m", "Total", 0.0369822006665697, 0.293092825414092, 2.08596050628128, - -0.242262726411015, 0.924936617506481, 84, 0.341336945547733, - 1, "m", "Total", 0.25165132896972, 0.297760406090167, 1.14634766263843, - -0.0341650769106585, 0.0289963182028025, 16, -0.00258437935392797, - 0, "m", "Total indirect", 0.872572310728322, 0.0161128968725114, - -0.160391975097719, -0.0729506665205528, 0.0863053166632494, - 16, 0.00667732507134832, 1, "m", "Total indirect", 0.869451112257992, - 0.0406272728580712, 0.164355729577891, -0.0195493083484164, - 0.0179747913516262, 50, -0.000787258498395074, 0, "m", "Total indirect", - 0.934455555357992, 0.00957265031297205, -0.0822403903470962, - -0.0630819329241026, 0.0636629763452924, 50, 0.000290521710594861, - 1, "m", "Total indirect", 0.992830970420113, 0.0323334791529698, - 0.00898516702209501, -0.0231427275647059, 0.0257812135381103, - 84, 0.0013192429867022, 0, "m", "Total indirect", 0.915819133087903, - 0.012480826558223, 0.10570157197105, -0.0851235785298863, 0.0707319942359945, - 84, -0.00719579214694589, 1, "m", "Total indirect", 0.856382038893699, - 0.039759805280926, -0.180981574132556)) + list(0.0322002129623028, 1.18275260902657, 16, 0.607476410994438, 0, + "m", "Total", 0.0384832582401022, 0.293513657684447, 2.06966999691554, + -0.232334870771465, 0.942754954004551, 16, 0.355210041616543, + 1, "m", "Total", 0.236045598907544, 0.299773320847979, 1.1849288009078, + 0.0347785848275745, 1.18376851385423, 50, 0.609273549340903, + 0, "m", "Total", 0.0376526930805117, 0.293115061830152, 2.07861563147496, + -0.235026619310592, 0.932673136280767, 50, 0.348823258485087, + 1, "m", "Total", 0.241603722588753, 0.29788806447517, 1.17098769666941, + 0.0369286892519172, 1.1858314534042, 84, 0.611380071328057, + 0, "m", "Total", 0.0369821967431778, 0.293092825484213, 2.08596054959042, + -0.24226269773429, 0.924936634413066, 84, 0.341336968339388, + 1, "m", "Total", 0.251651292529828, 0.297760403087525, 1.14634775074191, + -0.0341652414440963, 0.0289964324299921, 16, -0.00258440450705211, + 0, "m", "Total indirect", 0.872571638699448, 0.0161129679862231, + -0.1603928282649, -0.0729504469356413, 0.0863050547793705, 16, + 0.0066773039218646, 1, "m", "Total indirect", 0.869451130904001, + 0.0406271500321432, 0.164355705890807, -0.0195494723364625, + 0.0179749400152884, 50, -0.000787266160587047, 0, "m", "Total indirect", + 0.93445546375561, 0.00957273007252649, -0.0822405055425602, + -0.0630817329963444, 0.0636627745771612, 50, 0.00029052079040839, + 1, "m", "Total indirect", 0.992830970406013, 0.0323333766776457, + 0.00898516703976816, -0.0231428961923613, 0.0257814078454962, + 84, 0.00131925582656743, 0, "m", "Total indirect", 0.915818938985677, + 0.012480919145394, 0.105701816604932, -0.0851233233170612, 0.0707317846064793, + 84, -0.00719576935529096, 1, "m", "Total indirect", 0.856382065151386, + 0.0397596866965173, -0.180981540680029)) @@ -9253,7 +9266,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 66 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -9264,27 +9277,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -9293,145 +9306,146 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1403.06364229064, 1473.40323731231, 22, "Model 1", 100, -674.531821145318, + list(1403.06364229084, 1473.40323731252, 22, "Model 1", 100, -674.531821145419, 66)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544847515517748, 0.0642091223937993, -0.240319196561974, "contcor1", - "", 0.121933211380449, "contGamma", 0.155374446345879, - -1.54670991410647, -0.403933690508473, 0.194628470110528, -0.104652610198972, - "contcor2", "", 0.49311664018991, "contGamma", 0.152697234576855, - -0.685360219449808, 0.42497895640909, 0.896762608415409, 0.66087078241225, - "contcor2", "", 3.99655573080082e-08, "contcor1", 0.120355184005341, - 5.49100388050524, 1.68041093371437, 2.96919127781339, 2.32480110576388, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776537289654, 7.07106755527301, 0.732634450601933, 1.29452345542538, - 1.01357895301366, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341665779463, 7.07107000258453, 0.721541806531409, - 1.27492359531921, 0.998232700925311, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171417728287, 7.07106804612964, - 0.00465468320442403, 0.00822455797041081, 0.00643962058741742, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000910699072571103, 7.07107405878537, 0.744514189004002, 1.3155145244411, - 1.03001435672255, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.145666027524249, 7.07106779960127, 0.323891736880265, - 0.572298304101652, 0.448095020490958, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.063370186692405, - 7.071069912828, 0.318532880279006, 0.562829637144719, 0.440681258711863, - "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", - 0.0623217464179684, 7.07106722838574)) + list(-0.403933994275354, 0.194627552824542, -0.104653220725406, "contcor2", + "", 0.493113674604581, "contGamma", 0.152697078064004, + -0.685364920221591, -0.544847975461182, 0.0642087041894042, + -0.240319635635889, "contcor1", "", 0.121932555220105, + "contGamma", 0.155374456993789, -1.54671263401742, 1.6804099554338, + 2.96918786562565, 2.32479891052973, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328775916383557, 7.07107423226696, + 0.74451418153246, 1.31551449745438, 1.03001433949342, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.145666022545797, + 7.07106792299204, 0.00465469028325164, 0.0082245826609781, 0.00643963647211487, + "debCollin1", "", 1.53765888910584e-12, "debCollin1", + 0.000910703565444394, 7.07105661651005, 0.424979048596085, 0.896763080564483, + 0.660871064580284, "contcor2", "", 3.99660273764368e-08, + "contcor1", 0.120355280936224, 5.49100180265856, 0.732634868482522, + 1.29452491258064, 1.01357989053158, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341930905424, 7.07106346432807, + 0.721541743967071, 1.27492337711499, 0.998232560541031, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171378023506, + 7.07106904045961, 0.323891752840305, 0.572298359518007, 0.448095056179156, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633701967579768, 7.07106935284609, 0.318532831371732, 0.562829466487992, + 0.440681148929862, "debCollin1:contcor2", "", 1.53743684450092e-12, + "debCollin1:contcor2", 0.062321715358864, 7.07106899083747 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.178874665080335, 0.17598546387173, "", 16, -0.00144460060430261, - "contGamma", "contNormal", "", "", "", 0.987268185490416, - 0.0905272065586807, -0.0159576403516461, -0.148744026518359, - 0.122082736324564, "", 50, -0.0133306450968975, "contGamma", - "contNormal", "", "", "", 0.847000599791021, 0.0690897294489006, - -0.192946841784306, -0.241085105716154, 0.186559278422923, "", - 84, -0.0272629136466156, "contGamma", "contNormal", "", "", - "", 0.802664093455894, 0.109094959783007, -0.249900762609404, - -0.019639260060957, 0.0330747963789523, 16, 16, 0.00671776815899763, + list(-0.178874445302823, 0.175985680793781, "", 16, -0.00144438225452102, + "contGamma", "contNormal", "", "", "", 0.98727010962435, + 0.0905272058302337, -0.0159552285003657, -0.148743865028576, + 0.122082895587898, "", 50, -0.0133304847203387, "contGamma", + "contNormal", "", "", "", 0.847002416505301, 0.0690897288809184, + -0.192944522091191, -0.241085011449544, 0.186559369002399, "", + 84, -0.0272628212235723, "contGamma", "contNormal", "", "", + "", 0.802664746960735, 0.109094958842394, -0.249899917584259, + -0.0196392824253256, 0.033074831629989, 16, 16, 0.0067177746023317, "contGamma", "debCollin1", "contNormal", "", "", - 0.617393836996679, 0.0134477104823637, 0.499547351782133, -0.0595342627878137, - 0.0266309719847771, 50, 16, -0.0164516454015183, "contGamma", - "debCollin1", "contNormal", "", "", 0.454196506076532, - 0.021981331150024, -0.748437175584807, -0.189731398522699, 0.0526203176057261, - 84, 16, -0.0685555404584863, "contGamma", "debCollin1", "contNormal", - "", "", 0.267492973728177, 0.061825553438753, - -1.10885445653795, -0.0302741736895144, 0.0613296087735036, - 16, 50, 0.0155277175419946, "contGamma", "debCollin1", "contNormal", - "", "", 0.506392554415519, 0.0233687412589152, - 0.664465294469841, -0.0248122133313827, 0.0222521678534295, - 50, 50, -0.0012800227389766, "contGamma", "debCollin1", "contNormal", - "", "", 0.915097318620563, 0.0120064403111614, - -0.106611344062292, -0.128969979862088, 0.0360880599438141, - 84, 50, -0.0464409599591368, "contGamma", "debCollin1", "contNormal", - "", "", 0.270063474697908, 0.0421074165412881, - -1.10291639273569, -0.0501710343612898, 0.101879695300156, 16, - 84, 0.0258543304694329, "contGamma", "debCollin1", "contNormal", - "", "", 0.505069283995214, 0.0387891642042411, - 0.666534868689078, -0.0247007185331131, 0.0577076140002671, - 50, 84, 0.016503447733577, "contGamma", "debCollin1", "contNormal", - "", "", 0.432440866675431, 0.0210229201106262, - 0.785021664294639, -0.0784011233706981, 0.0373625689342295, - 84, 84, -0.0205192772182343, "contGamma", "debCollin1", "contNormal", - "", "", 0.487172660768907, 0.0295320968186295, - -0.694812743715857)) + 0.617393884082193, 0.0134477251804413, 0.499547284926838, -0.0595342470475959, + 0.0266309716095103, 50, 16, -0.0164516377190428, "contGamma", + "debCollin1", "contNormal", "", "", 0.454196632412915, + 0.0219813270388554, -0.748436966064969, -0.189731291987963, + 0.0526203792221505, 84, 16, -0.0685554563829063, "contGamma", + "debCollin1", "contNormal", "", "", 0.267493471795916, + 0.0618255419797896, -1.1088533021727, -0.0302742102657519, 0.061329678325606, + 16, 50, 0.0155277340299271, "contGamma", "debCollin1", "contNormal", + "", "", 0.506392595535542, 0.0233687683329688, + 0.664465230203017, -0.0248122011025759, 0.0222521562985732, + 50, 50, -0.00128002240200134, "contGamma", "debCollin1", "contNormal", + "", "", 0.915097298144562, 0.0120064342437888, + -0.10661136987141, -0.128969905253187, 0.0360881008369084, 84, + 50, -0.0464409022081394, "contGamma", "debCollin1", "contNormal", + "", "", 0.270063972512865, 0.0421074079401592, + -1.10291524650814, -0.0501710961761957, 0.101879813638549, 16, + 84, 0.0258543587311764, "contGamma", "debCollin1", "contNormal", + "", "", 0.505069323052613, 0.0387892101625598, + 0.666534807561811, -0.0247007203216525, 0.0577075992426495, + 50, 84, 0.0165034394604985, "contGamma", "debCollin1", "contNormal", + "", "", 0.432441024967062, 0.0210229168021271, + 0.785021394311407, -0.0784010489619707, 0.0373625483145937, + 84, 84, -0.0205192503236885, "contGamma", "debCollin1", "contNormal", + "", "", 0.487172874077647, 0.0295320725762547, + -0.694812403386377)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.148008067524716, 0.122091991695208, -0.0129580379147539, "contGamma", - "", 0.850830899432528, "contNormal", 0.0689043424650755, - -0.188058363974981, -2.36012751468723, 2.71484802398578, 0.177360254649275, - "debCollin1", "", 0.891035814340384, "contNormal", - 1.29466040669721, 0.136993650019573, -3.92591604800149, 0.389063302614832, - -1.76842637269333, "contcor1", "", 0.108159532558217, - "contNormal", 1.10078026551823, -1.6065207817482, -0.18343646921576, - 6.36375008283457, 3.09015680680941, "debCollin1:contcor1", "", - 0.064293806097605, "contNormal", 1.6702313419261, 1.85013700152809, - -1.07356755587979, 3.07543384856948, 1.00093314634485, "contcor2", - "", 0.344316968193908, "contNormal", 1.05843817467465, - 0.945669922244174, -4.81086066433699, 1.39316408742652, -1.70884828845524, - "debCollin1:contcor2", "", 0.280270288565287, "contNormal", - 1.58268845772169, -1.07971235913046, -0.148380665608707, 0.123457108274685, - -0.0124617786670108, "contGamma:contcor2", "", 0.857388016115308, - "contNormal", 0.069347645167874, -0.179700098494243, -0.0197474880796886, - 0.0011600212191002, -0.00929373343029421, "contGamma", "", - 0.081425752437819, "debCollin1", 0.0053336462975097, -1.74247276851363, - -0.0185475924174039, 0.0350787436087211, 0.00826557559565857, - "contcor1", "", 0.545717762560179, "debCollin1", 0.0136804391430462, - 0.604189347230129, -0.0145562992891293, 0.00654285625154587, - -0.00400672151879173, "contGamma:contcor1", "", 0.45663886567182, - "debCollin1", 0.00538253654329943, -0.744392813046404)) + list(-0.148007904222883, 0.122092152781215, -0.0129578757208336, "contGamma", + "", 0.850832743444708, "contNormal", 0.0689043418998034, + -0.188056011617907, -2.3601274575369, 2.71484803610316, 0.177360289283131, + "debCollin1", "", 0.891035792234419, "contNormal", + 1.294660395209, 0.136993677986496, -3.92591603455766, 0.389063152293652, + -1.76842644113201, "contcor1", "", 0.108159505523721, + "contNormal", 1.10078022374067, -1.60652090489284, -0.183436485818906, + 6.36374982296208, 3.09015666857159, "debCollin1:contcor1", "", + 0.0642938081179929, "contNormal", 1.67023127986646, 1.8501369875067, + -1.07356756257289, 3.07543381950852, 1.00093312846782, "contcor2", + "", 0.344316974210158, "contNormal", 1.05843816896846, + 0.94566991045241, -4.8108606667859, 1.39316402186166, -1.70884832246212, + "debCollin1:contcor2", "", 0.28027027410118, "contNormal", + 1.58268844162039, -1.07971239160158, -0.148380725234828, 0.123457046338167, + -0.0124618394483306, "contGamma:contcor2", "", 0.857387326792868, + "contNormal", 0.069347644578476, -0.179700976494283, -0.0197474963210936, + 0.00116003876410842, -0.00929372877849258, "contGamma", "", + 0.0814262806673458, "debCollin1", 0.0053336528757972, -1.74246974726556, + -0.0185476570449273, 0.0350787451218003, 0.00826554403843652, + "contcor1", "", 0.545719791387718, "debCollin1", 0.0136804560159589, + 0.604186295310212, -0.0145563012681158, 0.00654288029533512, + -0.00400671048639034, "contGamma:contcor1", "", 0.456640660587672, + "debCollin1", 0.00538254318188461, -0.744389845282664)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.171500149637237, 0.182046484746627, 16, 16, 0.00527316755469502, - "Total", 0.953377490499848, 0.0901921252565338, 0.0584659418956648, - -0.167041091334296, 0.107476510337465, 50, 16, -0.0297822904984158, - "Total", 0.670638976123402, 0.0700312872678072, -0.42527121320111, - -0.328793025571216, 0.137156117361012, 84, 16, -0.0958184541051018, - "Total", 0.420185396889656, 0.118866761483266, -0.806099643915941, - -0.167261612433686, 0.19542784630907, 16, 50, 0.014083116937692, - "Total", 0.879021651761045, 0.0925245212676366, 0.152209562878528, - -0.147716352841562, 0.118495017169814, 50, 50, -0.0146106678358741, - "Total", 0.829658018120303, 0.0679123116830763, -0.215140192901357, - -0.28884209001517, 0.141434342803665, 84, 50, -0.0737038736057523, - "Total", 0.501926849341373, 0.109766413110853, -0.671461073719506, - -0.167533542850355, 0.216353002580615, 16, 84, 0.0244097298651303, - "Total", 0.803166072565421, 0.0979320407055992, 0.249251722819809, - -0.134926929204896, 0.141272534478255, 50, 84, 0.0031728026366795, - "Total", 0.96408369694426, 0.070460341583258, 0.0450296232658824, - -0.254380563755482, 0.158816182025783, 84, 84, -0.0477821908648499, - "Total", 0.650331580130385, 0.105409270027538, -0.453301601010677, - -0.019639260060957, 0.0330747963789523, 16, 16, 0.00671776815899763, - "Total indirect", 0.617393836996679, 0.0134477104823637, 0.499547351782133, - -0.0595342627878137, 0.0266309719847771, 50, 16, -0.0164516454015183, - "Total indirect", 0.454196506076532, 0.021981331150024, -0.748437175584807, - -0.189731398522699, 0.0526203176057261, 84, 16, -0.0685555404584863, - "Total indirect", 0.267492973728177, 0.061825553438753, -1.10885445653795, - -0.0302741736895144, 0.0613296087735036, 16, 50, 0.0155277175419946, - "Total indirect", 0.506392554415519, 0.0233687412589152, 0.664465294469841, - -0.0248122133313827, 0.0222521678534295, 50, 50, -0.0012800227389766, - "Total indirect", 0.915097318620563, 0.0120064403111614, -0.106611344062292, - -0.128969979862088, 0.0360880599438141, 84, 50, -0.0464409599591368, - "Total indirect", 0.270063474697908, 0.0421074165412881, -1.10291639273569, - -0.0501710343612898, 0.101879695300156, 16, 84, 0.0258543304694329, - "Total indirect", 0.505069283995214, 0.0387891642042411, 0.666534868689078, - -0.0247007185331131, 0.0577076140002671, 50, 84, 0.016503447733577, - "Total indirect", 0.432440866675431, 0.0210229201106262, 0.785021664294639, - -0.0784011233706981, 0.0373625689342295, 84, 84, -0.0205192772182343, - "Total indirect", 0.487172660768907, 0.0295320968186295, -0.694812743715857 + list(-0.171499924754761, 0.182046709450382, 16, 16, 0.00527339234781069, + "Total", 0.953375505240275, 0.0901921252109411, 0.0584684343059584, + -0.167040922327641, 0.107476677448878, 50, 16, -0.0297821224393815, + "Total", 0.670640723176385, 0.0700312867843181, -0.425268816366381, + -0.328792853589543, 0.137156298376586, 84, 16, -0.0958182776064786, + "Total", 0.420186261990942, 0.118866763787875, -0.806098143442958, + -0.167261387705117, 0.19542809125593, 16, 50, 0.0140833517754061, + "Total", 0.879019656655638, 0.0925245264254587, 0.152212092506652, + -0.147716191175101, 0.118495176930421, 50, 50, -0.0146105071223401, + "Total", 0.829659861906818, 0.0679123111968801, -0.215137827955578, + -0.288841950339978, 0.141434503476554, 84, 50, -0.0737037234317117, + "Total", 0.501927741499256, 0.109766418467507, -0.671459672828165, + -0.167533329891575, 0.216353282844886, 16, 84, 0.0244099764766554, + "Total", 0.80316415859612, 0.0979320578756828, 0.249254197309343, + -0.134926775730674, 0.141272685210994, 50, 84, 0.00317295474015978, + "Total", 0.964081975931624, 0.0704603408838872, 0.0450317824233712, + -0.254380448090222, 0.1588163049957, 84, 84, -0.0477820715472608, + "Total", 0.650332400878087, 0.105409271891006, -0.453300461051169, + -0.0196392824253256, 0.033074831629989, 16, 16, 0.0067177746023317, + "Total indirect", 0.617393884082193, 0.0134477251804413, 0.499547284926838, + -0.0595342470475959, 0.0266309716095103, 50, 16, -0.0164516377190428, + "Total indirect", 0.454196632412915, 0.0219813270388554, -0.748436966064969, + -0.189731291987963, 0.0526203792221505, 84, 16, -0.0685554563829063, + "Total indirect", 0.267493471795916, 0.0618255419797896, -1.1088533021727, + -0.0302742102657519, 0.061329678325606, 16, 50, 0.0155277340299271, + "Total indirect", 0.506392595535542, 0.0233687683329688, 0.664465230203017, + -0.0248122011025759, 0.0222521562985732, 50, 50, -0.00128002240200134, + "Total indirect", 0.915097298144562, 0.0120064342437888, -0.10661136987141, + -0.128969905253187, 0.0360881008369084, 84, 50, -0.0464409022081394, + "Total indirect", 0.270063972512865, 0.0421074079401592, -1.10291524650814, + -0.0501710961761957, 0.101879813638549, 16, 84, 0.0258543587311764, + "Total indirect", 0.505069323052613, 0.0387892101625598, 0.666534807561811, + -0.0247007203216525, 0.0577075992426495, 50, 84, 0.0165034394604985, + "Total indirect", 0.432441024967062, 0.0210229168021271, 0.785021394311407, + -0.0784010489619707, 0.0373625483145937, 84, 84, -0.0205192503236885, + "Total indirect", 0.487172874077647, 0.0295320725762547, -0.694812403386377 )) @@ -9448,7 +9462,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 66 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -9459,27 +9473,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -9488,128 +9502,129 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(956.889403683763, 1027.22899870544, 22, "Model 1", 100, -451.444701841882, + list(956.889403684419, 1027.2289987061, 22, "Model 1", 100, -451.444701842209, 66)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0096224523434509, 0.0896212169086848, 0.039999382282617, "facExperimexperimental", - "", 0.114130636320937, "facGenderm", 0.0253177277835096, - 1.5798962144095, -0.163249229741226, 0.0341993773998874, -0.0645249261706694, - "contcor2", "", 0.200191180867361, "facGenderm", 0.0503704682072128, - -1.2810070755195, -0.170525752177482, 0.0272983796874243, -0.0716136862450287, - "contcor2", "", 0.155887154895176, "facExperimexperimental", - 0.0504662670909561, -1.41904068545348, 0.18070417895344, 0.319292994425454, - 0.249998586689447, "facGenderm", "", 1.53699275529107e-12, - "facGenderm", 0.0353549393165345, 7.07110778641698, 0.180704398338879, - 0.319293759620992, 0.249999078979935, "facExperimexperimental", - "", 1.53721479989599e-12, "facExperimexperimental", - 0.0353550785563633, 7.0710938622689, 0.721541544405699, 1.2749226808971, - 0.9982321126514, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.141171251323086, 7.07107221403623, 0.00474535368810501, - 0.00838477195006576, 0.00656506281908539, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000928440086314853, 7.07106782209642, - 0.758145086987077, 1.33959955001926, 1.04887231850317, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.148332945813959, - 7.07106781131871, 0.0796445784333564, 0.140727282212998, 0.110185930323177, + list(-0.163249128026186, 0.0341995143579774, -0.0645248068341041, "contcor2", + "", 0.200192093333703, "facGenderm", 0.0503704771979518, + -1.28100447769289, -0.00962247950353697, 0.0896212122013327, + 0.0399993663488978, "facExperimexperimental", "", 0.114130862341028, + "facGenderm", 0.0253177335113531, 1.57989522762617, 0.180704278799116, + 0.319293342677547, 0.249998810738331, "facGenderm", "", + 1.53699275529107e-12, "facGenderm", 0.035355002686683, 7.07110144931476, + 0.758145086992818, 1.33959955001352, 1.04887231850317, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.14833294581103, + 7.07106781145834, 0.00474536044013702, 0.00838479550083286, + 0.00656507797048494, "debCollin1", "", 1.53765888910584e-12, + "debCollin1", 0.000928444371785208, 7.07105150291518, -0.170525656472278, + 0.0272982271776882, -0.0716137146472951, "contcor2", "", + 0.155886471764017, "facExperimexperimental", 0.050466203769655, + -1.41904302875969, 0.180704326615729, 0.319293509457035, 0.249998918036382, + "facExperimexperimental", "", 1.53721479989599e-12, + "facExperimexperimental", 0.0353550330349128, 7.07109841446082, + 0.721541253897974, 1.27492166764351, 0.998231460770741, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171066945752, + 7.07107683158854, 0.0796445139142975, 0.140727057175752, 0.110185785545025, "debCollin1:facExperimexperimental", "", 1.53721479989599e-12, - "debCollin1:facExperimexperimental", 0.0155826087268577, 7.07108368403449, - 0.318533206878452, 0.562830776263371, 0.440681991570911, "debCollin1:contcor2", - "", 1.53765888910584e-12, "debCollin1:contcor2", 0.0623219536970852, - 7.0710554696799)) + "debCollin1:facExperimexperimental", 0.0155825677775882, 7.07109297502947, + 0.318533301961408, 0.562831107911786, 0.440682204936597, "debCollin1:contcor2", + "", 1.53765888910584e-12, "debCollin1:contcor2", 0.0623220140465253, + 7.07105204603327)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.152134720186446, 1.01350311054209, 16, 0.430684195177824, "", - "m", "facGender", "contNormal", "", "", "", 0.147519317744498, - 0.297362053569081, 1.44834954564157, 0.0689843003479009, 0.890308554047518, + list(-0.152134720273854, 1.0135031106295, 16, 0.430684195177824, "", + "m", "facGender", "contNormal", "", "", "", 0.147519317805216, + 0.297362053613678, 1.44834954542436, 0.0689843003452194, 0.8903085540502, 50, 0.47964642719771, "", "m", "facGender", "contNormal", "", - "", "", 0.0220674543381432, 0.209525343368072, 2.28920482595329, - -0.068502305279583, 1.1425776620827, 84, 0.53703767840156, "", - "m", "facGender", "contNormal", "", "", "", 0.0821683338966261, - 0.308954648380055, 1.73824113415162, -0.0362335879660736, 0.0305569310986389, - 16, -0.00283832843371733, "", "m", "facGender", "debCollin1", - "contNormal", "", "", 0.867699608445428, 0.0170387108108995, - -0.166581173025231, -0.0732830017106599, 0.0857898593920737, - 16, 0.00625342884070688, "", "m", "facGender", "debCollin1", - "contNormal", "", "", 0.877531568730838, 0.0405805571830605, - 0.154099136995517, -0.0193025655637214, 0.0178547358547148, - 50, -0.000723914854503306, "", "m", "facGender", "debCollin1", - "contNormal", "", "", 0.939124929622951, 0.00947907760334582, - -0.0763697571425923, -0.0647109530394989, 0.0621891744441291, - 50, -0.0012608892976849, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.96893128758117, 0.0323730763638006, - -0.0389487018013161, -0.0249001646080846, 0.0284091694169251, - 84, 0.00175450240442023, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.897348461613857, 0.0135995697996256, - 0.129011610681136, -0.0902600841445575, 0.0701224370679086, - 84, -0.0100688235383245, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.805610013812014, 0.040914660289052, - -0.246093294364189)) + "", "", 0.0220674543390111, 0.20952534336944, 2.28920482593834, + -0.0685023051304304, 1.14257766193355, 84, 0.53703767840156, + "", "m", "facGender", "contNormal", "", "", "", 0.0821683338212158, + 0.308954648303955, 1.73824113457977, -0.0362331293207637, 0.0305566396731035, + 16, -0.00283824482383008, "", "m", "facGender", "debCollin1", + "contNormal", "", "", 0.867701997720716, 0.01703851946278, + -0.166578136676142, -0.0732834468571542, 0.0857903832340919, + 16, 0.00625346818846887, "", "m", "facGender", "debCollin1", + "contNormal", "", "", 0.877531544343821, 0.0405808043785499, + 0.154099167925176, -0.019302068123722, 0.017854281064071, 50, + -0.000723893529825498, "", "m", "facGender", "debCollin1", "contNormal", + "", "", 0.939125162353416, 0.0094788346829017, + -0.0763694646063705, -0.0647113593904802, 0.0621895649276005, + 50, -0.00126089723143985, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.968931287178572, 0.0323732796416309, + -0.0389487023062803, -0.0248997226306342, 0.0284086240731788, + 84, 0.00175445072127234, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.897349578102511, 0.0135993179273452, + 0.129010199676598, -0.0902606092068634, 0.0701228354203143, + 84, -0.0100688868932746, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.805609911970239, 0.0409148958583581, + -0.246093425928095)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0667088031723331, 0.88951428662381, 0.478111544898072, "facGenderm", - "", 0.022740199768027, "contNormal", 0.20990321504417, - 2.27777142335558, -3.62928776413516, 3.31394389727272, -0.157671933431222, - "debCollin1", "", 0.929068746640252, "contNormal", - 1.77126511409781, -0.0890165634586731, -3.44109117914324, 3.19249193597789, - -0.124299621582674, "facExperimexperimental", "", 0.941446965152546, - "contNormal", 1.69227168648148, -0.0734513391529428, -4.7505401647892, - 5.18102017950755, 0.215240007359174, "debCollin1:facExperimexperimental", - "", 0.932297997351058, "contNormal", 2.53360786795973, - 0.084953954430408, -1.86115850573356, 1.36333449452585, -0.248912005603853, - "contcor2", "", 0.762198129867023, "contNormal", 0.822589860245853, - -0.302595518901071, -1.93778467444081, 2.82245411416473, 0.44233471986196, - "debCollin1:contcor2", "", 0.715670821530432, "contNormal", - 1.21436894406063, 0.364250685119526, -0.363454890871338, 0.466122603221697, - 0.0513338561751792, "facGenderm:contcor2", "", 0.808343748168717, - "contNormal", 0.21163080052405, 0.242563256615124, -0.0404917444638702, - 0.0505150642720405, 0.00501165990408519, "facGenderm", "", - 0.829091600276883, "debCollin1", 0.0232164492444149, 0.215866769777072, - -0.0488497084697985, 0.0421571002661074, -0.0033463041018456, - "facExperimexperimental", "", 0.885393826796438, "debCollin1", - 0.0232164492444137, -0.144135051256849, -0.0871739014201595, - 0.0415291617621251, -0.0228223698290172, "facGenderm:facExperimexperimental", - "", 0.486989973442933, "debCollin1", 0.0328330173915128, - -0.695104246949801)) + list(0.066708803164902, 0.889514286631242, 0.478111544898072, "facGenderm", + "", 0.0227401997704797, "contNormal", 0.209903215047961, + 2.27777142331444, -3.62928776078598, 3.31394389392353, -0.157671933431222, + "debCollin1", "", 0.929068746572003, "contNormal", + 1.77126511238901, -0.0890165635445503, -3.44109117597489, 3.19249193280955, + -0.124299621582674, "facExperimexperimental", "", 0.941446965096714, + "contNormal", 1.69227168486495, -0.0734513392231066, -4.75054016020188, + 5.18102017492022, 0.215240007359174, "debCollin1:facExperimexperimental", + "", 0.932297997288666, "contNormal", 2.53360786561921, + 0.0849539545088874, -1.86115850887612, 1.36333449766841, -0.248912005603853, + "contcor2", "", 0.762198130316567, "contNormal", 0.822589861849229, + -0.302595518311257, -1.93778467973415, 2.82245411945807, 0.44233471986196, + "debCollin1:contcor2", "", 0.7156708221353, "contNormal", + 1.21436894676136, 0.36425068430944, -0.363454890836994, 0.466122603187352, + 0.0513338561751791, "facGenderm:contcor2", "", 0.808343748153157, + "contNormal", 0.211630800506527, 0.242563256635208, -0.0404919446024984, + 0.0505149691493351, 0.00501151227341831, "facGenderm", "", + 0.829096751255638, "debCollin1", 0.0232164760346834, 0.215860161806277, + -0.0488495574011477, 0.0421573563507371, -0.00334610052520527, + "facExperimexperimental", "", 0.885400882190356, "debCollin1", + 0.0232164760346965, -0.144126116306566, -0.0871739401152226, + 0.0415292715817825, -0.02282233426672, "facGenderm:facExperimexperimental", + "", 0.486991154810758, "debCollin1", 0.0328330552786173, + -0.695102361722127)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.156762001922874, 1.01245373541109, 16, 0.427845866744106, 0, - "m", "Total", 0.151457677882929, 0.298274801617934, 1.43440164715001, - 0.0713352645706684, 0.900464447506165, 16, 0.485899856038416, - 1, "m", "Total", 0.0216062025326385, 0.211516433331317, 2.297220354871, - -0.0689558739649857, 1.1415834010591, 50, 0.536313763547057, - 0, "m", "Total", 0.0824448408475518, 0.308816714126551, 1.73667336971689, - -0.15520494066984, 1.01405155243012, 50, 0.429423305880139, - 1, "m", "Total", 0.14996927432948, 0.298285198688063, 1.43964000818296, - 0.0700724197473102, 0.892729439456949, 84, 0.48140092960213, - 0, "m", "Total", 0.0217987556055002, 0.209865340944694, 2.29385627676841, - -0.0750551378088081, 1.12899284753528, 84, 0.526968854863235, - 1, "m", "Total", 0.0862329619358753, 0.307160742452786, 1.71561264846284, - -0.0362335879660736, 0.0305569310986389, 16, -0.00283832843371733, - 0, "m", "Total indirect", 0.867699608445428, 0.0170387108108995, - -0.166581173025231, -0.0732830017106599, 0.0857898593920737, - 16, 0.00625342884070688, 1, "m", "Total indirect", 0.877531568730838, - 0.0405805571830605, 0.154099136995517, -0.0193025655637214, - 0.0178547358547148, 50, -0.000723914854503306, 0, "m", "Total indirect", - 0.939124929622951, 0.00947907760334582, -0.0763697571425923, - -0.0647109530394989, 0.0621891744441291, 50, -0.0012608892976849, - 1, "m", "Total indirect", 0.96893128758117, 0.0323730763638006, - -0.0389487018013161, -0.0249001646080846, 0.0284091694169251, - 84, 0.00175450240442023, 0, "m", "Total indirect", 0.897348461613857, - 0.0135995697996256, 0.129011610681136, -0.0902600841445575, - 0.0701224370679086, 84, -0.0100688235383245, 1, "m", "Total indirect", - 0.805610013812014, 0.040914660289052, -0.246093294364189)) + list(-0.156761872442341, 1.01245377315033, 16, 0.427845950353994, 0, + "m", "Total", 0.151457565837007, 0.298274778214113, 1.43440204001047, + 0.0713352346043017, 0.900464556168055, 16, 0.485899895386179, + 1, "m", "Total", 0.0216062138256019, 0.211516468696318, 2.2972201568087, + -0.0689558542704598, 1.14158342401393, 50, 0.536313784871735, + 0, "m", "Total", 0.0824448294781563, 0.308816714958277, 1.73667343409243, + -0.155204981511582, 1.01405157740435, 50, 0.429423297946384, + 1, "m", "Total", 0.149969304796904, 0.298285215478161, 1.43963990054956, + 0.0700723942472817, 0.892729361590682, 84, 0.481400877918982, + 0, "m", "Total", 0.0217987613659443, 0.209865327585714, 2.2938561765157, + -0.0750552069194285, 1.128992789936, 84, 0.526968791508285, + 1, "m", "Total", 0.086233002716243, 0.307160745389406, 1.71561242580075, + -0.0362331293207637, 0.0305566396731035, 16, -0.00283824482383008, + 0, "m", "Total indirect", 0.867701997720716, 0.01703851946278, + -0.166578136676142, -0.0732834468571542, 0.0857903832340919, + 16, 0.00625346818846887, 1, "m", "Total indirect", 0.877531544343821, + 0.0405808043785499, 0.154099167925176, -0.019302068123722, 0.017854281064071, + 50, -0.000723893529825498, 0, "m", "Total indirect", 0.939125162353416, + 0.0094788346829017, -0.0763694646063705, -0.0647113593904802, + 0.0621895649276005, 50, -0.00126089723143985, 1, "m", "Total indirect", + 0.968931287178572, 0.0323732796416309, -0.0389487023062803, + -0.0248997226306342, 0.0284086240731788, 84, 0.00175445072127234, + 0, "m", "Total indirect", 0.897349578102511, 0.0135993179273452, + 0.129010199676598, -0.0902606092068634, 0.0701228354203143, + 84, -0.0100688868932746, 1, "m", "Total indirect", 0.805609911970239, + 0.0409148958583581, -0.246093425928095)) @@ -9625,7 +9640,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 67 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -9636,29 +9651,29 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -9667,162 +9682,162 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1404.67194734167, 1477.61671254934, 21, "Model 1", 100, -674.335973670836, + list(1404.67194734132, 1477.61671254899, 21, "Model 1", 100, -674.33597367066, 67)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544849917299305, 0.0642065889545218, -0.240321664172392, "contcor1", - "", 0.121929299407316, "contGamma", 0.155374412759109, - -1.54672613015751, -0.40393488188294, 0.194626743430105, -0.104654069226417, - "contcor2", "", 0.493110225510866, "contGamma", 0.152697098016704, - -0.685370387425233, 0.42497929569148, 0.89676361009074, 0.66087145289111, - "contcor2", "", 3.99660411432023e-08, "contcor1", 0.120355352986237, - 5.49100174187252, 1.68040943735165, 2.96918605870361, 2.32479774802763, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328775587591831, 7.07107776783545, 0.732634775529404, 1.29452458871671, - 1.01357968212306, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341871998521, 7.07106491628291, 0.721541990547607, - 1.2749242380067, 0.998233114277153, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171534738418, 7.07106511328089, - 0.00465468497907217, 0.00822456416027347, 0.00643962456967282, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000910700198922036, 7.07106968604506, 0.741603696306261, 1.3103718973971, - 1.02598779685168, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.145096595033687, 7.0710673576694, 0.323891704048473, - 0.572298189510256, 0.448094946779365, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633701658349801, - 7.07107107698333, 0.318533009258453, 0.56283008685646, 0.440681548057457, - "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", - 0.0623218282389347, 7.07106258770097)) + list(-0.403934083783198, 0.194627918012453, -0.104653082885373, "contcor2", + "", 0.493114572547124, "contGamma", 0.15269719405995, + -0.685363496884462, -0.544847867461556, 0.0642087990625697, + -0.240319534199493, "contcor1", "", 0.121932704674019, + "contGamma", 0.15537445364514, -1.54671201450117, 1.68041065881351, + 2.96919031891347, 2.32480048886349, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776362796891, 7.07106943177568, + 0.74160368470528, 1.31037185529426, 1.02598776999977, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.145096587252456, + 7.07106755181383, 0.00465468454032118, 0.00822456262993603, + 0.0064396235851286, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910699920450987, 7.07107076713002, 0.424979173998073, + 0.896763029926683, 0.660871101962378, "contcor2", "", + 3.9965493359162e-08, "contcor1", 0.120355236027289, 5.49100416214989, + 0.732634560629498, 1.29452384105862, 1.01357920084406, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341736088326, + 7.07106826318544, 0.721541786981401, 1.27492352702261, 0.998232657002005, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171405292703, + 7.0710683578752, 0.323891829733533, 0.572298628619901, 0.448095229176717, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633702457917005, 7.07106661144438, 0.318532805009391, 0.562829374474157, + 0.440681089741774, "debCollin1:contcor2", "", 1.53743684450092e-12, + "debCollin1:contcor2", 0.0623216986107261, 7.07106994137558 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.209487206539584, 0.166373145480761, 16, 16, -0.0215570305294112, - "contGamma", "contNormal", "", "", "", 0.822117065846511, - 0.0958845047626088, -0.224822880222223, -0.19850732625426, 0.314044690641973, - 50, 16, 0.0577686821938563, "contGamma", "contNormal", "", "", - "", 0.6586288668677, 0.130755468197165, 0.441807008076689, -0.344935609227806, - 0.633620840414422, 84, 16, 0.144342615593308, "contGamma", "contNormal", - "", "", "", 0.563121291842173, 0.249636334483939, 0.578211564801657, - -0.366989331083713, 0.186093911128443, 16, 50, -0.0904477099776347, - "contGamma", "contNormal", "", "", "", 0.521496663843765, - 0.14109525648808, -0.641040047900377, -0.146446965068497, 0.124202970559762, - 50, 50, -0.0111219972543672, "contGamma", "contNormal", "", - "", "", 0.872027085034337, 0.0690446196366645, -0.161084199071482, - -0.233446194432069, 0.384350066722238, 84, 50, 0.0754519361450844, - "contGamma", "contNormal", "", "", "", 0.632120873141097, - 0.157603983039333, 0.47874384066965, -0.669519725450081, 0.327123404628563, - 16, 84, -0.171198160410759, "contGamma", "contNormal", "", "", - "", 0.500727965147751, 0.254250368358816, -0.673344788115122, - -0.38581209454452, 0.202067199169537, 50, 84, -0.0918724476874914, - "contGamma", "contNormal", "", "", "", 0.540142521084173, - 0.149971963350137, -0.612597485791385, -0.229493284046568, 0.218896255470488, - 84, 84, -0.00529851428803979, "contGamma", "contNormal", "", - "", "", 0.963054503915066, 0.114387188502925, -0.0463208717460897, - -0.0204602368277774, 0.0355989836855878, 16, 16, 0.00756937342890517, + list(-0.209487152124768, 0.16637319603925, 16, 16, -0.0215569780427589, + "contGamma", "contNormal", "", "", "", 0.822117489909924, + 0.0958845037788338, -0.224822335134382, -0.19850727632474, 0.314044739309568, + 50, 16, 0.0577687314924142, "contGamma", "contNormal", "", "", + "", 0.658628593227547, 0.13075546787524, 0.44180738619309, -0.344935566441503, + 0.633620889266435, 84, 16, 0.144342661412466, "contGamma", "contNormal", + "", "", "", 0.563121170358954, 0.249636336031342, 0.578211744761162, + -0.366989284992905, 0.186093958480652, 16, 50, -0.0904476632561264, + "contGamma", "contNormal", "", "", "", 0.521496879928938, + 0.141095256809872, -0.641039715303868, -0.146446919779188, 0.124203012337282, + 50, 50, -0.0111219537209533, "contGamma", "contNormal", "", + "", "", 0.872027579978656, 0.0690446187407835, -0.161083570650289, + -0.233446156771465, 0.384350109169663, 84, 50, 0.0754519761990985, + "contGamma", "contNormal", "", "", "", 0.632120694958979, + 0.157603984260483, 0.478744091103648, -0.6695196863986, 0.327123445504831, + 16, 84, -0.171198120446884, "contGamma", "contNormal", "", "", + "", 0.500728065907261, 0.254250368824332, -0.67334462969912, + -0.385812055470534, 0.202067233647112, 50, 84, -0.0918724109117112, + "contGamma", "contNormal", "", "", "", 0.540142680098082, + 0.149971962177561, -0.612597245363355, -0.229493248598548, 0.218896286615229, + 84, 84, -0.00529848099165932, "contGamma", "contNormal", "", + "", "", 0.963054735563849, 0.11438718740513, -0.046320581105762, + -0.0204602344085486, 0.0355989787480894, 16, 16, 0.00756937216977037, "contGamma", "debCollin1", "contNormal", "", "", - 0.596606595480347, 0.0143010843453128, 0.529286678278074, -0.0631275108152892, - 0.0260139855994758, 50, 16, -0.0185567626079067, "contGamma", - "debCollin1", "contNormal", "", "", 0.414489153432761, - 0.0227405955206069, -0.816019201919802, -0.208094805223042, - 0.0534832879548465, 84, 16, -0.0773057586340977, "contGamma", - "debCollin1", "contNormal", "", "", 0.246668183754547, - 0.0667303315880248, -1.15848006138142, -0.0327770998713117, - 0.0670642084016534, 16, 50, 0.0171435542651708, "contGamma", - "debCollin1", "contNormal", "", "", 0.500894421245465, - 0.0254701895189148, 0.673083105739736, -0.0257553471872748, - 0.0216171597149908, 50, 50, -0.00206909373614201, "contGamma", - "debCollin1", "contNormal", "", "", 0.864057789944843, - 0.012085045254896, -0.17121108713298, -0.143621720865794, 0.0370759283592992, - 84, 50, -0.0532728962532472, "contGamma", "debCollin1", "contNormal", - "", "", 0.247818283805566, 0.0460971861346466, - -1.15566481862127, -0.0540509281351965, 0.110782855652632, 16, - 84, 0.0283659637587177, "contGamma", "debCollin1", "contNormal", - "", "", 0.499946649674671, 0.0420502073221795, - 0.674573695710556, -0.0243380698833921, 0.0588520396739156, - 50, 84, 0.0172569848952618, "contGamma", "debCollin1", "contNormal", - "", "", 0.416131372110597, 0.0212223566895873, - 0.813151204066269, -0.0869450461058388, 0.0367396606905392, - 84, 84, -0.0251026927076498, "contGamma", "debCollin1", "contNormal", - "", "", 0.426277754808023, 0.0315528009116461, - -0.795577317460408)) + 0.596606608371344, 0.0143010824685622, 0.529286659692369, -0.0631275393161468, + 0.026013995135839, 50, 16, -0.0185567720901539, "contGamma", + "debCollin1", "contNormal", "", "", 0.414489114098682, + 0.0227406052241579, -0.816019270693841, -0.208094927083211, + 0.0534832845334798, 84, 16, -0.0773058212748658, "contGamma", + "debCollin1", "contNormal", "", "", 0.24666801483017, + 0.0667303618025604, -1.15848047555318, -0.0327770986297675, + 0.0670642012262217, 16, 50, 0.0171435512982271, "contGamma", + "debCollin1", "contNormal", "", "", 0.50089445925172, + 0.0254701873716876, 0.67308304599611, -0.0257553602038925, 0.021617170446544, + 50, 50, -0.00206909487867426, "contGamma", "debCollin1", "contNormal", + "", "", 0.864057783095067, 0.0120850513132142, + -0.171211095844653, -0.143621804673759, 0.0370759254963487, + 84, 50, -0.0532729395887052, "contGamma", "debCollin1", "contNormal", + "", "", 0.247818110963452, 0.0460972067842645, + -1.15566524102042, -0.0540509264936074, 0.110782844073527, 16, + 84, 0.0283659587899599, "contGamma", "debCollin1", "contNormal", + "", "", 0.499946690384317, 0.0420502039494915, + 0.674573631653049, -0.0243380769370034, 0.0588520639933144, + 50, 84, 0.0172569935281555, "contGamma", "debCollin1", "contNormal", + "", "", 0.416131314712595, 0.0212223646930533, + 0.81315130419016, -0.0869451040162767, 0.0367396771876346, 84, + 84, -0.0251027134143211, "contGamma", "debCollin1", "contNormal", + "", "", 0.426277651520985, 0.0315528198935085, + -0.795577495103236)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.14454055508012, 0.126022949156819, -0.0092588029616502, "contGamma", - "", 0.893290548350687, "contNormal", 0.0690225704071885, - -0.134141671442099, -2.28223744286787, 2.8124944028391, 0.265128479985614, - "debCollin1", "", 0.838359749712812, "contNormal", - 1.29970037355114, 0.203992001064991, -4.64758131248283, 0.319583041327143, - -2.16399913557784, "contcor1", "", 0.0876810282014022, - "contNormal", 1.26715704803515, -1.70775922284719, -0.173334376571801, - 0.336197440860851, 0.0814315321445249, "contGamma:contcor1", - "", 0.531007554079538, "contNormal", 0.129984994992707, - 0.626468710092988, -0.0078185900407779, 6.97589399499698, 3.4840377024781, - "debCollin1:contcor1", "", 0.0505151880212227, "contNormal", - 1.78159207009016, 1.95557544343009, -0.962519769106052, 3.35439362812801, - 1.19593692951098, "contcor2", "", 0.277497576453754, - "contNormal", 1.10127365382357, 1.08595799541625, -4.98755824950836, - 1.27340681559688, -1.85707571695574, "debCollin1:contcor2", - "", 0.244952605392561, "contNormal", 1.59721431477592, - -1.16269663987846, -0.303234672878505, 0.158779484268265, -0.07222759430512, - "contGamma:contcor2", "", 0.540001875716408, "contNormal", - 0.117862920132992, -0.612810154572967, -0.0197475153383132, - 0.00116000042507313, -0.00929375745662005, "contGamma", "", - 0.0814250590515804, "debCollin1", 0.00533364794667203, -1.74247673441195, - -0.0185476165691481, 0.0350787360384232, 0.00826555973463757, - "contcor1", "", 0.545718657481701, "debCollin1", 0.0136804433730847, - 0.604188001018993, -0.0145563002550635, 0.00654286180948531, - -0.00400671922278907, "contGamma:contcor1", "", 0.456639262865572, - "debCollin1", 0.00538253820758347, -0.744392156314653)) + list(-0.144540509639614, 0.126022991168422, -0.00925875923559613, "contGamma", + "", 0.893291047942033, "contNormal", 0.0690225695324523, + -0.134141039638389, -2.28223743895703, 2.81249441894425, 0.265128489993606, + "debCollin1", "", 0.83835974407698, "contNormal", 1.29970037666199, + 0.203992008276965, -4.64758155181468, 0.319583308994963, -2.16399912140986, + "contcor1", "", 0.0876810626339202, "contNormal", 1.26715717737418, + -1.70775903735488, -0.173334382429872, 0.336197440173468, 0.0814315288717978, + "contGamma:contcor1", "", 0.531007574757694, "contNormal", + 0.129984996311785, 0.626468678557903, -0.00781891737649287, + 6.97589437286037, 3.48403772774194, "debCollin1:contcor1", "", + 0.0505152096307686, "contNormal", 1.7815922499912, 1.95557526014112, + -0.962519885047196, 3.35439374527307, 1.19593693011294, "contcor2", + "", 0.277497602154516, "contNormal", 1.10127371328543, + 1.08595793732795, -4.98755841679428, 1.27340698566798, -1.85707571556315, + "debCollin1:contcor2", "", 0.244952631173807, "contNormal", + 1.59721440083796, -1.16269657635747, -0.303234678270782, 0.158779477571752, + -0.0722276003495151, "contGamma:contcor2", "", 0.540001840659202, + "contNormal", 0.117862919800272, -0.612810207586153, -0.0197475192332575, + 0.00115999493186756, -0.00929376215069497, "contGamma", "", + 0.0814248818916969, "debCollin1", 0.00533364753894481, -1.74247774770164, + -0.0185476087901483, 0.0350787397176412, 0.00826556546374642, + "contcor1", "", 0.545718348382142, "debCollin1", 0.0136804423272028, + 0.604188465990666, -0.0145563052745991, 0.00654285517690593, + -0.00400672504884657, "contGamma:contcor1", "", 0.456638573807483, + "debCollin1", 0.00538253779608516, -0.744393295623628)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.200654285466873, 0.172678971265861, 16, 16, -0.013987657100506, - "Total", 0.883236422678532, 0.0952398257512738, -0.146867730911603, - -0.214129678407239, 0.292553517579138, 50, 16, 0.0392119195859496, - "Total", 0.761614794746939, 0.129258292494921, 0.303360959123689, - -0.413463984130964, 0.547537698049384, 84, 16, 0.0670368569592103, - "Total", 0.784512328572413, 0.245157995187821, 0.273443486547733, - -0.349501510723353, 0.202893199298426, 16, 50, -0.0733041557124639, - "Total", 0.60293518409837, 0.140919607293552, -0.520184217940395, - -0.1461231379321, 0.119740955951082, 50, 50, -0.0131910909905092, - "Total", 0.845791580454098, 0.0678237192061396, -0.19449082334186, - -0.275830918784333, 0.320188998568007, 84, 50, 0.0221790398918372, - "Total", 0.884025586366787, 0.152048691214142, 0.145868009219499, - -0.6410949755493, 0.355430582245218, 16, 84, -0.142832196652041, - "Total", 0.574222299076952, 0.254220374878055, -0.561844017107422, - -0.366665512205914, 0.217434586621455, 50, 84, -0.0746154627922297, - "Total", 0.616548144936909, 0.149007865306372, -0.50074848491262, - -0.244304522420746, 0.183502108429367, 84, 84, -0.0304012069956896, - "Total", 0.780581209968886, 0.109136350010663, -0.278561698212551, - -0.0204602368277774, 0.0355989836855878, 16, 16, 0.00756937342890517, - "Total indirect", 0.596606595480347, 0.0143010843453128, 0.529286678278074, - -0.0631275108152892, 0.0260139855994758, 50, 16, -0.0185567626079067, - "Total indirect", 0.414489153432761, 0.0227405955206069, -0.816019201919802, - -0.208094805223042, 0.0534832879548465, 84, 16, -0.0773057586340977, - "Total indirect", 0.246668183754547, 0.0667303315880248, -1.15848006138142, - -0.0327770998713117, 0.0670642084016534, 16, 50, 0.0171435542651708, - "Total indirect", 0.500894421245465, 0.0254701895189148, 0.673083105739736, - -0.0257553471872748, 0.0216171597149908, 50, 50, -0.00206909373614201, - "Total indirect", 0.864057789944843, 0.012085045254896, -0.17121108713298, - -0.143621720865794, 0.0370759283592992, 84, 50, -0.0532728962532472, - "Total indirect", 0.247818283805566, 0.0460971861346466, -1.15566481862127, - -0.0540509281351965, 0.110782855652632, 16, 84, 0.0283659637587177, - "Total indirect", 0.499946649674671, 0.0420502073221795, 0.674573695710556, - -0.0243380698833921, 0.0588520396739156, 50, 84, 0.0172569848952618, - "Total indirect", 0.416131372110597, 0.0212223566895873, 0.813151204066269, - -0.0869450461058388, 0.0367396606905392, 84, 84, -0.0251026927076498, - "Total indirect", 0.426277754808023, 0.0315528009116461, -0.795577317460408 + list(-0.200654232529784, 0.172679020783807, 16, 16, -0.0139876058729886, + "Total", 0.88323684617862, 0.0952398248790274, -0.146867194377515, + -0.214129635946556, 0.292553554751076, 50, 16, 0.0392119594022603, + "Total", 0.761614557609239, 0.129258291145726, 0.303361270326966, + -0.413463990582323, 0.547537670857524, 84, 16, 0.0670368401376002, + "Total", 0.784512376774668, 0.24515798989678, 0.273443423833851, + -0.349501466703742, 0.202893242787944, 16, 50, -0.0733041119578993, + "Total", 0.602935400138801, 0.140919607158322, -0.520183907946485, + -0.146123093558783, 0.119740996359528, 50, 50, -0.0131910485996275, + "Total", 0.845792067530275, 0.0678237181946741, -0.194490201226735, + -0.275830911433211, 0.320188984653997, 84, 50, 0.0221790366103933, + "Total", 0.8840255992956, 0.152048685789264, 0.145867992842326, + -0.641094939492998, 0.355430616179149, 16, 84, -0.142832161656924, + "Total", 0.574222392058959, 0.254220374336624, -0.561843880647403, + -0.366665463733017, 0.217434628965905, 50, 84, -0.0746154173835557, + "Total", 0.616548355735378, 0.149007863742964, -0.500748185426415, + -0.244304502801444, 0.183502113989483, 84, 84, -0.0304011944059804, + "Total", 0.780581291482003, 0.10913634642407, -0.278561592009419, + -0.0204602344085486, 0.0355989787480894, 16, 16, 0.00756937216977037, + "Total indirect", 0.596606608371344, 0.0143010824685622, 0.529286659692369, + -0.0631275393161468, 0.026013995135839, 50, 16, -0.0185567720901539, + "Total indirect", 0.414489114098682, 0.0227406052241579, -0.816019270693841, + -0.208094927083211, 0.0534832845334798, 84, 16, -0.0773058212748658, + "Total indirect", 0.24666801483017, 0.0667303618025604, -1.15848047555318, + -0.0327770986297675, 0.0670642012262217, 16, 50, 0.0171435512982271, + "Total indirect", 0.50089445925172, 0.0254701873716876, 0.67308304599611, + -0.0257553602038925, 0.021617170446544, 50, 50, -0.00206909487867426, + "Total indirect", 0.864057783095067, 0.0120850513132142, -0.171211095844653, + -0.143621804673759, 0.0370759254963487, 84, 50, -0.0532729395887052, + "Total indirect", 0.247818110963452, 0.0460972067842645, -1.15566524102042, + -0.0540509264936074, 0.110782844073527, 16, 84, 0.0283659587899599, + "Total indirect", 0.499946690384317, 0.0420502039494915, 0.674573631653049, + -0.0243380769370034, 0.0588520639933144, 50, 84, 0.0172569935281555, + "Total indirect", 0.416131314712595, 0.0212223646930533, 0.81315130419016, + -0.0869451040162767, 0.0367396771876346, 84, 84, -0.0251027134143211, + "Total indirect", 0.426277651520985, 0.0315528198935085, -0.795577495103236 )) @@ -9839,7 +9854,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 67 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -9850,29 +9865,29 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -9881,140 +9896,140 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(958.538618297217, 1031.48338350488, 21, "Model 1", 100, -451.269309148609, + list(958.538618296291, 1031.48338350396, 21, "Model 1", 100, -451.269309148146, 67)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962223000596079, 0.0896221149445498, 0.0399999424692945, - "facExperimexperimental", "", 0.11412803219375, "facGenderm", - 0.0253179001587114, 1.57990758390487, -0.163249897920861, 0.0341990728474459, - -0.0645254125367076, "contcor2", "", 0.200188618001429, - "facGenderm", 0.0503705609709565, -1.28101437214314, -0.170526737904501, - 0.0272981465445079, -0.0716142956799967, "contcor2", "", - 0.155885208219755, "facExperimexperimental", 0.0504664590802246, - -1.41904736304471, 0.180704421485184, 0.319293840352858, 0.249999130919021, - "facGenderm", "", 1.53721479989599e-12, "facGenderm", - 0.0353550932468273, 7.07109239321424, 0.180704853871336, 0.319295348487782, - 0.250000101179559, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553676775774, 7.07106495000787, - 0.721541297034341, 1.27492181806492, 0.998231557549631, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141171094314889, - 7.07107614624724, 0.00474535448916504, 0.00838477474411827, - 0.00656506461664166, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000928440594740648, 7.07106588599301, 0.755490283883771, - 1.33490866286894, 1.04519947337636, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.147813527073852, 7.07106781136577, - 0.0796445994627383, 0.140727355561916, 0.110185977512327, "debCollin1:facExperimexperimental", - "", 1.53721479989599e-12, "debCollin1:facExperimexperimental", - 0.0155826220739235, 7.07108065572071, 0.318532674896232, 0.5628289207431, - 0.440680797819666, "debCollin1:contcor2", "", 1.53743684450092e-12, - "debCollin1:contcor2", 0.0623216160536229, 7.0710746242603 - )) + list(-0.163250689924131, 0.0341992365793702, -0.0645257266723805, "contcor2", + "", 0.200188605409339, "facGenderm", 0.0503708047854351, + -1.2810144079937, -0.00962234562533493, 0.089622349272537, 0.040000001823601, + "facExperimexperimental", "", 0.114128771218875, "facGenderm", + 0.0253179894326379, 1.57990435733559, 0.180704831433383, 0.319295270224914, + 0.250000050829149, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553534362658, 7.0710663741438, 0.75549028388853, + 1.33490866286418, 1.04519947337636, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.147813527071424, 7.07106781148192, + 0.00474535403738027, 0.00838477316831807, 0.00656506360284917, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000928440307996749, 7.07106697792375, -0.170527254111204, + 0.0272978573161833, -0.0716146983975103, "contcor2", "", + 0.155883356559341, "facExperimexperimental", 0.050466516983936, + -1.41905371476906, 0.18070483835871, 0.319295294380446, 0.250000066369578, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553578318072, 7.07106593458565, + 0.721541777053879, 1.27492349234694, 0.998232634700407, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171398979283, + 7.07106851612981, 0.079644732954448, 0.140727821172857, 0.110186277063652, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.0155827067997739, 7.07106143235981, + 0.318532940206801, 0.56282984612405, 0.440681393165425, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217844420183, + 7.07106507156286)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.175783429967622, 1.32274377991243, 16, 0.573480174972406, 0, - "m", "facGender", "contNormal", "", "", "", 0.133578077654009, - 0.38228437402428, 1.50014024621363, -0.362716053006733, 1.00606619818958, + list(-0.175783430314628, 1.32274378025944, 16, 0.573480174972406, 0, + "m", "facGender", "contNormal", "", "", "", 0.133578077833938, + 0.382284374201327, 1.50014024551887, -0.362716052984189, 1.00606619816703, 16, 0.321675072591423, 1, "m", "facGender", "contNormal", "", - "", "", 0.356938046357823, 0.34918556207999, 0.921215272118653, - 0.0235481261364956, 1.18422554838696, 50, 0.603886837261728, - 0, "m", "facGender", "contNormal", "", "", "", 0.041400898483293, - 0.296096619990403, 2.03949250511978, -0.236088085491443, 0.940251555252934, + "", "", 0.356938046341983, 0.349185562068488, 0.921215272148998, + 0.0235481261379562, 1.1842255483855, 50, 0.603886837261728, + 0, "m", "facGender", "contNormal", "", "", "", 0.0414008984827812, + 0.296096619989658, 2.03949250512492, -0.23608808559073, 0.940251555352221, 50, 0.352081734880746, 1, "m", "facGender", "contNormal", "", - "", "", 0.240697421752677, 0.300092157310847, 1.17324537247418, - -0.0534551058212815, 1.33251133106703, 84, 0.639528112622876, - 0, "m", "facGender", "contNormal", "", "", "", 0.0704856636370439, - 0.353569363473166, 1.80877694362626, -0.392737323200112, 1.1681833436839, + "", "", 0.240697421832076, 0.300092157361505, 1.17324537227613, + -0.0534551055119299, 1.33251133075768, 84, 0.639528112622876, + 0, "m", "facGender", "contNormal", "", "", "", 0.0704856635115509, + 0.353569363315331, 1.80877694443371, -0.392737323503981, 1.16818334398777, 84, 0.387723010241893, 1, "m", "facGender", "contNormal", "", - "", "", 0.330212575161192, 0.398201364718014, 0.973685789641779, - -0.0352516329244926, 0.0298167103814208, 16, -0.00271746127153589, + "", "", 0.330212575349481, 0.398201364873052, 0.973685789262678, + -0.0352517702650019, 0.0298168021252179, 16, -0.00271748406989197, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.869960485896639, 0.0165993721872351, -0.163708677706836, - -0.0728976436985679, 0.0865997813174653, 16, 0.0068510688094487, + "", 0.869959858384678, 0.0165994306281831, -0.16370947478633, + -0.0728974065307695, 0.0865994972020162, 16, 0.00685104533562334, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.866286709435109, 0.0406888662940055, 0.168376989418799, - -0.0196782118438645, 0.0180473378147309, 50, -0.000815437014566771, + "", 0.866286730364955, 0.0406887333111417, 0.168376962812635, + -0.0196783523333566, 0.0180474646218765, 50, -0.000815443855740042, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.932476708201224, 0.00962404155284734, -0.0847291660254229, - -0.0633243155084779, 0.0635070764560316, 50, 9.13804737768101e-05, + "", 0.932476620342827, 0.00962410974201809, -0.0847292765355615, + -0.063324098503808, 0.0635068588251675, 50, 9.13801606797818e-05, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.997746569244602, 0.0323555414703891, 0.00282426037779151, - -0.0235097125923341, 0.0263377673098801, 84, 0.001414027358773, + "", 0.997746569243305, 0.0323554305919399, 0.00282426037941666, + -0.0235098538283239, 0.0263379322720585, 84, 0.00141403922186727, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.911460207369007, 0.0127164275199455, 0.111196903104675, - -0.0865963827886001, 0.0709323591706658, 84, -0.00783201180896713, + "", 0.911460009250708, 0.0127165056331584, 0.11119715294901, + -0.086596103488701, 0.0709321335404298, 84, -0.00783198497413558, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.845478339223415, 0.0401866420000144, -0.194890924426189 + "", 0.845478372939667, 0.0401865131889396, -0.194890881358952 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0207107614291905, 1.18515651929588, 0.602933640362535, "facGenderm", - "", 0.0423887125068187, "contNormal", 0.297057947761206, - 2.02968358499269, -3.64059358320996, 3.29137566982379, -0.174608956693084, - "debCollin1", "", 0.921345637683186, "contNormal", - 1.76839199794288, -0.0987388299066054, -3.31785503636652, 3.3868368884024, - 0.0344909260179411, "facExperimexperimental", "", 0.98391153007938, - "contNormal", 1.71041202227558, 0.0201652733778457, -1.08435620507377, - 0.580746000311803, -0.251805102380983, "facGenderm:facExperimexperimental", - "", 0.553320926243299, "contNormal", 0.424778776171319, - -0.592791157436327, -4.80316190464726, 5.11832346782566, 0.157580781589202, - "debCollin1:facExperimexperimental", "", 0.950356292997867, - "contNormal", 2.5310376748584, 0.0622593583471721, -1.83177666385506, - 1.39297612350408, -0.219400270175488, "contcor2", "", - 0.789702138874188, "contNormal", 0.822656133682961, -0.266697422157727, - -1.98257275445761, 2.7783954310656, 0.397911338303996, "debCollin1:contcor2", - "", 0.743199730674601, "contNormal", 1.21455501812205, - 0.327619031140515, -0.387148701002736, 0.450907690915343, 0.0318794949563039, - "facGenderm:contcor2", "", 0.881464259834753, "contNormal", - 0.213793824409163, 0.149113263885922, -0.0404918565446022, 0.0505149646499849, - 0.00501155405269137, "facGenderm", "", 0.829095177352465, - "debCollin1", 0.0232164524227071, 0.215862180898481, -0.0488496088802294, - 0.0421572123144642, -0.0033461982828826, "facExperimexperimental", - "", 0.885397441500155, "debCollin1", 0.0232164524227343, - -0.144130473594919, -0.0871738785955117, 0.0415292022062949, - -0.0228223381946084, "facGenderm:facExperimexperimental", "", - 0.486990636842491, "debCollin1", 0.0328330218863714, -0.695103188295978 + list(0.0207107614184909, 1.18515651930658, 0.602933640362535, "facGenderm", + "", 0.0423887125106126, "contNormal", 0.297057947766665, + 2.02968358495539, -3.64059358293271, 3.29137566954654, -0.174608956693084, + "debCollin1", "", 0.921345637676914, "contNormal", + 1.76839199780142, -0.0987388299145038, -3.31785503628651, 3.3868368883224, + 0.034490926017941, "facExperimexperimental", "", 0.983911530078996, + "contNormal", 1.71041202223476, 0.020165273378327, -1.08435620522094, + 0.580746000458975, -0.251805102380983, "facGenderm:facExperimexperimental", + "", 0.553320926313437, "contNormal", 0.424778776246408, + -0.592791157331538, -4.80316190323879, 5.11832346641719, 0.157580781589202, + "debCollin1:facExperimexperimental", "", 0.95035629298379, + "contNormal", 2.53103767413978, 0.062259358364849, -1.83177666827486, + 1.39297612792388, -0.219400270175489, "contcor2", "", + 0.789702139437112, "contNormal", 0.822656135938001, -0.266697421426664, + -1.98257276049155, 2.77839543709954, 0.397911338303997, "debCollin1:contcor2", + "", 0.743199731302568, "contNormal", 1.21455502120064, + 0.327619030310083, -0.387148701097754, 0.450907691010362, 0.031879494956304, + "facGenderm:contcor2", "", 0.881464259861434, "contNormal", + 0.213793824457643, 0.149113263852109, -0.0404918109869367, 0.050515003181977, + 0.00501159609752012, "facGenderm", "", 0.829093752675286, + "debCollin1", 0.0232164506304105, 0.215864008555881, -0.0488496118814007, + 0.0421572022875725, -0.0033462047969141, "facExperimexperimental", + "", 0.885397211158123, "debCollin1", 0.0232164506304257, + -0.144130765300051, -0.0871738546474527, 0.041529216218801, + -0.0228223192143258, "facGenderm:facExperimexperimental", "", + 0.486990965470685, "debCollin1", 0.032833019351745, -0.695102663870993 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.180104376639895, 1.32162980404163, 16, 0.57076271370087, 0, - "m", "Total", 0.136265422341246, 0.383102493853718, 1.48984337835923, - -0.35569915831231, 1.01275144111405, 16, 0.328526141400872, - 1, "m", "Total", 0.346672356522605, 0.34910095548197, 0.941063426616256, - 0.0228811969274294, 1.18326160356689, 50, 0.603071400247162, - 0, "m", "Total", 0.0416240059222333, 0.296020849309578, 2.03725988103112, - -0.233269567660012, 0.937615798369057, 50, 0.352173115354522, - 1, "m", "Total", 0.238391578912738, 0.29870073513209, 1.17901656719655, - -0.052547206421394, 1.33443148638469, 84, 0.640942139981649, - 0, "m", "Total", 0.0700707239268883, 0.353827596768716, 1.81145322138513, - -0.393013086743393, 1.15279508360925, 84, 0.379890998432926, - 1, "m", "Total", 0.335374814116495, 0.394346065168997, 0.963344209533633, - -0.0352516329244926, 0.0298167103814208, 16, -0.00271746127153589, - 0, "m", "Total indirect", 0.869960485896639, 0.0165993721872351, - -0.163708677706836, -0.0728976436985679, 0.0865997813174653, - 16, 0.0068510688094487, 1, "m", "Total indirect", 0.866286709435109, - 0.0406888662940055, 0.168376989418799, -0.0196782118438645, - 0.0180473378147309, 50, -0.000815437014566771, 0, "m", "Total indirect", - 0.932476708201224, 0.00962404155284734, -0.0847291660254229, - -0.0633243155084779, 0.0635070764560316, 50, 9.13804737768101e-05, - 1, "m", "Total indirect", 0.997746569244602, 0.0323555414703891, - 0.00282426037779151, -0.0235097125923341, 0.0263377673098801, - 84, 0.001414027358773, 0, "m", "Total indirect", 0.911460207369007, - 0.0127164275199455, 0.111196903104675, -0.0865963827886001, - 0.0709323591706658, 84, -0.00783201180896713, 1, "m", "Total indirect", - 0.845478339223415, 0.0401866420000144, -0.194890924426189)) + list(-0.180104412342207, 1.32162979414723, 16, 0.570762690902514, 0, + "m", "Total", 0.136265444725913, 0.38310250043749, 1.48984329324586, + -0.355699167881956, 1.01275140373605, 16, 0.328526117927046, + 1, "m", "Total", 0.346672381179392, 0.349100948387871, 0.941063378498861, + 0.0228811895415592, 1.18326159727042, 50, 0.603071393405988, + 0, "m", "Total", 0.0416240084284971, 0.29602084958749, 2.03725985600804, + -0.233269565600827, 0.937615795683678, 50, 0.352173115041425, + 1, "m", "Total", 0.238391577427769, 0.29870073392172, 1.17901657092587, + -0.0525472002229435, 1.33443150391243, 84, 0.640942151844743, + 0, "m", "Total", 0.0700707210297413, 0.353827599658893, 1.81145324011649, + -0.393013074030499, 1.15279512456602, 84, 0.379891025267758, + 1, "m", "Total", 0.335374788808403, 0.3943460723742, 0.963344259981052, + -0.0352517702650019, 0.0298168021252179, 16, -0.00271748406989197, + 0, "m", "Total indirect", 0.869959858384678, 0.0165994306281831, + -0.16370947478633, -0.0728974065307695, 0.0865994972020162, + 16, 0.00685104533562334, 1, "m", "Total indirect", 0.866286730364955, + 0.0406887333111417, 0.168376962812635, -0.0196783523333566, + 0.0180474646218765, 50, -0.000815443855740042, 0, "m", "Total indirect", + 0.932476620342827, 0.00962410974201809, -0.0847292765355615, + -0.063324098503808, 0.0635068588251675, 50, 9.13801606797818e-05, + 1, "m", "Total indirect", 0.997746569243305, 0.0323554305919399, + 0.00282426037941666, -0.0235098538283239, 0.0263379322720585, + 84, 0.00141403922186727, 0, "m", "Total indirect", 0.911460009250708, + 0.0127165056331584, 0.11119715294901, -0.086596103488701, 0.0709321335404298, + 84, -0.00783198497413558, 1, "m", "Total indirect", 0.845478372939667, + 0.0401865131889396, -0.194890881358952)) @@ -10030,7 +10045,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 68 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -10041,25 +10056,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contcor1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -10068,142 +10083,142 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1200.09286832485, 1267.82729316054, 25, "Model 1", 100, -574.046434162423, + list(1200.09286832768, 1267.82729316337, 25, "Model 1", 100, -574.046434163838, 68)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848482795968, 0.0642082573380479, -0.24032011272896, "contcor1", - "", 0.121931851515828, "contGamma", 0.155374472423518, - -1.54671555101984, -0.403933958349045, 0.194627757176312, -0.104653100586367, - "contcor2", "", 0.49311429262522, "contGamma", 0.152697121030472, - -0.685363940591142, 0.42497866211567, 0.896761927759847, 0.660870294937758, - "contcor2", "", 3.99654560556684e-08, "contcor1", 0.120355085441759, - 5.49100432700503, 1.68041079348489, 2.96919078868689, 2.32480079108589, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776448283677, 7.07106851242577, 0.732634504996405, 1.29452364530571, - 1.01357907515106, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341700342817, 7.07106914964018, 0.721541514800727, - 1.27492257754415, 0.998232046172439, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171232509481, 7.07107268547364, - 0.00458999058012934, 0.00811025407424042, 0.00635012232718488, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000898042903308039, 7.07106787859857, 0.761632488078488, 1.34576159074826, - 1.05369703941337, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.14901526438172, 7.07106781164514, 0.323891856098897, - 0.572298719942678, 0.448095288020787, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702623627737, - 7.07106569096385)) + list(-0.403930893908929, 0.194629820425003, -0.104650536741963, "contcor2", + "", 0.493124162052743, "contGamma", 0.152696865619803, + -0.685348296555937, -0.544849326618935, 0.0642066842911422, + -0.240321321163896, "contcor1", "", 0.121929528505842, + "contGamma", 0.155374286393585, -1.54672518047889, 1.68041152895342, + 2.96919335396291, 2.32480244145817, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776915079878, 7.07106349268272, + 0.761632488120933, 1.34576159070581, 1.05369703941337, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.149015264360064, + 7.07106781267278, 0.00458997995350912, 0.00811021700936403, + 0.00635009848143658, "debCollin1", "", 1.53721479989599e-12, + "debCollin1", 0.000898036158731001, 7.07109443166496, 0.424977872943086, + 0.896758882382176, 0.660868377662631, "contcor2", "", + 3.99631185921123e-08, "contcor1", 0.120354509868661, 5.49101465648289, + 0.732633518822218, 1.29452020589162, 1.01357686235692, "contcor1", + "", 1.53721479989599e-12, "contcor1", 0.143341074504811, + 7.07108458519963, 0.721540554204999, 1.27491922718905, 0.998229890697026, + "contcor2", "", 1.53721479989599e-12, "contcor2", 0.141170622865786, + 7.0710879532356, 0.3238922325538, 0.572300032960136, 0.448096132756968, + "debCollin1:contcor1", "", 1.53765888910584e-12, "debCollin1:contcor1", + 0.063370501286183, 7.0710523613085)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.154211938723693, 0.117652637919318, "", "", -0.0182796504021878, - "contGamma", "contNormal", "", "", "", 0.792112506901854, - 0.0693544827321941, -0.263568405127798, -0.0258571269761159, - 0.0572297247254793, 16, 16, 0.0156862988746817, "contGamma", - "debCollin1", "contNormal", "", "", 0.459264273264167, - 0.0211960149158285, 0.740058871300739, -0.0190157271601051, - 0.0213531073835556, 50, 16, 0.00116869011172527, "contGamma", - "debCollin1", "contNormal", "", "", 0.909647549600649, - 0.0102983613122703, 0.11348311408853, -0.0957997958678833, 0.0644866150865313, - 84, 16, -0.015656590390676, "contGamma", "debCollin1", "contNormal", - "", "", 0.70179835318219, 0.0408901419155488, - -0.382894009588225, -0.0473587614025879, 0.0504004702871598, - 16, 50, 0.00152085444228595, "contGamma", "debCollin1", "contNormal", - "", "", 0.951372840441777, 0.0249390377733622, - 0.0609828837867355, -0.0135249104203352, 0.0151862549340702, - 50, 50, 0.000830672256867517, "contGamma", "debCollin1", "contNormal", - "", "", 0.909704348167413, 0.00732441146390328, - 0.11341146806966, -0.0823003405183491, 0.0402875765052841, 84, - 50, -0.0210063820065325, "contGamma", "debCollin1", "contNormal", - "", "", 0.501768465788776, 0.0312730024609103, - -0.671709792904902, -0.119454009490891, 0.0892875680810227, - 16, 84, -0.015083220704934, "contGamma", "debCollin1", "contNormal", - "", "", 0.776988555658382, 0.0532513809484359, - -0.283245625489775, -0.00813481790160179, 0.00900374479795171, - 50, 84, 0.000434463448174957, "contGamma", "debCollin1", "contNormal", - "", "", 0.920844202735654, 0.00437216266082956, - 0.0993703761452744, -0.0894053536290372, 0.0348510357754866, - 84, 84, -0.0272771589267753, "contGamma", "debCollin1", "contNormal", - "", "", 0.389505168623458, 0.031698640991529, - -0.860515090664761)) + list(-0.154211934394355, 0.117652642231539, "", "", -0.0182796460814081, + "contGamma", "contNormal", "", "", "", 0.792112554900292, + 0.0693544827278274, -0.263568342844458, -0.025857070437962, + 0.0572292241238631, 16, 16, 0.0156860768429506, "contGamma", + "debCollin1", "contNormal", "", "", 0.459267618130614, + 0.0211958727857244, 0.740053358572488, -0.019015646554135, 0.0213530167321635, + 50, 16, 0.00116868508901423, "contGamma", "debCollin1", "contNormal", + "", "", 0.909647554585713, 0.0102983176233649, + 0.113483107800318, -0.0957998274495264, 0.0644864635904446, + 84, 16, -0.0156566819295409, "contGamma", "debCollin1", "contNormal", + "", "", 0.701796480843488, 0.0408901113245674, + -0.382896534696743, -0.0473587605861386, 0.0504002709307088, + 16, 50, 0.00152075517228511, "contGamma", "debCollin1", "contNormal", + "", "", 0.951375911086804, 0.0249389867079085, + 0.0609790281416228, -0.013524876271118, 0.0151862165550632, + 50, 50, 0.000830670141972634, "contGamma", "debCollin1", "contNormal", + "", "", 0.909704349953996, 0.00732439296146528, + 0.113411465816063, -0.0823003801723709, 0.0402875270759142, + 84, 50, -0.0210064265482283, "contGamma", "debCollin1", "contNormal", + "", "", 0.501767524778395, 0.0312729999671532, + -0.671711270754066, -0.119453762432282, 0.0892874102735937, + 16, 84, -0.0150831760793441, "contGamma", "debCollin1", "contNormal", + "", "", 0.776988776909861, 0.0532512776643855, + -0.283245336842533, -0.00813483177631136, 0.00900376125968522, + 50, 84, 0.000434464741686932, "contGamma", "debCollin1", "contNormal", + "", "", 0.920844107493546, 0.00437217039986031, + 0.0993704961043634, -0.0894052946637769, 0.0348509979026263, + 84, 84, -0.0272771483805753, "contGamma", "debCollin1", "contNormal", + "", "", 0.389504982424927, 0.0316986162874729, + -0.860515428597906)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.154211938723693, 0.117652637919318, -0.0182796504021878, "contGamma", - "", 0.792112506901854, "contNormal", 0.0693544827321941, - -0.263568405127798, -2.65749892927781, 2.35038162561149, -0.15355865183316, - "debCollin1", "", 0.904326044658035, "contNormal", - 1.27754402488791, -0.120198324943543, -2.74314933702959, 0.527114556216718, - -1.10801739040644, "contcor1", "", 0.184133874080206, - "contNormal", 0.834266323014539, -1.32813390621202, -0.533830956029838, - 4.39043815539885, 1.92830359968451, "debCollin1:contcor1", "", - 0.124780928517115, "contNormal", 1.25621418308466, 1.53501180423669, - -0.0201068463006269, 0.00866070886085138, -0.00572306871988779, - "contGamma", "", 0.435486553986378, "debCollin1", 0.00733879688310427, - -0.779837459878977, -0.0350283318345827, 0.0413280241474201, - 0.00314984615641869, "contcor1", "", 0.871538522731676, - "debCollin1", 0.0194790201718736, 0.161704548207556, -0.0236340767818238, - 0.0138396852342704, -0.00489719577377671, "contGamma:contcor1", - "", 0.60846260694715, "debCollin1", 0.00955980883110161, - -0.512269215870124, -0.0390764150684217, 0.0457717587588887, - 0.00334767184523347, "contcor2", "", 0.877089236382284, - "debCollin1", 0.021645340041088, 0.154660164214505, -0.0167951890193591, - 0.0216687161642554, 0.00243676357244816, "contGamma:contcor2", - "", 0.803875144698653, "debCollin1", 0.00981240101527705, - 0.248335098479397, -0.0169077167025326, 0.00681511271236975, - -0.00504630199508141, "contGamma:contcor1:contcor2", "", - 0.404368864883156, "debCollin1", 0.00605185340190559, -0.833844057341582, - -0.0164773419312257, 0.0426898295486803, 0.0131062438087273, - "contcor1:contcor2", "", 0.38522386292146, "debCollin1", - 0.0150939435486083, 0.868311436737534)) + list(-0.154211934394355, 0.117652642231539, -0.0182796460814081, "contGamma", + "", 0.792112554900292, "contNormal", 0.0693544827278274, + -0.263568342844458, -2.65749892565866, 2.35038162389972, -0.153558650879467, + "debCollin1", "", 0.904326045148016, "contNormal", + 1.27754402352796, -0.120198324324991, -2.74314935938314, 0.527114578317138, + -1.108017390533, "contcor1", "", 0.184133879993238, + "contNormal", 0.834266334355046, -1.32813388830989, -0.53383098998373, + 4.39043818883379, 1.92830359942503, "debCollin1:contcor1", "", + 0.124780933727764, "contNormal", 1.25621420027601, 1.53501178302343, + -0.0201068041427751, 0.0086606970052605, -0.00572305356875729, + "contGamma", "", 0.435486907384173, "debCollin1", 0.0073387831039116, + -0.779836859561483, -0.0350281397330273, 0.0413280728848406, + 0.00314996657590667, "contcor1", "", 0.871533415163869, + "debCollin1", 0.0194789835987181, 0.161711033840285, -0.0236340784608321, + 0.0138396131955758, -0.00489723263262815, "contGamma:contcor1", + "", 0.608459235845615, "debCollin1", 0.00955979088187224, + -0.512274033306997, -0.0390763564173992, 0.0457716581017179, + 0.00334765084215934, "contcor2", "", 0.877089772449415, + "debCollin1", 0.021645299400496, 0.154659484270411, -0.0167951738584621, + 0.0216686591064569, 0.00243674262399739, "contGamma:contcor2", + "", 0.803876435647906, "debCollin1", 0.0098123825918019, + 0.248333429847431, -0.0169076505292002, 0.0068151343441327, + -0.00504625809253376, "contGamma:contcor1:contcor2", "", + 0.40437207100424, "debCollin1", 0.00605184203905154, -0.833838368544831, + -0.0164773927213768, 0.0426896676672479, 0.0131061374729356, + "contcor1:contcor2", "", 0.385226826300787, "debCollin1", + 0.015093915208475, 0.868306022123185)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.142891922331902, 0.13770521927689, 16, 16, -0.00259335152750616, - "Total", 0.971099770057003, 0.0715822188116991, -0.0362289905308484, - -0.151092574983456, 0.116870654402531, 50, 16, -0.0171109602904626, - "Total", 0.802348039610881, 0.0683592227968595, -0.250309462138131, - -0.187195699482598, 0.119323217896871, 84, 16, -0.0339362407928638, - "Total", 0.664292209554505, 0.0781950382244907, -0.433994810456337, - -0.16103773216229, 0.127520140242487, 16, 50, -0.0167587959599019, - "Total", 0.819910065288812, 0.0736130548012323, -0.227660650752145, - -0.151687058599366, 0.116789102308726, 50, 50, -0.0174489781453203, - "Total", 0.798903434622111, 0.0684900750793887, -0.254766520917005, - -0.181904344951175, 0.103332280133734, 84, 50, -0.0392860324087203, - "Total", 0.58926802083061, 0.0727657822630463, -0.539897066820534, - -0.206194061195661, 0.139468318981417, 16, 84, -0.0333628711071218, - "Total", 0.705173421344888, 0.0881807989594756, -0.378346210295215, - -0.152766759699305, 0.117076385791279, 50, 84, -0.0178451869540129, - "Total", 0.795456616426251, 0.0688388020440867, -0.259231515135667, - -0.186544002375317, 0.0954303837173904, 84, 84, -0.0455568093289631, - "Total", 0.52652610108744, 0.0719335631462836, -0.633317846862655, - -0.0258571269761159, 0.0572297247254793, 16, 16, 0.0156862988746817, - "Total indirect", 0.459264273264167, 0.0211960149158285, 0.740058871300739, - -0.0190157271601051, 0.0213531073835556, 50, 16, 0.00116869011172527, - "Total indirect", 0.909647549600649, 0.0102983613122703, 0.11348311408853, - -0.0957997958678833, 0.0644866150865313, 84, 16, -0.015656590390676, - "Total indirect", 0.70179835318219, 0.0408901419155488, -0.382894009588225, - -0.0473587614025879, 0.0504004702871598, 16, 50, 0.00152085444228595, - "Total indirect", 0.951372840441777, 0.0249390377733622, 0.0609828837867355, - -0.0135249104203352, 0.0151862549340702, 50, 50, 0.000830672256867517, - "Total indirect", 0.909704348167413, 0.00732441146390328, 0.11341146806966, - -0.0823003405183491, 0.0402875765052841, 84, 50, -0.0210063820065325, - "Total indirect", 0.501768465788776, 0.0312730024609103, -0.671709792904902, - -0.119454009490891, 0.0892875680810227, 16, 84, -0.015083220704934, - "Total indirect", 0.776988555658382, 0.0532513809484359, -0.283245625489775, - -0.00813481790160179, 0.00900374479795171, 50, 84, 0.000434463448174957, - "Total indirect", 0.920844202735654, 0.00437216266082956, 0.0993703761452744, - -0.0894053536290372, 0.0348510357754866, 84, 84, -0.0272771589267753, - "Total indirect", 0.389505168623458, 0.031698640991529, -0.860515090664761 + list(-0.142892083827504, 0.137704945350589, 16, 16, -0.0025935692384575, + "Total", 0.9710973333785, 0.0715821901298713, -0.0362320464594894, + -0.151092577774384, 0.116870655789596, 50, 16, -0.0171109609923938, + "Total", 0.802348034688564, 0.0683592238626934, -0.250309468503665, + -0.187195728424536, 0.119323072402639, 84, 16, -0.033936328010949, + "Total", 0.664291279751032, 0.0781950084912162, -0.433996090872745, + -0.161037804599666, 0.12752002278142, 16, 50, -0.016758890909123, + "Total", 0.81990903485371, 0.0736130433153857, -0.227661976116401, + -0.15168705881502, 0.116789106936149, 50, 50, -0.0174489759394354, + "Total", 0.798903463049088, 0.0684900763148901, -0.254766484113874, + -0.181904369005778, 0.103332223746506, 84, 50, -0.0392860726296364, + "Total", 0.589267597409048, 0.0727657740147762, -0.539897680764843, + -0.206193885669542, 0.139468241348038, 16, 84, -0.0333628221607522, + "Total", 0.705173627814916, 0.088180734376784, -0.378345932323465, + -0.152766751215915, 0.117076388536472, 50, 84, -0.0178451813397211, + "Total", 0.795456675096185, 0.068838800580234, -0.259231439091126, + -0.186543969570261, 0.0954303806462948, 84, 84, -0.0455567944619834, + "Total", 0.526526183416539, 0.0719335539940361, -0.633317720764365, + -0.025857070437962, 0.0572292241238631, 16, 16, 0.0156860768429506, + "Total indirect", 0.459267618130614, 0.0211958727857244, 0.740053358572488, + -0.019015646554135, 0.0213530167321635, 50, 16, 0.00116868508901423, + "Total indirect", 0.909647554585713, 0.0102983176233649, 0.113483107800318, + -0.0957998274495264, 0.0644864635904446, 84, 16, -0.0156566819295409, + "Total indirect", 0.701796480843488, 0.0408901113245674, -0.382896534696743, + -0.0473587605861386, 0.0504002709307088, 16, 50, 0.00152075517228511, + "Total indirect", 0.951375911086804, 0.0249389867079085, 0.0609790281416228, + -0.013524876271118, 0.0151862165550632, 50, 50, 0.000830670141972634, + "Total indirect", 0.909704349953996, 0.00732439296146528, 0.113411465816063, + -0.0823003801723709, 0.0402875270759142, 84, 50, -0.0210064265482283, + "Total indirect", 0.501767524778395, 0.0312729999671532, -0.671711270754066, + -0.119453762432282, 0.0892874102735937, 16, 84, -0.0150831760793441, + "Total indirect", 0.776988776909861, 0.0532512776643855, -0.283245336842533, + -0.00813483177631136, 0.00900376125968522, 50, 84, 0.000434464741686932, + "Total indirect", 0.920844107493546, 0.00437217039986031, 0.0993704961043634, + -0.0894052946637769, 0.0348509979026263, 84, 84, -0.0272771483805753, + "Total indirect", 0.389504982424927, 0.0316986162874729, -0.860515428597906 )) @@ -10220,7 +10235,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 68 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -10231,25 +10246,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facExperim", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facExperim", 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) @@ -10258,125 +10273,126 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(752.53503558087, 820.26946041656, 25, "Model 1", 100, -350.267517790435, + list(752.535035580726, 820.269460416416, 25, "Model 1", 100, -350.267517790363, 68)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0096223970985606, 0.0896220718012303, 0.0399998373513349, "facExperimexperimental", - "", 0.114129435114244, "facGenderm", 0.0253179317790068, - 1.57990145879538, -0.16325073509418, 0.0341990626275366, -0.0645258362333219, - "contcor2", "", 0.200187547973363, "facGenderm", 0.0503707719323354, - -1.28101741859349, -0.17052690928872, 0.0272979842149529, -0.0716144625368835, - "contcor2", "", 0.155884263298953, "facExperimexperimental", - 0.0504664613901302, -1.41905060438593, 0.180704728054578, 0.319294909646114, - 0.249999818850346, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353552878228166, 7.0710729354891, 0.180704704997037, - 0.319294829222785, 0.249999767109911, "facExperimexperimental", - "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353552731884182, 7.07107439893315, 0.721541869659803, 1.2749238153477, - 0.998232842503749, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.141171457754555, 7.07106704415637, 0.00469471933468724, - 0.00829530170152767, 0.00649501051810746, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000918532788163806, 7.0710709533748, - 0.762423372129804, 1.34715903822207, 1.05479120517594, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.149170002792038, - 7.07106781144499, 0.0796446038278892, 0.140727370787283, 0.110185987307586, - "debCollin1:facExperimexperimental", "", 1.53721479989599e-12, - "debCollin1:facExperimexperimental", 0.0155826248444377, 7.07108002711864 + list(-0.163250776838996, 0.0341991548235051, -0.0645258110077455, "contcor2", + "", 0.200188029091072, "facGenderm", 0.0503708061015307, + -1.28101604881373, -0.00962228648161226, 0.0896224256325922, + 0.04000006957549, "facExperimexperimental", "", 0.114128221063651, + "facGenderm", 0.0253179938246402, 1.579906759301, 0.180704841204894, + 0.319295304307653, 0.250000072756273, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553596382236, 7.07106575394558, + 0.762423372129675, 1.3471590382222, 1.05479120517594, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.149170002792103, + 7.07106781144188, 0.00469472147740197, 0.00829530917519297, + 0.00649501532629747, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000918534148125164, 7.07106571873736, -0.170527258631608, + 0.0272978346790792, -0.0716147119762643, "contcor2", "", + 0.155883240237022, "facExperimexperimental", 0.050466512362244, + -1.41905411378976, 0.180704838746744, 0.319295295733666, 0.250000067240205, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553580780325, 7.07106590996566, + 0.721541730462174, 1.27492332983546, 0.998232530148819, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.14117136940737, + 7.07106925674338, 0.0796447429324952, 0.140727855975779, 0.110186299454137, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.0155827131327666, 7.07105999547937 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0581216477992607, 0.876434140289695, "", 0.467277894044478, - "", "m", "facGender", "contNormal", "", "", "", 0.0251961761161286, - 0.208757022819087, 2.23838167326917, -0.0108831762516817, 0.0104431001662529, - 16, -0.00022003804271438, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.967738652775068, 0.00544047660726258, - -0.0404446261970226, -0.0248218258367533, 0.027211992737034, - 16, 0.00119508345014035, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.928262819854489, 0.0132741772257611, - 0.0900306986877546, -0.017221137210671, 0.0161430852765094, - 50, -0.000539025967080797, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.949504043286334, 0.00851143764639378, - -0.0633296029971126, -0.0529253954032223, 0.0477190440472555, - 50, -0.00260317567798344, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.919241494080271, 0.0256750736861362, - -0.101389219357492, -0.028625571608521, 0.0267997140559034, - 84, -0.000912928776308784, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.948519182046454, 0.0141393632999412, - -0.0645664699988703, -0.142080163718872, 0.127969526967136, - 84, -0.00705531837586812, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.918429627066259, 0.0688914931131708, - -0.102412040399212)) + list(0.0581216477951239, 0.876434140293832, "", 0.467277894044478, + "", "m", "facGender", "contNormal", "", "", "", 0.0251961761176032, + 0.208757022821198, 2.23838167324653, -0.0108830700077634, 0.0104430056067634, + 16, -0.000220032200499995, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.967739205282087, 0.00544042538096212, + -0.0404439331655869, -0.0248216221636001, 0.0272117627419063, + 16, 0.00119507028915313, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.928263011468009, 0.0132740665940648, + 0.0900304575605703, -0.0172212330135748, 0.0161431744248462, + 50, -0.000539029294364273, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.949504011548334, 0.0085114848286997, + -0.063329642854644, -0.0529252951411633, 0.0477189540015955, + 50, -0.00260317056978389, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.919241499827016, 0.0256750251373566, + -0.101389212117901, -0.0286259823251388, 0.0268000966218365, + 84, -0.000912942851651191, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.948519125232718, 0.0141395656716575, + -0.0645665413529049, -0.142079635576496, 0.127969051869741, + 84, -0.0070552918533775, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.918429630659127, 0.0688912371799549, + -0.102412035872544)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0581216477992607, 0.876434140289695, 0.467277894044478, "facGenderm", - "", 0.0251961761161286, "contNormal", 0.208757022819087, - 2.23838167326917, -3.59074802716471, 3.35309576258064, -0.118826132292034, - "debCollin1", "", 0.946518378227823, "contNormal", - 1.77142127215538, -0.067079544634491, -3.51918446930648, 3.11340998929372, - -0.202887240006382, "facExperimexperimental", "", 0.904555760738931, - "contNormal", 1.69201947355086, -0.119908336267906, -4.66097026920301, - 5.2710150515589, 0.305022391177944, "debCollin1:facExperimexperimental", - "", 0.904177874204812, "contNormal", 2.53371628231543, - 0.120385377521117, -0.0421496397485408, 0.0510538467707356, - 0.00445210351109742, "facGenderm", "", 0.851468222142902, - "debCollin1", 0.0237768365272152, 0.187245410296761, -0.0546134295879841, - 0.0380354929111766, -0.00828896833840378, "facExperimexperimental", - "", 0.725811954064977, "debCollin1", 0.0236353635143206, - -0.350701961210858, -0.0838945431794776, 0.048307665299887, - -0.0177934389397953, "facGenderm:facExperimexperimental", "", - 0.597781646746415, "debCollin1", 0.0337256729006652, -0.527593296424467, - -0.0277180995601138, 0.0230158856571864, -0.00235110695146368, - "contcor2", "", 0.855852124674552, "debCollin1", 0.0129425809906415, - -0.181656730845549, -0.0452630213834966, 0.0508920694727362, - 0.00281452404461981, "facGenderm:contcor2", "", 0.908652061914805, - "debCollin1", 0.0245298106533314, 0.114738922545967, -0.0944433174671474, - 0.0460396339161726, -0.0242018417754874, "facGenderm:facExperimexperimental:contcor2", - "", 0.499479127695785, "debCollin1", 0.0358381461321309, - -0.675309534322956, -0.0244181967826761, 0.0716992084847947, - 0.0236405058510593, "facExperimexperimental:contcor2", "", - 0.334983850906066, "debCollin1", 0.0245201968060721, 0.964123821600202 + list(0.0581216477951239, 0.876434140293832, 0.467277894044478, "facGenderm", + "", 0.0251961761176032, "contNormal", 0.208757022821198, + 2.23838167324653, -3.59074803217045, 3.35309576758638, -0.118826132292034, + "debCollin1", "", 0.946518378304816, "contNormal", + 1.77142127470938, -0.0670795445377772, -3.51918447833517, 3.1134099983224, + -0.202887240006382, "facExperimexperimental", "", 0.904555760997536, + "contNormal", 1.69201947815741, -0.119908335941453, -4.66097028284053, + 5.27101506519642, 0.305022391177945, "debCollin1:facExperimexperimental", + "", 0.904177874466689, "contNormal", 2.53371628927347, + 0.120385377190517, -0.0421496314157973, 0.0510538896024175, + 0.0044521290933101, "facGenderm", "", 0.851467432932439, + "debCollin1", 0.0237768453281265, 0.187246416918207, -0.0546134672720877, + 0.0380354895216778, -0.00828898887520494, "facExperimexperimental", + "", 0.725811399531271, "debCollin1", 0.023635372263105, + -0.350702700297389, -0.0838945688704738, 0.0483076885437823, + -0.0177934401633458, "facGenderm:facExperimexperimental", "", + 0.597781757134137, "debCollin1", 0.0337256853842853, -0.527593137414391, + -0.0277181290242185, 0.0230158749718942, -0.00235112702616214, + "contcor2", "", 0.855850960132368, "debCollin1", 0.0129425857812429, + -0.181658214664454, -0.0452629582742732, 0.0508921681738526, + 0.00281460494978969, "facGenderm:contcor2", "", 0.908649481232673, + "debCollin1", 0.0245298197330627, 0.114742178312709, -0.0944433215019117, + 0.0460396818816429, -0.0242018198101344, "facGenderm:facExperimexperimental:contcor2", + "", 0.499479675793652, "debCollin1", 0.0358381593977406, + -0.675308671450917, -0.0244182598549398, 0.0716991809896056, + 0.0236404605673329, "facExperimexperimental:contcor2", "", + 0.334984955590319, "debCollin1", 0.0245202058820232, 0.964121617945496 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0579001859917599, 0.876215526011767, 16, 0.467057856001763, - 0, "m", "Total", 0.0252654428384138, 0.208757749243041, 2.23731984894129, - 0.056741404104764, 0.880204550884472, 16, 0.468472977494618, - 1, "m", "Total", 0.025742806771504, 0.210070989384264, 2.23006983909464, - 0.0575794317186985, 0.875898304436096, 50, 0.466738868077397, - 0, "m", "Total", 0.025366043578402, 0.208758650457915, 2.23578216784598, - 0.0562501221439309, 0.873099314589058, 50, 0.464674718366494, - 1, "m", "Total", 0.0257541302971214, 0.20838372513177, 2.22989927871123, - 0.056840959560106, 0.875888970976232, 84, 0.466364965268169, - 0, "m", "Total", 0.0256148088341648, 0.208944658645943, 2.23200233157635, - 0.0393235293813693, 0.88112162195585, 84, 0.46022257566861, - 1, "m", "Total", 0.0321068000388056, 0.214748357422503, 2.14307844396292, - -0.0108831762516817, 0.0104431001662529, 16, -0.00022003804271438, - 0, "m", "Total indirect", 0.967738652775068, 0.00544047660726258, - -0.0404446261970226, -0.0248218258367533, 0.027211992737034, - 16, 0.00119508345014035, 1, "m", "Total indirect", 0.928262819854489, - 0.0132741772257611, 0.0900306986877546, -0.017221137210671, - 0.0161430852765094, 50, -0.000539025967080797, 0, "m", "Total indirect", - 0.949504043286334, 0.00851143764639378, -0.0633296029971126, - -0.0529253954032223, 0.0477190440472555, 50, -0.00260317567798344, - 1, "m", "Total indirect", 0.919241494080271, 0.0256750736861362, - -0.101389219357492, -0.028625571608521, 0.0267997140559034, - 84, -0.000912928776308784, 0, "m", "Total indirect", 0.948519182046454, - 0.0141393632999412, -0.0645664699988703, -0.142080163718872, - 0.127969526967136, 84, -0.00705531837586812, 1, "m", "Total indirect", - 0.918429627066259, 0.0688914931131708, -0.102412040399212)) + list(0.0579001907967088, 0.876215532891247, 16, 0.467057861843978, + 0, "m", "Total", 0.0252654413810767, 0.208757749772268, 2.23731987125502, + 0.0567414238543051, 0.880204504812957, 16, 0.468472964333631, + 1, "m", "Total", 0.0257427990980159, 0.21007097259287, 2.2300699546984, + 0.0575794266997176, 0.87589830280051, 50, 0.466738864750114, + 0, "m", "Total", 0.0253660452287623, 0.208758651321041, 2.23578214266356, + 0.0562501314683685, 0.87309931548102, 50, 0.464674723474694, + 1, "m", "Total", 0.0257541271407951, 0.208383722980589, 2.2298993262443, + 0.0568409274339718, 0.875888974951682, 84, 0.466364951192827, + 0, "m", "Total", 0.0256148197885768, 0.2089446678557, 2.23200216583132, + 0.0393236789736383, 0.881121525408563, 84, 0.4602226021911, + 1, "m", "Total", 0.0321067398148998, 0.214748294630646, 2.14307919409863, + -0.0108830700077634, 0.0104430056067634, 16, -0.000220032200499995, + 0, "m", "Total indirect", 0.967739205282087, 0.00544042538096212, + -0.0404439331655869, -0.0248216221636001, 0.0272117627419063, + 16, 0.00119507028915313, 1, "m", "Total indirect", 0.928263011468009, + 0.0132740665940648, 0.0900304575605703, -0.0172212330135748, + 0.0161431744248462, 50, -0.000539029294364273, 0, "m", "Total indirect", + 0.949504011548334, 0.0085114848286997, -0.063329642854644, -0.0529252951411633, + 0.0477189540015955, 50, -0.00260317056978389, 1, "m", "Total indirect", + 0.919241499827016, 0.0256750251373566, -0.101389212117901, -0.0286259823251388, + 0.0268000966218365, 84, -0.000912942851651191, 0, "m", "Total indirect", + 0.948519125232718, 0.0141395656716575, -0.0645665413529049, + -0.142079635576496, 0.127969051869741, 84, -0.0070552918533775, + 1, "m", "Total indirect", 0.918429630659127, 0.0688912371799549, + -0.102412035872544)) @@ -10392,7 +10408,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 70 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -10403,25 +10419,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contcor1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -10430,143 +10446,144 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1400.36736475644, 1473.31212996411, 28, "Model 1", 100, -672.183682378222, + list(1400.36736475695, 1473.31212996461, 28, "Model 1", 100, -672.183682378474, 70)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848260109688, 0.0642086140082783, -0.240319823050705, "contcor1", - "", 0.121932383368602, "contGamma", 0.155374506603726, - -1.54671334637688, -0.403934344689484, 0.194627839106091, -0.104653252791697, - "contcor2", "", 0.493114002045191, "contGamma", 0.152697240489355, - -0.685364401192255, 0.424979185275309, 0.896763106618909, 0.660871145947109, - "contcor2", "", 3.99655830651824e-08, "contcor1", 0.120355252715094, - 5.49100376625465, 1.68041088602806, 2.96919111137594, 2.324800998702, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776506995438, 7.07106788118, 0.732634593158383, 1.29452395284186, - 1.01357927300012, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341756306644, 7.07106776919785, 0.721541818721513, - 1.27492363738885, 0.998232728055183, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171425350758, 7.07106785650815, - 0.004654685648041, 0.00822456649359765, 0.00643962607081933, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000910700623510282, 7.07106803770254, 0.71035804564889, 1.25516254473643, - 0.982760295192661, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.138983293413779, 7.07106783163354, 0.323891773626033, - 0.572298432289438, 0.448095102957736, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702100198792, - 7.07106861121604, 0.318532875035861, 0.562829618778375, 0.440681246907118, - "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", - 0.0623217430701521, 7.0710674188151)) + list(-0.403934354097879, 0.194628409941284, -0.104652972078297, "contcor2", + "", 0.493115580961215, "contGamma", 0.152697388513399, + -0.685361898439503, -0.544848532080003, 0.0642088867965027, + -0.24031982264175, "contcor1", "", 0.121932717744909, + "contGamma", 0.155374645575294, -1.54671196031975, 1.68041137383882, + 2.96919281307876, 2.32480209345879, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.32877681666747, 7.07106455078955, + 0.710358046922228, 1.25516254894684, 0.982760297934532, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.138983294163045, + 7.07106781324114, 0.00465468611192818, 0.00822456811161037, + 0.00643962711176928, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000910700917935474, 7.07106689468116, 0.424979435404289, + 0.896763903257281, 0.660871669330785, "contcor2", "", + 3.99660384786671e-08, "contcor1", 0.120355392133317, 5.4910017541943, + 0.732634794179232, 1.29452465443774, 1.01357972430849, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341884006702, + 7.07106461821792, 0.721542053422758, 1.27492445719294, 0.998233255307847, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171574614429, + 7.07106411495548, 0.32389132515339, 0.572296867954556, 0.448094096553973, + "debCollin1:contcor1", "", 1.53721479989599e-12, "debCollin1:contcor1", + 0.063369925355914, 7.07108449374487, 0.318533155531229, 0.562830597035477, + 0.440681876283353, "debCollin1:contcor2", "", 1.53765888910584e-12, + "debCollin1:contcor2", 0.0623219210738655, 7.0710573212441 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.149831937697961, 0.120438968753159, "", "", -0.0146964844724011, - "contGamma", "contNormal", "", "", "", 0.83120732043392, - 0.0689479267432929, -0.213153392227718, -0.019642284952121, - 0.0229725600648764, 16, 16, 0.00166513755637771, "contGamma", - "debCollin1", "contNormal", "", "", 0.878266001307125, - 0.0108713336962153, 0.153167734788364, -0.0403761531103848, - 0.0415867899768524, 50, 16, 0.000605318433233805, "contGamma", - "debCollin1", "contNormal", "", "", 0.976904687464378, - 0.020909298266129, 0.0289497249276109, -0.112528609093363, 0.107095747731377, - 84, 16, -0.00271643068099307, "contGamma", "debCollin1", "contNormal", - "", "", 0.961330714134549, 0.0560276511602021, - -0.0484837508755431, -0.0375580018593202, 0.078713622427919, - 16, 50, 0.0205778102842994, "contGamma", "debCollin1", "contNormal", - "", "", 0.487838492769507, 0.0296616736849184, - 0.69375081470073, -0.0177817206913118, 0.0451839469999532, 50, - 50, 0.0137011131543207, "contGamma", "debCollin1", "contNormal", - "", "", 0.393679894706849, 0.0160629654901647, - 0.852962870567696, -0.0853116350827885, 0.05609830698335, 84, - 50, -0.0146066640497193, "contGamma", "debCollin1", "contNormal", - "", "", 0.685550054615717, 0.0360746276925398, - -0.404901311087957, -0.0767281326832792, 0.162220863987496, - 16, 84, 0.0427463656521086, "contGamma", "debCollin1", "contNormal", - "", "", 0.483147819744687, 0.060957496810037, - 0.701248704245843, -0.0226262576716071, 0.0807290469875354, - 50, 84, 0.0290513946579642, "contGamma", "debCollin1", "contNormal", - "", "", 0.270538113297266, 0.0263666336408209, - 1.10182418634538, -0.0890017924408171, 0.0319141072303785, 84, - 84, -0.0285438426052193, "contGamma", "debCollin1", "contNormal", - "", "", 0.354782677439143, 0.0308464595841977, - -0.925352309146104)) + list(-0.149831890085612, 0.120439016637523, "", "", -0.0146964367240443, + "contGamma", "contNormal", "", "", "", 0.831207860747492, + 0.0689479268126856, -0.213152699485379, -0.0196423044763438, + 0.0229725798194862, 16, 16, 0.00166513767157124, "contGamma", + "debCollin1", "contNormal", "", "", 0.878266104280778, + 0.0108713437165098, 0.15316760420724, -0.0403761925839803, 0.0415868288143021, + 50, 16, 0.000605318115160915, "contGamma", "debCollin1", "contNormal", + "", "", 0.976904721656831, 0.0209093182438035, + 0.0289496820557648, -0.112528711794977, 0.10709584841924, 84, + 16, -0.00271643168786879, "contGamma", "debCollin1", "contNormal", + "", "", 0.961330735595307, 0.0560277030462262, + -0.0484837239468406, -0.0375579901230792, 0.0787136481943513, + 16, 50, 0.020577829035636, "contGamma", "debCollin1", "contNormal", + "", "", 0.48783814875662, 0.0296616772641146, + 0.693751363161501, -0.017781731021084, 0.0451839829981006, 50, + 50, 0.0137011259885083, "contGamma", "debCollin1", "contNormal", + "", "", 0.393679799646941, 0.0160629773087287, + 0.852963041979962, -0.0853117054540685, 0.0560983589431406, + 84, 50, -0.0146066732554639, "contGamma", "debCollin1", "contNormal", + "", "", 0.685550124512573, 0.036074658900019, + -0.404901216001691, -0.0767281082591723, 0.162220920754903, + 16, 84, 0.0427464062478655, "contGamma", "debCollin1", "contNormal", + "", "", 0.483147463431661, 0.0609575050610305, + 0.701249275295436, -0.0226262601891422, 0.0807291060063818, + 50, 84, 0.0290514229086198, "contGamma", "debCollin1", "contNormal", + "", "", 0.270537932650143, 0.0263666493391659, + 1.10182460178836, -0.089001847198602, 0.0319141243560085, 84, + 84, -0.0285438614212968, "contGamma", "debCollin1", "contNormal", + "", "", 0.354782646302783, 0.0308464779221405, + -0.925352369023921)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.149831937697961, 0.120438968753159, -0.0146964844724011, "contGamma", - "", 0.83120732043392, "contNormal", 0.0689479267432929, - -0.213153392227718, -4.39513846598854, 1.52254947662281, -1.43629449468287, - "debCollin1", "", 0.341394272889204, "contNormal", - 1.50964201110054, -0.951413967100583, -3.43497680551169, 0.849245580189071, - -1.29286561266131, "contcor1", "", 0.236836438627235, - "contNormal", 1.09293395682119, -1.18293114107428, -0.924280627553907, - 5.58380728382224, 2.32976332813416, "debCollin1:contcor1", "", - 0.160540925094842, "contNormal", 1.66025701561639, 1.40325462035118, - -1.18791417069724, 2.9180266536435, 0.865056241473131, "contcor2", - "", 0.408879939393302, "contNormal", 1.04745313095748, - 0.825866299795566, -4.58909583085996, 1.62263472830874, -1.48323055127561, - "debCollin1:contcor2", "", 0.349275084237338, "contNormal", - 1.58465426103899, -0.935996316510785, -0.133637688384168, 4.63689807916763, - 2.25163019539173, "debCollin1:contcor1:contcor2", "", - 0.0642912858993026, "contNormal", 1.21699577267266, 1.85015449186558, - -2.95950667509125, 0.224915194954914, -1.36729574006817, "contcor1:contcor2", - "", 0.0923557123739007, "contNormal", 0.812367445311363, - -1.68310011431356, -0.0197475165547516, 0.00116000164551376, - -0.00929375745461893, "contGamma", "", 0.0814250946255435, - "debCollin1", 0.00533364856833626, -1.74247653094211, -0.0185476057666696, - 0.0350787530929761, 0.00826557366315328, "contcor1", "", - 0.545718027482914, "debCollin1", 0.0136804449680309, 0.60418894871246, - -0.0145563046922006, 0.00654285983210352, -0.00400672243004852, - "contGamma:contcor1", "", 0.45663895497095, "debCollin1", - 0.0053825388350836, -0.744392665396586)) + list(-0.149831890085612, 0.120439016637523, -0.0146964367240443, "contGamma", + "", 0.831207860747492, "contNormal", 0.0689479268126856, + -0.213152699485379, -4.39513847217938, 1.522549496256, -1.43629448796169, + "debCollin1", "", 0.341394277255187, "contNormal", + 1.50964201768842, -0.951413958496568, -3.43497694423877, 0.849245449552137, + -1.29286574734331, "contcor1", "", 0.236836390670329, + "contNormal", 1.09293395888504, -1.18293126207025, -0.924280922142856, + 5.58380699771752, 2.32976303778733, "debCollin1:contcor1", "", + 0.160540977770685, "contNormal", 1.66025701778077, 1.40325444364119, + -1.18791422412416, 2.91802657437343, 0.865056175124634, "contcor2", + "", 0.408879972380329, "contNormal", 1.04745312436471, + 0.825866241650952, -4.58909590948782, 1.62263461386916, -1.48323064780933, + "debCollin1:contcor2", "", 0.349275050094068, "contNormal", + 1.58465425190318, -0.935996382824813, -0.133637770401443, 4.63689794945205, + 2.25163008952531, "debCollin1:contcor1:contcor2", "", + 0.0642912957680959, "contNormal", 1.2169957605045, 1.85015442337441, + -2.95950671973151, 0.22491511737498, -1.36729580117827, "contcor1:contcor2", + "", 0.0923556944441868, "contNormal", 0.812367436908231, + -1.68310020694826, -0.0197475261238219, 0.00115999376628478, + -0.00929376617876858, "contGamma", "", 0.0814248332720677, + "debCollin1", 0.00533364899942616, -1.74247802578844, -0.0185475758845223, + 0.0350787873071781, 0.00826560571132789, "contcor1", "", + 0.545716502621075, "debCollin1", 0.0136804460731673, 0.604191242531192, + -0.0145563090362738, 0.00654285719256256, -0.00400672592185561, + "contGamma:contcor1", "", 0.456638598988764, "debCollin1", + 0.00538253926992125, -0.744393253988136)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.146752551706188, 0.120689857874141, 16, 16, -0.0130313469160234, - "Total", 0.848524301202308, 0.0682263581601195, -0.191001649031893, - -0.150779372881113, 0.122597040802778, 50, 16, -0.0140911660391673, - "Total", 0.839875772789888, 0.069740162533661, -0.202052383120931, - -0.187037795453683, 0.152211965146895, 84, 16, -0.0174129151533941, - "Total", 0.840541450965573, 0.0865448965584411, -0.201200947090343, - -0.140699154901597, 0.152461806525394, 16, 50, 0.00588132581189832, - "Total", 0.937318440094887, 0.0747873337825102, 0.0786406670012045, - -0.137221912192342, 0.135231169556181, 50, 50, -0.000995371318080373, - "Total", 0.988573934715014, 0.0695046143443447, -0.0143209386523466, - -0.176163336884279, 0.117557039840038, 84, 50, -0.0293031485221203, - "Total", 0.695742968971403, 0.0749300443888627, -0.391073417360418, - -0.154092297053674, 0.210192059413089, 16, 84, 0.0280498811797075, - "Total", 0.762778381903612, 0.0929313904082402, 0.301834300084036, - -0.130200279559876, 0.158910099931003, 50, 84, 0.0143549101855631, - "Total", 0.845680826181258, 0.07375400307642, 0.194632285527462, - -0.184851526497271, 0.0983708723420303, 84, 84, -0.0432403270776203, - "Total", 0.549529059152149, 0.0722519395951465, -0.598465969493849, - -0.019642284952121, 0.0229725600648764, 16, 16, 0.00166513755637771, - "Total indirect", 0.878266001307125, 0.0108713336962153, 0.153167734788364, - -0.0403761531103848, 0.0415867899768524, 50, 16, 0.000605318433233805, - "Total indirect", 0.976904687464378, 0.020909298266129, 0.0289497249276109, - -0.112528609093363, 0.107095747731377, 84, 16, -0.00271643068099307, - "Total indirect", 0.961330714134549, 0.0560276511602021, -0.0484837508755431, - -0.0375580018593202, 0.078713622427919, 16, 50, 0.0205778102842994, - "Total indirect", 0.487838492769507, 0.0296616736849184, 0.69375081470073, - -0.0177817206913118, 0.0451839469999532, 50, 50, 0.0137011131543207, - "Total indirect", 0.393679894706849, 0.0160629654901647, 0.852962870567696, - -0.0853116350827885, 0.05609830698335, 84, 50, -0.0146066640497193, - "Total indirect", 0.685550054615717, 0.0360746276925398, -0.404901311087957, - -0.0767281326832792, 0.162220863987496, 16, 84, 0.0427463656521086, - "Total indirect", 0.483147819744687, 0.060957496810037, 0.701248704245843, - -0.0226262576716071, 0.0807290469875354, 50, 84, 0.0290513946579642, - "Total indirect", 0.270538113297266, 0.0263666336408209, 1.10182418634538, - -0.0890017924408171, 0.0319141072303785, 84, 84, -0.0285438426052193, - "Total indirect", 0.354782677439143, 0.0308464595841977, -0.925352309146104 + list(-0.146752504017635, 0.120689905912689, 16, 16, -0.013031299052473, + "Total", 0.848524851028768, 0.0682263582494057, -0.19100094724148, + -0.150779332979583, 0.122597095761816, 50, 16, -0.0140911186088834, + "Total", 0.839876313166991, 0.0697401663749326, -0.202051691891981, + -0.187037810423853, 0.152212073600027, 84, 16, -0.0174128684119131, + "Total", 0.840541930489595, 0.0865449280445559, -0.201200333807527, + -0.140699090642708, 0.152461875265891, 16, 50, 0.00588139231159177, + "Total", 0.937317733775472, 0.0747873349257984, 0.0786415549829004, + -0.137221854556564, 0.135231233085492, 50, 50, -0.000995310735535984, + "Total", 0.98857463035368, 0.0695046158478246, -0.0143200667091686, + -0.176163322539117, 0.117557102580101, 84, 50, -0.0293031099795082, + "Total", 0.695743396801017, 0.0749300567347277, -0.391072838543937, + -0.15409222091306, 0.210192159960702, 16, 84, 0.0280499695238212, + "Total", 0.762777672597364, 0.0929313966346298, 0.301835230499148, + -0.130200214301086, 0.158910186670237, 50, 84, 0.0143549861845755, + "Total", 0.84568003075761, 0.0737540085562258, 0.194633301505668, + -0.184851506872164, 0.0983709105814816, 84, 84, -0.0432402981453411, + "Total", 0.549529352505575, 0.072251944343791, -0.598465529724626, + -0.0196423044763438, 0.0229725798194862, 16, 16, 0.00166513767157124, + "Total indirect", 0.878266104280778, 0.0108713437165098, 0.15316760420724, + -0.0403761925839803, 0.0415868288143021, 50, 16, 0.000605318115160915, + "Total indirect", 0.976904721656831, 0.0209093182438035, 0.0289496820557648, + -0.112528711794977, 0.10709584841924, 84, 16, -0.00271643168786879, + "Total indirect", 0.961330735595307, 0.0560277030462262, -0.0484837239468406, + -0.0375579901230792, 0.0787136481943513, 16, 50, 0.020577829035636, + "Total indirect", 0.48783814875662, 0.0296616772641146, 0.693751363161501, + -0.017781731021084, 0.0451839829981006, 50, 50, 0.0137011259885083, + "Total indirect", 0.393679799646941, 0.0160629773087287, 0.852963041979962, + -0.0853117054540685, 0.0560983589431406, 84, 50, -0.0146066732554639, + "Total indirect", 0.685550124512573, 0.036074658900019, -0.404901216001691, + -0.0767281082591723, 0.162220920754903, 16, 84, 0.0427464062478655, + "Total indirect", 0.483147463431661, 0.0609575050610305, 0.701249275295436, + -0.0226262601891422, 0.0807291060063818, 50, 84, 0.0290514229086198, + "Total indirect", 0.270537932650143, 0.0263666493391659, 1.10182460178836, + -0.089001847198602, 0.0319141243560085, 84, 84, -0.0285438614212968, + "Total indirect", 0.354782646302783, 0.0308464779221405, -0.925352369023921 )) @@ -10583,7 +10600,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 70 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -10594,25 +10611,25 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facExperim", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facExperim", 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) @@ -10621,127 +10638,127 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(958.083602639786, 1031.02836784745, 28, "Model 1", 100, -451.041801319893, + list(958.083602636111, 1031.02836784378, 28, "Model 1", 100, -451.041801318055, 70)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962232395664352, 0.0896223551653284, 0.0400000156043425, - "facExperimexperimental", "", 0.114128589026357, "facGenderm", - 0.0253179854080997, 1.57990515278304, -0.163250047414928, 0.0341991086359394, - -0.0645254693894943, "contcor2", "", 0.200188643778813, - "facGenderm", 0.0503706082377843, -1.28101429875314, -0.170526821209161, - 0.0272975971275222, -0.0716146120408196, "contcor2", "", - 0.155882406040679, "facExperimexperimental", 0.0504663401718341, - -1.41905697534192, 0.180704804209381, 0.319295175266658, 0.249999989738019, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553361568021, 7.07106810211792, 0.180704845455076, 0.319295319131933, - 0.250000082293505, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553623357472, 7.07106548419486, - 0.72154018017149, 1.27491792254782, 0.998229051359657, "contcor2", - "", 1.53721479989599e-12, "contcor2", 0.141170385461495, - 7.07109389902411, 0.00474535377500817, 0.0083847722531789, 0.00656506301409354, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000928440141471475, 7.07106761205805, 0.752059860479322, 1.32884620859653, - 1.04045303453793, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.147142078289914, 7.0710774690019, 0.0796446871126457, - 0.140727661279155, 0.1101861741959, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826777043669, 7.07106803377068, 0.318532863691048, 0.562829579240196, - 0.440681221465622, "debCollin1:contcor2", "", 1.53743684450092e-12, - "debCollin1:contcor2", 0.0623217358778348, 7.07106782663211 - )) + list(-0.163250699085857, 0.0341991769338802, -0.0645257610759883, "contcor2", + "", 0.200188250470804, "facGenderm", 0.0503707919066872, + -1.28101541852912, -0.00962233793958065, 0.0896223058786317, + 0.0399999839695255, "facExperimexperimental", "", 0.114128746491645, + "facGenderm", 0.0253179764018731, 1.57990446529393, 0.180704805568163, + 0.31929518000888, 0.249999992788522, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553370199403, 7.07106801577149, + 0.752060493744293, 1.32884841738892, 1.04045445556661, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.147142480217559, + 7.07106781147248, 0.00474535342333342, 0.00838477102655755, + 0.00656506222494549, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000928439918266712, 7.07106846203003, -0.170527178701627, + 0.0272978663107261, -0.0716146561954506, "contcor2", "", + 0.155883461455605, "facExperimexperimental", 0.0504665000410141, + -1.41905335494337, 0.180704807961373, 0.3192951883561, 0.249999998158737, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553385388482, 7.07106786388251, + 0.721541756788828, 1.27492342165351, 0.998232589221167, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171386114664, + 7.07106883834356, 0.0796446854100635, 0.140727655340567, 0.110186170375315, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.0155826766237333, 7.07106827895633, + 0.318532869151077, 0.562829598291611, 0.440681233721344, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217393450887, + 7.07106762988751)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0393120760749306, 0.866238685862601, "", 0.452775380968766, - "", "m", "facGender", "contNormal", "", "", "", 0.0318476731345994, - 0.210954542101376, 2.14631728930103, -0.0371909715558107, 0.0317287948254582, - 16, -0.00273108836517626, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.876557021350743, 0.0175818961279134, - -0.155335257659743, -0.090871277089043, 0.092888630713797, 16, - 0.00100867681237701, 1, "m", "facGender", "debCollin1", "contNormal", - "", "", 0.982833335840767, 0.0468783889021214, - 0.0215168830670152, -0.0186050573231307, 0.0174888865610851, - 50, -0.000558085381022809, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.951669797065079, 0.00920780794160511, - -0.0606100153871719, -0.0677418693740053, 0.0606376222422335, - 50, -0.00355212356588592, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.913630630378014, 0.0327504721078754, - -0.108460224762126, -0.0282215593137867, 0.0321995746206938, - 84, 0.00198900765345355, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.897325688802829, 0.0154138378080094, - 0.129040390733839, -0.0992466145898641, 0.0814504512851043, - 84, -0.00889808165237989, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.846935973825096, 0.0460970373181048, - -0.193029360888777)) + list(0.0393124070787078, 0.86623958160162, "", 0.452775994340164, "", + "m", "facGender", "contNormal", "", "", "", 0.0318475581817887, + 0.210954686169136, 2.1463187311096, -0.0371870199645857, 0.031725898416822, + 16, -0.00273056077388189, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.876568510825161, 0.0175801491570723, + -0.155320682975174, -0.0908720227042143, 0.0928887034389045, + 16, 0.0010083403673451, 1, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.982839137324327, 0.0468785976662326, + 0.0215096103028572, -0.0186032975421568, 0.0174880346991026, + 50, -0.000557631421527059, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.951705571746222, 0.00920714169391459, + -0.0605650961031285, -0.0677421768782835, 0.0606379065286109, + 50, -0.00355213517483631, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.913630745790602, 0.0327506230776535, + -0.108460079260599, -0.0282231093874469, 0.0322018599978059, + 84, 0.00198937530517949, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.897313297733821, 0.0154148162573081, + 0.129056050488849, -0.0992463843054762, 0.0814509592983097, + 84, -0.00889771250358323, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.846942477758189, 0.0460971081685948, + -0.193021056137424)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0393120760749306, 0.866238685862601, 0.452775380968766, "facGenderm", - "", 0.0318476731345994, "contNormal", 0.210954542101376, - 2.14631728930103, -3.58868140421552, 3.33878113969341, -0.124950132261053, - "debCollin1", "", 0.943633773102686, "contNormal", - 1.76724230612192, -0.0707034523948483, -3.50812970980763, 3.14563372570519, - -0.181247992051217, "facExperimexperimental", "", 0.914964681281229, - "contNormal", 1.69741982199593, -0.106778529213883, -4.66928832821241, - 5.30200982044199, 0.316360746114787, "debCollin1:facExperimexperimental", - "", 0.901023835153426, "contNormal", 2.54374524922568, - 0.124368093153624, -2.30073958386838, 2.0037382237601, -0.148500680054138, - "contcor2", "", 0.892426825970024, "contNormal", 1.09810125124279, - -0.135234050490399, -2.77293049853653, 3.68211698868781, 0.454593245075639, - "debCollin1:contcor2", "", 0.782502890902179, "contNormal", - 1.64672604653477, 0.27605881745312, -4.91509313185384, 4.54285635296888, - -0.186118389442478, "debCollin1:facExperimexperimental:contcor2", - "", 0.938513479712197, "contNormal", 2.41278655103508, - -0.0771383566286184, -3.21053124486527, 3.06451035449874, -0.0730104451832649, - "facExperimexperimental:contcor2", "", 0.963622236876616, - "contNormal", 1.60080533337876, -0.0456085719237107, -0.0404917632019229, - 0.05051504688611, 0.00501164184209358, "facGenderm", "", - 0.829092209221632, "debCollin1", 0.0232164495893504, 0.215865988587353, - -0.0488496090828715, 0.0421572010047437, -0.0033462040390639, - "facExperimexperimental", "", 0.885397231830122, "debCollin1", - 0.0232164495892438, -0.144130739121032, -0.0871738391143912, - 0.0415292259794877, -0.0228223065674518, "facGenderm:facExperimexperimental", - "", 0.486991187310597, "debCollin1", 0.0328330178791734, - -0.695102309858894)) + list(0.0393124070787078, 0.86623958160162, 0.452775994340164, "facGenderm", + "", 0.0318475581817887, "contNormal", 0.210954686169136, + 2.1463187311096, -3.58859402017756, 3.33887320920046, -0.124860405488548, + "debCollin1", "", 0.943674220430895, "contNormal", + 1.76724350141661, -0.0706526324122629, -3.50807113727283, 3.14569677376312, + -0.181187181754851, "facExperimexperimental", "", 0.91499316012934, + "contNormal", 1.69742096373199, -0.106742632279319, -4.66938095853487, + 5.30192389653783, 0.316271469001482, "debCollin1:facExperimexperimental", + "", 0.901051688819455, "contNormal", 2.54374696007811, + 0.124332912811332, -2.30073480501285, 2.00374594797465, -0.1484944285191, + "contcor2", "", 0.892431400170884, "contNormal", 1.09810200262369, + -0.1352282649192, -2.77294332432278, 3.68210858047589, 0.454582628076558, + "debCollin1:contcor2", "", 0.78250798790862, "contNormal", + 1.6467271734877, 0.276052181196337, -4.91510593691962, 4.54284997787278, + -0.186127979523422, "debCollin1:facExperimexperimental:contcor2", + "", 0.938510359510121, "contNormal", 2.4127881913636, + -0.0771422788745622, -3.21052580600634, 3.06452005978997, -0.0730028731081863, + "facExperimexperimental:contcor2", "", 0.963626031793888, + "contNormal", 1.60080642177435, -0.045603810751377, -0.0404918132396223, + 0.0505149913774701, 0.00501158906892392, "facGenderm", "", + 0.829093971004778, "debCollin1", 0.0232164481936766, 0.215863728470271, + -0.0488496062399208, 0.0421571983768223, -0.00334620393154921, + "facExperimexperimental", "", 0.885397228645152, "debCollin1", + 0.0232164481935875, -0.144130743154478, -0.0871738544805731, + 0.0415292028744487, -0.0228223258030622, "facGenderm:facExperimexperimental", + "", 0.486990793991881, "debCollin1", 0.0328330159049388, + -0.695102937516903)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0352237189036005, 0.864864866303578, 16, 0.450044292603589, - 0, "m", "Total", 0.0334707425135468, 0.21164703891094, 2.12639068762482, - 0.0305044113811538, 0.877063704181132, 16, 0.453784057781143, - 1, "m", "Total", 0.0356223319482172, 0.215962971635584, 2.10121232517053, - 0.0387217946557514, 0.865712796519734, 50, 0.452217295587743, - 0, "m", "Total", 0.0320725818989174, 0.210970968953303, 2.14350485202463, - 0.0340256776406291, 0.86442083716513, 50, 0.44922325740288, - 1, "m", "Total", 0.0339568133765946, 0.211839392477248, 2.12058414702604, - 0.0408934741099858, 0.868635303134453, 84, 0.454764388622219, - 0, "m", "Total", 0.0312697675262177, 0.211162510013855, 2.15362276472458, - 0.0272792958822077, 0.860475302750564, 84, 0.443877299316386, - 1, "m", "Total", 0.0367703682341305, 0.212553907480061, 2.08830458389961, - -0.0371909715558107, 0.0317287948254582, 16, -0.00273108836517626, - 0, "m", "Total indirect", 0.876557021350743, 0.0175818961279134, - -0.155335257659743, -0.090871277089043, 0.092888630713797, 16, - 0.00100867681237701, 1, "m", "Total indirect", 0.982833335840767, - 0.0468783889021214, 0.0215168830670152, -0.0186050573231307, - 0.0174888865610851, 50, -0.000558085381022809, 0, "m", "Total indirect", - 0.951669797065079, 0.00920780794160511, -0.0606100153871719, - -0.0677418693740053, 0.0606376222422335, 50, -0.00355212356588592, - 1, "m", "Total indirect", 0.913630630378014, 0.0327504721078754, - -0.108460224762126, -0.0282215593137867, 0.0321995746206938, - 84, 0.00198900765345355, 0, "m", "Total indirect", 0.897325688802829, - 0.0154138378080094, 0.129040390733839, -0.0992466145898641, - 0.0814504512851043, 84, -0.00889808165237989, 1, "m", "Total indirect", - 0.846935973825096, 0.0460970373181048, -0.193029360888777)) + list(0.0352248621046402, 0.864866005027924, 16, 0.450045433566282, + 0, "m", "Total", 0.0334702930641311, 0.211647037768905, 2.12639608997354, + 0.0305043251419356, 0.877064344273082, 16, 0.453784334707509, + 1, "m", "Total", 0.0356223776197597, 0.215963156927552, 2.1012118046586, + 0.0387226333042907, 0.865714092532983, 50, 0.452218362918637, + 0, "m", "Total", 0.0320722711898163, 0.210971085630118, 2.14350872570037, + 0.0340259699392021, 0.864421748391453, 50, 0.449223859165328, + 1, "m", "Total", 0.0339567072417217, 0.211839550369881, 2.12058540712045, + 0.0408940267053567, 0.86863671258533, 84, 0.454765369645343, + 0, "m", "Total", 0.0312695778697898, 0.21116272860346, 2.15362518117173, + 0.0272800041115615, 0.8604765595616, 84, 0.443878281836581, + 1, "m", "Total", 0.036770075478904, 0.212554047426939, 2.08830783139594, + -0.0371870199645857, 0.031725898416822, 16, -0.00273056077388189, + 0, "m", "Total indirect", 0.876568510825161, 0.0175801491570723, + -0.155320682975174, -0.0908720227042143, 0.0928887034389045, + 16, 0.0010083403673451, 1, "m", "Total indirect", 0.982839137324327, + 0.0468785976662326, 0.0215096103028572, -0.0186032975421568, + 0.0174880346991026, 50, -0.000557631421527059, 0, "m", "Total indirect", + 0.951705571746222, 0.00920714169391459, -0.0605650961031285, + -0.0677421768782835, 0.0606379065286109, 50, -0.00355213517483631, + 1, "m", "Total indirect", 0.913630745790602, 0.0327506230776535, + -0.108460079260599, -0.0282231093874469, 0.0322018599978059, + 84, 0.00198937530517949, 0, "m", "Total indirect", 0.897313297733821, + 0.0154148162573081, 0.129056050488849, -0.0992463843054762, + 0.0814509592983097, 84, -0.00889771250358323, 1, "m", "Total indirect", + 0.846942477758189, 0.0460971081685948, -0.193021056137424)) @@ -10757,7 +10774,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 72 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -10768,27 +10785,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contcor1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "debCollin1", - processIndependent = "contcor1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "debCollin1", + processIndependent = "contcor1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -10797,154 +10814,153 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1406.96772271089, 1490.33316866251, 38, "Model 1", 100, -671.483861355447, + list(1406.96772271233, 1490.33316866395, 38, "Model 1", 100, -671.483861356167, 72)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544857449556034, 0.0642026835157161, -0.240327383020159, "contcor1", - "", 0.121922642290825, "contGamma", 0.155375337984764, - -1.54675372641008, -0.403940645819944, 0.194623278456151, -0.104658683681896, - "contcor2", "", 0.493092821787795, "contGamma", 0.152697684497647, - -0.6853979746072, 0.424978761105677, 0.896763298990062, 0.66087103004787, - "contcor2", "", 3.99674249251802e-08, "contcor1", 0.120355409998796, - 5.49099562748761, 1.68041313902331, 2.96919896998944, 2.32480605450638, - "contGamma", "", 1.53765888910584e-12, "contGamma", - 0.328777937026372, 7.07105250289317, 0.732635390449168, 1.29452673364559, - 1.01358106204738, "contcor1", "", 1.53765888910584e-12, - "contcor1", 0.143342262314142, 7.07105528881682, 0.721541932912533, - 1.2749240358665, 0.998232984389517, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171497874189, 7.07106603968412, - 0.00458998532094964, 0.00811023573056204, 0.00635011052575584, - "debCollin1", "", 1.53721479989599e-12, "debCollin1", - 0.000898039565364387, 7.07108101988717, 0.710358046758309, 1.2551625490654, - 0.982760297911852, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.138983294235107, 7.07106780941164, 0.323890239438198, - 0.57229308116474, 0.448091660301469, "debCollin1:contcor1", - "", 1.53677071068614e-12, "debCollin1:contcor1", 0.0633692362936034, - 7.07112293771954, 0.318533462159289, 0.562831666747139, 0.440682564453214, - "debCollin1:contcor2", "", 1.53765888910584e-12, "debCollin1:contcor2", - 0.0623221157416267, 7.07104627641627)) + list(-0.403925096934723, 0.194634672818106, -0.104645212058309, "contcor2", + "", 0.493145479330358, "contGamma", 0.152696624650808, + -0.685314507099389, -0.544841878052946, 0.064209353784537, -0.240316262134204, + "contcor1", "", 0.121934455574858, "contGamma", 0.15537306722001, + -1.54670475671252, 1.68040925006167, 2.9691854054135, 2.32479732773758, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328775468712063, 7.07107904627036, 0.710358034794545, 1.25516250657758, + 0.982760270686062, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.138983286448216, 7.07106800969361, 0.00458999059847747, + 0.00811025413823996, 0.00635012236835871, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.00089804291495402, 7.0710678327481, + 0.424974878949436, 0.896752686809913, 0.660863782879674, "contcor2", + "", 3.99633255376841e-08, "contcor1", 0.120353693124415, + 5.49101374227471, 0.732631347325267, 1.29451263208977, 1.01357198970752, + "contcor1", "", 1.53699275529107e-12, "contcor1", 0.143339696340481, + 7.07111857764745, 0.721541040988616, 1.27492092513653, 0.998230983062574, + "contcor2", "", 1.53721479989599e-12, "contcor2", 0.141170931841837, + 7.0710802148771, 0.32389178402375, 0.572298468539232, 0.448095126281491, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633702166149178, 7.07106824337422, 0.318531947990915, 0.562826385326757, + 0.440679166658836, "debCollin1:contcor2", "", 1.53699275529107e-12, + "debCollin1:contcor2", 0.0623211546902915, 7.07110079793637 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.149831402873261, 0.120439503717062, "", "", -0.0146959495780994, - "contGamma", "contNormal", "", "", "", 0.831213371437057, - 0.0689479267788045, -0.213145634171804, -0.0278904025201642, - 0.0326629517547097, 16, 16, 0.00238627461727272, "contGamma", - "debCollin1", "contNormal", "", "", 0.877234633035097, - 0.0154475681064834, 0.154475746656278, -0.0346117186822631, - 0.0356489428424167, 50, 16, 0.000518612080076799, "contGamma", - "debCollin1", "contNormal", "", "", 0.976917228691988, - 0.01792396750116, 0.028934000245383, -0.0686408210570276, 0.0653474803946728, - 84, 16, -0.0016466703311774, "contGamma", "debCollin1", "contNormal", - "", "", 0.961577115187317, 0.0341813172355674, - -0.0481745720865303, -0.0889559687929595, 0.0946742595980475, - 16, 50, 0.00285914540254402, "contGamma", "debCollin1", "contNormal", - "", "", 0.951332319349748, 0.0468453068116197, - 0.0610337640447436, -0.0188141723702083, 0.0355015162763122, - 50, 50, 0.00834367195305195, "contGamma", "debCollin1", "contNormal", - "", "", 0.547069379083243, 0.0138562976347922, - 0.602157385252866, -0.073355340780012, 0.049595000125353, 84, - 50, -0.0118801703273295, "contGamma", "debCollin1", "contNormal", - "", "", 0.704861618647392, 0.0313654592316955, - -0.378766025377505, -0.458061689054963, 0.340253590331556, 16, - 84, -0.0589040493617038, "contGamma", "debCollin1", "contNormal", - "", "", 0.772402593824734, 0.203655599205784, - -0.289233635566211, -0.0827421145252915, 0.101249884217814, - 50, 84, 0.00925388484626113, "contGamma", "debCollin1", "contNormal", - "", "", 0.843707862393721, 0.0469375968625982, - 0.197152932080232, -0.0941333991856948, 0.0338402912538131, - 84, 84, -0.0301465539659408, "contGamma", "debCollin1", "contNormal", - "", "", 0.355793034582295, 0.0326469494972734, - -0.923411051573397)) + list(-0.149832311964037, 0.120438590930473, "", "", -0.0146968605167819, + "contGamma", "contNormal", "", "", "", 0.831203064302237, + 0.0689479258359778, -0.213158849067407, -0.0278915057249287, + 0.0326642741016318, 16, 16, 0.00238638418835154, "contGamma", + "debCollin1", "contNormal", "", "", 0.877233919268507, + 0.0154481868810388, 0.154476651967527, -0.0346125301558068, + 0.0356497850151606, 50, 16, 0.000518627429676935, "contGamma", + "debCollin1", "contNormal", "", "", 0.976917088816194, + 0.0179243893574544, 0.0289341756270903, -0.0686412109864715, + 0.0653478385811441, 84, 16, -0.00164668620266368, "contGamma", + "debCollin1", "contNormal", "", "", 0.96157695950039, + 0.034181508084971, -0.04817476743771, -0.0889554580577689, 0.094674996180457, + 16, 50, 0.00285976906134403, "contGamma", "debCollin1", "contNormal", + "", "", 0.951321776555236, 0.0468453644267649, + 0.0610470021172492, -0.0188142115985939, 0.0355017377311558, + 50, 50, 0.00834376306628095, "contGamma", "debCollin1", "contNormal", + "", "", 0.54706692602717, 0.013856364136838, + 0.602161070817889, -0.0733550425768262, 0.0495948280895358, + 84, 50, -0.0118801072436452, "contGamma", "debCollin1", "contNormal", + "", "", 0.704862036473449, 0.0313653392705618, + -0.378765462766582, -0.458062141946761, 0.340253799461756, 16, + 84, -0.0589041712425024, "contGamma", "debCollin1", "contNormal", + "", "", 0.772402319415942, 0.203655768092049, + -0.289233994177266, -0.0827424362757103, 0.101249654654039, + 50, 84, 0.00925360918916455, "contGamma", "debCollin1", "contNormal", + "", "", 0.843712535354291, 0.0469376203800315, + 0.197146960460341, -0.0941324880359716, 0.0338401489759071, + 84, 84, -0.0301461695300323, "contGamma", "debCollin1", "contNormal", + "", "", 0.355795209187852, 0.0326466807607973, + -0.923406877131361)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.149831402873261, 0.120439503717062, -0.0146959495780994, "contGamma", - "", 0.831213371437057, "contNormal", 0.0689479267788045, - -0.213145634171804, -4.39513818631378, 1.52254968410135, -1.43629425110621, - "debCollin1", "", 0.341394348872594, "contNormal", - 1.5096419926828, -0.951413817360605, -3.43497685777599, 0.849245330828956, - -1.29286576347352, "contcor1", "", 0.236836362365611, - "contNormal", 1.09293390654072, -1.18293133348348, -0.924280804542288, - 5.58380680094476, 2.32976299820124, "debCollin1:contcor1", "", - 0.160540964672256, "contNormal", 1.66025693758202, 1.40325448758207, - -1.18791407783329, 2.91802643688053, 0.865056179523619, "contcor2", - "", 0.408879937614637, "contNormal", 1.04745305196957, - 0.825866302930733, -4.58909569297981, 1.62263440558189, -1.48323064369896, - "debCollin1:contcor2", "", 0.349275018473084, "contNormal", - 1.58465414353504, -0.935996444239987, -0.133637103282987, 4.63689860182757, - 2.25163074927229, "debCollin1:contcor1:contcor2", "", - 0.0642912168322476, "contNormal", 1.21699575674347, 1.85015497120332, - -2.95950634272542, 0.224915481723071, -1.36729543050118, "contcor1:contcor2", - "", 0.092355781466007, "contNormal", 0.81236743367909, - -1.68309975734613, -0.0201068156480204, 0.00866071278102336, - -0.00572305143349853, "contGamma", "", 0.435487514021364, - "debCollin1", 0.00733879006348034, -0.77983582906641, -0.0350281219339707, - 0.0413281630920886, 0.00315002057905897, "contcor1", "", - 0.871531352627363, "debCollin1", 0.019479002070535, 0.161713652868484, - -0.0236340770461917, 0.0138396501466189, -0.00489721344978641, - "contGamma:contcor1", "", 0.608460979957299, "debCollin1", - 0.00955979994744765, -0.51227154090122, -0.0390757276941308, - 0.045772367288061, 0.00334831979696511, "contcor2", "", - 0.877065522446027, "debCollin1", 0.0216453199271677, 0.15469024288999, - -0.0164774467870191, 0.0426896697088649, 0.0131061114609229, - "contcor1:contcor2", "", 0.385228220120092, "debCollin1", - 0.0150939295218143, 0.868303475379386, -0.0167953723497586, - 0.0216684970912949, 0.00243656237076814, "contGamma:contcor2", - "", 0.803890829932222, "debCollin1", 0.00981239189710924, - 0.248314824389144, -0.0169076737100051, 0.0068151336594956, - -0.00504627002525475, "contGamma:contcor1:contcor2", "", - 0.404371405394651, "debCollin1", 0.0060518477779753, -0.833839549570267 - )) + list(-0.149832311964037, 0.120438590930473, -0.0146968605167819, "contGamma", + "", 0.831203064302237, "contNormal", 0.0689479258359778, + -0.213158849067407, -4.3951386637867, 1.52254926050733, -1.43629470163968, + "debCollin1", "", 0.341394201830497, "contNormal", + 1.50964200642767, -0.951414107135541, -3.43497708925118, 0.84924549956315, + -1.29286579484401, "contcor1", "", 0.236836394787207, + "contNormal", 1.09293400863682, -1.18293125168331, -0.924281170956433, + 5.5838070505373, 2.32976293979043, "debCollin1:contcor1", "", + 0.160541014752711, "contNormal", 1.66025709472947, 1.40325431957877, + -1.18791431080276, 2.91802659165315, 0.865056140425196, "contcor2", + "", 0.408880003037305, "contNormal", 1.04745315088518, + 0.825866187613407, -4.58909604757089, 1.62263465517215, -1.48323069619937, + "debCollin1:contcor2", "", 0.349275048288723, "contNormal", + 1.58465429766577, -0.935996386331204, -0.133638426687017, 4.63689730016737, + 2.25162943674017, "debCollin1:contcor1:contcor2", "", + 0.0642913734471207, "contNormal", 1.21699576229047, 1.85015388426863, + -2.95950708774242, 0.224914750348198, -1.36729616869711, "contcor1:contcor2", + "", 0.0923556069806635, "contNormal", 0.812367437159288, + -1.6831006588328, -0.0201068935943322, 0.00866066166159168, + -0.00572311596637025, "contGamma", "", 0.435482765606597, + "debCollin1", 0.00733879690719796, -0.779843895224429, -0.0350285224229291, + 0.0413278338019168, 0.00314965568949381, "contcor1", "", + 0.871546223563928, "debCollin1", 0.0194790202338245, 0.161694769638597, + -0.023633987323258, 0.0138397748117022, -0.00489710625577788, + "contGamma:contcor1", "", 0.608469160757803, "debCollin1", + 0.00955980886142511, -0.512259850250589, -0.0390762663500453, + 0.0457719077501922, 0.00334782070007344, "contcor2", "", + 0.877083814964866, "debCollin1", 0.0216453401107135, 0.154667040709441, + -0.0164773282543055, 0.042689843421129, 0.0131062575834118, + "contcor1:contcor2", "", 0.385223365035647, "debCollin1", + 0.015093943598489, 0.868312346464832, -0.0167952569293917, 0.0216686483770165, + 0.00243669572381239, "contGamma:contcor2", "", 0.803880494830877, + "debCollin1", 0.00981240104660253, 0.248328183106222, -0.0169077133616954, + 0.00681511613199973, -0.00504629861484784, "contGamma:contcor1:contcor2", + "", 0.404369181231084, "debCollin1", 0.00605185342200617, + -0.833843496026876)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.146409400498154, 0.1217900505765, 16, 16, -0.0123096749608267, - "Total", 0.857219489536558, 0.0684194845390469, -0.179914757378822, - -0.149891860315254, 0.121537185319209, 50, 16, -0.0141773374980226, - "Total", 0.837770203454924, 0.0692433758414593, -0.204746480450105, - -0.164030137065439, 0.131344897246885, 84, 16, -0.0163426199092768, - "Total", 0.828299343469638, 0.0753521586728645, -0.216883234629376, - -0.175146315934754, 0.151472707583644, 16, 50, -0.0118368041755554, - "Total", 0.887032803438525, 0.0833227105433384, -0.142059758958499, - -0.142645510876497, 0.129940955626402, 50, 50, -0.00635227762504746, - "Total", 0.927215372951487, 0.0695386416926604, -0.0913488884802005, - -0.170325593437807, 0.117173353626949, 84, 50, -0.0265761199054289, - "Total", 0.717087295959886, 0.0733429158220535, -0.362354286130491, - -0.493964676572102, 0.346764678692496, 16, 84, -0.0735999989398033, - "Total", 0.731476297514221, 0.214475715343793, -0.343162389372738, - -0.168884402048933, 0.158000272585256, 50, 84, -0.00544206473183828, - "Total", 0.947966970591584, 0.0833904799304001, -0.0652600241224222, - -0.187630030436484, 0.0979450233484032, 84, 84, -0.0448425035440402, - "Total", 0.538206217617767, 0.0728521177015156, -0.615527797390403, - -0.0278904025201642, 0.0326629517547097, 16, 16, 0.00238627461727272, - "Total indirect", 0.877234633035097, 0.0154475681064834, 0.154475746656278, - -0.0346117186822631, 0.0356489428424167, 50, 16, 0.000518612080076799, - "Total indirect", 0.976917228691988, 0.01792396750116, 0.028934000245383, - -0.0686408210570276, 0.0653474803946728, 84, 16, -0.0016466703311774, - "Total indirect", 0.961577115187317, 0.0341813172355674, -0.0481745720865303, - -0.0889559687929595, 0.0946742595980475, 16, 50, 0.00285914540254402, - "Total indirect", 0.951332319349748, 0.0468453068116197, 0.0610337640447436, - -0.0188141723702083, 0.0355015162763122, 50, 50, 0.00834367195305195, - "Total indirect", 0.547069379083243, 0.0138562976347922, 0.602157385252866, - -0.073355340780012, 0.049595000125353, 84, 50, -0.0118801703273295, - "Total indirect", 0.704861618647392, 0.0313654592316955, -0.378766025377505, - -0.458061689054963, 0.340253590331556, 16, 84, -0.0589040493617038, - "Total indirect", 0.772402593824734, 0.203655599205784, -0.289233635566211, - -0.0827421145252915, 0.101249884217814, 50, 84, 0.00925388484626113, - "Total indirect", 0.843707862393721, 0.0469375968625982, 0.197152932080232, - -0.0941333991856948, 0.0338402912538131, 84, 84, -0.0301465539659408, - "Total indirect", 0.355793034582295, 0.0326469494972734, -0.923411051573397 + list(-0.146410291111126, 0.121789338454266, 16, 16, -0.0123104763284304, + "Total", 0.857210388312383, 0.0684195300732351, -0.179926350199329, + -0.149892874567277, 0.121536408393067, 50, 16, -0.014178233087105, + "Total", 0.837760237625304, 0.0692434363848886, -0.204759235348972, + -0.164031213806502, 0.131344120367611, 84, 16, -0.0163435467194456, + "Total", 0.828289929448915, 0.0753522351696244, -0.216895314155644, + -0.175146650760755, 0.15147246784988, 16, 50, -0.0118370914554379, + "Total", 0.887030112782637, 0.0833227348020079, -0.142063165396159, + -0.142646338317921, 0.129940143416919, 50, 50, -0.00635309745050099, + "Total", 0.927206009522755, 0.0695386455784307, -0.0913606728698147, + -0.170326361645641, 0.117172426124787, 84, 50, -0.0265769677604271, + "Total", 0.717078508385292, 0.0733428751849989, -0.362366047054875, + -0.493966020756568, 0.346763957237999, 16, 84, -0.0736010317592843, + "Total", 0.73147286617489, 0.214475874206398, -0.343166950742699, + -0.168885614226785, 0.15799911157155, 50, 84, -0.0054432513276174, + "Total", 0.947955649470204, 0.0833904929827181, -0.0652742432970802, + -0.18763040022984, 0.0979443401362115, 84, 84, -0.0448430300468142, + "Total", 0.538201000445793, 0.0728520377462618, -0.615535699948423, + -0.0278915057249287, 0.0326642741016318, 16, 16, 0.00238638418835154, + "Total indirect", 0.877233919268507, 0.0154481868810388, 0.154476651967527, + -0.0346125301558068, 0.0356497850151606, 50, 16, 0.000518627429676935, + "Total indirect", 0.976917088816194, 0.0179243893574544, 0.0289341756270903, + -0.0686412109864715, 0.0653478385811441, 84, 16, -0.00164668620266368, + "Total indirect", 0.96157695950039, 0.034181508084971, -0.04817476743771, + -0.0889554580577689, 0.094674996180457, 16, 50, 0.00285976906134403, + "Total indirect", 0.951321776555236, 0.0468453644267649, 0.0610470021172492, + -0.0188142115985939, 0.0355017377311558, 50, 50, 0.00834376306628095, + "Total indirect", 0.54706692602717, 0.013856364136838, 0.602161070817889, + -0.0733550425768262, 0.0495948280895358, 84, 50, -0.0118801072436452, + "Total indirect", 0.704862036473449, 0.0313653392705618, -0.378765462766582, + -0.458062141946761, 0.340253799461756, 16, 84, -0.0589041712425024, + "Total indirect", 0.772402319415942, 0.203655768092049, -0.289233994177266, + -0.0827424362757103, 0.101249654654039, 50, 84, 0.00925360918916455, + "Total indirect", 0.843712535354291, 0.0469376203800315, 0.197146960460341, + -0.0941324880359716, 0.0338401489759071, 84, 84, -0.0301461695300323, + "Total indirect", 0.355795209187852, 0.0326466807607973, -0.923406877131361 )) @@ -10961,7 +10977,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 72 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -10972,27 +10988,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facExperim", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "debCollin1", - processIndependent = "facExperim", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facExperim", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "debCollin1", + processIndependent = "facExperim", 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) @@ -11001,137 +11017,137 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(965.010866226034, 1048.37631217765, 38, "Model 1", 100, -450.505433113017, + list(965.010866224163, 1048.37631217578, 38, "Model 1", 100, -450.505433112082, 72)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962263090833565, 0.0896215646321149, 0.0399994668618896, - "facExperimexperimental", "", 0.114131790135862, "facGenderm", - 0.0253178620431998, 1.57989117697374, -0.163250278350073, 0.0341990886420882, - -0.0645255948539923, "contcor2", "", 0.200188249592177, - "facGenderm", 0.0503706620503276, -1.28101542103064, -0.17052633010245, - 0.027297825152012, -0.0716142524752192, "contcor2", "", - 0.155883932929987, "facExperimexperimental", 0.0504662730577894, - -1.4190517376469, 0.180704685954198, 0.319294762803524, 0.249999724378861, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.035355261102374, 7.07107560753029, 0.180704485205543, 0.319294062607019, - 0.249999273906281, "facExperimexperimental", "", 1.53721479989599e-12, - "facExperimexperimental", 0.0353551336898669, 7.07108834884518, - 0.72154110666674, 1.2749211540915, 0.998231130379122, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.141170973494859, - 7.07107917206136, 0.00469471924759735, 0.00829530139776265, - 0.00649501032268, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.00091853273288852, 7.07107116613588, 0.752060493744569, - 1.32884841738864, 1.04045445556661, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.147142480217418, 7.07106781147923, - 0.0796446307048227, 0.140727464532124, 0.110186047618473, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826419028908, 7.07107615673516, 0.318532764336454, 0.562829232704743, - 0.440680998520599, "debCollin1:contcor2", "", 1.53743684450092e-12, - "debCollin1:contcor2", 0.0623216728203346, 7.07107140386019 - )) + list(-0.163250750069997, 0.0341991780475011, -0.0645257860112481, "contcor2", + "", 0.20018819531446, "facGenderm", 0.0503708051971766, + -1.2810155755633, -0.0096223290190393, 0.0896223219647968, 0.0399999964728787, + "facExperimexperimental", "", 0.114128659505023, "facGenderm", + 0.0253179782298719, 1.57990484507503, 0.180704816003168, 0.319295216405751, + 0.250000016204459, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.035355343642987, 7.07106735346493, 0.752060493739744, + 1.32884841739347, 1.04045445556661, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.14714248021988, 7.07106781136094, + 0.00469471915106227, 0.00829530106105609, 0.00649501010605918, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000918532671619161, 7.07107140196763, -0.170527212046106, + 0.0272978596334819, -0.0716146762063122, "contcor2", "", + 0.155883401628098, "facExperimexperimental", 0.0504665068440051, + -1.41905356016966, 0.180704803993172, 0.319295174515116, 0.249999989254144, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553360202347, 7.07106811574533, + 0.721541828723171, 1.27492367255555, 0.998232750639361, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171431770529, + 7.07106769492831, 0.0796446886085349, 0.140727666496636, 0.110186177552586, + "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, + "debCollin1:facExperimexperimental", 0.0155826786537702, 7.07106781836423, + 0.318532864598096, 0.56282958240909, 0.440681223503593, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217364548468, + 7.07106779386474)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0393124070633408, 0.866239581616987, "", 0.452775994340164, - "", "m", "facGender", "contNormal", "", "", "", 0.0318475581881488, - 0.210954686176976, 2.14631873102983, -0.041004511445679, 0.0389869992606428, - 16, -0.00100875609251809, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.96057392253919, 0.020406372601049, - -0.0494333859446551, -0.0336791611766571, 0.032952491450213, - 16, -0.000363334863222026, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.982946576964628, 0.016998182913679, - -0.0213749237237374, -0.0170059896105399, 0.0159965629112176, - 50, -0.000504713349661143, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.952196978774148, 0.00841917320473168, - -0.0599480896030845, -0.0535382462227012, 0.0479614779137855, - 50, -0.00278838415445784, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.914243479950521, 0.0258932625642878, - -0.107687632932885, -0.0417669667142856, 0.0478663507490775, - 84, 0.00304969201739596, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.893899204026309, 0.0228660623793037, - 0.133371980134029, -0.208587453574171, 0.170728106648831, 84, - -0.0189296734626701, 1, "m", "facGender", "debCollin1", "contNormal", - "", "", 0.8449050325553, 0.096765951623345, - -0.195623286343037)) + list(0.0393124070739392, 0.866239581606389, "", 0.452775994340164, + "", "m", "facGender", "contNormal", "", "", "", 0.0318475581837623, + 0.210954686171569, 2.14631873108485, -0.0410058920026347, 0.038987439396193, + 16, -0.00100922630322082, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.960556456912723, 0.0204068370719577, + -0.0494553026351966, -0.0336852757828505, 0.0329584723686924, + 16, -0.000363401707079084, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.982946535284064, 0.0170012685634074, + -0.0213749759745135, -0.0170073709228965, 0.015997853679011, + 50, -0.000504758621942762, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.952196561837549, 0.00841985487035692, + -0.0599486130954375, -0.0535362370479532, 0.0479596849697001, + 50, -0.00278827603912657, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.914243592209864, 0.025892292618191, + -0.107687491418494, -0.0417665053003313, 0.0478657878839591, + 84, 0.00304964129181389, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.893899753081787, 0.0228658010788205, + 0.133371285847432, -0.208588549984477, 0.170728996810743, 84, + -0.0189297765868671, 1, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.844905000322488, 0.0967664584112844, + -0.195623327521301)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0393124070633408, 0.866239581616987, 0.452775994340164, "facGenderm", - "", 0.0318475581881488, "contNormal", 0.210954686176976, - 2.14631873102983, -3.58859403990666, 3.33887322892956, -0.124860405488548, - "debCollin1", "", 0.943674220751188, "contNormal", - 1.76724351148266, -0.0706526320098322, -3.5080711669036, 3.1456968033939, - -0.181187181754851, "facExperimexperimental", "", 0.914993160883579, - "contNormal", 1.69742097885001, -0.106742631328619, -4.66938100419524, - 5.3019239421982, 0.316271469001482, "debCollin1:facExperimexperimental", - "", 0.901051689720999, "contNormal", 2.54374698337465, - 0.124332911672647, -2.30073488085221, 2.003746023814, -0.148494428519101, - "contcor2", "", 0.892431403938273, "contNormal", 1.09810204131795, - -0.135228260154107, -2.77294343812551, 3.68210869427863, 0.454582628076559, - "debCollin1:contcor2", "", 0.782507995384572, "contNormal", - 1.64672723155139, 0.276052171462723, -4.9151061810486, 4.54285022200176, + list(0.0393124070739392, 0.866239581606389, 0.452775994340164, "facGenderm", + "", 0.0318475581837623, "contNormal", 0.210954686171569, + 2.14631873108485, -3.5885940551301, 3.33887324415301, -0.124860405488548, + "debCollin1", "", 0.943674220998334, "contNormal", + 1.76724351924987, -0.070652631699307, -3.50807117980504, 3.14569681629533, + -0.181187181754852, "facExperimexperimental", "", 0.914993161211979, + "contNormal", 1.6974209854325, -0.106742630914679, -4.66938102236961, + 5.30192396037257, 0.316271469001482, "debCollin1:facExperimexperimental", + "", 0.901051690079844, "contNormal", 2.54374699264746, + 0.124332911219412, -2.3007348607936, 2.0037460037554, -0.1484944285191, + "contcor2", "", 0.892431402941844, "contNormal", 1.09810203108378, + -0.135228261414417, -2.77294340713885, 3.68210866329197, 0.454582628076558, + "debCollin1:contcor2", "", 0.78250799334899, "contNormal", + 1.64672721574158, 0.276052174113029, -4.91510609544089, 4.54285013639405, -0.186127979523422, "debCollin1:facExperimexperimental:contcor2", - "", 0.938510362678173, "contNormal", 2.4127883159215, - -0.0771422748921657, -3.21052596744715, 3.06452022123078, -0.0730028731081866, - "facExperimexperimental:contcor2", "", 0.963626033664208, - "contNormal", 1.60080650414362, -0.0456038084048396, -0.0421498992946352, - 0.0510535858231254, 0.00445184326424511, "facGenderm", "", - 0.851476801343584, "debCollin1", 0.0237768361696791, 0.187234467717881, - -0.0546132384144629, 0.0380356826925304, -0.00828877786096626, - "facExperimexperimental", "", 0.725817996757762, "debCollin1", - 0.0236353631591693, -0.35069390747866, -0.0838946921420261, - 0.0483075143504545, -0.0177935888957858, "facGenderm:facExperimexperimental", - "", 0.597778554510648, "debCollin1", 0.0337256723937977, - -0.527597750699201, -0.0277182462906693, 0.0230157381650564, - -0.00235125406280645, "contcor2", "", 0.85584320182878, - "debCollin1", 0.0129425807963588, -0.181668100033646, -0.0244179142877307, - 0.0716994895395629, 0.0236407876259161, "facExperimexperimental:contcor2", - "", 0.334978083033625, "debCollin1", 0.0245201964386732, - 0.964135327587746, -0.045262951470657, 0.0508921379416353, 0.00281459323548917, - "facGenderm:contcor2", "", 0.908649824734187, "debCollin1", - 0.0245298102849724, 0.114741744954035, -0.0944431021385556, - 0.046039847139408, -0.0242016274995738, "facGenderm:facExperimexperimental:contcor2", - "", 0.499482919138882, "debCollin1", 0.0358381455950403, - -0.67530356545354)) + "", 0.938510361567245, "contNormal", 2.41278827224329, + -0.0771422762886563, -3.2105259122099, 3.06452016599353, -0.0730028731081857, + "facExperimexperimental:contcor2", "", 0.963626033024275, + "contNormal", 1.60080647596083, -0.0456038092077108, -0.0421494773437858, + 0.0510540062196777, 0.00445226443794591, "facGenderm", "", + 0.851462911076422, "debCollin1", 0.0237768357731674, 0.187252184454685, + -0.0546136029313004, 0.0380353166310369, -0.00828914315013174, + "facExperimexperimental", "", 0.725806396395519, "debCollin1", + 0.0236353627651172, -0.35070936852154, -0.0838945500948416, + 0.0483076541940055, -0.0177934479504181, "facGenderm:facExperimexperimental", + "", 0.597781449659535, "debCollin1", 0.033725671831636, + -0.527593580322012, -0.0277181304208235, 0.0230158531841856, + -0.00235113861831894, "contcor2", "", 0.855850199891271, + "debCollin1", 0.0129425805793352, -0.181659183337277, -0.0244177518531871, + 0.0716996503583778, 0.0236409492525954, "facExperimexperimental:contcor2", + "", 0.334974770627484, "debCollin1", 0.02452019602649, + 0.964141935368514, -0.0452634288962406, 0.0508916589068399, + 0.00281411500529961, "facGenderm:contcor2", "", 0.908665276626996, + "debCollin1", 0.0245298098744517, 0.114722250995943, -0.0944432922544186, + 0.0460396546705679, -0.0242018187919253, "facGenderm:facExperimexperimental:contcor2", + "", 0.499479521447278, "debCollin1", 0.03583814499478, + -0.675308914438803)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0364018314532675, 0.867132645042024, 16, 0.451767238247646, - 0, "m", "Total", 0.0330289267614747, 0.211925020087475, 2.13173148720794, - 0.0375099002797826, 0.867315418674101, 16, 0.452412659476942, - 1, "m", "Total", 0.0325851883473824, 0.21168897105756, 2.13715744007243, - 0.0388057501458435, 0.865736811835162, 50, 0.452271280990503, - 0, "m", "Total", 0.0320396072927975, 0.210955677811441, 2.14391613291754, - 0.0359569390881448, 0.864018281283267, 50, 0.449987610185706, - 1, "m", "Total", 0.0331568244532998, 0.211244019973521, 2.13017916550779, - 0.0410022039736253, 0.870649168741494, 84, 0.45582568635756, - 0, "m", "Total", 0.031264350387127, 0.211648522960631, 2.1536917904329, - -0.00784535595501767, 0.875537997710005, 84, 0.433846320877494, - 1, "m", "Total", 0.0542104728891539, 0.225357037331563, 1.92515097826382, - -0.041004511445679, 0.0389869992606428, 16, -0.00100875609251809, - 0, "m", "Total indirect", 0.96057392253919, 0.020406372601049, - -0.0494333859446551, -0.0336791611766571, 0.032952491450213, - 16, -0.000363334863222026, 1, "m", "Total indirect", 0.982946576964628, - 0.016998182913679, -0.0213749237237374, -0.0170059896105399, - 0.0159965629112176, 50, -0.000504713349661143, 0, "m", "Total indirect", - 0.952196978774148, 0.00841917320473168, -0.0599480896030845, - -0.0535382462227012, 0.0479614779137855, 50, -0.00278838415445784, - 1, "m", "Total indirect", 0.914243479950521, 0.0258932625642878, - -0.107687632932885, -0.0417669667142856, 0.0478663507490775, - 84, 0.00304969201739596, 0, "m", "Total indirect", 0.893899204026309, - 0.0228660623793037, 0.133371980134029, -0.208587453574171, 0.170728106648831, - 84, -0.0189296734626701, 1, "m", "Total indirect", 0.8449050325553, - 0.096765951623345, -0.195623286343037)) + list(0.0364012867409444, 0.867132249332942, 16, 0.451766768036943, + 0, "m", "Total", 0.0330291407168426, 0.211925058099204, 2.13172888609268, + 0.0375093295081011, 0.867315855758068, 16, 0.452412592633085, + 1, "m", "Total", 0.0325854250748034, 0.211689228168317, 2.13715452858737, + 0.0388056809470123, 0.86573679048943, 50, 0.452271235718221, + 0, "m", "Total", 0.0320396344338727, 0.210955690019088, 2.14391579424711, + 0.0359571816372536, 0.864018254964821, 50, 0.449987718301037, + 1, "m", "Total", 0.0331567251346119, 0.211243951383599, 2.1301803689702, + 0.0410021908408349, 0.870649080423121, 84, 0.455825635631978, + 0, "m", "Total", 0.0312643538787336, 0.211648503780282, 2.15369174593921, + -0.00784581273464552, 0.875538248241239, 84, 0.433846217753297, + 1, "m", "Total", 0.054210722906304, 0.225357217771323, 1.92514897922433, + -0.0410058920026347, 0.038987439396193, 16, -0.00100922630322082, + 0, "m", "Total indirect", 0.960556456912723, 0.0204068370719577, + -0.0494553026351966, -0.0336852757828505, 0.0329584723686924, + 16, -0.000363401707079084, 1, "m", "Total indirect", 0.982946535284064, + 0.0170012685634074, -0.0213749759745135, -0.0170073709228965, + 0.015997853679011, 50, -0.000504758621942762, 0, "m", "Total indirect", + 0.952196561837549, 0.00841985487035692, -0.0599486130954375, + -0.0535362370479532, 0.0479596849697001, 50, -0.00278827603912657, + 1, "m", "Total indirect", 0.914243592209864, 0.025892292618191, + -0.107687491418494, -0.0417665053003313, 0.0478657878839591, + 84, 0.00304964129181389, 0, "m", "Total indirect", 0.893899753081787, + 0.0228658010788205, 0.133371285847432, -0.208588549984477, 0.170728996810743, + 84, -0.0189297765868671, 1, "m", "Total indirect", 0.844905000322488, + 0.0967664584112844, -0.195623327521301)) @@ -11147,7 +11163,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 75 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -11158,27 +11174,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -11187,143 +11203,144 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1404.48233882014, 1477.4271040278, 21, "Model 1", 100, -674.241169410068, + list(1404.48233882008, 1477.42710402775, 21, "Model 1", 100, -674.241169410042, 75)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848765994173, 0.0642083706114381, -0.240320197691367, "contcor1", - "", 0.121931962493391, "contGamma", 0.15537457356609, - -1.5467150909936, -0.40393392836616, 0.194628483504051, -0.104652722431055, - "contcor2", "", 0.493116357992938, "contGamma", 0.152697298672729, - -0.685360666761715, 0.424979489946987, 0.896763915633261, 0.660871702790124, - "contcor2", "", 3.99658643956968e-08, "contcor1", 0.120355381376303, - 5.49100252296855, 1.68041088299416, 2.9691911008604, 2.32480099192728, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776505086822, 7.07106790162319, 0.732634759192888, 1.29452453282471, - 1.0135796460088, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341861907652, 7.07106516212129, 0.721542011321985, - 1.27492431006697, 0.998233160694476, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171547821794, 7.07106478675562, - 0.00462621343165525, 0.00817425949062823, 0.00640023646114174, + list(-0.403933984603781, 0.194628487043205, -0.104652748780288, "contcor2", + "", 0.493116292310549, "contGamma", 0.152697313922187, + -0.685360770875235, -0.544848659557366, 0.0642085270187169, + -0.240320066269325, "contcor1", "", 0.121932197159499, + "contGamma", 0.155374586313894, -1.54671411825239, 1.68041095878133, + 2.96919136526188, 2.32480116202161, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328776553203602, 7.07106738412067, + 0.744754608926425, 1.31593933408358, 1.030346971505, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.145713066582497, + 7.07106778870559, 0.0046262134253861, 0.00817425946876165, 0.00640023644707387, "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000905130422538251, 7.07106545285883, 0.744754609192376, 1.31593933426761, - 1.03034697172999, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.145713066561596, 7.07106779126387, 0.32389177002912, - 0.572298419761554, 0.448095094895337, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633702077415284, - 7.07106873821541, 0.318532819261987, 0.562829424353832, 0.44068112180791, - "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", - 0.0623217076994338, 7.07106942468961)) + 0.000905130418559241, 7.07106546840131, 0.424979483023174, 0.896763930702145, + 0.66087170686266, "contcor2", "", 3.99659147998221e-08, + "contcor1", 0.120355386986788, 5.49100230083765, 0.732634776251506, + 1.2945245918854, 1.01357968406845, "contcor1", "", + 1.53743684450092e-12, "contcor1", 0.143341872622662, 7.07106489906569, + 0.721542022534657, 1.27492434846146, 0.998233185498061, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171554756061, + 7.0710646151271, 0.323891808875984, 0.572298555305054, 0.448095182090519, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633702324094909, 7.07106736164357, 0.318532838610204, 0.562829491699666, + 0.440681165154935, "debCollin1:contcor2", "", 1.53743684450092e-12, + "debCollin1:contcor2", 0.0623217199439487, 7.07106873095411 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.146732362231469, 0.122660940212222, "", "", -0.0120357110096236, - "contGamma", "contNormal", "", "", "", 0.860976695056916, - 0.0687240440560721, -0.175131006548503, -0.0189658377512647, - 0.0308819064008094, 16, 16, 0.00595803432477236, "contGamma", - "debCollin1", "contNormal", "", "", 0.639407030643892, - 0.0127164949318627, 0.468528030459383, -0.0685081685432086, - 0.0356526797931053, 50, 16, -0.0164277443750517, "contGamma", - "debCollin1", "contNormal", "", "", 0.53642238701918, - 0.0265721332529376, -0.618232048540383, -0.282911778956314, - 0.137197311638812, 84, 16, -0.072857233658751, "contGamma", - "debCollin1", "contNormal", "", "", 0.496623647827288, - 0.107172655699006, -0.679811778326836, -0.0491996620797185, - 0.078083782491989, 16, 50, 0.0144420602061352, "contGamma", - "debCollin1", "contNormal", "", "", 0.656486100924554, - 0.0324708631321042, 0.444769827872429, -0.0255941683713346, - 0.0225802090927629, 50, 50, -0.00150697963928586, "contGamma", - "debCollin1", "contNormal", "", "", 0.902406216705429, - 0.0122896078305752, -0.12262227241594, -0.153639154511662, 0.0518159814080455, - 84, 50, -0.0509115865518081, "contGamma", "debCollin1", "contNormal", - "", "", 0.331371823388933, 0.0524129875702592, - -0.971354408743854, -0.160196665334113, 0.211647145932007, 16, - 84, 0.025725240298947, "contGamma", "debCollin1", "contNormal", - "", "", 0.786243319892928, 0.0948598581910629, - 0.271192059418139, -0.0386518381937185, 0.0732939309422937, - 50, 84, 0.0173210463742876, "contGamma", "debCollin1", "contNormal", - "", "", 0.544170061601725, 0.028558118929487, - 0.606519162450968, -0.0861981755141994, 0.0384995352323957, - 84, 84, -0.0238493201409018, "contGamma", "debCollin1", "contNormal", - "", "", 0.453426985677416, 0.0318112250353054, - -0.749713980346022)) + list(-0.146732362226707, 0.122660940148466, "", "", -0.0120357110391205, + "contGamma", "contNormal", "", "", "", 0.860976694684671, + 0.068724044038593, -0.175131007022253, -0.0189658330512322, + 0.0308818909168298, 16, 16, 0.0059580289327988, "contGamma", + "debCollin1", "contNormal", "", "", 0.639407198156084, + 0.0127164897827854, 0.468527796158364, -0.0685081787680871, + 0.0356526821478844, 50, 16, -0.0164277483101013, "contGamma", + "debCollin1", "contNormal", "", "", 0.536422338625876, + 0.0265721364620929, -0.618232121964927, -0.282911851426495, + 0.137197289937564, 84, 16, -0.0728572807444654, "contGamma", + "debCollin1", "contNormal", "", "", 0.496623421629966, + 0.107172668650502, -0.67981213551804, -0.0491996746767769, 0.0780837534793088, + 16, 50, 0.014442039401266, "contGamma", "debCollin1", "contNormal", + "", "", 0.656486522546036, 0.0324708589443687, + 0.44476924450964, -0.0255941664157757, 0.0225802073764531, 50, + 50, -0.00150697951966134, "contGamma", "debCollin1", "contNormal", + "", "", 0.902406217012278, 0.0122896068938568, + -0.12262227202846, -0.153639192526626, 0.0518159758536863, 84, + 50, -0.05091160833647, "contGamma", "debCollin1", "contNormal", + "", "", 0.331371692882136, 0.0524129958511781, + -0.971354670910796, -0.160196704292127, 0.211647082669394, 16, + 84, 0.0257251891886336, "contGamma", "debCollin1", "contNormal", + "", "", 0.786243720637857, 0.0948598519907962, + 0.271191538345744, -0.0386518331228275, 0.0732939111377234, + 50, 84, 0.017321039007448, "contGamma", "debCollin1", "contNormal", + "", "", 0.544170143376044, 0.0285581125835894, + 0.606519039265966, -0.0861981900646415, 0.0384995410486187, + 84, 84, -0.0238493245080114, "contGamma", "debCollin1", "contNormal", + "", "", 0.453426976742246, 0.0318112302309787, + -0.74971399517854)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.146732362231469, 0.122660940212222, -0.0120357110096236, "contGamma", - "", 0.860976695056916, "contNormal", 0.0687240440560721, - -0.175131006548503, -2.33172274853432, 2.72584287128254, 0.197060061374114, - "debCollin1", "", 0.878608200200474, "contNormal", - 1.29021901925502, 0.152733805992023, -3.92782171981242, 0.322249290557662, - -1.80278621462738, "contcor1", "", 0.0963631235850957, - "contNormal", 1.08422171118809, -1.66274683122872, -0.0857622872659491, - 6.3677909352443, 3.14101432398917, "debCollin1:contcor1", "", - 0.0564078340159113, "contNormal", 1.6463448495521, 1.90787144312063, - -1.07379981186025, 3.00630225596363, 0.966251222051689, "contcor2", - "", 0.353242258555151, "contNormal", 1.04086149031492, - 0.92831873505027, -4.80094220660088, 1.40104567450315, -1.69994826604887, - "debCollin1:contcor2", "", 0.282624735859708, "contNormal", - 1.58216883831145, -1.07444175671107, -0.0199697550244962, 0.000908090089205782, - -0.00953083246764522, "contGamma", "", 0.0735399311567315, - "debCollin1", 0.0053260787642997, -1.78946517492938, -0.0336994535004892, - 0.042065155942126, 0.00418285122081836, "contcor1", "", - 0.828665534799635, "debCollin1", 0.0193280616481315, 0.216413383657783, - -0.0233912746389658, 0.0139845375966588, -0.00470336852115348, - "contGamma:contcor1", "", 0.62181239229697, "debCollin1", - 0.00953482118305241, -0.493283348565933, -0.0310213412177602, - 0.0494312969200449, 0.00920497785114235, "contcor2", "", - 0.653793803837638, "debCollin1", 0.0205240093114989, 0.44849803522478, - -0.0182406888856858, 0.01756077278029, -0.000339958052697925, - "contGamma:contcor2", "", 0.970307795238774, "debCollin1", - 0.00913319375977651, -0.0372222534241126)) + list(-0.146732362226707, 0.122660940148466, -0.0120357110391205, "contGamma", + "", 0.860976694684671, "contNormal", 0.068724044038593, + -0.175131007022253, -2.33172275423803, 2.72584287692243, 0.197060061342197, + "debCollin1", "", 0.878608200490142, "contNormal", + 1.29021902214885, 0.152733805624719, -3.92782153081751, 0.322249099244126, + -1.80278621578669, "contcor1", "", 0.0963630935753024, + "contNormal", 1.08422161416885, -1.66274698108531, -0.0857619987224822, + 6.36779064201184, 3.14101432164468, "debCollin1:contcor1", "", + 0.0564078119650817, "contNormal", 1.64634470113714, 1.90787161368768, + -1.0737997344441, 3.00630217799701, 0.966251221776459, "contcor2", + "", 0.353242240359136, "contNormal", 1.04086145067573, + 0.928318770139063, -4.80094208556298, 1.40104555240199, -1.69994826658049, + "debCollin1:contcor2", "", 0.282624716839412, "contNormal", + 1.58216877628504, -1.07444179916886, -0.0199697543267053, 0.000908090764053045, + -0.0095308317813261, "contGamma", "", 0.0735399515757091, + "debCollin1", 0.0053260787584466, -1.7894650480358, -0.0336994442685772, + 0.0420651650890555, 0.00418286041023919, "contcor1", "", + 0.828665164040792, "debCollin1", 0.0193280616264519, 0.216413859345038, + -0.0233912811978117, 0.0139845309957635, -0.0047033751010241, + "contGamma:contcor1", "", 0.621811904368901, "debCollin1", + 0.00953482117232533, -0.493284039209417, -0.0310213402744831, + 0.0494312977717908, 0.00920497874865383, "contcor2", "", + 0.653793771916616, "debCollin1", 0.0205240092881487, 0.44849807946487, + -0.0182406857568857, 0.0175607758683528, -0.000339954944266479, + "contGamma:contcor2", "", 0.970308066572501, "debCollin1", + 0.00913319374938413, -0.0372219131220558)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.141761913548368, 0.129606560178665, 16, 16, -0.00607767668485123, - "Total", 0.930041780198284, 0.0692279235403184, -0.0877922718758361, - -0.168271233597136, 0.111344322827785, 50, 16, -0.0284634553846752, - "Total", 0.689871891538227, 0.0713318098267349, -0.399028924876756, - -0.328260150002978, 0.158474260666229, 84, 16, -0.0848929446683746, - "Total", 0.494172523860313, 0.12416922313586, -0.683687491347906, - -0.145659867985989, 0.150472566379012, 16, 50, 0.00240634919651163, - "Total", 0.974589255696737, 0.0755453765224403, 0.0318530306854297, - -0.146122598796297, 0.119037217498478, 50, 50, -0.0135426906489094, - "Total", 0.841320106988898, 0.0676440532546318, -0.200205191695578, - -0.223904838546689, 0.098010243423826, 84, 50, -0.0629472975614317, - "Total", 0.443377074506089, 0.08212270340418, -0.766502988237327, - -0.215564074827307, 0.242943133405954, 16, 84, 0.0136895292893234, - "Total", 0.906831319748152, 0.116968273868782, 0.117036259803924, - -0.137332376915948, 0.147903047645276, 50, 84, 0.00528533536466401, - "Total", 0.942096410084897, 0.072765476001377, 0.0726352063520342, - -0.175715351830675, 0.103945289529625, 84, 84, -0.0358850311505254, - "Total", 0.614970721450913, 0.0713433112971023, -0.50299082700389, - -0.0189658377512647, 0.0308819064008094, 16, 16, 0.00595803432477236, - "Total indirect", 0.639407030643892, 0.0127164949318627, 0.468528030459383, - -0.0685081685432086, 0.0356526797931053, 50, 16, -0.0164277443750517, - "Total indirect", 0.53642238701918, 0.0265721332529376, -0.618232048540383, - -0.282911778956314, 0.137197311638812, 84, 16, -0.072857233658751, - "Total indirect", 0.496623647827288, 0.107172655699006, -0.679811778326836, - -0.0491996620797185, 0.078083782491989, 16, 50, 0.0144420602061352, - "Total indirect", 0.656486100924554, 0.0324708631321042, 0.444769827872429, - -0.0255941683713346, 0.0225802090927629, 50, 50, -0.00150697963928586, - "Total indirect", 0.902406216705429, 0.0122896078305752, -0.12262227241594, - -0.153639154511662, 0.0518159814080455, 84, 50, -0.0509115865518081, - "Total indirect", 0.331371823388933, 0.0524129875702592, -0.971354408743854, - -0.160196665334113, 0.211647145932007, 16, 84, 0.025725240298947, - "Total indirect", 0.786243319892928, 0.0948598581910629, 0.271192059418139, - -0.0386518381937185, 0.0732939309422937, 50, 84, 0.0173210463742876, - "Total indirect", 0.544170061601725, 0.028558118929487, 0.606519162450968, - -0.0861981755141994, 0.0384995352323957, 84, 84, -0.0238493201409018, - "Total indirect", 0.453426985677416, 0.0318112250353054, -0.749713980346022 + list(-0.141761918251123, 0.12960655403848, 16, 16, -0.00607768210632168, + "Total", 0.930041717583995, 0.0692279231736202, -0.0877923506542172, + -0.168271238989405, 0.111344320290961, 50, 16, -0.0284634593492218, + "Total", 0.689871853588705, 0.071331810555178, -0.3990289763808, + -0.328260215423934, 0.158474231856763, 84, 16, -0.0848929917835858, + "Total", 0.494172316685861, 0.124169232475698, -0.683687819365406, + -0.145659886416861, 0.150472543141152, 16, 50, 0.00240632836214548, + "Total", 0.974589475218283, 0.0755453752961452, 0.0318527554163632, + -0.1461225986494, 0.119037217531837, 50, 50, -0.0135426905587818, + "Total", 0.841320107963849, 0.0676440532256674, -0.200205190448923, + -0.2239048673252, 0.098010228574019, 84, 50, -0.0629473193755905, + "Total", 0.443376936240174, 0.082122706957486, -0.766503220700915, + -0.215564116517064, 0.24294307281609, 16, 84, 0.0136894781495131, + "Total", 0.906831662388063, 0.116968269047238, 0.117035827417302, + -0.137332380423255, 0.14790303635991, 50, 84, 0.00528532796832749, + "Total", 0.942096489397006, 0.0727654740171415, 0.0726351066864817, + -0.17571535900292, 0.103945287908657, 84, 84, -0.0358850355471319, + "Total", 0.614970685142938, 0.0713433127132704, -0.502990878645547, + -0.0189658330512322, 0.0308818909168298, 16, 16, 0.0059580289327988, + "Total indirect", 0.639407198156084, 0.0127164897827854, 0.468527796158364, + -0.0685081787680871, 0.0356526821478844, 50, 16, -0.0164277483101013, + "Total indirect", 0.536422338625876, 0.0265721364620929, -0.618232121964927, + -0.282911851426495, 0.137197289937564, 84, 16, -0.0728572807444654, + "Total indirect", 0.496623421629966, 0.107172668650502, -0.67981213551804, + -0.0491996746767769, 0.0780837534793088, 16, 50, 0.014442039401266, + "Total indirect", 0.656486522546036, 0.0324708589443687, 0.44476924450964, + -0.0255941664157757, 0.0225802073764531, 50, 50, -0.00150697951966134, + "Total indirect", 0.902406217012278, 0.0122896068938568, -0.12262227202846, + -0.153639192526626, 0.0518159758536863, 84, 50, -0.05091160833647, + "Total indirect", 0.331371692882136, 0.0524129958511781, -0.971354670910796, + -0.160196704292127, 0.211647082669394, 16, 84, 0.0257251891886336, + "Total indirect", 0.786243720637857, 0.0948598519907962, 0.271191538345744, + -0.0386518331228275, 0.0732939111377234, 50, 84, 0.017321039007448, + "Total indirect", 0.544170143376044, 0.0285581125835894, 0.606519039265966, + -0.0861981900646415, 0.0384995410486187, 84, 84, -0.0238493245080114, + "Total indirect", 0.453426976742246, 0.0318112302309787, -0.74971399517854 )) @@ -11340,7 +11357,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 75 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -11351,27 +11368,27 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -11380,125 +11397,126 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(958.801185934803, 1031.74595114247, 21, "Model 1", 100, -451.400592967402, + list(958.80118593532, 1031.74595114299, 21, "Model 1", 100, -451.40059296766, 75)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962228939799509, 0.0896223105989492, 0.040000010600477, "facExperimexperimental", - "", 0.114128345787729, "facGenderm", 0.0253179652227727, - 1.57990621475766, -0.163250573012996, 0.0341992689301609, -0.0645256520414177, - "contcor2", "", 0.200188933122496, "facGenderm", 0.0503707832135224, - -1.28101347497204, -0.170527198321071, 0.0272978223003133, -0.0716146880103788, - "contcor2", "", 0.155883226671576, "facExperimexperimental", - 0.0504664938187137, -1.41905416032336, 0.180704779836613, 0.319295090258756, - 0.249999935047685, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553206883712, 7.07106964892875, 0.180704779443825, - 0.319295088885379, 0.249999934164602, "facExperimexperimental", - "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553204382165, 7.07106967398239, 0.721541806556018, 1.27492359526437, - 0.998232700910192, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.141171417708017, 7.07106804703784, 0.00473837835980752, - 0.00837244175547445, 0.00655541005764098, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000927074023893286, 7.07107511233166, - 0.758591156312968, 1.34038772930961, 1.04948944281129, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.148420220367767, - 7.07106781145307, 0.0796446877547108, 0.140727663518599, 0.110186175636655, + list(-0.163250833836001, 0.0341991704426752, -0.0645258316966628, "contcor2", + "", 0.200188050301268, "facGenderm", 0.0503708246264055, + -1.2810159884267, -0.00962232551701086, 0.0896223656638734, + 0.0400000200734313, "facExperimexperimental", "", 0.114128592565319, + "facGenderm", 0.0253179884844094, 1.57990513733202, 0.18070483478411, + 0.319295281912067, 0.250000058348088, "facGenderm", "", + 1.53743684450092e-12, "facGenderm", 0.0353553555629441, 7.07106616147606, + 0.758591156312265, 1.34038772931032, 1.04948944281129, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.148420220368126, + 7.07106781143598, 0.00473838242331495, 0.00837245592874482, + 0.00655541917602988, "debCollin1", "", 1.53743684450092e-12, + "debCollin1", 0.000927076602961833, 7.07106527668433, -0.170526996996479, + 0.0272981285138545, -0.0716144342413124, "contcor2", "", + 0.155884911911657, "facExperimexperimental", 0.0504665205765905, + -1.41904837946232, 0.180704828125998, 0.319295258689351, 0.250000043407674, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553513372023, 7.07106658404536, + 0.721541917681781, 1.27492398281369, 0.998232950247733, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.141171488225526, + 7.07106628112485, 0.0796447220874358, 0.140727783269259, 0.110186252678347, "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, - "debCollin1:facExperimexperimental", 0.0155826781118692, 7.07106794131408, - 0.31853285182004, 0.562829537844768, 0.440681194832404, "debCollin1:contcor2", - "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217283459567, - 7.07106825385396)) + "debCollin1:facExperimexperimental", 0.015582699902559, 7.07106299725712, + 0.318532826128449, 0.562829448222654, 0.440681137175552, "debCollin1:contcor2", + "", 1.53743684450092e-12, "debCollin1:contcor2", 0.0623217120368501, + 7.0710691791487)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0715438300028005, 0.892289575876473, "", 0.481916702939637, - "", "m", "facGender", "contNormal", "", "", "", 0.0213542773547413, - 0.209377762129205, 2.30166135142017, -0.0560644004179153, 0.0459987548048033, - 16, -0.00503282280655598, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.846727901291906, 0.0260369976254104, - -0.193295051870507, -0.0555869444398369, 0.0642898960559021, - 16, 0.00435147580803259, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.886849652981579, 0.0305813885972682, - 0.142291635783383, -0.0213440026029491, 0.0198255778940844, - 50, -0.000759212354432364, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.942372886213193, 0.0105026369927647, - -0.0722877840065682, -0.0615383274028843, 0.0595927466508237, - 50, -0.000972790376030281, 1, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.974886333792357, 0.0309013520169693, - -0.0314805117748919, -0.0179138357070423, 0.0185924435178207, - 84, 0.000339303905389171, 0, "m", "facGender", "debCollin1", - "contNormal", "", "", 0.970936804446966, 0.00931299746138703, - 0.0364333724771183, -0.10816733883345, 0.0859184213847258, 84, - -0.0111244587243619, 1, "m", "facGender", "debCollin1", "contNormal", - "", "", 0.822228672322329, 0.0495125833303824, - -0.224679424422915)) + list(0.071543829986549, 0.892289575892724, "", 0.481916702939637, "", + "m", "facGender", "contNormal", "", "", "", 0.0213542773598856, + 0.209377762137497, 2.30166135132902, -0.0560674010185046, 0.0460009492078588, + 16, -0.0050332259053229, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.846723482332957, 0.0260383229057946, + -0.193300694654294, -0.0555841140299521, 0.0642865740606486, + 16, 0.00435123001534824, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.886850233182963, 0.0305798190773212, + 0.142290901209917, -0.0213451797736458, 0.0198266635294564, + 50, -0.000759258122094722, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.942372580185934, 0.010503214249818, + -0.0722881685582945, -0.061537205548191, 0.0595916603397355, + 50, -0.000972772604227796, 1, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.974886334779907, 0.0309007886990209, + -0.0314805105365682, -0.0179137325877962, 0.0185922371537434, + 84, 0.000339252282973581, 0, "m", "facGender", "debCollin1", + "contNormal", "", "", 0.970940977987517, 0.00931291851010886, + 0.0364281382474607, -0.108168209570202, 0.08591909613784, 84, + -0.011124556716181, 1, "m", "facGender", "debCollin1", "contNormal", + "", "", 0.822228524484698, 0.0495129775952461, + -0.224679614446154)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0715438300028005, 0.892289575876473, 0.481916702939637, "facGenderm", - "", 0.0213542773547413, "contNormal", 0.209377762129205, - 2.30166135142017, -3.61764353814927, 3.32517001016163, -0.146236763993818, - "debCollin1", "", 0.934196953354945, "contNormal", - 1.77115845063351, -0.082565602158018, -3.43286866784459, 3.20124664292996, - -0.115811012457313, "facExperimexperimental", "", 0.945443543292161, - "contNormal", 1.69240745317353, -0.0684297461820728, -4.77223994009148, - 5.15463707680224, 0.191198568355379, "debCollin1:facExperimexperimental", - "", 0.939816464664455, "contNormal", 2.53241311962762, - 0.0755005440753261, -1.7756767159204, 1.36743846080339, -0.204119127558505, - "contcor2", "", 0.799057826031457, "contNormal", 0.801829829914296, - -0.254566642376379, -1.9565275580346, 2.77446185022761, 0.408967146096502, - "debCollin1:contcor2", "", 0.734718593320787, "contNormal", - 1.20690723033169, 0.338855494290233, -0.0402675532368695, 0.0518452321093736, - 0.00578883943625202, "facGenderm", "", 0.805412577193707, - "debCollin1", 0.0234985913192326, 0.246348360104211, -0.0489095154791336, - 0.042035133465142, -0.00343719100699582, "facExperimexperimental", - "", 0.882223597164647, "debCollin1", 0.023200591863329, - -0.148151005252097, -0.0882812532128701, 0.0429308132780339, - -0.0226752199674181, "facGenderm:facExperimexperimental", "", - 0.498141683483871, "debCollin1", 0.0334730810172759, -0.67741657709116, - -0.0174101404226059, 0.0258805571380151, 0.00423520835770461, - "contcor2", "", 0.701353707790065, "debCollin1", 0.0110437482275421, - 0.383493744192972, -0.0370218557857605, 0.0287649222744489, - -0.00412846675565579, "facGenderm:contcor2", "", 0.805685234204166, - "debCollin1", 0.0167826497270172, -0.245996122353055)) + list(0.071543829986549, 0.892289575892724, 0.481916702939637, "facGenderm", + "", 0.0213542773598856, "contNormal", 0.209377762137497, + 2.30166135132902, -3.6176435487942, 3.32517002080657, -0.146236763993818, + "debCollin1", "", 0.934196953556269, "contNormal", + 1.7711584560647, -0.0825656019048337, -3.43286868865078, 3.20124666373615, + -0.115811012457313, "facExperimexperimental", "", 0.945443543633831, + "contNormal", 1.69240746378913, -0.0684297457528483, -4.77223997111371, + 5.15463710782447, 0.191198568355379, "debCollin1:facExperimexperimental", + "", 0.939816465039897, "contNormal", 2.53241313545558, + 0.0755005436034363, -1.77567672205493, 1.36743846693792, -0.204119127558505, + "contcor2", "", 0.799057826799031, "contNormal", 0.801829833044213, + -0.254566641382686, -1.95652756734623, 2.77446185953923, 0.408967146096502, + "debCollin1:contcor2", "", 0.734718594325691, "contNormal", + 1.20690723508261, 0.338855492956349, -0.0402672303356109, 0.0518456190741131, + 0.0057891943692511, "facGenderm", "", 0.805401018441839, + "debCollin1", 0.0234986076622577, 0.246363293198406, -0.0489100053574644, + 0.0420347068383025, -0.00343764925958097, "facExperimexperimental", + "", 0.882208090893035, "debCollin1", 0.02320060799921, + -0.148170653962949, -0.0882813296183669, 0.042930828129363, + -0.022675250744502, "facGenderm:facExperimexperimental", "", + 0.49814139911573, "debCollin1", 0.0334731042975062, -0.677417025411394, + -0.0174099332768037, 0.0258807943919176, 0.00423543055755697, + "contcor2", "", 0.701338990275305, "debCollin1", 0.011043755908321, + 0.383513597431626, -0.037022327001083, 0.0287644968130486, -0.0041289150940172, + "facGenderm:contcor2", "", 0.805664686990342, "debCollin1", + 0.0167826613991506, -0.246022665643851)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0643801964874038, 0.889387563778757, 16, 0.476883880133081, - 0, "m", "Total", 0.0234600108206691, 0.210464930427015, 2.26585911090045, - 0.0742142205600816, 0.898322136935257, 16, 0.486268178747669, - 1, "m", "Total", 0.0207243321827093, 0.210235474446376, 2.31296920763817, - 0.0706762840519884, 0.89163869711842, 50, 0.481157490585204, - 0, "m", "Total", 0.0215943194880837, 0.209433035387915, 2.29742881629919, - 0.0702171505907353, 0.891670674536477, 50, 0.480943912563606, - 1, "m", "Total", 0.0217310553667567, 0.209558321077648, 2.29503610303025, - 0.0715087173730635, 0.893003296316988, 84, 0.482256006845026, - 0, "m", "Total", 0.0213813272239098, 0.209568794483921, 2.3011823302826, - 0.0551225863409189, 0.88646190208963, 84, 0.470792244215275, - 1, "m", "Total", 0.0264270643174027, 0.212080253082763, 2.21987779329719, - -0.0560644004179153, 0.0459987548048033, 16, -0.00503282280655598, - 0, "m", "Total indirect", 0.846727901291906, 0.0260369976254104, - -0.193295051870507, -0.0555869444398369, 0.0642898960559021, - 16, 0.00435147580803259, 1, "m", "Total indirect", 0.886849652981579, - 0.0305813885972682, 0.142291635783383, -0.0213440026029491, - 0.0198255778940844, 50, -0.000759212354432364, 0, "m", "Total indirect", - 0.942372886213193, 0.0105026369927647, -0.0722877840065682, - -0.0615383274028843, 0.0595927466508237, 50, -0.000972790376030281, - 1, "m", "Total indirect", 0.974886333792357, 0.0309013520169693, - -0.0314805117748919, -0.0179138357070423, 0.0185924435178207, - 84, 0.000339303905389171, 0, "m", "Total indirect", 0.970936804446966, - 0.00931299746138703, 0.0364333724771183, -0.10816733883345, - 0.0859184213847258, 84, -0.0111244587243619, 1, "m", "Total indirect", - 0.822228672322329, 0.0495125833303824, -0.224679424422915)) + list(0.0643795546554752, 0.889387399413152, 16, 0.476883477034314, + 0, "m", "Total", 0.0234602084404734, 0.210465052231886, 2.26585588427713, + 0.0742142707661864, 0.898321595143783, 16, 0.486267932954985, + 1, "m", "Total", 0.0207243051089019, 0.21023532342381, 2.31296970002859, + 0.0706762061330867, 0.891638683501997, 50, 0.481157444817542, + 0, "m", "Total", 0.0215943421973788, 0.20943305179191, 2.29742841782019, + 0.0702172560769841, 0.891670604593833, 50, 0.480943930335409, + 1, "m", "Total", 0.0217310224209355, 0.209558276324557, 2.29503667796226, + 0.0715086678474471, 0.893003242597773, 84, 0.48225595522261, + 0, "m", "Total", 0.021381340477707, 0.209568793414106, 2.30118209570294, + 0.055122361400708, 0.886461931046203, 84, 0.470792146223455, + 1, "m", "Total", 0.0264271417245479, 0.212080317853541, 2.21987665328084, + -0.0560674010185046, 0.0460009492078588, 16, -0.0050332259053229, + 0, "m", "Total indirect", 0.846723482332957, 0.0260383229057946, + -0.193300694654294, -0.0555841140299521, 0.0642865740606486, + 16, 0.00435123001534824, 1, "m", "Total indirect", 0.886850233182963, + 0.0305798190773212, 0.142290901209917, -0.0213451797736458, + 0.0198266635294564, 50, -0.000759258122094722, 0, "m", "Total indirect", + 0.942372580185934, 0.010503214249818, -0.0722881685582945, -0.061537205548191, + 0.0595916603397355, 50, -0.000972772604227796, 1, "m", "Total indirect", + 0.974886334779907, 0.0309007886990209, -0.0314805105365682, + -0.0179137325877962, 0.0185922371537434, 84, 0.000339252282973581, + 0, "m", "Total indirect", 0.970940977987517, 0.00931291851010886, + 0.0364281382474607, -0.108168209570202, 0.08591909613784, 84, + -0.011124556716181, 1, "m", "Total indirect", 0.822228524484698, + 0.0495129775952461, -0.224679614446154)) @@ -11514,7 +11532,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 76 - continuous works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -11525,31 +11543,31 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor1"), list(processDependent = "debCollin1", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "contGamma", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor1"), list(processDependent = "debCollin1", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "contGamma", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -11558,168 +11576,169 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1408.05835697136, 1486.21346255101, 19, "Model 1", 100, -674.029178485682, + list(1408.05835697799, 1486.21346255764, 19, "Model 1", 100, -674.029178488997, 76)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848231276136, 0.0642092652730996, -0.240319483001518, "contcor1", - "", 0.121933292675151, "contGamma", 0.155374665390131, - -1.54670957712507, -0.403934123871023, 0.194628916827821, -0.104652603521601, - "contcor2", "", 0.49311730350833, "contGamma", 0.152697459091145, - -0.685359168020826, 0.424978662576508, 0.896761411579013, 0.660870037077761, - "contcor2", "", 3.99645800897019e-08, "contcor1", 0.120354953642992, - 5.4910081976193, 1.68041333233765, 2.96919964399499, 2.32480648816632, - "contGamma", "", 1.53765888910584e-12, "contGamma", - 0.328778059653932, 7.07105118453885, 0.732634030588727, 1.29452199134454, - 1.01357801096663, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341399430784, 7.07107656958566, 0.721541434117088, - 1.27492229594281, 0.99823186502995, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.141171181254024, 7.07107396964916, - 0.00462622034512676, 0.00817428360451137, 0.00640025197481906, - "debCollin1", "", 1.53765888910584e-12, "debCollin1", - 0.00090513481047899, 7.07104831315912, 0.741603728508732, 1.3103720090746, - 1.02598786879167, "contNormal", "", 1.53743684450092e-12, - "contNormal", 0.145096615308303, 7.0710668654237, 0.323891653532862, - 0.572298013322224, 0.448094833427543, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633701337750999, - 7.07107286561564, 0.318533020031705, 0.5628301245587, 0.440681572295203, - "debCollin1:contcor2", "", 1.53743684450092e-12, "debCollin1:contcor2", - 0.0623218351087009, 7.07106219716688)) + list(-0.403933887163434, 0.194628116344308, -0.104652885409563, "contcor2", + "", 0.493115389659607, "contGamma", 0.152697194496716, + -0.685362201673023, -0.544848659016959, 0.0642079535775762, + -0.240320352719691, "contcor1", "", 0.121931400759729, + "contGamma", 0.155374439887339, -1.54671741950572, 1.68041006760778, + 2.96918825683721, 2.3247991622225, "contGamma", "", + 1.53743684450092e-12, "contGamma", 0.328775987567923, 7.07107346683038, + 0.741603787007666, 1.31037221343227, 1.02598800021997, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.145096652517845, + 7.07106595787095, 0.00462618066071689, 0.00817414518895189, + 0.00640016292483439, "debCollin1", "", 1.53654866608122e-12, + "debCollin1", 0.000905109623498414, 7.07114669723275, 0.424979682623537, + 0.896764197769122, 0.660871940196329, "contcor2", "", + 3.99656536753668e-08, "contcor1", 0.120355404197975, 5.49100345431308, + 0.732634702053492, 1.29452433424774, 1.01357951815061, "contcor1", + "", 1.53743684450092e-12, "contcor1", 0.143341825825974, + 7.07106605005273, 0.721542049932475, 1.2749244448839, 0.998233247408186, + "contcor2", "", 1.53743684450092e-12, "contcor2", 0.141171572364704, + 7.07106417168279, 0.323891803012902, 0.572298534603816, 0.448095168808359, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633702286241773, 7.07106757442563, 0.318533095994363, 0.562830389492755, + 0.440681742743559, "debCollin1:contcor2", "", 1.53765888910584e-12, + "debCollin1:contcor2", 0.0623218833165757, 7.07105946245291 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.209487052571584, 0.166373313108294, 16, 16, -0.0215568697316452, - "contGamma", "contNormal", "", "", "", 0.822118376858699, - 0.0958845082472475, -0.224821195057482, -0.198507156295151, - 0.314044882590122, 50, 16, 0.0577688631474854, "contGamma", - "contNormal", "", "", "", 0.658627879059944, 0.130755473806718, - 0.441808373031321, -0.344935429635909, 0.633621066724908, 84, - 16, 0.1443428185445, "contGamma", "contNormal", "", "", - "", 0.563120761663243, 0.249636346402165, 0.578212350183827, - -0.366989137192483, 0.186094127828773, 16, 50, -0.0904475046818552, - "contGamma", "contNormal", "", "", "", 0.521497626330998, - 0.141095262306835, -0.641038566448548, -0.146446744676708, 0.124203201071259, - 50, 50, -0.0111217718027246, "contGamma", "contNormal", "", - "", "", 0.872029661530486, 0.06904462221827, -0.161080927745038, - -0.233445962934013, 0.384350330122593, 84, 50, 0.0754521835942898, - "contGamma", "contNormal", "", "", "", 0.632119773636923, - 0.157603991177824, 0.478745386017271, -0.669519488667256, 0.3271236827543, - 16, 84, -0.171197902956478, "contGamma", "contNormal", "", "", - "", 0.500728626972581, 0.254250378905671, -0.673343747581958, - -0.385811827615258, 0.202067487460564, 50, 84, -0.091872170077347, - "contGamma", "contNormal", "", "", "", 0.540143760071537, - 0.149971968799667, -0.612595612451219, -0.229492994523592, 0.218896565162927, - 84, 84, -0.00529821468033251, "contGamma", "contNormal", "", - "", "", 0.963056593187583, 0.114387193648291, -0.0463182504207861, - -0.0198745141502388, 0.0329039942745475, 16, 16, 0.00651474006215433, + list(-0.209487950813374, 0.16637244016329, 16, 16, -0.0215577553250417, + "contGamma", "contNormal", "", "", "", 0.822111203247913, + 0.095884514700628, -0.224830415968101, -0.198508088065888, 0.314043990720212, + 50, 16, 0.0577679513271619, "contGamma", "contNormal", "", "", + "", 0.658632950611143, 0.130755483985687, 0.441801365160986, + -0.344936413244318, 0.633620169445955, 84, 16, 0.144341878100819, + "contGamma", "contNormal", "", "", "", 0.563123339217774, + 0.24963636842539, 0.578208531918934, -0.366990191578099, 0.186093120112542, + 16, 50, -0.0904485357327787, "contGamma", "contNormal", "", + "", "", 0.521492913871654, 0.141095274212509, -0.641045819837671, + -0.146447810543235, 0.124202152382084, 50, 50, -0.0111228290805751, + "contGamma", "contNormal", "", "", "", 0.872017609106577, + 0.0690446266003282, -0.161096230485259, -0.233447076057962, + 0.384349271444126, 84, 50, 0.0754510976930819, "contGamma", + "contNormal", "", "", "", 0.632124705892855, 0.157604005067232, + 0.478738453765151, -0.669520732356879, 0.327122523344981, 16, + 84, -0.171199104505949, "contGamma", "contNormal", "", "", + "", 0.500725657344156, 0.254250400406144, -0.673348416492059, + -0.385813076825472, 0.202066281117981, 50, 84, -0.0918733978537456, + "contGamma", "contNormal", "", "", "", 0.540138375112764, + 0.149971979735488, -0.612603754486584, -0.229494265549132, 0.218895323388955, + 84, 84, -0.00529947108008859, "contGamma", "contNormal", "", + "", "", 0.963047841234008, 0.114387201110563, -0.046329231143319, + -0.0198744424157608, 0.0329040375120005, 16, 16, 0.00651479754811987, "contGamma", "debCollin1", "contNormal", "", "", - 0.628486538374031, 0.0134641526173686, 0.483858156342524, -0.0737508294034688, - 0.0369338283476415, 50, 16, -0.0184085005279136, "contGamma", - "debCollin1", "contNormal", "", "", 0.514438478732355, - 0.0282364009298581, -0.651942171158502, -0.312135653893738, - 0.149930530967953, 84, 16, -0.0811025614628925, "contGamma", - "debCollin1", "contNormal", "", "", 0.491432796834181, - 0.117876192753135, -0.68803173540516, -0.0534540233955156, 0.0850202546172222, - 16, 50, 0.0157831156108533, "contGamma", "debCollin1", "contNormal", - "", "", 0.655027976839516, 0.0353257200400123, - 0.446788220961279, -0.0264403552509462, 0.0221911138327824, - 50, 50, -0.00212462070908189, "contGamma", "debCollin1", "contNormal", - "", "", 0.86402361971876, 0.0124062149782668, - -0.171254545629251, -0.170325526205234, 0.0560012254436319, - 84, 50, -0.0571621503808012, "contGamma", "debCollin1", "contNormal", - "", "", 0.322156782040888, 0.0577374771766478, - -0.990035470478101, -0.174677529906469, 0.230895596219775, 16, - 84, 0.0281090331566532, "contGamma", "debCollin1", "contNormal", - "", "", 0.785869449023718, 0.103464433358305, - 0.271678220662647, -0.039486753857856, 0.0763358431781959, 50, - 84, 0.01842454466017, "contGamma", "debCollin1", "contNormal", - "", "", 0.532913471186987, 0.0295471238118776, - 0.623564742797859, -0.0950841059187408, 0.0398073955985655, - 84, 84, -0.0276383551600876, "contGamma", "debCollin1", "contNormal", - "", "", 0.421878392890796, 0.034411729649451, - -0.803166694660131)) + 0.628483322660303, 0.0134641453475858, 0.48386268715437, -0.0737512744093718, + 0.0369337660535639, 50, 16, -0.018408754177904, "contGamma", + "debCollin1", "contNormal", "", "", 0.514434137764548, + 0.0282364985622198, -0.651948900014633, -0.312136267227525, + 0.14992864317127, 84, 16, -0.0811038120281276, "contGamma", + "debCollin1", "contNormal", "", "", 0.491424921068011, + 0.117875867629075, -0.68804424229852, -0.0534537032627295, 0.085019554490396, + 16, 50, 0.0157829256138332, "contGamma", "debCollin1", "contNormal", + "", "", 0.655029483540666, 0.0353254597649204, + 0.446786134387593, -0.0264404231598963, 0.0221911749890111, + 50, 50, -0.0021246240854426, "contGamma", "debCollin1", "contNormal", + "", "", 0.864023763094006, 0.0124062479036623, + -0.17125436328057, -0.170325865216218, 0.0560006503475697, 84, + 50, -0.0571626074343244, "contGamma", "debCollin1", "contNormal", + "", "", 0.322152408215776, 0.0577374169497559, + -0.990044419272657, -0.174676914985469, 0.230893103082503, 16, + 84, 0.028108094048517, "contGamma", "debCollin1", "contNormal", + "", "", 0.785874827790713, 0.103463640471727, + 0.271671225953023, -0.0394864661157587, 0.0763352173554536, + 50, 84, 0.0184243756198474, "contGamma", "debCollin1", "contNormal", + "", "", 0.532913998426594, 0.0295468907553401, + 0.623563940192845, -0.0950839897845459, 0.0398073075462301, + 84, 84, -0.0276383411191579, "contGamma", "debCollin1", "contNormal", + "", "", 0.421877926089504, 0.0344116775600933, + -0.803167502394874)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.144540336198725, 0.126023178238206, -0.00925857898025928, "contGamma", - "", 0.893293118331454, "contNormal", 0.0690225730092751, - -0.134138421339569, -2.28223755261184, 2.81249461446848, 0.26512853092832, - "debCollin1", "", 0.838359729138659, "contNormal", - 1.29970045553564, 0.203992027392999, -4.64758136892937, 0.319583255412073, - -2.16399905675865, "contcor1", "", 0.087681057013228, - "contNormal", 1.26715711704955, -1.70775906763425, -0.173334368452747, - 0.336197474123658, 0.0814315528354555, "contGamma:contcor1", - "", 0.531007469973634, "contNormal", 0.129985001407048, - 0.626468838358147, -0.00781862951603296, 6.97589430297638, 3.48403783673017, - "debCollin1:contcor1", "", 0.0505151906077979, "contNormal", - 1.78159215872818, 1.95557542149114, -0.962519792679086, 3.35439371628586, - 1.19593696180339, "contcor2", "", 0.277497575915794, - "contNormal", 1.10127368232687, 1.08595799663214, -0.303234635485305, - 0.158779540181867, -0.0722275476517194, "contGamma:contcor2", - "", 0.540002153718958, "contNormal", 0.117862924857671, - -0.612809734180108, -4.98755827204046, 1.2734069420526, -1.85707566499393, - "debCollin1:contcor2", "", 0.244952629826181, "contNormal", - 1.59721435278371, -1.16269657967781, -0.0199697941592129, 0.000908076257600995, - -0.00953085895080598, "contGamma", "", 0.0735394800200708, - "debCollin1", 0.00532608521929381, -1.78946797852207, -0.0336993794133327, - 0.0420653218552348, 0.00418297122095109, "contcor1", "", - 0.828660900155062, "debCollin1", 0.0193280850735498, 0.216419329956046, - -0.0233914023365703, 0.0139844551978882, -0.00470347356934109, - "contGamma:contcor1", "", 0.62180503114203, "debCollin1", - 0.00953483273908973, -0.493293768023677, -0.0310215400542442, - 0.0494311955898719, 0.00920482776781388, "contcor2", "", - 0.653799472365252, "debCollin1", 0.0205240341860149, 0.448490179093838, - -0.0182406249285576, 0.017560880127772, -0.000339872400392806, - "contGamma:contcor2", "", 0.970315308686139, "debCollin1", - 0.00913320482894771, -0.0372128301902942)) + list(-0.144541397446603, 0.126022134246074, -0.0092596316002646, "contGamma", + "", 0.893281066051363, "contNormal", 0.0690225774113321, + -0.134153663156954, -2.28223795224599, 2.81249453891162, 0.265128293332816, + "debCollin1", "", 0.838359882134944, "contNormal", + 1.29970053820994, 0.203991831609129, -4.64758224345298, 0.319583657236851, + -2.16399929310807, "contcor1", "", 0.087681103847381, + "contNormal", 1.26715744265461, -1.70775881533287, -0.173334418972796, + 0.336197470797387, 0.0814315259122955, "contGamma:contcor1", + "", 0.531007643837409, "contNormal", 0.129985013446499, + 0.626468573208345, -0.00781994299028677, 6.97589481117519, 3.48403743409245, + "debCollin1:contcor1", "", 0.050515277393435, "contNormal", + 1.78159262344924, 1.95557468538863, -0.962520350767144, 3.35439403906031, + 1.19593684414658, "contcor2", "", 0.277497721225483, + "contNormal", 1.10127390704082, 1.08595766820638, -0.303234806245043, + 0.158779405935257, -0.0722277001548931, "contGamma:contcor2", + "", 0.540001330098024, "contNormal", 0.117862934172416, + -0.612810979652305, -4.98755910231876, 1.27340739235457, -1.8570758549821, + "debCollin1:contcor2", "", 0.244952678068374, "contNormal", + 1.59721467946836, -1.16269646081655, -0.0199697501237831, 0.000907975050276217, + -0.00953088753675345, "contGamma", "", 0.0735366131981323, + "debCollin1", 0.00532604816688984, -1.78948579474057, -0.03369892862315, + 0.042065245564332, 0.00418315847059104, "contcor1", "", + 0.828652175673439, "debCollin1", 0.0193279506116184, 0.216430523579487, + -0.0233913599814212, 0.0139842375362644, -0.00470356122257843, + "contGamma:contcor1", "", 0.621796112011923, "debCollin1", + 0.00953476640706145, -0.49330639281262, -0.0310214868541577, + 0.0494306890977527, 0.00920460112179749, "contcor2", "", + 0.653805189135115, "debCollin1", 0.0205238914047674, 0.448482256130989, + -0.0182403936495665, 0.0175608623432945, -0.000339765653136016, + "contGamma:contcor2", "", 0.970324421413312, "debCollin1", + 0.00913314129118104, -0.0372014011722444)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.201939371322057, 0.171855111983075, 16, 16, -0.0150421296694909, - "Total", 0.874658047226888, 0.095357487753238, -0.157744609510018, - -0.21615091205307, 0.294871637292213, 50, 16, 0.0393603626195717, - "Total", 0.762710276972218, 0.130365290733953, 0.301923636252977, - -0.452408257127035, 0.578888771290249, 84, 16, 0.0632402570816074, - "Total", 0.810040136519876, 0.263090810992453, 0.240374252688823, - -0.355376974351899, 0.206048196209895, 16, 50, -0.0746643890710019, - "Total", 0.602147769909651, 0.143223338538423, -0.521314401919009, - -0.146170671428372, 0.119677886404759, 50, 50, -0.0132463925118065, - "Total", 0.845144313070626, 0.0678197558552378, -0.195317608339392, - -0.285641873868809, 0.322221940295786, 84, 50, 0.0182900332134886, - "Total", 0.906109783565435, 0.155070148982162, 0.117946834600595, - -0.674744508744466, 0.388566769144817, 16, 84, -0.143088869799824, - "Total", 0.597845526048728, 0.271257861439431, -0.527501282508542, - -0.36793843105186, 0.221043180217506, 50, 84, -0.073447625417177, - "Total", 0.624965038118574, 0.150253171975398, -0.488825789509476, - -0.246565549780865, 0.180692410100025, 84, 84, -0.0329365698404201, - "Total", 0.762514544602994, 0.108996380354702, -0.302180400241147, - -0.0198745141502388, 0.0329039942745475, 16, 16, 0.00651474006215433, - "Total indirect", 0.628486538374031, 0.0134641526173686, 0.483858156342524, - -0.0737508294034688, 0.0369338283476415, 50, 16, -0.0184085005279136, - "Total indirect", 0.514438478732355, 0.0282364009298581, -0.651942171158502, - -0.312135653893738, 0.149930530967953, 84, 16, -0.0811025614628925, - "Total indirect", 0.491432796834181, 0.117876192753135, -0.68803173540516, - -0.0534540233955156, 0.0850202546172222, 16, 50, 0.0157831156108533, - "Total indirect", 0.655027976839516, 0.0353257200400123, 0.446788220961279, - -0.0264403552509462, 0.0221911138327824, 50, 50, -0.00212462070908189, - "Total indirect", 0.86402361971876, 0.0124062149782668, -0.171254545629251, - -0.170325526205234, 0.0560012254436319, 84, 50, -0.0571621503808012, - "Total indirect", 0.322156782040888, 0.0577374771766478, -0.990035470478101, - -0.174677529906469, 0.230895596219775, 16, 84, 0.0281090331566532, - "Total indirect", 0.785869449023718, 0.103464433358305, 0.271678220662647, - -0.039486753857856, 0.0763358431781959, 50, 84, 0.01842454466017, - "Total indirect", 0.532913471186987, 0.0295471238118776, 0.623564742797859, - -0.0950841059187408, 0.0398073955985655, 84, 84, -0.0276383551600876, - "Total indirect", 0.421878392890796, 0.034411729649451, -0.803166694660131 + list(-0.201940183493245, 0.171854267939402, 16, 16, -0.0150429577769218, + "Total", 0.87465119328435, 0.0953574796223528, -0.157753307202507, + -0.216152042131498, 0.294870436430014, 50, 16, 0.0393591971492579, + "Total", 0.762717060395307, 0.130365272676537, 0.301914738036993, + -0.452409784181583, 0.578885916326965, 84, 16, 0.0632380660726912, + "Total", 0.810046352142814, 0.263090472234, 0.240366234230047, + -0.355378142818625, 0.206046922580734, 16, 50, -0.0746656101189455, + "Total", 0.602141763840674, 0.143223311710778, -0.52132302505142, + -0.146171739571399, 0.119676833239363, 50, 50, -0.0132474531660177, + "Total", 0.845132079102415, 0.0678197596761321, -0.195333236644894, + -0.285643176458223, 0.322220156975738, 84, 50, 0.0182884902587575, + "Total", 0.906117593622807, 0.155070026344542, 0.117936977827831, + -0.674746304909709, 0.388564283994845, 16, 84, -0.143091010457432, + "Total", 0.597839810004383, 0.271257685674791, -0.527509515910944, + -0.36793980523877, 0.221041760770973, 50, 84, -0.0734490222338981, + "Total", 0.624958429378264, 0.150253160429364, -0.488835123494309, + -0.246566773752583, 0.18069114935409, 84, 84, -0.0329378121992464, + "Total", 0.762505836254135, 0.108996370973352, -0.302191824416789, + -0.0198744424157608, 0.0329040375120005, 16, 16, 0.00651479754811987, + "Total indirect", 0.628483322660303, 0.0134641453475858, 0.48386268715437, + -0.0737512744093718, 0.0369337660535639, 50, 16, -0.018408754177904, + "Total indirect", 0.514434137764548, 0.0282364985622198, -0.651948900014633, + -0.312136267227525, 0.14992864317127, 84, 16, -0.0811038120281276, + "Total indirect", 0.491424921068011, 0.117875867629075, -0.68804424229852, + -0.0534537032627295, 0.085019554490396, 16, 50, 0.0157829256138332, + "Total indirect", 0.655029483540666, 0.0353254597649204, 0.446786134387593, + -0.0264404231598963, 0.0221911749890111, 50, 50, -0.0021246240854426, + "Total indirect", 0.864023763094006, 0.0124062479036623, -0.17125436328057, + -0.170325865216218, 0.0560006503475697, 84, 50, -0.0571626074343244, + "Total indirect", 0.322152408215776, 0.0577374169497559, -0.990044419272657, + -0.174676914985469, 0.230893103082503, 16, 84, 0.028108094048517, + "Total indirect", 0.785874827790713, 0.103463640471727, 0.271671225953023, + -0.0394864661157587, 0.0763352173554536, 50, 84, 0.0184243756198474, + "Total indirect", 0.532913998426594, 0.0295468907553401, 0.623563940192845, + -0.0950839897845459, 0.0398073075462301, 84, 84, -0.0276383411191579, + "Total indirect", 0.421877926089504, 0.0344116775600933, -0.803167502394874 )) @@ -11736,7 +11755,7 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) }) test_that("Test that model number 76 - factor works", { - + options <- jaspTools::analysisOptions("ClassicProcess") options$dependent <- "contNormal" options$covariates <- list("contGamma", "contcor1", "contcor2", "debCollin1") @@ -11747,31 +11766,31 @@ options$errorCalculationMethod <- "standard" options$naAction <- "fiml" options$emulation <- "lavaan" options$estimator <- "default" -options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, +options$moderationProbes <- list(list(probePercentile = 16, value = "16"), list(probePercentile = 50, value = "50"), list(probePercentile = 84, value = "84")) options$pathPlotsLegend <- 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(list(processDependent = "contNormal", - processIndependent = "facGender", processType = "mediators", - processVariable = "debCollin1"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "facExperim"), list(processDependent = "debCollin1", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "debCollin1", processType = "moderators", - processVariable = "contcor2"), list(processDependent = "contNormal", - processIndependent = "facGender", processType = "moderators", - processVariable = "contcor2")), residualCovariances = TRUE, - statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, +options$processModels <- list(list(conceptualPathPlot = TRUE, independentCovariances = TRUE, + inputType = "inputVariables", mediationEffects = TRUE, mediatorCovariances = TRUE, + modelNumber = 1, modelNumberCovariates = list(), modelNumberIndependent = "", + modelNumberMediators = list(), modelNumberModeratorW = "", + modelNumberModeratorZ = "", name = "Model 1", pathCoefficients = TRUE, + processRelationships = list(list(processDependent = "contNormal", + processIndependent = "facGender", processType = "mediators", + processVariable = "debCollin1"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "facExperim"), list(processDependent = "debCollin1", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "debCollin1", processType = "moderators", + processVariable = "contcor2"), list(processDependent = "contNormal", + processIndependent = "facGender", processType = "moderators", + processVariable = "contcor2")), residualCovariances = TRUE, + statisticalPathPlot = TRUE, totalEffects = TRUE, localTests = FALSE, localTestType = "cis", localTestBootstrap = FALSE, localTestBootstrapSamples = 1000)) set.seed(1) results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) @@ -11780,144 +11799,144 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(962.391580930551, 1040.54668651019, 19, "Model 1", 100, -451.195790465275, + list(962.391580925062, 1040.54668650471, 19, "Model 1", 100, -451.195790462531, 76)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962199672362371, 0.0896223815773241, 0.0400001924268502, - "facExperimexperimental", "", 0.11412589252632, "facGenderm", - 0.0253179086666323, 1.57991692574388, -0.163250254375774, 0.0341998059923472, - -0.0645252241917136, "contcor2", "", 0.200192414303409, - "facGenderm", 0.0503708389352004, -1.28100356388191, -0.170526623650399, - 0.0272989998347913, -0.0716138119078038, "contcor2", "", - 0.155889548229685, "facExperimexperimental", 0.050466647613327, - -1.41903247579481, 0.180704512970788, 0.319294159446086, 0.249999336208437, - "facGenderm", "", 1.53721479989599e-12, "facGenderm", - 0.0353551513110638, 7.07108658675727, 0.180704765137866, 0.319295038988245, - 0.249999902063055, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553113586682, 7.07107058192437, - 0.721543470878833, 1.27492940032895, 0.998236435603891, "contcor2", - "", 1.53765888910584e-12, "contcor2", 0.141172474039103, - 7.07104159219729, 0.00473834357910046, 0.00837232044438939, - 0.00655533201174493, "debCollin1", "", 1.53654866608122e-12, - "debCollin1", 0.00092705194941164, 7.07115929792857, 0.755490283885498, - 1.33490866286722, 1.04519947337636, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.147813527072971, 7.07106781140791, - 0.0796447980667311, 0.14072804828162, 0.110186423174175, "debCollin1:facExperimexperimental", - "", 1.53765888910584e-12, "debCollin1:facExperimexperimental", - 0.0155827481261659, 7.07105205590499, 0.318532806376883, 0.562829379332223, - 0.440681092854553, "debCollin1:contcor2", "", 1.53743684450092e-12, - "debCollin1:contcor2", 0.062321699501195, 7.07106989028923 - )) + list(-0.163249813334683, 0.0341998917323271, -0.0645249608011779, "contcor2", + "", 0.200193441317323, "facGenderm", 0.0503707482954963, + -1.28100063994775, -0.00962197504469632, 0.0896222799907527, + 0.0400001524730282, "facExperimexperimental", "", 0.11412580452123, + "facGenderm", 0.0253178772207742, 1.57991730997916, 0.180704528335545, + 0.319294213041521, 0.249999370688533, "facGenderm", "", + 1.53721479989599e-12, "facGenderm", 0.035355161063967, 7.07108561141093, + 0.755490283884886, 1.33490866286783, 1.04519947337636, "contNormal", + "", 1.53743684450092e-12, "contNormal", 0.147813527073283, + 7.07106781139298, 0.00473836689720645, 0.00837240177486408, + 0.00655538433603526, "debCollin1", "", 1.53699275529107e-12, + "debCollin1", 0.00092706674875723, 7.07110285728942, -0.170525838817598, + 0.0272991158494118, -0.0716133614840929, "contcor2", "", + 0.155890751562678, "facExperimexperimental", 0.0504664769933089, + -1.41902834813668, 0.180704613550388, 0.319294510265235, 0.249999561907812, + "facExperimexperimental", "", 1.53721479989599e-12, + "facExperimexperimental", 0.0353552151488564, 7.07108020288481, + 0.72154265625404, 1.27492655899334, 0.99823460762369, "contcor2", + "", 1.53765888910584e-12, "contcor2", 0.141171957011537, + 7.07105454054241, 0.0796448558815249, 0.140728249937691, 0.110186552909608, + "debCollin1:facExperimexperimental", "", 1.53765888910584e-12, + "debCollin1:facExperimexperimental", 0.0155827848210437, 7.07104373030981, + 0.318533215021355, 0.562830804670121, 0.440682009845738, "debCollin1:contcor2", + "", 1.53765888910584e-12, "debCollin1:contcor2", 0.0623219588665288, + 7.07105517638688)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.175783430370312, 1.32274378031512, 16, 0.573480174972406, 0, - "m", "facGender", "contNormal", "", "", "", 0.133578077862812, - 0.382284374229738, 1.50014024540738, -0.362716053008532, 1.00606619819138, + list(-0.175783430116806, 1.32274378006162, 16, 0.573480174972405, 0, + "m", "facGender", "contNormal", "", "", "", 0.133578077731364, + 0.382284374100395, 1.50014024591494, -0.362716053042664, 1.00606619822551, 16, 0.321675072591423, 1, "m", "facGender", "contNormal", "", - "", "", 0.356938046359087, 0.349185562080908, 0.921215272116231, - 0.0235481260619423, 1.18422554846151, 50, 0.603886837261728, - 0, "m", "facGender", "contNormal", "", "", "", 0.0414008985094156, - 0.296096620028441, 2.03949250485778, -0.236088085529856, 0.940251555291348, + "", "", 0.356938046383068, 0.349185562098322, 0.921215272070289, + 0.0235481259688034, 1.18422554855465, 50, 0.603886837261728, + 0, "m", "facGender", "contNormal", "", "", "", 0.0414008985420504, + 0.296096620075962, 2.03949250453046, -0.236088085515832, 0.940251555277323, 50, 0.352081734880746, 1, "m", "facGender", "contNormal", "", - "", "", 0.240697421783395, 0.300092157330446, 1.17324537239756, - -0.0534551055770377, 1.33251133082279, 84, 0.639528112622876, - 0, "m", "facGender", "contNormal", "", "", "", 0.0704856635379627, - 0.35356936334855, 1.80877694426377, -0.392737323377006, 1.16818334386079, + "", "", 0.240697421772181, 0.300092157323291, 1.17324537242553, + -0.0534551059360534, 1.33251133118181, 84, 0.639528112622876, + 0, "m", "facGender", "contNormal", "", "", "", 0.0704856636836029, + 0.353569363531725, 1.80877694332669, -0.392737323202035, 1.16818334368582, 84, 0.387723010241894, 1, "m", "facGender", "contNormal", "", - "", "", 0.330212575270802, 0.398201364808268, 0.973685789421091, - -0.056938399914368, 0.0465244819870263, 16, -0.00520695896367084, + "", "", 0.330212575162383, 0.398201364718995, 0.97368578963938, + -0.0569377036645011, 0.0465240032195057, 16, -0.00520685022249772, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.84361034497157, 0.0263940773191488, -0.197277552107995, - -0.0557499229035051, 0.0658069335603466, 16, 0.00502850532842074, + "", 0.843611815671755, 0.0263937775643072, -0.197275672639564, + -0.055750705224323, 0.0658078718321857, 16, 0.00502858330393134, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.871181679630224, 0.0310099719746579, 0.162157686970184, - -0.0219077074864437, 0.0200641598926147, 50, -0.0009217737969145, + "", 0.871181506983233, 0.0310104109094216, 0.162157906214766, + -0.0219069497674244, 0.0200634757610264, 50, -0.000921737003198967, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.931396220985835, 0.0107073057745262, -0.0860883042219167, - -0.06047820206868, 0.060652748660656, 50, 8.72732959880079e-05, + "", 0.931396601728767, 0.0107069379487348, -0.0860878252598712, + -0.0604790136898567, 0.0606535626244905, 50, 8.72744673168816e-05, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.997746571291635, 0.0309013205560922, 0.00282425781220543, - -0.0157871436682365, 0.0163794388900215, 84, 0.000296147610892528, + "", 0.997746571288647, 0.0309017352537663, 0.00282425781595047, + -0.0157869714878823, 0.0163791221785721, 84, 0.000296075345344892, 0, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.971210959420073, 0.00820591164225055, 0.0360895441973473, - -0.105826104800968, 0.0868069399441564, 84, -0.00950958242840603, + "", 0.971217544167801, 0.00820578692266198, 0.0360812860649865, + -0.105827309221554, 0.0868079172032208, 84, -0.00950969600916648, 1, "m", "facGender", "debCollin1", "contNormal", "", - "", 0.846557714792424, 0.0491419858386659, -0.193512375743752 + "", 0.84655762110621, 0.0491425423998239, -0.193512495381203 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.020710761342815, 1.18515651938225, 0.602933640362535, "facGenderm", - "", 0.0423887125374458, "contNormal", 0.297057947805276, - 2.02968358469157, -3.64059357745488, 3.2913756640687, -0.174608956693091, - "debCollin1", "", 0.921345637553005, "contNormal", - 1.76839199500656, -0.0987388300705599, -3.31785503148945, 3.38683688352532, - 0.0344909260179321, "facExperimexperimental", "", 0.983911530055982, - "contNormal", 1.71041201978723, 0.0201652734071774, -1.08435620525992, - 0.580746000497959, -0.251805102380983, "facGenderm:facExperimexperimental", - "", 0.553320926332015, "contNormal", 0.424778776266298, - -0.592791157303781, -4.80316189734275, 5.11832346052118, 0.157580781589216, - "debCollin1:facExperimexperimental", "", 0.950356292924859, - "contNormal", 2.53103767113155, 0.0622593584388519, -1.83177667141746, - 1.39297613106648, -0.219400270175488, "contcor2", "", - 0.789702139837367, "contNormal", 0.822656137541399, -0.266697420906858, - -0.387148701095902, 0.45090769100851, 0.0318794949563041, "facGenderm:contcor2", - "", 0.881464259860913, "contNormal", 0.213793824456698, - 0.149113263852769, -1.98257276539175, 2.77839544199974, 0.397911338303996, - "debCollin1:contcor2", "", 0.743199731812545, "contNormal", - 1.21455502370079, 0.327619029635682, -0.0402675970528429, 0.0518446399642096, - 0.00578852145568336, "facGenderm", "", 0.805421916361766, - "debCollin1", 0.0234984514367667, 0.246336294596263, -0.0489090575204684, - 0.0420350500480665, -0.00343700373620094, "facExperimexperimental", - "", 0.882229271296821, "debCollin1", 0.0232004537547349, - -0.148143815312211, -0.0882809891233249, 0.0429302962875141, - -0.0226753464179054, "facGenderm:facExperimexperimental", "", - 0.498136729476596, "debCollin1", 0.0334728817584958, -0.677424387344545, - -0.0174101175308475, 0.0258803223289286, 0.00423510239904057, - "contcor2", "", 0.701359128043227, "debCollin1", 0.0110436824863226, - 0.383486432563202, -0.0370215352636558, 0.0287648511810859, - -0.00412834204128499, "facGenderm:contcor2", "", 0.805689853149045, - "debCollin1", 0.0167825498232764, -0.245990155534007)) + list(0.0207107612612455, 1.18515651946382, 0.602933640362535, "facGenderm", + "", 0.0423887125663689, "contNormal", 0.297057947846894, + 2.02968358440721, -3.64059357777798, 3.2913756643918, -0.174608956693091, + "debCollin1", "", 0.921345637560313, "contNormal", + 1.76839199517141, -0.0987388300613556, -3.31785502893583, 3.38683688097169, + 0.0344909260179319, "facExperimexperimental", "", 0.983911530043728, + "contNormal", 1.71041201848434, 0.0201652734225381, -1.08435620531391, + 0.580746000551949, -0.251805102380983, "facGenderm:facExperimexperimental", + "", 0.553320926357745, "contNormal", 0.424778776293845, + -0.592791157265339, -4.80316189446422, 5.11832345764265, 0.157580781589216, + "debCollin1:facExperimexperimental", "", 0.95035629289609, + "contNormal", 2.53103766966288, 0.0622593584749785, -1.83177666719835, + 1.39297612684737, -0.219400270175489, "contcor2", "", + 0.789702139300004, "contNormal", 0.822656135388754, -0.266697421604725, + -0.387148701001876, 0.450907690914484, 0.0318794949563041, "facGenderm:contcor2", + "", 0.881464259834511, "contNormal", 0.213793824408724, + 0.149113263886228, -1.98257275932605, 2.77839543593404, 0.397911338303997, + "debCollin1:contcor2", "", 0.743199731181272, "contNormal", + 1.21455502060599, 0.327619030470487, -0.0402680061877191, 0.0518445984459926, + 0.00578829612913677, "facGenderm", "", 0.805430099576258, + "debCollin1", 0.02349854521825, 0.246325722523509, -0.0489090391669806, + 0.0420354313563397, -0.00343680390532046, "facExperimexperimental", + "", 0.882236535227549, "debCollin1", 0.0232005463469428, + -0.148134610880547, -0.0882812531254925, 0.0429305559443347, + -0.0226753485905789, "facGenderm:facExperimexperimental", "", + 0.498138403159974, "debCollin1", 0.0334730153474271, -0.677421748689929, + -0.0174101957085695, 0.0258804169217725, 0.00423511060660147, + "contcor2", "", 0.701359711675001, "debCollin1", 0.0110437265612564, + 0.383485645276574, -0.0370216933663462, 0.0287649556294935, + -0.00412836886842636, "facGenderm:contcor2", "", 0.805689375701065, + "debCollin1", 0.0167826168018281, -0.245990772307729)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.184490377888482, 1.32103680990595, 16, 0.568273216008735, 0, - "m", "Total", 0.138977889898212, 0.384070115489325, 1.4796080014836, - -0.356853796700267, 1.01026095253995, 16, 0.326703577919844, - 1, "m", "Total", 0.348883500311954, 0.348760171111268, 0.936757132785134, - 0.0227613028808017, 1.18316882404883, 50, 0.602965063464814, - 0, "m", "Total", 0.0416647686901808, 0.296027766408253, 2.03685306544273, - -0.233249105342029, 0.937587121695497, 50, 0.352169008176734, - 1, "m", "Total", 0.238377351325861, 0.298688199444717, 1.17905229878998, - -0.0533577366790818, 1.33300625714662, 84, 0.639824260233769, - 0, "m", "Total", 0.0704361512258098, 0.35367078292284, 1.80909560848106, - -0.394192438580395, 1.15061929420737, 84, 0.378213427813488, - 1, "m", "Total", 0.337201799708859, 0.394091867241706, 0.959708786838579, - -0.056938399914368, 0.0465244819870263, 16, -0.00520695896367084, - 0, "m", "Total indirect", 0.84361034497157, 0.0263940773191488, - -0.197277552107995, -0.0557499229035051, 0.0658069335603466, - 16, 0.00502850532842074, 1, "m", "Total indirect", 0.871181679630224, - 0.0310099719746579, 0.162157686970184, -0.0219077074864437, - 0.0200641598926147, 50, -0.0009217737969145, 0, "m", "Total indirect", - 0.931396220985835, 0.0107073057745262, -0.0860883042219167, - -0.06047820206868, 0.060652748660656, 50, 8.72732959880079e-05, - 1, "m", "Total indirect", 0.997746571291635, 0.0309013205560922, - 0.00282425781220543, -0.0157871436682365, 0.0163794388900215, - 84, 0.000296147610892528, 0, "m", "Total indirect", 0.971210959420073, - 0.00820591164225055, 0.0360895441973473, -0.105826104800968, - 0.0868069399441564, 84, -0.00950958242840603, 1, "m", "Total indirect", - 0.846557714792424, 0.0491419858386659, -0.193512375743752)) + list(-0.184490192591373, 1.32103684209119, 16, 0.568273324749908, 0, + "m", "Total", 0.13897777411484, 0.384070076429456, 1.47960843508798, + -0.356853740484127, 1.01026105227484, 16, 0.326703655895354, + 1, "m", "Total", 0.348883400621407, 0.348760182213191, 0.936757326544938, + 0.022761345141443, 1.18316885537562, 50, 0.602965100258529, + 0, "m", "Total", 0.0416647543072299, 0.296027763618954, 2.03685320892625, + -0.233249109228589, 0.937587127924714, 50, 0.352169009348063, + 1, "m", "Total", 0.238377353820477, 0.29868820202532, 1.17905229252479, + -0.0533578006647601, 1.3330061766012, 84, 0.639824187968221, + 0, "m", "Total", 0.0704361796078021, 0.35367077869834, 1.80909542576022, + -0.394192519732164, 1.15061914819762, 84, 0.378213314232727, + 1, "m", "Total", 0.337201924517103, 0.394091850695998, 0.959708538922518, + -0.0569377036645011, 0.0465240032195057, 16, -0.00520685022249772, + 0, "m", "Total indirect", 0.843611815671755, 0.0263937775643072, + -0.197275672639564, -0.055750705224323, 0.0658078718321857, + 16, 0.00502858330393134, 1, "m", "Total indirect", 0.871181506983233, + 0.0310104109094216, 0.162157906214766, -0.0219069497674244, + 0.0200634757610264, 50, -0.000921737003198967, 0, "m", "Total indirect", + 0.931396601728767, 0.0107069379487348, -0.0860878252598712, + -0.0604790136898567, 0.0606535626244905, 50, 8.72744673168816e-05, + 1, "m", "Total indirect", 0.997746571288647, 0.0309017352537663, + 0.00282425781595047, -0.0157869714878823, 0.0163791221785721, + 84, 0.000296075345344892, 0, "m", "Total indirect", 0.971217544167801, + 0.00820578692266198, 0.0360812860649865, -0.105827309221554, + 0.0868079172032208, 84, -0.00950969600916648, 1, "m", "Total indirect", + 0.84655762110621, 0.0491425423998239, -0.193512495381203)) @@ -11975,55 +11994,101 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1923.79936103679, 1999.34929643045, -2, "Model 1", 100, -932.899680518397, + list(1919.79936103679, 1990.13895605847, 0, "Model 1", 100, -932.899680518397, 82)) + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(1.68041089480192, 2.96919114210622, 2.32480101845407, "contGamma", + "", 1.53743684450092e-12, "contGamma", 0.328776512596666, + 7.07106782079068, 0.719243095446917, 1.27101851286767, 0.995130804157296, + "contNormal", "", 1.55364610066044e-12, "contNormal", + 0.140761621584144, 7.06961736415084, -0.017063829424213, 0.0136234316300662, + -0.00172019889707342, "contcor1", "", 0.826077786806031, + "debCollin1", 0.00782852677302654, -0.219734689162772, -0.762343306344135, + 0.0887543315059579, -0.336794487419088, "debMiss1", "", + 0.120857287748549, "debCollin1", 0.217120733993952, -1.55118528398338, + 0.00468047960484189, 0.00827014311556882, 0.00647531136020536, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000915747314502139, 7.07106781276859, 0.413197536866249, 0.872209472692487, + 0.642703504779368, "contcor1", "", 4.05039308759569e-08, + "contcor2", 0.117097033273791, 5.4886403763674, -6.53655165917213, + 3.73651368195567, -1.40001898860823, "debMiss1", "", + 0.593196294728594, "contcor2", 2.62072809045483, -0.534209937195452, + 0.71669479817852, 1.2663592308511, 0.991527014514812, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.140223095171204, + 7.07106781022211, 507.563085651454, 899.790692619836, 703.676889135645, + "debMiss1", "", 2.02793337678031e-12, "debMiss1", 100.059901626312, + 7.03255627577598, 0.700714207950775, 1.23822336162219, 0.969468784786483, + "contcor1", "", 1.54809498553732e-12, "contcor1", 0.137122201711669, + 7.0701080691879)) + + + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0159066566815791, -0.0159066566815791, -0.0159066566815791, - "contGamma", "contNormal", "", "", "", "", "", "", - 0, "", -0.00334966180130081, -0.00334966180130081, -0.00334966180130081, - "contGamma", "debCollin1", "contNormal", "", "", "", - "", "", 0, "", 0.005685099654328, 0.005685099654328, 0.005685099654328, - "contGamma", "contcor2", "contNormal", "", "", "", - "", "", 0, "", 0.0027182844015523, 0.0027182844015523, 0.0027182844015523, - "contGamma", "debMiss1", "contNormal", "", "", "", - "", "", 0, "", -0.0308166335362827, -0.0308166335362827, -0.0308166335362827, - "contGamma", "contcor1", "contNormal", "", "", "", - "", "", 0, "", 0.00119185324433526, 0.00119185324433526, 0.00119185324433526, - "contGamma", "debCollin1", "contcor2", "contNormal", "", - "", "", "", 0, "", -0.000411112762668984, - -0.000411112762668984, -0.000411112762668984, "contGamma", "debMiss1", + list(-0.147948996708588, 0.116135688465705, -0.0159066541214415, "contGamma", + "contNormal", "", "", "", "", "", 0.813347598335086, + 0.0673697800718175, -0.236109634089419, -0.0261961165104945, + 0.0194967930965771, -0.00334966170695873, "contGamma", "debCollin1", + "contNormal", "", "", "", "", 0.773834706557657, + 0.0116565686837849, -0.287362584807512, -0.0163077605876651, + 0.0285137534820108, 0.00610299644717284, "contGamma", "contcor2", + "contNormal", "", "", "", "", 0.593517238385026, + 0.0114342698190432, 0.533746058450414, -0.0332675922356836, + 0.038704162906655, 0.0027182853354857, "contGamma", "debMiss1", + "contNormal", "", "", "", "", 0.882302602912406, + 0.0183604789960537, 0.148050894318713, -0.0775466819567461, + 0.0159133084692364, -0.0308166867437548, "contGamma", "contcor1", + "contNormal", "", "", "", "", 0.196176067287806, + 0.0238422723996928, -1.29252305431054, -0.00296122904246256, + 0.00450914197709736, 0.000773956467317395, "contGamma", "debCollin1", + "contcor2", "contNormal", "", "", "", + 0.684655756514328, 0.00190574191119971, 0.406118196157092, -0.00589119861695775, + 0.00506907909285442, -0.000411059762051665, "contGamma", "debMiss1", "contcor1", "contNormal", "", "", "", - "", 0, "")) + 0.883120221676967, 0.00279604058958875, -0.147014948059866 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list("", "", -0.0159066566815791, "contGamma", "", "", "contNormal", - "", "", "", "", 0.366958946475593, "debCollin1", "", - "", "contNormal", "", "", "", "", -0.15276696110588, "contcor2", - "", "", "contNormal", "", "", "", "", 0.0104534523941849, - "debMiss1", "", "", "contNormal", "", "", "", "", 0.302090384722267, - "contcor1", "", "", "contNormal", "", "", "", "", -0.00912816497178275, - "contGamma", "", "", "debCollin1", "", "", "", "", - -0.0372141961401443, "contGamma", "", "", "contcor2", - "", "", "", "", 0.85469244098942, "debCollin1", "", - "", "contcor2", "", "", "", "", 0.260037000126814, "contGamma", - "", "", "debMiss1", "", "", "", "", -0.102011302228684, - "contGamma", "", "", "contcor1", "", "", "", "", -0.00523346000800844, - "debMiss1", "", "", "contcor1", "", "")) + list(-0.147948996708588, 0.116135688465705, -0.0159066541214415, "contGamma", + "", 0.813347598335086, "contNormal", 0.0673697800718175, + -0.236109634089419, -2.10110820470282, 2.83502607382475, 0.366958934560965, + "debCollin1", "", 0.77073564479617, "contNormal", 1.25924106704592, + 0.291412775650513, -0.413433882620032, 0.107899969914886, -0.152766956352573, + "contcor2", "", 0.250696109315949, "contNormal", 0.132995773556844, + -1.14866023383276, 0.0028905648879694, 0.0180163398795304, 0.0104534523837499, + "debMiss1", "", 0.00674721413960322, "contNormal", + 0.00385868697355441, 2.70906980934003, 0.0387464898678602, 0.565434272654561, + 0.302090381261211, "contcor1", "", 0.024554599581468, + "contNormal", 0.134361597187792, 2.24833871868158, -0.0194720938734558, + 0.00121576385131691, -0.00912816501106944, "contGamma", "", + 0.0837015014975608, "debCollin1", 0.00527761170306084, -1.72960147973285, + -0.169849433838636, 0.0899500027982267, -0.0399497155202047, + "contGamma", "", 0.546659912050572, "contcor2", 0.0662765843367857, + -0.602772697476375, -1.87031193110395, 2.98033913143301, 0.555013600164534, + "debCollin1", "", 0.653778056597516, "contcor2", 1.23743372347611, + 0.448519859799382, -3.17623798796469, 3.69631216742168, 0.260037089728493, + "contGamma", "", 0.882091377958021, "debMiss1", 1.75323378633387, + 0.148318548133987, -0.228615253195251, 0.0245922941384487, -0.102011479528401, + "contGamma", "", 0.11427905810986, "contcor1", 0.0645949490222699, + -1.57924854918968, -0.012530212645152, 0.0020646455096896, -0.0052327835677312, + "debMiss1", "", 0.159891757636204, "contcor1", 0.00372324651625335, + -1.40543569835845)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0408888274816161, -0.0408888274816161, -0.0408888274816161, - "Total", "", 0, "", -0.0249821708000369, -0.0249821708000369, - -0.0249821708000369, "Total indirect", "", 0, "")) + list(-0.176023199935095, 0.0942455517666334, -0.0408888240842308, "Total", + 0.553151746868814, 0.0689473770522249, -0.593043939195237, -0.0779893376489408, + 0.0280249977233621, -0.0249821699627893, "Total indirect", 0.355628457145996, + 0.0270449702669362, -0.923727026364354)) @@ -12081,56 +12146,102 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1698.56540701386, 1774.11534240752, -2, "Model 1", 100, -820.282703506932, + list(1694.56540701386, 1764.90500203554, 0, "Model 1", 100, -820.282703506932, 82)) + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(0.180704808730328, 0.319295191038147, 0.249999999884237, "facGenderm", + "", 1.53743684450092e-12, "facGenderm", 0.0353553390268909, + 7.0710678150785, 0.679351239017548, 1.20070868331726, 0.940029961167402, + "contNormal", "", 1.57407420431355e-12, "contNormal", + 0.133001791974778, 7.06779921691328, -0.0155310360409273, 0.015901321346984, + 0.000185142653028361, "contcor1", "", 0.981579174401771, + "debCollin1", 0.0080186058610887, 0.0230891324795984, -0.781706195292346, + 0.0840275744384795, -0.348839310426933, "debMiss1", "", + 0.114221818813752, "debCollin1", 0.220854509715388, -1.57949824468822, + 0.00480662801191764, 0.0084930402246428, 0.00664983411828022, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000940428559351885, 7.07106781493651, 0.415818962568938, 0.877332208264479, + 0.646575585416708, "contcor1", "", 3.97900377091531e-08, + "contcor2", 0.11773513425142, 5.49178110279271, -6.63530159455768, + 3.59524109747847, -1.5200302485396, "debMiss1", "", + 0.560287998937135, "contcor2", 2.60988027655951, -0.582413784337798, + 0.707778596528062, 1.25060480683957, 0.979191701683816, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.138478618636172, + 7.07106780330087, 507.892714690368, 901.011119528301, 704.451917109335, + "debMiss1", "", 2.15072404330385e-12, "debMiss1", 100.287150156534, + 7.02434874268325, 0.716666293529629, 1.26647572327931, 0.99157100840447, + "contcor1", "", 1.55475632368507e-12, "contcor1", 0.140260084901179, + 7.06951667042756)) + + + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.475880029215187, 0.475880029215187, 0.475880029215187, "m", - "facGender", "contNormal", "", "", "", "", "", "", - 0, "", -0.00502620081529695, -0.00502620081529695, -0.00502620081529695, - "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", "", 0, "", 0.0279381985995283, 0.0279381985995283, - 0.0279381985995283, "m", "facGender", "contcor2", "contNormal", - "", "", "", "", "", 0, "", -0.0129128653936377, - -0.0129128653936377, -0.0129128653936377, "m", "facGender", - "debMiss1", "contNormal", "", "", "", "", - "", 0, "", -0.0235324435181743, -0.0235324435181743, -0.0235324435181743, + list(0.0910081224725078, 0.860751929259853, 0.475880025866181, "m", + "facGender", "contNormal", "", "", "", "", "", 0.0153749805220957, + 0.196366824303657, 2.42342375069574, -0.0327065874144014, 0.0226541864902512, + -0.0050262004620751, "m", "facGender", "debCollin1", "contNormal", + "", "", "", "", 0.721922972814061, 0.0141229059159585, + -0.355889962871992, -0.04952974707603, 0.106054836558549, 0.0282625447412593, + "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.476421330290286, 0.0396906741301907, 0.712070161583914, + -0.126072868172848, 0.100247146419103, -0.0129128608768725, + "m", "facGender", "debMiss1", "contNormal", "", "", + "", "", 0.823026170644271, 0.0577357585080989, -0.223654477061406, + -0.138320655423621, 0.0912558701983019, -0.0235323926126597, "m", "facGender", "contcor1", "contNormal", "", "", - "", "", "", 0, "", 0.000910991426515243, 0.000910991426515243, - 0.000910991426515243, "m", "facGender", "debCollin1", "contcor2", - "contNormal", "", "", "", "", 0, - "", 0.00187197380828937, 0.00187197380828937, 0.00187197380828937, - "m", "facGender", "debMiss1", "contcor1", "contNormal", "", - "", "", "", 0, "")) + "", "", 0.687826618468944, 0.0585665163831564, -0.401806254937635, + -0.00284859619040834, 0.00402188839589021, 0.000586646102740937, + "m", "facGender", "debCollin1", "contcor2", "contNormal", "", + "", "", 0.73784489268874, 0.00175270684576147, + 0.334708627492162, -0.0147815474651881, 0.0185253899009152, + 0.00187192121786353, "m", "facGender", "debMiss1", "contcor1", + "contNormal", "", "", "", 0.825631019351605, + 0.00849682382656624, 0.220308347692318)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list("", "", 0.475880029215187, "facGenderm", "", "", "contNormal", - "", "", "", "", 0.573720023709461, "debCollin1", "", - "", "contNormal", "", "", "", "", -0.111773886211324, "contcor2", - "", "", "contNormal", "", "", "", "", 0.0107880140712843, - "debMiss1", "", "", "contNormal", "", "", "", "", 0.289161884091483, - "contcor1", "", "", "contNormal", "", "", "", "", -0.00876072057377291, - "facGenderm", "", "", "debCollin1", "", "", "", "", - -0.249952824819093, "facGenderm", "", "", "contcor2", - "", "", "", "", 0.930323754581042, "debCollin1", "", - "", "contcor2", "", "", "", "", -1.19696408517017, "facGenderm", - "", "", "debMiss1", "", "", "", "", -0.0813815541149584, - "facGenderm", "", "", "contcor1", "", "", "", "", -0.00540850957094982, - "debMiss1", "", "", "contcor1", "", "")) + list(0.0910081224725078, 0.860751929259853, 0.475880025866181, "facGenderm", + "", 0.0153749805220957, "contNormal", 0.196366824303657, + 2.42342375069574, -1.79290884127227, 2.94034877890532, 0.573719968816522, + "debCollin1", "", 0.634690061553928, "contNormal", + 1.20748586645289, 0.475135970329726, -0.367051095396393, 0.14350331678753, + -0.111773889304432, "contcor2", "", 0.390795230450944, + "contNormal", 0.130245865794247, -0.858176101197744, 0.00343201054080372, + 0.0181440175053956, 0.0107880140230996, "debMiss1", "", + 0.00404792007154309, "contNormal", 0.00375313196585199, 2.8744030642287, + 0.0358514443861678, 0.542472331293712, 0.28916188783994, "contcor1", + "", 0.0252627608038503, "contNormal", 0.129242397029666, + 2.23736091627553, -0.0407263673121724, 0.0232049257195319, -0.00876072079632024, + "facGenderm", "", 0.591156438387134, "debCollin1", + 0.0163093030116845, -0.537160955930723, -0.641306843553368, + 0.135597595765052, -0.252854623894158, "facGenderm", "", + 0.202027488900194, "contcor2", 0.198193549842381, -1.27579643280646, + -1.77925887403205, 2.97744968035564, 0.599095403161793, "debCollin1", + "", 0.621514529069439, "contcor2", 1.21346835755861, + 0.493705006339943, -11.6494093208209, 9.25548197715544, -1.19696367183275, + "facGenderm", "", 0.822410573160282, "debMiss1", 5.33297842788732, + -0.22444562415133, -0.471868158437157, 0.309105404407237, -0.0813813770149599, + "facGenderm", "", 0.682924078848467, "contcor1", 0.199231610632801, + -0.408476229030502, -0.0127958409040199, 0.00197912205577032, + -0.00540835942412481, "debMiss1", "", 0.151319742569027, + "contcor1", 0.00376919246382415, -1.43488544987634)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.465129683322411, 0.465129683322411, 0.465129683322411, "m", - "Total", "", 0, "", -0.0107503458927761, -0.0107503458927761, - -0.0107503458927761, "m", "Total indirect", "", 0, "")) + list(0.0625107978025213, 0.867748570150353, 0.465129683976437, "m", + "Total", 0.0235575802096637, 0.205421573737947, 2.26426891544407, + -0.156837434248426, 0.135336750468939, -0.0107503418897435, + "m", "Total indirect", 0.885318086689426, 0.0745356004043945, + -0.144230969247143)) @@ -12184,7 +12295,99 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0, "Model 1", 83)) + list(1044.66489542349, 1094.16312895727, 6, "Model 1", 100, -503.332447711747, + 83)) + + + + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848037518826, 0.0642086936772268, -0.2403196719208, "contcor1", + "", 0.121932530461073, "contGamma", 0.155374470143384, + -1.5467127366486, 1.68041057232019, 2.96919001732045, 2.32480029482032, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.32877630792351, 7.07107002175226, 0.797840916249296, 1.40973983836069, + 1.10379037730499, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.156099532169463, 7.07106781144425, 0.00465468569075073, + 0.0082245666425669, 0.00643962616665881, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000910700650617802, 7.07106793246529, + 0.716694798023691, 1.26635923038138, 0.991527014202535, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.140223095090872, + 7.07106781204603, 0.732634635177858, 1.29452409954366, 1.01357936736076, + "contcor1", "", 1.53743684450092e-12, "contcor1", 0.143341783011809, + 7.07106711011999)) + + + + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.179344135016095, 0.0952661337110287, "", -0.0420390006525329, + "contGamma", "contNormal", "", "", "", "", "", 0.548448736139894, + 0.0700549272571369, -0.600086279416559, -0.0129057295468148, + 0.0158948770339691, 16, 0.00149457374357715, "contGamma", "debCollin1", + "contNormal", "", "", "", "", 0.83880671380625, + 0.00734722852255435, 0.203420070437327, -0.0214442998408432, + 0.0265919134708913, 50, 0.00257380681502407, "contGamma", "debCollin1", + "contNormal", "", "", "", "", 0.833642772915629, + 0.0122543612256751, 0.210031903550508, -0.031272819112526, 0.0387761242035732, + 84, 0.00375165254552358, "contGamma", "debCollin1", "contNormal", + "", "", "", "", 0.833713025092641, 0.0178699567616131, + 0.209941892729288, -0.0103825999340857, 0.00794416139103331, + "", -0.00121921927152619, "contGamma", "contcor2", "contNormal", + "", "", "", "", 0.794262214704822, 0.00467528012496101, + -0.260779940225798, -0.000868557265746845, 0.000685447111508543, + 16, -9.15550771191509e-05, "contGamma", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.817357647275501, + 0.000396436972697758, -0.230944849810848, -0.0014411925607895, + 0.0011258583961797, 50, -0.000157667082304903, "contGamma", + "debCollin1", "contcor2", "contNormal", "", "", + "", 0.809741007127717, 0.000654871971428499, -0.240760162571896, + -0.00210177638360011, 0.00164213651690799, 84, -0.00022981993334606, + "contGamma", "debCollin1", "contcor2", "contNormal", "", + "", "", 0.809846073875309, 0.000955097371696523, + -0.240624610805738)) + + + + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.179344135016095, 0.0952661337110287, -0.0420390006525329, "contGamma", + "", 0.548448736139894, "contNormal", 0.0700549272571369, + -0.600086279416559, -2.83802377237932, 2.28501280829148, -0.276505482043923, + "debCollin1", "", 0.832442405865071, "contNormal", + 1.30692110188775, -0.211570141184904, -0.176275917796942, 0.237313209252068, + 0.0305186457275632, "contcor2", "", 0.772389631535841, + "contNormal", 0.105509369129063, 0.289250575370532, -0.0197475138701868, + 0.00116000448566748, -0.00929375469225966, "contGamma", "", + 0.0814251874426286, "debCollin1", 0.00533364860802804, -1.74247600006326, + -0.0185475943574633, 0.035078764899854, 0.00826558527119536, + "contcor1", "", 0.545717466394826, "debCollin1", 0.0136804450694797, + 0.604189792745518, -0.0145563127519611, 0.00654285192891746, + -0.00400673041152183, "contGamma:contcor1", "", 0.456638061482202, + "debCollin1", 0.00538253887502681, -0.744394142717988, -0.169849697808813, + 0.0899497387863815, -0.0399499795112155, "contGamma", "", + 0.546657261830584, "contcor2", 0.0662765843261557, -0.602776680744687, + -1.87031199793408, 2.98033906396041, 0.555013533013169, "debCollin1", + "", 0.653778095709851, "contcor2", 1.23743372331222, + 0.448519805592153)) + + + + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.177349608735055, 0.0936392062198529, 16, -0.0418552012576011, + "Total", 0.544882008058729, 0.0691310700330296, -0.605447033260204, + -0.175977821661869, 0.0942936612791893, 50, -0.04084208019134, + "Total", 0.553609553564532, 0.0689480738097551, -0.592359988243232, + -0.175382464778849, 0.0959096901550861, 84, -0.0397363873118816, + "Total", 0.565862845836222, 0.069208454102691, -0.574155106151064, + -0.0168076680806241, 0.0171752668704877, 16, 0.000183799394931801, + "Total indirect", 0.983085124445877, 0.00866927535892619, 0.0212012408560255, + -0.0244593980573365, 0.0268532389797224, 50, 0.00119692046119297, + "Total indirect", 0.927145852442278, 0.0130901989632989, 0.0914363841641204, + -0.0338314947375825, 0.0384367214188851, 84, 0.00230261334065133, + "Total indirect", 0.900605147734401, 0.0184361081954847, 0.124896931404171 + )) @@ -12238,92 +12441,91 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(676.044059472091, 728.147463191853, 5, "Model 1", 100, -318.022029736046, + list(677.341945642314, 726.840179176088, 6, "Model 1", 100, -319.670972821157, 83)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962233388381484, 0.0896223130157434, 0.0399999895659643, - "facExperimexperimental", "", 0.11412870709761, "facGenderm", - 0.0253179771879451, 1.57990463728713, 0.180704821089323, 0.319295234145547, - 0.250000027617435, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553468710158, 7.07106703066698, 0.180704795189695, - 0.319295143809221, 0.249999969499458, "facExperimexperimental", + list(-0.00962232838232122, 0.0896223173656496, 0.0399999944916642, + "facExperimexperimental", "", 0.114128658337354, "facGenderm", + 0.0253179768941674, 1.57990485017304, 0.180704807123342, 0.319295185429881, + 0.249999996276611, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553380061374, 7.07106791719013, 0.759557816133623, + 1.34209576261857, 1.0508267893761, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.148609349732938, 7.0710678114433, + 0.00474535371267712, 0.00838477203577188, 0.0065650628742245, + "debCollin1", "", 1.53743684450092e-12, "debCollin1", + 0.000928440101910552, 7.07106776270743, 0.707778595984043, 1.25060480495166, + 0.97919170046785, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.138478618293336, 7.07106781202607, 0.180704807128847, + 0.319295185449083, 0.249999996288965, "facExperimexperimental", "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553304327807, 7.07106867448941, -0.3962981861503, 0.137698156882781, - -0.129300014633759, "contcor2", "", 0.342540408872904, - "debCollin1", 0.136226060082016, -0.94915770562485, 0.0047462079648253, - 0.00838656728068937, 0.00656638762275734, "debCollin1", "", - 1.54187773659942e-12, "debCollin1", 0.000928680155497438, 7.07066645484646, - -6.95293532198776, 13.9395540777, 3.49330937785612, "contcor2", - "", 0.512192272203066, "contcor2", 5.32981462018819, - 0.655427932638447, 0.75955781613361, 1.34209576261859, 1.0508267893761, - "contNormal", "", 1.53743684450092e-12, "contNormal", - 0.148609349732944, 7.071067811443)) + 0.0353553380096316, 7.07106791684072)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0761248335534141, 0.887469273754717, 0.481797053654065, "", + list(0.0761248335400072, 0.887469273768124, 0.481797053654066, "", "m", "facGender", "contNormal", "", "", "", "", "", - 0.0199252039959819, 0.206979425795852, 2.32775335906705, -0.0158256452099082, - 0.0157243312679311, -5.06569709885482e-05, 0, "m", "facGender", + 0.019925204000069, 0.206979425802693, 2.32775335899012, -0.0124076704045688, + 0.0123282538929803, -3.97082557942048e-05, 0, "m", "facGender", "debCollin1", "contNormal", "", "", "", "", - 0.994978245714168, 0.00804861128232495, -0.00629387719342252, - -0.0484802955285017, 0.0487927241762222, 0.000156214323860201, + 0.994979257481153, 0.00631030072303953, -0.00629260910644497, + -0.0437961254964933, 0.0440783634777331, 0.000141118990619929, 1, "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.994977224872373, 0.0248150018245236, 0.00629515665422282, - -0.0606663592094518, 0.0499656249282937, -0.00535036714057905, + "", "", 0.994977292022696, 0.0224173733975137, 0.00629507249210474, + -0.0735824033485701, 0.0407895213830047, -0.0163964409827827, "", "m", "facGender", "contcor2", "contNormal", "", "", - "", "", 0.849642211582647, 0.0282229635366763, -0.189574958477558, - -0.0464957005884445, 0.0631148744391929, 0.0083095869253742, + "", "", 0.574140765797629, 0.0291770475462116, -0.561963679046466, + -0.00182865280780057, 0.00221803968297343, 0.000194693437586431, 0, "m", "facGender", "debCollin1", "contcor2", "contNormal", - "", "", "", 0.766336671315482, 0.027962395200175, - 0.297170069512579, -0.123741650055574, 0.0724919808482169, -0.0256248346036787, - 1, "m", "facGender", "debCollin1", "contcor2", "contNormal", - "", "", "", 0.608737011953581, 0.05006051959415, - -0.511877120162236)) + "", "", "", 0.850410584854773, 0.00103233848241442, + 0.188594575231841, -0.00461159289161077, 0.00322775263758828, + -0.000691920127011248, 1, "m", "facGender", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.729355799982762, + 0.00199986979123974, -0.345982588487583)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0761248335534141, 0.887469273754717, 0.481797053654065, "facGenderm", - "", 0.0199252039959819, "contNormal", 0.206979425795852, - 2.32775335906705, -2.47474004307638, 2.45889351385684, -0.00792326460976921, - "debCollin1", "", 0.994977122918256, "contNormal", - 1.25860311614119, -0.00629528443729071, -0.13819382703882, 0.267884482767009, - 0.0648453278640943, "contcor2", "", 0.531340797635426, - "contNormal", 0.103593309114076, 0.625960580066875, -0.0357017558634894, - 0.0484886495199474, 0.00639344682822902, "facGenderm", "", - 0.765946945580751, "debCollin1", 0.0214775388852856, 0.297680607744549, - -0.0238452925974337, 0.023710535869667, -6.73783638833498e-05, - "facExperimexperimental", "", 0.995568684982879, "debCollin1", - 0.0121318118195576, -0.00555385830950076, -0.0760683387591158, - 0.0238496372421473, -0.0261093507584843, "facGenderm:facExperimexperimental", - "", 0.305689857682888, "debCollin1", 0.0254897479722595, - -1.02430792124344, -0.895493105929123, 0.730473749352113, -0.0825096782885051, - "facGenderm", "", 0.842327889255373, "contcor2", 0.414795085038974, - -0.198916721206454, -20.1782199603153, 60.2644932383742, 20.0431366390295, - "debCollin1", "", 0.328722288163102, "contcor2", 20.5214773927509, - 0.976690725303704)) + list(0.0761248335400072, 0.887469273768124, 0.481797053654066, "facGenderm", + "", 0.019925204000069, "contNormal", 0.206979425802693, + 2.32775335899012, -2.47474004315331, 2.45889351393378, -0.00792326460976666, + "debCollin1", "", 0.994977122918414, "contNormal", + 1.25860311618044, -0.00629528443709236, -0.138193827042815, + 0.267884482771004, 0.0648453278640943, "contcor2", "", + 0.531340797643505, "contNormal", 0.103593309116115, 0.625960580054558, + -0.0404918016717831, 0.0505150074461449, 0.0050116028871809, + "facGenderm", "", 0.829093515368225, "debCollin1", + 0.0232164493418701, 0.215864312987027, -0.04884961684763, 0.0421571922707743, + -0.00334621228842787, "facExperimexperimental", "", + 0.885396950039945, "debCollin1", 0.0232164493419916, -0.144131095980106, + -0.0871738475759951, 0.0415292161468652, -0.022822315714565, + "facGenderm:facExperimexperimental", "", 0.486991008090382, + "debCollin1", 0.0328330175294173, -0.695102595858481, -0.641306843219008, + 0.135597595602986, -0.252854623808011, "facGenderm", "", + 0.202027488765637, "contcor2", 0.198193549715739, -1.275796433187, + -1.7792588933885, 2.9774496577724, 0.599095382191949, "debCollin1", + "", 0.621514541039017, "contcor2", 1.21346835673543, + 0.493704989393941)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0752379101182676, 0.894173322817476, 0.484705616467872, 0, "m", - "Total", 0.0203355309682511, 0.208915933955641, 2.3200988421055, - 0.0444821659296167, 0.857473966537719, 0.450978066233668, 1, - "m", "Total", 0.0296721396451198, 0.207399678519829, 2.17443956255, - -0.036363500060113, 0.0421806256877262, 0.0029085628138066, - 0, "m", "Total indirect", 0.884585638079008, 0.0200371349594649, - 0.145158617721078, -0.142525240529987, 0.0808872656891923, -0.0308189874203975, - 1, "m", "Total indirect", 0.588686396009745, 0.0569940335591442, - -0.540740591529039)) + list(0.0615025150331035, 0.869608680673047, 0.465555597853075, 0, "m", + "Total", 0.0239270968075145, 0.206153320166641, 2.25829784102798, + 0.0616103083835388, 0.868089314686245, 0.464849811534892, 1, + "m", "Total", 0.0238570417535051, 0.205738220871432, 2.25942369660804, + -0.0747851608521719, 0.0423022492501909, -0.0162414558009905, + 0, "m", "Total indirect", 0.586619059519912, 0.0298697861353406, + -0.543741951395304, -0.0890443630290387, 0.0551498787906906, + -0.016947242119174, 1, "m", "Total indirect", 0.645005489061239, + 0.0367849212937368, -0.460711659102001)) @@ -12379,96 +12581,108 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(988.657064335677, 1045.97080842741, 3, "Model 1", 100, -472.328532167838, + list(986.657064335656, 1041.36563824141, 4, "Model 1", 100, -472.328532167828, 84)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848260171234, 0.0642086612813144, -0.24031979944496, "contcor1", - "", 0.121932449019213, "contGamma", 0.155374518679096, - -1.54671307424164, 1.68041087458388, 2.96919107158323, 2.32480097308355, + list(-0.544848228704268, 0.0642086132602256, -0.240319807722021, "contcor1", + "", 0.121932387470186, "contGamma", 0.155374498401158, + -1.54671332937497, 1.68041085675442, 2.96919100941795, 2.32480093308619, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776499763536, 7.07106795879756, 0.732634636211374, 1.29452410312473, - 1.01357936966805, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341783661708, 7.07106709415687, 0.00465468568045279, - 0.00822456660409523, 0.00643962614227401, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000910700643430492, 7.07106796149476, - 0.385512022815089, 0.681178177354441, 0.533345100084765, "contcor2", - "", 1.53743684450092e-12, "contcor2", 0.075426425401571, - 7.07106424897151, 0.797840916249555, 1.40973983836043, 1.10379037730499, - "contNormal", "", 1.53743684450092e-12, "contNormal", - 0.156099532169331, 7.07106781145024)) + 0.328776488453171, 7.07106808039686, 0.79784091624917, 1.40973983836082, + 1.103790377305, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.156099532169528, 7.07106781144132, 0.00465468538441295, + 0.00822456557407845, 0.0064396254792457, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000910700456188039, 7.07106868728313, + 0.385511789944254, 0.681177561225209, 0.533344675584732, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.0754263276297751, + 7.07106778686903, 0.732634582815271, 1.2945239169138, 1.01357924986454, + "contcor1", "", 1.53743684450092e-12, "contcor1", 0.143341749779751, + 7.07106792976875)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.179344121303493, 0.0952661474236518, "", -0.0420389869399208, - "contGamma", "contNormal", "", "", "", "", "", 0.548448866584524, - 0.0700549272571425, -0.600086083675645, -0.0129057469505062, - 0.0158948988066065, 16, 0.00149457592805015, "contGamma", "debCollin1", - "contNormal", "", "", "", "", 0.83880669769468, - 0.0073472385166994, 0.203420091052326, -0.0214443051382055, - 0.0265919199987401, 50, 0.00257380743026734, "contGamma", "debCollin1", - "contNormal", "", "", "", "", 0.833642774084852, - 0.012254364242366, 0.210031902052424, -0.0312728104928847, 0.0387761133891888, - 84, 0.00375165144815205, "contGamma", "debCollin1", "contNormal", - "", "", "", "", 0.833713027561747, 0.0178699518038624, - 0.209941889565767, "", "", 16, -0.00244609971048352, "contGamma", - "contcor2", "contNormal", "", "", "", "", - "", "", "", "", "", 50, 0.00106492760897172, "contGamma", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", 84, 0.00489676768809674, "contGamma", "contcor2", "contNormal", - "", "", "", "", "", "", "", "", "", 16, -0.00011764386347744, - "contGamma", "debCollin1", "contcor2", "contNormal", "", - "", "", "", "", "", "", "", 50, -0.000202594357543696, - "contGamma", "debCollin1", "contcor2", "contNormal", "", - "", "", "", "", "", "", "", 84, -0.000295307024887753, + list(-0.179344203470238, 0.0952660652555527, "", -0.0420390691073426, + "contGamma", "contNormal", "", "", "", "", "", 0.548448084944952, + 0.0700549272567969, -0.600087256578571, -0.0129057522246537, + 0.0158949056322916, 16, 0.00149457670381898, "contGamma", "debCollin1", + "contNormal", "", "", "", "", 0.838806681966185, + 0.00734724160344813, 0.203420111177174, -0.0214443054589723, + 0.0265919207766673, 50, 0.0025738076588475, "contGamma", "debCollin1", + "contNormal", "", "", "", "", 0.833642763275952, + 0.0122543645226502, 0.210031915901492, -0.031272805210775, 0.0387761073698656, + 84, 0.00375165107954532, "contGamma", "debCollin1", "contNormal", + "", "", "", "", 0.833713017224844, 0.0178699489207908, + 0.209941902809832, -0.0194936475858556, 0.0146014507138216, + 16, -0.00244609843601696, "contGamma", "contcor2", "contNormal", + "", "", "", "", 0.778534779391234, 0.0086978889838321, + -0.281228978728499, -0.00672990034150982, 0.00885975252184667, + 50, 0.00106492609016843, "contGamma", "contcor2", "contNormal", + "", "", "", "", 0.788876748463233, 0.00397702533983422, + 0.267769500863381, -0.0285766389441717, 0.0383701651857605, + 84, 0.00489676312079441, "contGamma", "contcor2", "contNormal", + "", "", "", "", 0.774327053790806, 0.0170785801825952, + 0.286719567343468, -0.00102268875600639, 0.000787402342424105, + 16, -0.000117643206791141, "contGamma", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.798902459568809, + 0.000461766418339383, -0.254767783274957, -0.00168348579512158, + 0.00127829951612136, 50, -0.000202593139500114, "contGamma", + "debCollin1", "contcor2", "contNormal", "", "", + "", 0.788597430422367, 0.000755571361158961, -0.268132369640584, + -0.0024554022046263, 0.00186479181623821, 84, -0.000295305194194044, "contGamma", "debCollin1", "contcor2", "contNormal", "", - "", "", "", "", "")) + "", "", 0.788741529413189, 0.00110211056298525, + -0.267945162774015)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.179344121303493, 0.0952661474236518, -0.0420389869399208, "contGamma", - "", 0.548448866584524, "contNormal", 0.0700549272571425, - -0.600086083675645, -2.83802376924021, 2.28501281122609, -0.276505479007057, - "debCollin1", "", 0.832442407671476, "contNormal", - 1.30692110183558, -0.21157013886967, -0.176275917647562, 0.237313209408773, - 0.0305186458806054, "contcor2", "", 0.772389630429839, - "contNormal", 0.105509369130931, 0.289250576815917, -0.0197475161967653, - 0.00116000211555217, -0.00929375704060657, "contGamma", "", - 0.081425109829576, "debCollin1", 0.00533364859692151, -1.74247644398073, - -0.0185476064229212, 0.0350787527327333, 0.00826557315490602, - "contcor1", "", 0.545718054397072, "debCollin1", 0.0136804450435448, - 0.604188908226066, -0.0145563069471613, 0.00654285768786231, - -0.00400672462964952, "contGamma:contcor1", "", 0.456638710177557, - "debCollin1", 0.00538253886332891, -0.744393070145247, "", "", - 0.034464445302409, "contGamma", "", "", "contcor2", - "", "", "", "", 0.713164598646474, "debCollin1", "", - "", "contcor2", "", "", "", "", 0.415054467893596, "contcor1", - "", "", "contcor2", "", "", "", "", 0.118099367620169, - "contGamma:contcor1", "", "", "contcor2", "", "")) + list(-0.179344203470238, 0.0952660652555527, -0.0420390691073426, "contGamma", + "", 0.548448084944952, "contNormal", 0.0700549272567969, + -0.600087256578571, -2.83802378743057, 2.28501279302202, -0.276505497204279, + "debCollin1", "", 0.832442396807382, "contNormal", + 1.30692110183209, -0.21157015279397, -0.176275918564166, 0.237313208491286, + 0.03051864496356, "contcor2", "", 0.772389637080139, + "contNormal", 0.105509369130706, 0.289250568124932, -0.019747515883009, + 0.00116000135692777, -0.00929375726304064, "contGamma", "", + 0.081425086912279, "debCollin1", 0.00533364832334998, -1.74247657505911, + -0.0185476018061252, 0.0350787545885293, 0.00826557639120205, + "contcor1", "", 0.545717876457406, "debCollin1", 0.0136804443391951, + 0.604189175896926, -0.0145563041117878, 0.00654285944281969, + -0.00400672233448406, "contGamma:contcor1", "", 0.45663894501769, + "debCollin1", 0.00538253858770748, -0.7443926818536, -0.0621053539788594, + 0.13103414780609, 0.0344643969136151, "contGamma", "", + 0.484249731182431, "contcor2", 0.0492711864372021, 0.699483803937646, + -1.0705393913072, 2.49686002323858, 0.713160315965691, "debCollin1", + "", 0.433254636965866, "contcor2", 0.910067593763194, + 0.78363444743343, 0.170591437994923, 0.659517521987464, 0.415054479991193, + "contcor1", "", 0.000875761791488294, "contcor2", 0.124728333747234, + 3.32766796061202, 0.0218253128244922, 0.214373241600552, 0.118099277212522, + "contGamma:contcor1", "", 0.0162040051869115, "contcor2", + 0.0491202721822577, 2.40428792361577)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.178868170527984, 0.0926518613563205, 16, -0.0431081545858317, - "Total", 0.533710856848149, 0.0692665870459916, -0.62235135906449, - -0.174561617271393, 0.0973559247549424, 50, -0.0386028462582255, - "Total", 0.577873456136322, 0.0693679945578558, -0.556493617903702, - -0.175402872881378, 0.108031123224258, 84, -0.0336858748285598, - "Total", 0.64130146637907, 0.0723059194815127, -0.465879904026014, - -0.0234530635847546, 0.021314728292933, 16, -0.00106916764591081, - "Total indirect", 0.925412805338609, 0.0114205649263992, -0.093617754708384, - -0.0216769298437872, 0.0285492112071779, 50, 0.00343614068169537, - "Total indirect", 0.788564179413135, 0.0128130265267991, 0.268175569176299, - -0.0397313787780009, 0.056437603000723, 84, 0.00835311211136103, - "Total indirect", 0.733495215816019, 0.0245333543211234, 0.340479821960951 + list(-0.178868248695598, 0.0926517806029341, 16, -0.0431082340463317, + "Total", 0.533710098794944, 0.0692665863863436, -0.622352512160623, + -0.174561699281014, 0.0973558422853605, 50, -0.0386029284978268, + "Total", 0.577872645251456, 0.0693679944405167, -0.55649480440045, + -0.175402952472027, 0.108031032269633, 84, -0.0336859601011969, + "Total", 0.641300608808277, 0.0723059165824859, -0.46588110203635, + -0.023453054842514, 0.0213147249645357, 16, -0.00106916493898913, + "Total indirect", 0.925412973575597, 0.0114205618470983, -0.0936175429285717, + -0.0216769297872781, 0.0285492110063097, 50, 0.00343614060951581, + "Total indirect", 0.78856418269135, 0.0128130264611404, 0.268175564917235, + -0.0397313654387689, 0.0564375834510603, 84, 0.00835310900614569, + "Total indirect", 0.733495223443605, 0.0245333459309451, 0.340479811830702 )) @@ -12525,91 +12739,99 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(680.016695632015, 737.330439723753, 3, "Model 1", 100, -318.008347816007, + list(678.016695631284, 732.725269537034, 4, "Model 1", 100, -318.008347815642, 84)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0096229171481727, 0.0896216969515677, 0.0399993899016975, "facExperimexperimental", - "", 0.114134012582935, "facGenderm", 0.0253179688204909, - 1.57988147411432, 0.18070483201453, 0.319295272253993, 0.250000052134262, + list(-0.00962244042717139, 0.089621999898739, 0.0399997797357838, "facExperimexperimental", + "", 0.114129852161874, "facGenderm", 0.0253179244896176, + 1.57989963798916, 0.180704704185617, 0.319294826389499, 0.249999765287558, "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553538056431, 7.07106633718255, 0.180704832013114, 0.319295272249209, - 0.250000052131162, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553538047837, 7.07106633726674, - 0.00474535151324702, 0.00838474431883563, 0.00656504791604132, - "debCollin1", "", 1.53699275529107e-12, "debCollin1", - 0.000928433592223038, 7.07110123010737, 0.684630962802918, 1.20970252361536, - 0.947166743209138, "contcor2", "", 1.53721479989599e-12, - "contcor2", 0.133949288087469, 7.07108456291783, 0.759557816133865, - 1.34209576261833, 1.0508267893761, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.148609349732815, 7.07106781144917 + 0.0353552726726266, 7.07107445054772, 0.759557816133726, 1.34209576261847, + 1.0508267893761, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.148609349732885, 7.07106781144581, 0.00474535611462281, + 0.00838478041362963, 0.00656506826412622, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000928441626405929, 7.07106195737919, + 0.684630192237103, 1.20970288291356, 0.947166537575333, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.133949576323384, + 7.07106781203, 0.180704704185848, 0.319294826390318, 0.249999765288083, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353552726727763, 7.07107445053263 )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0761248335403841, 0.887469273767747, 0.481797053654066, "", + list(0.0761248335522835, 0.887469273755848, 0.481797053654066, "", "m", "facGender", "contNormal", "", "", "", "", "", - 0.0199252039999542, 0.206979425802501, 2.32775335899229, -0.0124072917442412, - 0.0123278776582844, -3.9707042978403e-05, 0, "m", "facGender", + 0.0199252039963265, 0.20697942579643, 2.32775335906057, -0.0124080973195943, + 0.0123286780732032, -3.9709623195569e-05, 0, "m", "facGender", "debCollin1", "contNormal", "", "", "", "", - 0.994979257606672, 0.00631010814423975, -0.00629260894912713, - -0.0437964058271518, 0.0440786456150833, 0.000141119893965748, + 0.994979257335843, 0.00631051784316395, -0.00629260928856823, + -0.043795893946543, 0.0440781304354895, 0.000141118244473244, 1, "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.994977292020212, 0.0224175168868873, 0.00629507249521883, - "", "", 0.00346924352981763, 0, "m", "facGender", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", -0.0314286169644995, 1, "m", "facGender", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", 0.000114849116626433, 0, "m", "facGender", "debCollin1", - "contcor2", "contNormal", "", "", "", - "", "", "", "", "", -0.000408176835761792, 1, "m", "facGender", - "debCollin1", "contcor2", "contNormal", "", "", - "", "", "", "")) + "", "", 0.99497729202451, 0.022417254876919, 0.00629507248983195, + -0.0336077951844616, 0.0405463007976365, 0.00346925280658746, + 0, "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.854490948314016, 0.0189172088280745, 0.183391368045737, + -0.136058720288799, 0.0732015185354293, -0.0314286008766847, + 1, "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.556042181587777, 0.0533836949236941, -0.588730340258544, + -0.00122759114358628, 0.00145730445469458, 0.00011485665555415, + 0, "m", "facGender", "debCollin1", "contcor2", "contNormal", + "", "", "", 0.866827259256022, 0.000684934932340334, + 0.167689878455607, -0.00358834354680198, 0.00277199887800249, + -0.000408172334399746, 1, "m", "facGender", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.801381373133979, + 0.00162256614789201, -0.251559749924544)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0761248335403841, 0.887469273767747, 0.481797053654066, "facGenderm", - "", 0.0199252039999542, "contNormal", 0.206979425802501, - 2.32775335899229, -2.47474004318836, 2.45889351396883, -0.00792326460976668, - "debCollin1", "", 0.994977122918485, "contNormal", - 1.25860311619833, -0.00629528443700291, -0.138193827042981, - 0.26788448277117, 0.0648453278640943, "contcor2", "", - 0.53134079764384, "contNormal", 0.103593309116199, 0.625960580054047, - -0.040491902621906, 0.0505148022558417, 0.00501144981696785, - "facGenderm", "", 0.829098462088598, "debCollin1", - 0.0232164227494987, 0.215857967053777, -0.0488493417451459, - 0.0421573631455669, -0.00334598929978949, "facExperimexperimental", - "", 0.88540440401724, "debCollin1", 0.0232164227528062, - -0.144121656269593, -0.0871737351140041, 0.0415291818016604, - -0.0228222766561719, "facGenderm:facExperimexperimental", "", - 0.486991256697887, "debCollin1", 0.0328329800779139, -0.695102199130685, - "", "", 0.0535002851259944, "facGenderm", "", "", "contcor2", - "", "", "", "", 0.353415491949468, "debCollin1", "", - "", "contcor2", "", "", "", "", 0.0226974003626929, "facExperimexperimental", - "", "", "contcor2", "", "", "", "", -0.538170777198592, - "facGenderm:facExperimexperimental", "", "", "contcor2", - "", "")) + list(0.0761248335522835, 0.887469273755848, 0.481797053654066, "facGenderm", + "", 0.0199252039963265, "contNormal", 0.20697942579643, + 2.32775335906057, -2.4747400431012, 2.45889351388167, -0.00792326460976667, + "debCollin1", "", 0.994977122918308, "contNormal", + 1.25860311615385, -0.00629528443722535, -0.138193827042853, + 0.267884482771041, 0.0648453278640943, "contcor2", "", + 0.531340797643581, "contNormal", 0.103593309116134, 0.625960580054443, + -0.0404916477709556, 0.0505151987064174, 0.0050117754677309, + "facGenderm", "", 0.829087789929445, "debCollin1", + 0.0232164588725159, 0.215871657915236, -0.0488498902339543, + 0.0421569562435739, -0.0033464669951902, "facExperimexperimental", + "", 0.885388333662184, "debCollin1", 0.0232164588725555, + -0.144142007769588, -0.0871739524021117, 0.0415291641551271, + -0.0228223941234923, "facGenderm:facExperimexperimental", "", + 0.486989690406098, "debCollin1", 0.0328330310078228, -0.695104698620564, + -0.493186615899051, 0.600187472270954, 0.0535004281859516, "facGenderm", + "", 0.847892656025708, "contcor2", 0.27892708661853, + 0.191807933874563, -2.00077595686378, 2.70760740771422, 0.353415725425218, + "debCollin1", "", 0.76857947233926, "contcor2", 1.20114027648394, + 0.294233514889503, -0.523918940860372, 0.569314028253276, 0.022697543696452, + "facExperimexperimental", "", 0.935135798771853, "contcor2", + 0.278891086197739, 0.0813849736321762, -1.31298791250874, 0.236646568182048, + -0.538170672163346, "facGenderm:facExperimexperimental", "", + 0.173404052849664, "contcor2", 0.395322182681444, -1.36134701198139 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0758120165715884, 0.894870861943475, 0.485341439257531, 0, "m", - "Total", 0.0201903192952539, 0.208947422460953, 2.32279218159884, - 0.043463188944532, 0.856739570551008, 0.45010137974777, 1, "m", - "Total", 0.0300482994614792, 0.207472277047307, 2.16945312479093, - -0.0354642598473746, 0.0425530310543059, 0.00354438560346566, - 0, "m", "Total indirect", 0.858655950113232, 0.0199027358454214, - 0.178085346205358, -0.144355147313607, 0.0809637995010158, -0.0316956739062955, - 1, "m", "Total indirect", 0.581347664257609, 0.0574803793824554, - -0.551417270498564)) + list(0.0758119627412697, 0.894870944244754, 0.485341453493012, 0, "m", + "Total", 0.0201903363829423, 0.20894745718904, 2.32279186366892, + 0.0434632408359609, 0.856739556538948, 0.450101398687455, 1, + "m", "Total", 0.0300482792039836, 0.207472260234884, 2.1694533918794, + -0.035464499201834, 0.0425532988797261, 0.00354439983894604, + 0, "m", "Total indirect", 0.858656297586187, 0.0199028652304212, + 0.178084903751872, -0.14435489333632, 0.080963583403098, -0.0316956549666112, + 1, "m", "Total indirect", 0.581347101647391, 0.057480259463108, + -0.551418091405001)) @@ -12667,121 +12889,118 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(989.173534068677, 1051.69761853239, 1, "Model 1", 100, -470.586767034339, + list(987.173534072245, 1047.09244834997, 2, "Model 1", 100, -470.586767036123, 85)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544849219283617, 0.06420808396919, -0.240320567657213, "contcor1", - "", 0.121931490162466, "contGamma", 0.155374616078911, - -1.54671704891075, 1.68041087185661, 2.9691910620836, 2.3248009669701, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776498035864, 7.07106797736043, 0.732634856700198, 1.29452487223166, - 1.01357986446593, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341923617877, 7.0710636419806, -6.78454321027649, - 6.78454315614016, -2.70681674412908e-08, "contcor2", "", - 0.999999993760836, "debCollin1", 3.46156523115932, -7.81963234366823e-09, - 0.00465469700324775, 0.00822460610862557, 0.00643965155593666, - "debCollin1", "", 1.53765888910584e-12, "debCollin1", - 0.00091070783278081, 7.07104004615118, 0.385511096816891, 0.681175193040415, - 0.533343144928653, "contcor2", "", 1.53721479989599e-12, - "contcor2", 0.0754259003113537, 7.07108755383819, 0.77052640322168, - 1.36147663652148, 1.06600151987158, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.150755380701161, 7.07106781140164 - )) + list(-0.544848224652777, 0.0642096032449755, -0.240319310703901, "contcor1", + "", 0.121933763193226, "contGamma", 0.155374749919367, + -1.54670762674512, 1.68041747689747, 2.96921410025889, 2.32481578857818, + "contGamma", "", 1.53788093371077e-12, "contGamma", + 0.328780690239024, 7.07102289641169, 0.770526403223391, 1.3614766365201, + 1.06600151987175, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.150755380700373, 7.0710678114397, 0.00465469798169325, + 0.00822460951289105, 0.00643965374729215, "debCollin1", "", + 1.53788093371077e-12, "debCollin1", 0.000910708451623808, 7.07103764746022, + 0.385511789083412, 0.681177558204891, 0.533344673644151, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.0754263270788783, + 7.07106781278634, 0.732632491437218, 1.29451662231457, 1.0135745568759, + "contcor1", "", 1.53699275529107e-12, "contcor1", 0.14334042240302, + 7.07110066988712)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.178062801264025, 0.193981903901926, 16, 0.00795955131895054, - "contGamma", "contNormal", "", "", "", "", "", 0.933165180820924, - 0.0949111075766167, 0.0838632223580914, -0.16202639575206, 0.111765893043796, - 50, -0.0251302513541319, "contGamma", "contNormal", "", "", - "", "", "", 0.719001320471671, 0.0698462550729236, - -0.359793826138487, -0.270699374511922, 0.14821224377917, 84, - -0.0612435653663761, "contGamma", "contNormal", "", "", "", - "", "", 0.566589728900627, 0.1068671724571, -0.573081180668099, - -0.0127957815428721, 0.0154148362627854, 16, 0.00130952735995667, + list(-0.178062781038674, 0.19398192412829, 16, 0.00795957154480775, + "contGamma", "contNormal", "", "", "", "", "", 0.933165011386254, + 0.0949111075768752, 0.0838634354610257, -0.162026384884971, + 0.111765903910803, 50, -0.0251302404870839, "contGamma", "contNormal", + "", "", "", "", "", 0.719001436830186, 0.0698462550729025, + -0.359793670553333, -0.27069937388703, 0.148212244460472, 84, + -0.061243564713279, "contGamma", "contNormal", "", "", "", + "", "", 0.566589733090561, 0.10686717247149, -0.573081174479633, + -0.012795587302904, 0.0154145993696964, 16, 0.00130950603339616, "contGamma", "debCollin1", "contNormal", "", "", "", - "", 0.855612756590117, 0.00719671841630236, 0.181961733696606, - -0.0214256591356132, 0.0259359176781836, 50, 0.00225512927128519, + "", 0.855612899827257, 0.00719660843135863, 0.18196155117876, + -0.0214257233879301, 0.0259359955731038, 50, 0.00225513609258685, "contGamma", "debCollin1", "contNormal", "", "", "", - "", 0.851936617611874, 0.0120822569157849, 0.186648015102126, - -0.0312422723630831, 0.0378165395122786, 84, 0.00328713357459776, + "", 0.851936614176374, 0.0120822931785015, 0.186648019483544, + -0.031242624780859, 0.0378169670122859, 84, 0.00328717111571347, "contGamma", "debCollin1", "contNormal", "", "", "", - "", 0.85198615991443, 0.0176173675690188, 0.186584832366124, - -0.663972182158358, 0.682913786057158, 16, 0.00947080194939972, + "", 0.851986141320341, 0.017617566531293, 0.186584856079566, + -0.0175761322935714, 0.0365178450805286, 16, 0.00947085639347865, "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.978010311103286, 0.343599672963274, 0.0275634777755217, - -1.16301617958323, 1.15476980231742, 50, -0.00412318863290212, + "", 0.492519541100078, 0.0137997375974218, 0.68630699146396, + -0.0190814373333895, 0.0108350746484132, 50, -0.00412318134248816, "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.994436161690735, 0.591282799118517, -0.00697329372518356, - -1.70872200038687, 1.67080339718317, 84, -0.0189593016018534, + "", 0.589020526197405, 0.0076319034986817, -0.540255958844393, + -0.0665970165531569, 0.0286783250058136, 84, -0.0189593457736717, "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.982455145713683, 0.862139667929438, -0.0219909862718498, - -0.67244698702322, 0.673357972533494, 16, 0.000455492755137028, + "", 0.435363053987888, 0.0243053806882398, -0.780047266770243, + -0.00151783954983255, 0.0024288055403394, 16, 0.000455482995253424, "contGamma", "debCollin1", "contcor2", "contNormal", "", - "", "", 0.998941435391298, 0.343323900380888, - 0.00132671437855535, -1.15801555914113, 1.1595843618655, 50, - 0.000784401362184472, "contGamma", "debCollin1", "contcor2", - "contNormal", "", "", "", 0.998941434117605, - 0.591235333732547, 0.00132671597489352, -1.68795293825687, 1.69023966486402, - 84, 0.00114336330357122, "contGamma", "debCollin1", "contcor2", - "contNormal", "", "", "", 0.998941434188542, - 0.861799663097803, 0.0013267158859883)) + "", "", 0.65098115836261, 0.00100681571735567, + 0.452399567668369, -0.00204557211915967, 0.00361437152284262, + 50, 0.000784399701841473, "contGamma", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.586954529059608, + 0.00144388970579235, 0.543254584262739, -0.00299351776772117, + 0.00528025873341591, 84, 0.00114337048284737, "contGamma", "debCollin1", + "contcor2", "contNormal", "", "", "", + 0.588023090871536, 0.00211069605523356, 0.541703046259235)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.161866408054662, 0.111853193994292, -0.0250066070301846, "contGamma", - "", 0.720254511931851, "contNormal", 0.0698277121947187, - -0.358118664412951, -2.7717200926903, 2.28717942462882, -0.242270334030741, - "debCollin1", "", 0.851092177802364, "contNormal", - 1.29055930548293, -0.187725068504374, -0.395253350423881, 0.158929417509196, - -0.118161966457342, "contcor2", "", 0.403266980012825, - "contNormal", 0.141375752897604, -0.835800793527337, -0.0540967807636481, - 0.674392426471383, 0.310147822853868, "contcor1", "", - 0.0951422368184471, "contNormal", 0.185842498377843, 1.66887458768067, - -0.173954932642196, 0.106018490912912, -0.0339682208646421, - "contGamma:contcor1", "", 0.634365435845875, "contNormal", - 0.0714231041395409, -0.475591494851269, -0.0197475132561811, - 0.00116004635438663, -0.00929373345089723, "contGamma", "", - 0.0814264848723041, "debCollin1", 0.00533365913238301, -1.74246857930437, - -0.0185477428034892, 0.0350787221775172, 0.00826548968701401, - "contcor1", "", 0.54572290293597, "debCollin1", 0.0136804720403041, - 0.604181614688661, -0.0145563022902856, 0.00654290412446274, - -0.00400669908291141, "contGamma:contcor1", "", 0.456642472202191, - "debCollin1", 0.00538254952161778, -0.74438684991553, -9.75749427345156, - 9.82642327069847, 0.0344644986234532, "contGamma", "", - 0.994495890102637, "contcor2", 4.99598913516408, 0.0068984334615294, - -1052.84584424199, 1054.27217228499, 0.713164021498198, "debCollin1", - "", 0.998941432428436, "contcor2", 537.539983680227, - 0.00132671809195583, -8.2965447445355, 9.12665376468583, 0.415054510075165, - "contcor1", "", 0.92560142772833, "contcor2", 4.44477517103715, - 0.0933803160123207, -4.10428608926651, 4.34048499094155, 0.118099450837523, - "contGamma:contcor1", "", 0.95628196196248, "contcor2", - 2.15431792288515, 0.0548198803820742)) + list(-0.161866397152533, 0.1118532048962, -0.0250065961281662, "contGamma", + "", 0.720254628765907, "contNormal", 0.0698277121946624, + -0.358118508285851, -2.77172009064978, 2.28717942711294, -0.24227033176842, + "debCollin1", "", 0.851092179189512, "contNormal", + 1.29055930559609, -0.187725066734937, -0.395253352587032, 0.15892941535433, + -0.118161968616351, "contcor2", "", 0.403266971427179, + "contNormal", 0.141375752899718, -0.835800808786263, -0.0540967837840414, + 0.674392423566354, 0.310147819891156, "contcor1", "", + 0.0951422400309165, "contNormal", 0.185842498407273, 1.66887457147433, + -0.173954942269311, 0.106018481325521, -0.0339682304718949, + "contGamma:contcor1", "", 0.634365340045616, "contNormal", + 0.0714231041496747, -0.475591629295624, -0.0197475428236847, + 0.00116002030510141, -0.00929376125929163, "contGamma", "", + 0.0814256245735532, "debCollin1", 0.0053336600299042, -1.7424734998452, + -0.0185474390782413, 0.0350790350183947, 0.0082657979700767, + "contcor1", "", 0.545707990953939, "debCollin1", 0.0136804743657625, + 0.604204046517797, -0.0145564233203672, 0.0065427865437876, + -0.00400681838828982, "contGamma:contcor1", "", 0.45662914025621, + "debCollin1", 0.0053825504015846, -0.744408893432792, -0.0621053159135357, + 0.131034185521762, 0.034464434804113, "contGamma", "", + 0.484249249959287, "contcor2", 0.0492711863480036, 0.699484574223357, + -1.07053936891764, 2.49686003909773, 0.713160335090045, "debCollin1", + "", 0.433254623789818, "contcor2", 0.910067592097242, + 0.783634469882148, 0.170591636017389, 0.659517719179234, 0.415054677598312, + "contcor1", "", 0.000875756793780935, "contcor2", 0.124728333535318, + 3.32766955056595, 0.0218258941057028, 0.214373822560023, 0.118099858332863, + "contGamma:contcor1", "", 0.0162034805664584, "contcor2", + 0.0491202721001799, 2.40429975819353)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.165694108459659, 0.204084855226547, 16, 0.019195373383444, - "Total", 0.838755950570958, 0.0943331016801777, 0.203485023194965, - -0.161247802803903, 0.108819984096774, 50, -0.0262139093535643, - "Total", 0.703585718848856, 0.0688961095792925, -0.380484609561223, - -0.278343648713609, 0.126798908533488, 84, -0.0757723700900605, - "Total", 0.463479039160012, 0.103354592340168, -0.733130172297261, - -0.0193889687993429, 0.0418606129283298, 16, 0.0112358220644934, - "Total indirect", 0.472088974500281, 0.0156251804142325, 0.719084309212778, - -0.0290575096566782, 0.0268901936578132, 50, -0.00108365799943246, - "Total indirect", 0.939478313134108, 0.0142726355575408, -0.075925570653272, - -0.073333922386363, 0.0442763129389942, 84, -0.0145288047236844, - "Total indirect", 0.62821381660681, 0.0300031623675363, -0.484242445703148 + list(-0.165694066792089, 0.20408490072596, 16, 0.019195416966936, "Total", + 0.838755591136191, 0.0943331026577066, 0.203485483103293, -0.161247780873644, + 0.108820008803357, 50, -0.0262138860351438, "Total", 0.703585972945318, + 0.0688961102875516, -0.38048426719208, -0.278343649593058, 0.126798911816279, + 84, -0.0757723688883898, "Total", 0.463479050843956, 0.103354593401983, + -0.733130153138754, -0.0193889464749866, 0.0418606373192431, + 16, 0.0112358454221282, "Total indirect", 0.472088068446025, + 0.0156251809414251, 0.719085779822238, -0.0290575609910291, + 0.0268902698949095, 50, -0.00108364554805984, "Total indirect", + 0.939479144935165, 0.0142726681018753, -0.0759245251360855, + -0.0733342447397032, 0.0442766363894815, 84, -0.0145288041751108, + "Total indirect", 0.62821571643082, 0.0300033271164379, -0.484239768433912 )) @@ -12840,97 +13059,105 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(683.603267554876, 746.12735201859, 1, "Model 1", 100, -317.801633777438, + list(681.603267554688, 741.522181832414, 2, "Model 1", 100, -317.801633777344, 85)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962231353225415, 0.0896223491774702, 0.040000017822608, "facExperimexperimental", - "", 0.114128509115787, "facGenderm", 0.0253179812212249, - 1.57990550167067, 0.180704815221503, 0.319295213679363, 0.250000014450433, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553431468748, 7.071067403076, 0.180704815230535, 0.319295213710379, - 0.250000014470457, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553431524832, 7.0710674025207, - 0.00474535364199507, 0.00838477177764224, 0.00656506270981865, + list(-0.00962231513071415, 0.0896222717324213, 0.0399999783008536, + "facExperimexperimental", "", 0.114128590103622, "facGenderm", + 0.0253179618722497, 1.57990514807973, 0.180704774397031, 0.319295071285261, + 0.249999922841146, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553172357789, 7.07106999419455, 0.75642407321704, + 1.33655861587577, 1.04649134454641, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.147996225245657, 7.07106781142118, + 0.00474535370385679, 0.00838477200500705, 0.00656506285443192, "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.00092844005409141, 7.07106794982402, 0.684630412966537, 1.20970362018329, - 0.947167016574911, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.133949708096286, 7.07106443183933, 0.756424073220178, - 1.33655861587263, 1.04649134454641, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.147996225244056, 7.07106781149769 - )) + 0.000928440096312364, 7.07106778402553, 0.684630192237158, 1.20970288291351, + 0.947166537575333, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.133949576323355, 7.0710678120315, 0.180704774367475, + 0.319295071182553, 0.249999922775014, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353553172171174, 7.07106999605636)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0366838009998768, 1.1861687756168, 0.61142628830834, 0, "m", - "facGender", "contNormal", "", "", "", "", "", 0.0370637071059541, - 0.293241351291125, 2.0850616245501, -0.241526372778115, 0.928031128806223, + list(0.0366838008797363, 1.18616877573695, 0.611426288308341, 0, "m", + "facGender", "contNormal", "", "", "", "", "", 0.0370637071455118, + 0.293241351352423, 2.08506162411425, -0.24152637285578, 0.928031128883889, 0.343252378014054, 1, "m", "facGender", "contNormal", "", "", - "", "", "", 0.249956053143808, 0.298361987977753, 1.15045612995328, - -0.0128972050771744, 0.0123714599414317, -0.000262872567871329, + "", "", "", 0.249956053206706, 0.298361988017379, 1.15045612980049, + -0.012897204009318, 0.0123714589190882, -0.000262872545114915, 0, "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.967471745303378, 0.00644620646550703, -0.0407794210871048, - -0.0432228773310025, 0.0450913179848663, 0.0009342203269319, + "", "", 0.967471745428516, 0.00644620593228299, -0.0407794209301372, + -0.0432228886795712, 0.0450913298252601, 0.000934220572844438, 1, "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.966924036833367, 0.0225295454438143, 0.0414664525416957, - "", "", 0.00303376249613584, 0, "m", "facGender", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", -0.0274832360686722, 1, "m", "facGender", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", 0.000100435205340996, 0, "m", "facGender", "debCollin1", - "contcor2", "contNormal", "", "", "", - "", "", "", "", "", -0.000356935724137886, 1, "m", "facGender", - "debCollin1", "contcor2", "contNormal", "", "", - "", "", "", "")) + "", "", 0.966924036811744, 0.0225295513594746, 0.0414664525688195, + -0.0298673215719663, 0.0359348143184155, 0.00303374637322461, + 0, "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.856583718041994, 0.0167865676128288, 0.180724639080245, + -0.132059896064211, 0.0770933604781502, -0.0274832677930305, + 1, "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.606491202076885, 0.0533564030237636, -0.515088466154478, + -0.00108797437169792, 0.00128884414388531, 0.000100434886093695, + 0, "m", "facGender", "debCollin1", "contcor2", "contNormal", + "", "", "", 0.868439836134983, 0.000606342395659124, + 0.16564054701225, -0.00321462239483012, 0.00250075296598581, + -0.000356934714422156, 1, "m", "facGender", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.806606622240834, + 0.00145803071023194, -0.244806033177021)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0366838009998768, 1.1861687756168, 0.61142628830834, "facGenderm", - "", 0.0370637071059541, "contNormal", 0.293241351291125, - 2.0850616245501, -2.52807503699009, 2.42316947460038, -0.0524527811948553, - "debCollin1", "", 0.96687564081027, "contNormal", 1.2630957891689, - -0.0415271602079907, -0.14931176206522, 0.262721933762546, 0.0567050858486628, - "contcor2", "", 0.589562534682198, "contNormal", 0.105112568158863, - 0.539470082806473, -0.428203523212226, 0.720959782005335, 0.146378129396554, - "facExperimexperimental", "", 0.61755917650093, "contNormal", - 0.293159291263007, 0.49931260498659, -1.09011634343142, 0.55376852284285, - -0.268173910294287, "facGenderm:facExperimexperimental", "", - 0.522514313636004, "contNormal", 0.41936609020396, -0.639474474829044, - -0.0404917995071177, 0.0505150075004094, 0.00501160399664588, - "facGenderm", "", 0.829093474215046, "debCollin1", - 0.0232164488034926, 0.215864365780694, -0.0488496004885791, - 0.0421572065187112, -0.00334619698493392, "facExperimexperimental", - "", 0.885397467903638, "debCollin1", 0.0232164488034322, - -0.144130440157551, -0.0871738267301511, 0.0415292348692855, - -0.0228222959304328, "facGenderm:facExperimexperimental", "", - 0.48699137850027, "debCollin1", 0.0328330169877176, -0.695102004758513, - "", "", 0.0535007125151434, "facGenderm", "", "", "contcor2", - "", "", "", "", 0.353416818215269, "debCollin1", "", - "", "contcor2", "", "", "", "", 0.022697837103291, "facExperimexperimental", - "", "", "contcor2", "", "", "", "", -0.538170397030227, - "facGenderm:facExperimexperimental", "", "", "contcor2", - "", "")) + list(0.0366838008797363, 1.18616877573695, 0.611426288308341, "facGenderm", + "", 0.0370637071455118, "contNormal", 0.293241351352423, + 2.08506162411425, -2.52807503693338, 2.42316947454367, -0.0524527811948551, + "debCollin1", "", 0.966875640809512, "contNormal", + 1.26309578913996, -0.0415271602089419, -0.149311762064071, 0.262721933761397, + 0.0567050858486629, "contcor2", "", 0.589562534680122, + "contNormal", 0.105112568158277, 0.539470082809482, -0.42820352333879, + 0.720959782131899, 0.146378129396555, "facExperimexperimental", + "", 0.6175591765784, "contNormal", 0.293159291327581, + 0.499312604876607, -1.0901163437302, 0.553768523141631, -0.268173910294287, + "facGenderm:facExperimexperimental", "", 0.522514313787178, + "contNormal", 0.419366090356402, -0.639474474596591, -0.0404918009277258, + 0.0505150080533262, 0.0050116035628002, "facGenderm", "", + 0.829093492430719, "debCollin1", 0.0232164493069521, 0.215864342412579, + -0.0488495983291158, 0.0421572106520634, -0.00334619383852618, + "facExperimexperimental", "", 0.885397577388049, "debCollin1", + 0.0232164493069846, -0.144130301506505, -0.0871738319494162, + 0.0415292315797119, -0.0228223001848522, "facGenderm:facExperimexperimental", + "", 0.486991303832015, "debCollin1", 0.0328330174799949, + -0.695102123914068, -0.493186615941066, 0.60018747231297, 0.0535004281859516, + "facGenderm", "", 0.847892656037255, "contcor2", 0.278927086639967, + 0.191807933859822, -2.00077595664224, 2.70760740749267, 0.353415725425218, + "debCollin1", "", 0.768579472318103, "contcor2", 1.2011402763709, + 0.294233514917192, -0.523918940836957, 0.569314028229861, 0.022697543696452, + "facExperimexperimental", "", 0.93513579876908, "contcor2", + 0.278891086185793, 0.0813849736356624, -1.31298791252693, 0.236646568200234, + -0.538170672163346, "facGenderm:facExperimexperimental", "", + 0.173404052859757, "contcor2", 0.395322182690723, -1.36134701194944 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.03895739243996, 1.18963783444393, 0.614297613441946, 0, "m", - "Total", 0.0363780054523521, 0.293546323065218, 2.09267691391068, - -0.258993794476348, 0.891686647572699, 0.316346426548176, 1, - "m", "Total", 0.281180502762045, 0.293546323076717, 1.07767122828345, - -0.0323139874214345, 0.0380566376886455, 0.00287132513360551, - 0, "m", "Total indirect", 0.872924869342118, 0.0179520199516814, - 0.159944404102368, -0.140375077001877, 0.0865631740701204, -0.0269059514658781, - 1, "m", "Total indirect", 0.642111004186809, 0.0578934747939393, - -0.464749292759584)) + list(0.0389573763253271, 1.18963781771976, 0.614297597022544, 0, "m", + "Total", 0.0363780103498603, 0.29354632290972, 2.09267685908459, + -0.258993824622479, 0.891686616781371, 0.316346396079446, 1, + "m", "Total", 0.281180548829335, 0.293546322912123, 1.07767112509241, + -0.0323139778265635, 0.0380565952549703, 0.00287130871420339, + 0, "m", "Total indirect", 0.872925496679708, 0.0179520066788492, + 0.159943607729732, -0.140375207728291, 0.0865632438590741, -0.0269059819346082, + 1, "m", "Total indirect", 0.64211092135625, 0.0578935259467588, + -0.464749408411436)) @@ -12986,7 +13213,110 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0, "Model 1", 86)) + list(1045.1813651554, 1099.88993906115, 4, "Model 1", 100, -501.590682577702, + 86)) + + + + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.544848269114012, 0.0642086661026748, -0.240319801505669, "contcor1", + "", 0.121932454252122, "contGamma", 0.15537452219042, + -1.54671305255017, 1.68041098313932, 2.9691914502344, 2.32480121668686, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776568666775, 7.07106721781964, 0.770526403224887, 1.36147663651825, + 1.06600151987157, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.150755380699519, 7.07106781147858, 0.00465468555658643, + 0.00822456617460958, 0.006439625865598, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000910700565464956, 7.07106826304677, + 0.716694798022595, 1.26635923038254, 0.991527014202568, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.140223095091447, + 7.07106781201724, 0.732634599144319, 1.29452397386467, 1.01357928650449, + "contcor1", "", 1.53743684450092e-12, "contcor1", 0.14334176014265, + 7.07106767417815)) + + + + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.178062455048621, 0.193982250096115, 16, 0.00795989752374709, + "contGamma", "contNormal", "", "", "", "", "", 0.933162280611241, + 0.0949111075712048, 0.083866870037054, -0.162026263155493, 0.111766025645339, + 50, -0.0251301187550767, "contGamma", "contNormal", "", "", + "", "", "", 0.719002740277492, 0.0698462550741929, + -0.359791927690078, -0.270699475066733, 0.148212143285055, 84, + -0.0612436658908391, "contGamma", "contNormal", "", "", "", + "", "", 0.566589092085883, 0.106867172472584, -0.57308212123373, + -0.0127957819460438, 0.0154148368379154, 16, 0.00130952744593581, + "contGamma", "debCollin1", "contNormal", "", "", "", + "", 0.855612752166418, 0.0071967186658737, 0.18196173933344, + -0.0214257109949645, 0.0259359801842435, 50, 0.00225513459463947, + "contGamma", "debCollin1", "contNormal", "", "", "", + "", 0.8519366255406, 0.0120822860911708, 0.186648004990333, + -0.0312423786298422, 0.037816667857605, 84, 0.00328714461388137, + "contGamma", "debCollin1", "contNormal", "", "", "", + "", 0.851986165612692, 0.0176174274201404, 0.186584825099008, + -0.0142039447755673, 0.0236448806793488, "", 0.00472046795189071, + "contGamma", "contcor2", "contNormal", "", "", "", + "", 0.624919911088838, 0.00965549003794529, 0.488889526408256, + -0.00163849469576619, 0.00234746173265981, 16, 0.00035448351844681, + "contGamma", "debCollin1", "contcor2", "contNormal", "", + "", "", 0.727381066638346, 0.00101684430424914, + 0.348611401928015, -0.0024936554574392, 0.00371456617322439, + 50, 0.000610455357892595, "contGamma", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.699906191471184, + 0.00158375910976764, 0.385447101221193, -0.0036413492571367, + 0.00542098143206901, 84, 0.000889816087466154, "contGamma", + "debCollin1", "contcor2", "contNormal", "", "", + "", 0.700317728813588, 0.00231186153436702, 0.38489160109227 + )) + + + + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.161866274659825, 0.111853327393897, -0.025006473632964, "contGamma", + "", 0.720255941522451, "contNormal", 0.069827712195935, + -0.35811675403021, -2.77172006720285, 2.28717945067341, -0.242270308264719, + "debCollin1", "", 0.85109219347011, "contNormal", 1.29055930562506, + -0.187725048518696, -0.395253405327244, 0.158929362647731, -0.118162021339757, + "contcor2", "", 0.403266761620914, "contNormal", 0.141375752908293, + -0.835801181666603, -0.0540968519026555, 0.674392355358866, + 0.310147751728105, "contcor1", "", 0.0951423126945421, + "contNormal", 0.185842498384601, 1.66887420489933, -0.173955151929933, + 0.1060182716482, -0.0339684401408666, "contGamma:contcor1", + "", 0.634363248229863, "contNormal", 0.0714231041454149, + -0.47559456491429, -0.0197475152648815, 0.00116000260224464, + -0.00929375633131843, "contGamma", "", 0.0814251265929962, + "debCollin1", 0.0053336484833502, -1.74247634810024, -0.0185476075203342, + 0.0350787504831216, 0.00826557148139369, "contcor1", "", + 0.545718127087987, "debCollin1", 0.0136804447496111, 0.604188798878679, + -0.0145563037945869, 0.00654286039296265, -0.00400672170081214, + "contGamma:contcor1", "", 0.456639029725241, "debCollin1", + 0.00538253874917527, -0.744392541795647, -0.169848831372849, + 0.089950605219156, -0.0399491130768467, "contGamma", "", + 0.546665959819712, "contcor2", 0.0662765843253423, -0.602763607743305, + -1.87031180608543, 2.98033925576449, 0.555013724839532, "debCollin1", + "", 0.653777983855104, "contcor2", 1.23743372330085, + 0.448519960615778)) + + + + table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] + jaspTools::expect_equal_tables(table, + list(-0.170869066267807, 0.199557819147848, 16, 0.0143443764400204, + "Total", 0.879348682636447, 0.094498390872877, 0.151794928014352, + -0.154469346139959, 0.119381224438651, 50, -0.017544060850654, + "Total", 0.801715406197232, 0.069861123147851, -0.251127666721368, + -0.262098285986504, 0.157405811511302, 84, -0.0523462372376008, + "Total", 0.624747233117731, 0.107018317889207, -0.489133433136126, + -0.0171198455577634, 0.0298888033903101, 16, 0.00638447891627333, + "Total indirect", 0.594459402913799, 0.0119922226425771, 0.532384955363149, + -0.0224767346277683, 0.0376488504366139, 50, 0.00758605790442278, + "Total indirect", 0.620897929780684, 0.0153384413026579, 0.494578148765888, + -0.0302698307927997, 0.0480646880992762, 84, 0.00889742865323823, + "Total indirect", 0.656149844339188, 0.0199836628402278, 0.445235126531828 + )) @@ -13042,99 +13372,97 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(679.630631393392, 736.94437548513, 3, "Model 1", 100, -317.815315696696, + list(680.928517567727, 735.637091473477, 4, "Model 1", 100, -319.464258783863, 86)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962238381051216, 0.0896223057145565, 0.0399999609520222, - "facExperimexperimental", "", 0.114129121381735, "facGenderm", - 0.0253179880619996, 1.57990282853712, 0.180704852926605, 0.319295345191991, - 0.250000099059298, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553670778061, 7.07106500999201, 0.180704816508272, - 0.319295218167302, 0.250000017337787, "facExperimexperimental", + list(-0.00962284334388121, 0.0896218369429438, 0.0399994967995313, + "facExperimexperimental", "", 0.114133286815112, "facGenderm", + 0.0253179857052615, 1.57988464268777, 0.180704862494261, 0.319295378565181, + 0.250000120529721, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553731507581, 7.07106440267794, 0.75642407321811, + 1.3365586158747, 1.04649134454641, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.147996225245111, 7.07106781144728, + 0.00474536519808629, 0.00838481209641249, 0.00656508864724939, + "debCollin1", "", 1.53765888910584e-12, "debCollin1", + 0.000928447391644361, 7.07104000327046, 0.707778595984446, 1.25060480495125, + 0.97919170046785, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.13847861829313, 7.07106781203657, 0.180704862492133, + 0.319295378558027, 0.25000012052508, "facExperimexperimental", "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553439635152, 7.07106732141465, -0.396290859171775, 0.137694280349, - -0.129298289411388, "contcor2", "", 0.342536722309877, - "debCollin1", 0.136223201990644, -0.949164955176049, 0.00474619579768684, - 0.00838652467338468, 0.00656636023553576, "debCollin1", "", - 1.54165569199449e-12, "debCollin1", 0.000928672390006217, 7.07069608852246, - -6.95269820683369, 13.939202384321, 3.49325208874367, "contcor2", - "", 0.512187301097543, "contcor2", 5.32966441116963, - 0.655435655840299, 0.756424073220129, 1.33655861587268, 1.04649134454641, - "contNormal", "", 1.53743684450092e-12, "contNormal", - 0.147996225244081, 7.0710678114965)) + 0.035355373149476, 7.07106440280309)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0366838008531259, 1.18616877576354, 0.611426288308331, 0, "m", - "facGender", "contNormal", "", "", "", "", "", 0.0370637071542734, - 0.293241351365995, 2.08506162401772, -0.241526372789576, 0.928031128817704, - 0.343252378014064, 1, "m", "facGender", "contNormal", "", "", - "", "", "", 0.249956053153084, 0.298361987983606, 1.15045612993075, - -0.0163173944092309, 0.0156466438121256, -0.000335375298552651, + list(0.0366838009491725, 1.18616877566751, 0.61142628830834, 0, "m", + "facGender", "contNormal", "", "", "", "", "", 0.0370637071226492, + 0.293241351316995, 2.08506162436615, -0.241526372736387, 0.928031128764495, + 0.343252378014054, 1, "m", "facGender", "contNormal", "", "", + "", "", "", 0.249956053110014, 0.298361987956463, 1.15045613003538, + -0.0128973491041087, 0.0123715979223456, -0.000262875590881544, 0, "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.967193103264792, 0.00815424121909504, -0.0411289400866989, - -0.0478174978742633, 0.0498857810496907, 0.0010341415877137, + "", "", 0.967471734265313, 0.00644627840760661, -0.0407794349327747, + -0.043222597228962, 0.0450910257270636, 0.000934214249050789, 1, "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.966904844699451, 0.0249247638463321, 0.0414905270151991, - -0.0538133233416324, 0.0444548933378574, -0.00467921500188746, + "", "", 0.966924037655934, 0.0225293994309672, 0.0414664515098743, + -0.0708961425336758, 0.0422198562331466, -0.0143381431502646, "", "m", "facGender", "contcor2", "contNormal", "", "", - "", "", 0.851931685094096, 0.0250688832689317, -0.186654305725955, - -0.0424941399689483, 0.057027855038972, 0.00726685753501184, + "", "", 0.61927734880921, 0.0288566523821527, -0.496874792002294, + -0.00162670129014462, 0.00196721117298304, 0.000170254941419211, 0, "m", "facGender", "debCollin1", "contcor2", "contNormal", - "", "", "", 0.774706758461265, 0.0253887305565146, - 0.286223744776684, -0.117624625223006, 0.0728094010763381, -0.0224076120733341, - 1, "m", "facGender", "debCollin1", "contcor2", "contNormal", - "", "", "", 0.644624787957194, 0.0485810014371345, - -0.461242284235955)) + "", "", "", 0.852680560254566, 0.00091683125084848, + 0.185699321725398, -0.00420944177367551, 0.00299932871820505, + -0.00060505652773523, 1, "m", "facGender", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.742145987810909, + 0.00183900585641941, -0.329012833549802)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0366838008531259, 1.18616877576354, 0.611426288308331, "facGenderm", - "", 0.0370637071542734, "contNormal", 0.293241351365995, - 2.08506162401772, -2.52807503698529, 2.42316947459559, -0.052452781194854, - "debCollin1", "", 0.966875640810207, "contNormal", - 1.26309578916645, -0.0415271602080701, -0.149311762064224, 0.26272193376155, - 0.0567050858486633, "contcor2", "", 0.589562534680396, - "contNormal", 0.105112568158355, 0.539470082809086, -0.428203523257598, - 0.720959782050686, 0.146378129396544, "facExperimexperimental", - "", 0.617559176528721, "contNormal", 0.293159291286151, - 0.499312604947136, -1.09011634365243, 0.553768523063898, -0.268173910294267, - "facGenderm:facExperimexperimental", "", 0.522514313747867, - "contNormal", 0.419366090316731, -0.639474474657037, -0.0357010934984357, - 0.0484887966826304, 0.00639385159209734, "facGenderm", "", - 0.765931169884451, "debCollin1", 0.0214774074536944, 0.29770127543944, - -0.0238454791754661, 0.0237106543179361, -6.74124287650236e-05, - "facExperimexperimental", "", 0.995566473076192, "debCollin1", - 0.0121318896338195, -0.00555663056619811, -0.0760684931126135, - 0.0238494551485899, -0.0261095189820118, "facGenderm:facExperimexperimental", - "", 0.305686607190578, "debCollin1", 0.0254897408955836, - -1.02431480527664, -0.895485988749922, 0.730449116594379, -0.0825184360777714, - "facGenderm", "", 0.842308334330398, "contcor2", 0.414786985416434, - -0.198941719434435, -20.1778679366757, 60.2638084629909, 20.0429702631576, - "debCollin1", "", 0.328720069141316, "contcor2", 20.5212128983441, - 0.976695206196848)) + list(0.0366838009491725, 1.18616877566751, 0.61142628830834, "facGenderm", + "", 0.0370637071226492, "contNormal", 0.293241351316995, + 2.08506162436615, -2.52807503699145, 2.42316947460174, -0.0524527811948553, + "debCollin1", "", 0.966875640810288, "contNormal", + 1.26309578916959, -0.041527160207968, -0.149311762065097, 0.262721933762423, + 0.0567050858486628, "contcor2", "", 0.589562534681976, + "contNormal", 0.1051125681588, 0.539470082806795, -0.428203523121936, + 0.720959781915045, 0.146378129396554, "facExperimexperimental", + "", 0.617559176445663, "contNormal", 0.293159291216939, + 0.499312605065053, -1.09011634344616, 0.553768522857584, -0.268173910294287, + "facGenderm:facExperimexperimental", "", 0.522514313643458, + "contNormal", 0.419366090211477, -0.639474474817581, -0.0404918322479046, + 0.0505151555071612, 0.00501166162962828, "facGenderm", "", + 0.829091873343599, "debCollin1", 0.0232164949134059, 0.215866419471201, + -0.0488496327188513, 0.0421573550365619, -0.00334613884114473, + "facExperimexperimental", "", 0.885399671531331, "debCollin1", + 0.0232164949134945, -0.144127649484238, -0.0871738958671171, + 0.0415294204870491, -0.022822237690034, "facGenderm:facExperimexperimental", + "", 0.486993352255887, "debCollin1", 0.0328330819773633, + -0.695098855044091, -0.641306843225431, 0.135597595609409, -0.252854623808011, + "facGenderm", "", 0.202027488773096, "contcor2", 0.198193549719016, + -1.27579643316591, -1.77925889372129, 2.97744965810519, 0.599095382191949, + "debCollin1", "", 0.621514541087812, "contcor2", 1.21346835690523, + 0.49370498932486)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0383553196570646, 1.18900179142874, 0.613678555542903, 0, "m", - "Total", 0.036561267677006, 0.293537657030392, 2.09062973981347, - -0.258094239739594, 0.892493624792705, 0.317199692526556, 1, - "m", "Total", 0.279846191435463, 0.29352270592929, 1.08066492342493, - -0.0332062648397196, 0.0377107993088631, 0.00225226723457173, - 0, "m", "Total indirect", 0.900924414845175, 0.0180914202270979, - 0.124493666406477, -0.138583676131819, 0.0864783051568028, -0.0260526854875079, - 1, "m", "Total indirect", 0.649999894586448, 0.0574148257477896, - -0.453762336612349)) + list(0.0186417699122609, 1.17534927910497, 0.596995524508613, 0, "m", + "Total", 0.043058873834487, 0.295083868457958, 2.02313846442497, + -0.247588621374892, 0.906075406545102, 0.329243392585105, 1, + "m", "Total", 0.263265764729428, 0.29430745590734, 1.11870557804952, + -0.0721282965806775, 0.0432667689812236, -0.0144307637997269, + 0, "m", "Total indirect", 0.623986902284422, 0.0294380576561923, + -0.490207742924622, -0.0863746225440015, 0.0583566516861034, + -0.014008985428949, 1, "m", "Total indirect", 0.704374596827041, + 0.036921921875026, -0.379421891318846)) @@ -13188,102 +13516,100 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1338.7381786287, 1396.05192272044, 5, "Model 1", 100, -647.369089314352, + list(1336.73817862874, 1391.44675253449, 6, "Model 1", 100, -647.369089314369, 87)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848386763681, 0.0642085295023111, -0.240319928630685, "contcor1", - "", 0.121932245261299, "contGamma", 0.155374517355971, - -1.54671391886032, 1.68041075992053, 2.96919067165766, 2.3248007157891, + list(-0.544848155900623, 0.0642086830624644, -0.240319736419079, "contcor1", + "", 0.121932496340108, "contGamma", 0.15537449763548, + -1.5467128780869, 1.68041088917205, 2.96919112245892, 2.32480100581549, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776426991226, 7.07106874134604, 0.732634670348647, 1.29452422221643, - 1.01357944628254, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341805334153, 7.07106655954081, -69.486435453536, - 69.4864354672758, 6.86989537743461e-09, "contcor2", "", - 0.99999999984539, "debCollin1", 35.4529144456256, 1.93775194080899e-10, - 0.00468047947016255, 0.00827014275605926, 0.00647531111311091, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000915747257146437, 7.07106798582028, 0.716694736025142, 1.26635919107941, - 0.991526963552276, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.140223100880922, 7.07106715885769, 0.763066015073667, - 1.34829455200905, 1.05568028354136, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.14929573746038, 7.07106781144047, - 0.78450535760552, 1.38617662595544, 1.08534099178048, "contcor2:contcor1", - "", 1.53743684450092e-12, "contcor2:contcor1", 0.153490388878527, - 7.07106809560189)) + 0.328776509020728, 7.0710678592579, 0.763066015072436, 1.34829455200976, + 1.0556802835411, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.149295737460874, 7.07106781141531, 0.00468047973614843, + 0.00827014357350492, 0.00647531165482667, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000915747397827536, 7.07106749108795, + 0.716694798018282, 1.26635923037531, 0.991527014196794, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.140223095090703, + 7.07106781201363, 0.732634572981913, 1.29452388260133, 1.01357922779162, + "contcor1", "", 1.53743684450092e-12, "contcor1", 0.143341743534965, + 7.07106808383685, 0.784505373687332, 1.3861766820448, 1.08534102786607, + "contcor2:contcor1", "", 1.53743684450092e-12, "contcor2:contcor1", + 0.153490399084722, 7.07106786051806)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.177156434412108, 0.100311600964073, "", -0.0384224167240177, - "contGamma", "contNormal", "", "", "", "", "", 0.587258935638296, - 0.0707839627576867, -0.542812456764372, -0.0208743386981768, - 0.0251795063047865, "", 0.00215258380330483, "contGamma", "debCollin1", - "contNormal", "", "", "", "", 0.85462560712536, - 0.011748645731817, 0.183219738890868, -25.3474567530985, 25.3681406456874, - 16, 0.0103419462944505, "contGamma", "contcor2", "contNormal", - "", "", "", "", 0.999362208342125, 12.9378901344168, - 0.000799353386603533, -14.480171934, 14.4919879629819, 50, 0.0059080144909886, - "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.999362208421602, 7.39099292780649, 0.000799353286993605, - -2.61994058774634, 2.62207847067775, 84, 0.00106894146570424, - "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.999362216278057, 1.33727433253174, 0.000799343440384823, - -25.3564615186792, 25.3590845576818, 16, 0.0013115195012776, - "contGamma", "debCollin1", "contcor2", "contNormal", "", - "", "", 0.999919118016341, 12.9378770417209, - 0.00010137053374741, -14.4853142852176, 14.4868127413105, 50, - 0.00074922804645776, "contGamma", "debCollin1", "contcor2", - "contNormal", "", "", "", 0.999919118016505, - 7.39098454233255, 0.000101370533542113, -2.62083923083732, 2.62111034761516, - 84, 0.000135558388922175, "contGamma", "debCollin1", "contcor2", - "contNormal", "", "", "", 0.999919118032546, - 1.33725660772349, 0.000101370513437168)) + list(-0.177156251375267, 0.10031178400078, "", -0.0384222336872435, + "contGamma", "contNormal", "", "", "", "", "", 0.587260716221921, + 0.0707839627576523, -0.54280987091373, -0.0208743347043294, + 0.0251795006551179, "", 0.00215258297539424, "contGamma", "debCollin1", + "contNormal", "", "", "", "", 0.854625632313524, + 0.0117486432716912, 0.183219706787844, -0.0260580394664078, + 0.0467418975993738, 16, 0.010341929066483, "contGamma", "contcor2", + "contNormal", "", "", "", "", 0.577620795283809, + 0.0185717537771149, 0.556863352303695, -0.0161091702887797, + 0.0279251769785497, 50, 0.005908003344885, "contGamma", "contcor2", + "contNormal", "", "", "", "", 0.598937423141361, + 0.0112334582713424, 0.525929166439942, -0.0125374366152742, + 0.0146753105296384, 84, 0.0010689369571821, "contGamma", "contcor2", + "contNormal", "", "", "", "", 0.877627328563053, + 0.00694215489661116, 0.153977687490653, -0.00486723793899367, + 0.00749028040144825, 16, 0.00131152123122729, "contGamma", "debCollin1", + "contcor2", "contNormal", "", "", "", + 0.677389803586724, 0.00315248607574334, 0.416027604790623, -0.00289782774046023, + 0.0043962854790828, 50, 0.000749228869311282, "contGamma", "debCollin1", + "contcor2", "contNormal", "", "", "", + 0.68721091500615, 0.00186077736047143, 0.402642941185324, -0.00164139944470475, + 0.00191251588829578, 84, 0.000135558221795519, "contGamma", + "debCollin1", "contcor2", "contNormal", "", "", + "", 0.881143985203436, 0.000906627713833867, 0.149519168372079 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.177156434412108, 0.100311600964073, -0.0384224167240177, "contGamma", - "", 0.587258935638296, "contNormal", 0.0707839627576867, - -0.542812456764372, -2.74424718759816, 2.27261162085328, -0.23581778337244, - "debCollin1", "", 0.853812256389695, "contNormal", - 1.27983443778145, -0.184256476002648, -0.417639772413975, 0.121038057214207, - -0.148300857599884, "contcor2", "", 0.280508867620152, - "contNormal", 0.137420338811632, -1.07917691720413, -0.0398877014005333, - 0.501732714317906, 0.230922506458686, "contcor1", "", - 0.0946663035263138, "contNormal", 0.138171012322337, 1.67128041242089, - -0.0894010060237005, 0.317269112175332, 0.113934053075816, "contcor2:contcor1", - "", 0.272108409152486, "contNormal", 0.103744283417143, - 1.09822005919787, -0.0194720945741237, 0.00121576315992214, - -0.0091281657071008, "contGamma", "", 0.0837014780568781, - "debCollin1", 0.00527761170542649, -1.72960161084135, -97.9942015230838, - 97.9143020195197, -0.0399497517820319, "contGamma", "", - 0.99936220824602, "contcor2", 49.9775774167038, -0.000799353507052538, - -10730.4254790344, 10731.5355047498, 0.555012857700155, "debCollin1", - "", 0.99991911801694, "contcor2", 5475.09065295928, - 0.000101370532997508)) + list(-0.177156251375267, 0.10031178400078, -0.0384222336872435, "contGamma", + "", 0.587260716221921, "contNormal", 0.0707839627576523, + -0.54280987091373, -2.74424714638236, 2.27261166198034, -0.235817742201008, + "debCollin1", "", 0.853812281622527, "contNormal", + 1.27983443775882, -0.184256443836565, -0.417639768343969, 0.121038061291156, + -0.148300853526407, "contcor2", "", 0.280508880838084, + "contNormal", 0.137420338813404, -1.07917688754775, -0.0398877017418788, + 0.501732713983365, 0.230922506120743, "contcor1", "", + 0.0946663040133355, "contNormal", 0.138171012324073, 1.67128040995406, + -0.0894009506470876, 0.317269167551002, 0.113934108451957, "contcor2:contcor1", + "", 0.272108176127768, "contNormal", 0.103744283416902, + 1.09822059297577, -0.0194720928878497, 0.00121576530788842, + -0.00912816378998065, "contGamma", "", 0.083701549903898, + "debCollin1", 0.0052776118232073, -1.72960120898647, -0.169849395861875, + 0.0899500407270967, -0.0399496775673892, "contGamma", "", + 0.54666029297828, "contcor2", 0.0662765843245684, -0.602772124944587, + -1.87031193108633, 2.98033913081186, 0.555013599862764, "debCollin1", + "", 0.653778056730858, "contcor2", 1.23743372331316, + 0.448519859614579)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.16470247231815, 0.115469738068181, 16, -0.0246163671249847, - "Total", 0.730537231378965, 0.0714738159977158, -0.344410981579204, - -0.168416389264761, 0.109191208498228, 50, -0.0296125903832665, - "Total", 0.675843759254417, 0.070819566061602, -0.418141370105377, - -0.174776608996545, 0.104645942864373, 84, -0.0350653330660864, - "Total", 0.622775802625111, 0.0712825730638337, -0.491920136422199, - -0.0294102096790019, 0.0570223088770678, 16, 0.0138060495990329, - "Total indirect", 0.531224158839472, 0.0220495170415983, 0.62613841260045, - -0.022964529106328, 0.0405841817878304, 50, 0.0088098263407512, - "Total indirect", 0.586838013252514, 0.016211703734207, 0.543423842749008, - -0.0234051730681136, 0.0301193403839761, 84, 0.00335708365793125, - "Total indirect", 0.805790764402637, 0.0136544635193004, 0.245859799118878 + list(-0.164702306830284, 0.115469906002006, 16, -0.024616200414139, + "Total", 0.730538987517733, 0.0714738166216962, -0.344408646098054, + -0.168416215328874, 0.109191378333568, 50, -0.029612418497653, + "Total", 0.675845529173726, 0.0708195650155246, -0.418138949189557, + -0.174776425573877, 0.104646114508134, 84, -0.0350651555328717, + "Total", 0.622777548684485, 0.0712825700589554, -0.491917666603077, + -0.0294102205382019, 0.057022287084411, 16, 0.0138060332731045, + "Total indirect", 0.531224592501557, 0.0220495142523999, 0.62613775138388, + -0.0229645304580477, 0.0405841608372288, 50, 0.00880981518959052, + "Total indirect", 0.5868383713713, 0.0162116987344003, 0.543423322498374, + -0.0234051623564153, 0.030119318665159, 84, 0.00335707815437186, + "Total indirect", 0.805790961103778, 0.0136544552460577, 0.24585954502587 )) @@ -13338,86 +13664,92 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(885.749665049464, 943.063409141202, 5, "Model 1", 100, -420.874832524732, + list(883.749665049476, 938.458238955226, 6, "Model 1", 100, -420.874832524738, 87)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962232227042937, 0.0896223164528825, 0.0399999970912265, - "facExperimexperimental", "", 0.11412860920646, "facGenderm", - 0.0253179751021297, 1.57990506467723, 0.180704802897195, 0.31929517069261, - 0.249999986794903, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553353246789, 7.07106818529866, 0.18070480289511, - 0.319295170685326, 0.249999986790218, "facExperimexperimental", - "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553353233526, 7.07106818543141, 0.00480662740255639, 0.00849303801881333, - 0.00664983271068486, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.0009404281520821, 7.07106938043293, 0.707778774659135, - 1.2506054267983, 0.979192100728716, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.138478731349379, 7.07106492951784, - 0.75292606071295, 1.33037782533852, 1.04165194302574, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.147311830518427, - 7.07106781145751, 0.319034404162576, 0.563715811079738, 0.441375107621157, - "contcor2:facExperimexperimental", "", 1.53743684450092e-12, - "contcor2:facExperimexperimental", 0.0624198732341967, 7.07106702964833 - )) + list(-0.00962234744471571, 0.0896223050823096, 0.039999978818797, "facExperimexperimental", + "", 0.114128824843019, "facGenderm", 0.0253179786235499, + 1.57990412321426, 0.180704812144708, 0.319295202947201, 0.250000007545955, + "facGenderm", "", 1.53743684450092e-12, "facGenderm", + 0.0353553411939394, 7.07106759837492, 0.752926060712374, 1.3303778253391, + 1.04165194302574, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.147311830518721, 7.0710678114434, 0.00480662819061025, + 0.00849304084802195, 0.0066498345193161, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000940428672794413, 7.07106738840344, + 0.707778595984154, 1.25060480495155, 0.97919170046785, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.138478618293279, + 7.07106781202896, 0.180704812145809, 0.319295202951246, 0.250000007548527, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353553411946905, 7.07106759829746, + 0.319034350348205, 0.563715623379433, 0.441374986863819, "contcor2:facExperimexperimental", + "", 1.53743684450092e-12, "contcor2:facExperimexperimental", + 0.062419839078994, 7.07106896423181)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0382947731940849, 0.863153988625621, 0.450724380909853, "", + list(0.0382947731979594, 0.863153988621747, 0.450724380909853, "", "m", "facGender", "contNormal", "", "", "", "", "", - 0.0321975144613544, 0.210427135890741, 2.14194989159516, -0.0224126194384268, - 0.0211162117739842, -0.000648203832221288, "", "m", "facGender", + 0.0321975144597348, 0.210427135888764, 2.14194989161528, -0.0224124593339386, + 0.0211160610398606, -0.000648199147039015, "", "m", "facGender", "debCollin1", "contNormal", "", "", "", "", - 0.953451450203005, 0.011104497724387, -0.0583730888428878, "", - "", -0.0385516262871506, 0, "m", "facGender", "contcor2", "contNormal", - "", "", "", "", "", "", "", "", "", 0.0111836799129411, + 0.953451454246472, 0.0111044184273657, -0.0583730837665119, + -0.129481248421858, 0.0523780031482554, -0.0385516226368011, + 0, "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.405990572341476, 0.0463935187086588, -0.830970008524183, + -0.0684527671232886, 0.0908201248312658, 0.0111836788539886, 1, "m", "facGender", "contcor2", "contNormal", "", "", - "", "", "", "", "", "", "", -0.00080021676650653, 0, - "m", "facGender", "debCollin1", "contcor2", "contNormal", "", - "", "", "", "", "", "", "", 0.000232139835318974, - 1, "m", "facGender", "debCollin1", "contcor2", "contNormal", - "", "", "", "", "", "")) + "", "", 0.783127300842753, 0.0406315863992601, 0.27524593167724, + -0.00534642142707755, 0.00374600081045489, -0.000800210308311326, + 0, "m", "facGender", "debCollin1", "contcor2", "contNormal", + "", "", "", 0.730104201992727, 0.00231953809081501, + -0.344986922818826, -0.00181039963414165, 0.00227467555778395, + 0.000232137961821149, 1, "m", "facGender", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.823727495109336, + 0.00104213016773475, 0.222753326799608)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0382947731940849, 0.863153988625621, 0.450724380909853, "facGenderm", - "", 0.0321975144613544, "contNormal", 0.210427135890741, - 2.14194989159516, -2.39561739965962, 2.54359706600472, 0.0739898331725533, - "debCollin1", "", 0.953174461007011, "contNormal", - 1.26002684350943, 0.0587208388088595, -0.120404948575584, 0.425336075056172, - 0.152465563240294, "contcor2", "", 0.273462369395427, - "contNormal", 0.139222207126379, 1.09512387705428, -0.37984702575488, - 0.442869415275237, 0.0315111947601786, "facExperimexperimental", - "", 0.880655152585983, "contNormal", 0.209880499723362, - 0.150138744674768, -0.608730680086823, 0.215340195532718, -0.196695242277053, - "contcor2:facExperimexperimental", "", 0.349460130216944, - "contNormal", 0.210226025100386, -0.935636975408385, -0.0407263580019783, - 0.023204928247985, -0.00876071487699665, "facGenderm", "", - 0.59115664971127, "debCollin1", 0.0163093012816167, -0.537160649970421, - "", "", -0.252854647750136, "facGenderm", "", "", "contcor2", - "", "", "", "", 0.599095887000537, "debCollin1", "", - "", "contcor2", "", "")) + list(0.0382947731979594, 0.863153988621747, 0.450724380909853, "facGenderm", + "", 0.0321975144597348, "contNormal", 0.210427135888764, + 2.14194989161528, -2.39561739966349, 2.5435970660086, 0.0739898331725533, + "debCollin1", "", 0.953174461007084, "contNormal", + 1.26002684351141, 0.0587208388087674, -0.120404948619133, 0.425336075099721, + 0.152465563240294, "contcor2", "", 0.273462369471986, + "contNormal", 0.139222207148598, 1.09512387687951, -0.379847025764688, + 0.442869415285045, 0.0315111947601786, "facExperimexperimental", + "", 0.880655152588808, "contNormal", 0.209880499728366, + 0.150138744671188, -0.60873068014305, 0.215340195588944, -0.196695242277053, + "contcor2:facExperimexperimental", "", 0.349460130282704, + "contNormal", 0.210226025129074, -0.935636975280707, -0.0407262990350551, + 0.0232049959250092, -0.00876065155502292, "facGenderm", "", + 0.591159381917589, "debCollin1", 0.0163093035036221, -0.53715669421918, + -0.641306843222186, 0.135597595606164, -0.252854623808011, "facGenderm", + "", 0.202027488769328, "contcor2", 0.19819354971736, + -1.27579643317657, -1.77925889362558, 2.97744965800948, 0.599095382191949, + "debCollin1", "", 0.621514541073779, "contcor2", 1.21346835685639, + 0.493704989344727)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0132208192001006, 0.83466948724805, 0.410724334023974, 0, "m", - "Total", 0.0575852408335109, 0.216302522172907, 1.89884209346228, - 0.0557040451615438, 0.86727994849024, 0.461491996825892, 1, - "m", "Total", 0.0258128638273805, 0.207038473597041, 2.22901564529544, - -0.134836011286368, 0.0548359175146111, -0.0400000468858785, - 0, "m", "Total indirect", 0.408420515341495, 0.0483865852375572, - -0.826676375063367, -0.0717894483843886, 0.0933246802164662, - 0.0107676159160388, 1, "m", "Total indirect", 0.798235830521887, - 0.042121725170272, 0.25563093326572)) + list(-0.0132207947835936, 0.834669492418997, 0.410724348817702, 0, + "m", "Total", 0.0575852261697667, 0.216302517263236, 1.89884220495621, + 0.0557040494142661, 0.867279947742981, 0.461491998578624, 1, + "m", "Total", 0.0258128623504446, 0.207038472321513, 2.22901566749375, + -0.134835938098773, 0.05483587391447, -0.0400000320921514, 0, + "m", "Total indirect", 0.408420400095872, 0.0483865554442199, + -0.826676578337211, -0.0717893966541874, 0.0933246319917289, + 0.0107676176687707, 1, "m", "Total indirect", 0.798235678883895, + 0.0421216996710947, 0.25563112962794)) @@ -13473,113 +13805,110 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1545.10894083812, 1610.23819548782, 10, "Model 1", 100, -747.554470419061, + list(1543.10894083892, 1605.63302530263, 11, "Model 1", 100, -747.554470419459, 88)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544848532880296, 0.0642089635988375, -0.240319784640729, "contcor1", - "", 0.121932824289918, "contGamma", 0.155374665372247, - -1.54671151866986, 1.68041121721245, 2.96919226671027, 2.32480174196136, + list(-0.544846680285468, 0.0642108793533223, -0.240317900466073, "contcor1", + "", 0.121935788484891, "contGamma", 0.1553746814847, + -1.54669923162312, 1.68041116440808, 2.96919208244642, 2.32480162342725, "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776717241631, 7.07106562005353, 0.732634924939753, 1.29452511068306, - 1.01358001781141, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341967040064, 7.07106256975049, -22.9650202524076, - 22.9650202428175, -4.79502605111558e-09, "contcor2", "", - 0.999999999673478, "debCollin1", 11.7170623688791, -4.09234490707443e-10, - 0.00468047942559858, 0.00827014398320399, 0.00647531170440128, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000915747581567882, 7.07106612644795, 0.716694589291923, 1.26635851172641, - 0.991526550509167, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.140222965006033, 7.07107106504637, 0.739463391255518, - 1.3065900489462, 1.02302672010086, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.144677826267244, 7.07106780973579, - 0.323891748032959, 0.572298342902934, 0.448095045467947, "debCollin1:contcor1", - "", 1.53743684450092e-12, "debCollin1:contcor1", 0.0633701937457459, - 7.07106951993543, 0.784504876245642, 1.38617494699816, 1.0853399116219, - "contcor2:contcor1", "", 1.53743684450092e-12, "contcor2:contcor1", - 0.153490083363372, 7.07107513292877)) + 0.328776683705438, 7.07106598079236, 0.739463391418414, 1.30659004878332, + 1.02302672010087, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.144677826184136, 7.07106781379774, 0.0046804745234578, + 0.0082701253919752, 0.0064752999577165, "debCollin1", "", + 1.53721479989599e-12, "debCollin1", 0.000915744089389424, 7.07108026439344, + 0.716694798030377, 1.26635923037469, 0.991527014202535, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.14022309508746, + 7.07106781221808, 0.732635169842268, 1.29452596379512, 1.01358056681869, + "contcor1", "", 1.53765888910584e-12, "contcor1", 0.143342122198411, + 7.07105874584246, 0.323891766355691, 0.572298406894941, 0.448095086625316, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633702053962852, 7.07106886940253, 0.784504536124073, 1.38617376068992, + 1.085339148407, "contcor2:contcor1", "", 1.53721479989599e-12, + "contcor2:contcor1", 0.153489867495459, 7.07108010526562)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.169208111275507, 0.104245886269458, "", -0.0324811125030244, - "contGamma", "contNormal", "", "", "", "", "", 0.641492836537939, - 0.0697599546986411, -0.465612580216556, -0.0177281329308048, - 0.0595421488685352, 16, 0.0209070079688652, "contGamma", "debCollin1", - "contNormal", "", "", "", "", 0.288865224386921, - 0.0197121687971917, 1.06061429282422, -0.0216019698378597, 0.0236066801787423, - 50, 0.00100235517044131, "contGamma", "debCollin1", "contNormal", - "", "", "", "", 0.930741709306131, 0.0115330308039336, - 0.0869116876111548, -0.0618197790387804, 0.0203776919529187, - 84, -0.0207210435429309, "contGamma", "debCollin1", "contNormal", - "", "", "", "", 0.323069855328091, 0.0209691279125694, - -0.988169065939562, -9.66930169683572, 9.69319534149234, 16, - 0.0119468223283141, "contGamma", "contcor2", "contNormal", "", - "", "", "", 0.998070215715313, 4.93950327430937, - 0.00241862828403217, -5.21051738470261, 5.22339299090496, 50, - 0.00643780310117246, "contGamma", "contcor2", "contNormal", - "", "", "", "", 0.998070217727378, 2.66176074099038, - 0.00241862576227535, -0.3445531080236, 0.345403925609657, 84, - 0.000425408793028191, "contGamma", "contcor2", "contNormal", - "", "", "", "", 0.998071577715973, 0.176012681629752, - 0.00241692126436123, -9.67964782104833, 9.68267789073466, 16, - 0.00151503484316214, "contGamma", "debCollin1", "contcor2", - "contNormal", "", "", "", 0.99975527223679, - 4.93945956775496, 0.000306720770234129, -5.21608726776866, 5.21772008622761, - 50, 0.000816409229471642, "contGamma", "debCollin1", "contcor2", - "contNormal", "", "", "", 0.999755272241017, - 2.66173445948416, 0.000306720764936808, -0.344681961854584, - 0.34478985818489, 84, 5.39481651533198e-05, "contGamma", "debCollin1", - "contcor2", "contNormal", "", "", "", - 0.999755275021379, 0.175888900377236, 0.000306717280269619 - )) + list(-0.169207732329356, 0.104246265220311, "", -0.0324807335545224, + "contGamma", "contNormal", "", "", "", "", "", 0.64149672554564, + 0.0697599546998406, -0.465607148030396, -0.0177281181175479, + 0.059542115971335, 16, 0.0209069989268936, "contGamma", "debCollin1", + "contNormal", "", "", "", "", 0.288865135197173, + 0.0197121566259331, 1.06061448899957, -0.02160196208423, 0.0236066700834538, + 50, 0.00100235399961187, "contGamma", "debCollin1", "contNormal", + "", "", "", "", 0.930741762726552, 0.0115330262505545, + 0.0869116204052401, -0.0618197488967644, 0.0203776766499465, + 84, -0.020721036123409, "contGamma", "debCollin1", "contNormal", + "", "", "", "", 0.323069761065269, 0.0209691163192471, + -0.988169258443645, -0.029287272912286, 0.0531806091328659, + 16, 0.01194666811029, "contGamma", "contcor2", "contNormal", + "", "", "", "", 0.5701311301137, 0.0210381115917558, + 0.567858386822679, -0.017028499536973, 0.0299039344291512, 50, + 0.00643771744608906, "contGamma", "contcor2", "contNormal", + "", "", "", "", 0.590786843234419, 0.0119727796878721, + 0.537696141908479, -0.0126171691188727, 0.0134679650502338, + 84, 0.00042539796568051, "contGamma", "contcor2", "contNormal", + "", "", "", "", 0.949028810877241, 0.00665449323938162, + 0.063926425405767, -0.00554570020251181, 0.00857578608060617, + 16, 0.00151504293904718, "contGamma", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.674080187286198, + 0.00360248616671186, 0.420554824900279, -0.00310692216495224, + 0.00473974870206466, 50, 0.000816413268556211, "contGamma", + "debCollin1", "contcor2", "contNormal", "", "", + "", 0.683382259610056, 0.00200173853420533, 0.407852101863202, + -0.00160867938003409, 0.00171657493354565, 84, 5.39477767557778e-05, + "contGamma", "debCollin1", "contcor2", "contNormal", "", + "", "", 0.949292269885747, 0.00084829474924257, + 0.0635955566198506)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.169208111275507, 0.104245886269458, -0.0324811125030244, "contGamma", - "", 0.641492836537939, "contNormal", 0.0697599546986411, - -0.465612580216556, -2.59066999747789, 2.35475611815965, -0.11795693965912, - "debCollin1", "", 0.925508700560774, "contNormal", - 1.26161147721244, -0.0934970407210849, -0.427208008906611, 0.103883146482005, - -0.161662431212303, "contcor2", "", 0.232785806224794, - "contNormal", 0.135484927166467, -1.19321340457062, -2.88089000449105, - 0.395759276887556, -1.24256536380175, "contcor1", "", - 0.137144693253762, "contNormal", 0.835895278490931, -1.48650841292583, - -0.217241785744325, 4.6941615627836, 2.23845988851964, "debCollin1:contcor1", - "", 0.0740058401865262, "contNormal", 1.25293204040188, - 1.78657725745576, -0.0608877713251243, 0.344006019677713, 0.141559124176295, - "contcor2:contcor1", "", 0.170535013023098, "contNormal", - 0.103291130397443, 1.3704867361951, -0.0194721034541229, 0.00121575531469022, - -0.00912817406971633, "contGamma", "", 0.0837012102261059, - "debCollin1", 0.00527761196940257, -1.72960310887533, -32.4137412087877, - 32.3338415287566, -0.0399498400155472, "contGamma", "", - 0.998070213739874, "contcor2", 16.5175440080187, -0.00241863075988493, - -3545.99636248182, 3547.10638385951, 0.555010688846486, "debCollin1", - "", 0.999755272238518, "contcor2", 1809.49823626628, - 0.000306720768068663)) + list(-0.169207732329356, 0.104246265220311, -0.0324807335545224, "contGamma", + "", 0.64149672554564, "contNormal", 0.0697599546998406, + -0.465607148030396, -2.59066991479727, 2.35475620583885, -0.117956854479213, + "debCollin1", "", 0.925508754271473, "contNormal", + 1.26161147848762, -0.0934969731098326, -0.427208001001782, 0.103883154318023, + -0.16166242334188, "contcor2", "", 0.232785828909056, + "contNormal", 0.135484927148913, -1.19321334663445, -2.88089000652514, + 0.395759274315517, -1.24256536610481, "contcor1", "", + 0.137144692461039, "contNormal", 0.835895278353696, -1.48650841592508, + -0.217241791075159, 4.69416155530428, 2.23845988211456, "debCollin1:contcor1", + "", 0.0740058408869781, "contNormal", 1.25293203985378, + 1.78657725312523, -0.0608876569866195, 0.34400613410585, 0.141559238559615, + "contcor2:contcor1", "", 0.170534667667026, "contNormal", + 0.103291130420309, 1.37048784327935, -0.019472090241311, 0.00121574926897289, + -0.00912817048616906, "contGamma", "", 0.0837010437574928, + "debCollin1", 0.00527760705642219, -1.72960403997134, -0.1698490288267, + 0.0899504077535726, -0.0399493105365639, "contGamma", "", + 0.546663977529508, "contcor2", 0.0662765843223493, -0.602766587099035, + -1.87031184990054, 2.98033921214544, 0.555013681122453, "debCollin1", + "", 0.653778009359116, "contcor2", 1.23743372335086, + 0.448519925268826)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.142661086362722, 0.146436591637356, 16, 0.00188775263731714, - "Total", 0.979579272533056, 0.073750762840655, 0.0255963811709419, - -0.16125553228022, 0.112806442276342, 50, -0.0242245450019389, - "Total", 0.728977958423464, 0.0699150537250501, -0.346485394936619, - -0.193517628521734, 0.0880720303461862, 84, -0.0527227990877737, - "Total", 0.462986041740773, 0.0718354166426177, -0.73393879442602, - -0.0235153006304684, 0.0922530309111514, 16, 0.0343688651403415, - "Total indirect", 0.244532063673081, 0.0295332803191246, 1.16373341426911, - -0.0241586393305006, 0.0406717743326714, 50, 0.00825656750108541, - "Total indirect", 0.617618856765264, 0.0165386747344712, 0.499227878511719, - -0.0637935560779722, 0.0233101829084734, 84, -0.0202416865847494, - "Total indirect", 0.362328964082723, 0.0222207498896686, -0.910936250363029 + list(-0.142660856630578, 0.146436809473995, 16, 0.00188797642170834, + "Total", 0.979576851438312, 0.0737507598060319, 0.0255994165575217, + -0.16125522146176, 0.11280672378123, 50, -0.0242242488402652, + "Total", 0.728981113524976, 0.0699150462469605, -0.346481195974584, + -0.193517206613207, 0.0880723587422172, 84, -0.052722423935495, + "Total", 0.462989076212317, 0.071835392786951, -0.733933815770437, + -0.0235154048687757, 0.0922528248212371, 16, 0.0343687099762307, + "Total indirect", 0.244533778452362, 0.0295332543360944, 1.16372918423103, + -0.0241586748507435, 0.0406716442792578, 50, 0.00825648471425713, + "Total indirect", 0.617621869992007, 0.0165386506184232, 0.499223600809356, + -0.0637934839162363, 0.0233101031542909, 84, -0.0202416903809727, + "Total indirect", 0.362328036908236, 0.0222207111348956, -0.910938009953468 )) @@ -13636,94 +13965,102 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(954.963411960092, 1020.09266660979, 10, "Model 1", 100, -452.481705980046, + list(952.963411961087, 1015.4874964248, 11, "Model 1", 100, -452.481705980543, 88)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962229769348227, 0.089622361013666, 0.0400000316600919, "facExperimexperimental", - "", 0.114128369338235, "facGenderm", 0.0253179802001408, - 1.57990611193658, 0.180704811980691, 0.319295202375469, 0.25000000717808, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553410899283, 7.07106760877206, 0.180704811889686, 0.319295202057821, - 0.250000006973753, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553410321104, 7.0710676145564, - 0.00480662801334841, 0.00849304018684287, 0.00664983410009564, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000940428549343869, 7.07106787085015, 0.707779825848436, 1.25060687982451, - 0.979193352836472, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.138478833860679, 7.0710687369134, 0.752808780873299, - 1.33017059848597, 1.04148968967963, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.14728888443023, 7.07106781145445, - 0.0796447421774625, 0.140727853342268, 0.110186297759865, "debCollin1:facExperimexperimental", - "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155827126535543, 7.07106010420675, 0.319034287607647, 0.563715404544023, - 0.441374846075835, "contcor2:facExperimexperimental", "", - 1.53743684450092e-12, "contcor2:facExperimexperimental", 0.0624197992581469, - 7.07107121973366)) + list(-0.00962207800320053, 0.0896227860041092, 0.0400003540004543, + "facExperimexperimental", "", 0.114126201818457, "facGenderm", + 0.0253180325735933, 1.57991557535851, 0.180704907137534, 0.319295534277733, + 0.250000220707634, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353554014852784, 7.07106156924088, 0.752808780872455, + 1.33017059848681, 1.04148968967963, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.147288884430661, 7.07106781143375, + 0.0048066160584755, 0.0084929985320308, 0.00664980729525315, + "debCollin1", "", 1.53721479989599e-12, "debCollin1", + 0.000940420972689553, 7.07109633703198, 0.707778595984311, 1.25060480495139, + 0.97919170046785, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.138478618293199, 7.07106781203304, 0.180704907129311, + 0.319295534249186, 0.250000220689248, "facExperimexperimental", + "", 1.53743684450092e-12, "facExperimexperimental", + 0.0353554014800936, 7.07106156975781, 0.0796445198635507, 0.140727077926206, + 0.110185798894879, "debCollin1:facExperimexperimental", "", + 1.53721479989599e-12, "debCollin1:facExperimexperimental", 0.0155825715534742, + 7.07109211831676, 0.319033671282937, 0.563713254848932, 0.441373463065934, + "contcor2:facExperimexperimental", "", 1.53721479989599e-12, + "contcor2:facExperimexperimental", 0.0624194080850454, 7.07109337635132 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0391546899621784, 0.865292245120018, 0.452223467541098, "", + list(0.0391546899613917, 0.865292245120805, 0.452223467541098, "", "m", "facGender", "contNormal", "", "", "", "", "", - 0.0318930495498508, 0.210753248956182, 2.14574849868683, -0.0296400358903893, - 0.0310329077904401, 0.000696435950025406, 0, "m", "facGender", + 0.031893049550177, 0.210753248956583, 2.14574849868274, -0.0296400259089075, + 0.031032897345888, 0.000696435718490245, 0, "m", "facGender", "debCollin1", "contNormal", "", "", "", "", - 0.96411129883128, 0.0154780761685954, 0.0449949943674818, -0.0339779814493215, - 0.0298512020786484, -0.00206338968533654, 1, "m", "facGender", + 0.96411129868062, 0.0154780709577767, 0.0449949945564974, -0.0339779678766879, + 0.0298511898779924, -0.00206338899934774, 1, "m", "facGender", "debCollin1", "contNormal", "", "", "", "", - 0.899163196226615, 0.0162832541902419, -0.126718508550525, "", - "", -0.0384882249392391, 0, "m", "facGender", "contcor2", "contNormal", - "", "", "", "", "", "", "", "", "", 0.0115245104224357, - 1, "m", "facGender", "contcor2", "contNormal", "", "", - "", "", "", "", "", "", "", -0.000798871090475881, - 0, "m", "facGender", "debCollin1", "contcor2", "contNormal", - "", "", "", "", "", "", "", "", 0.000239205581003182, + 0.899163189072527, 0.0162832476153023, -0.126718517589124, -0.129356349541068, + 0.0523793166749087, -0.0384885164330795, 0, "m", "facGender", + "contcor2", "contNormal", "", "", "", "", + 0.406440453240606, 0.0463619912532792, -0.83017392895861, -0.0684000656698603, + 0.0914492610784487, 0.0115245977042942, 1, "m", "facGender", + "contcor2", "contNormal", "", "", "", "", + 0.777473057802394, 0.0407786387936667, 0.282613594892335, -0.00533841746534242, + 0.00374061611159614, -0.000798900676873142, 0, "m", "facGender", + "debCollin1", "contcor2", "contNormal", "", "", + "", 0.730146826113598, 0.00231612255341242, -0.344930226466685, + -0.00182981324943137, 0.00230824212951873, 0.000239214440043684, 1, "m", "facGender", "debCollin1", "contcor2", "contNormal", - "", "", "", "", "", "")) + "", "", "", 0.820731028966266, 0.0010556457699199, + 0.226604839293617)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0391546899621784, 0.865292245120018, 0.452223467541098, "facGenderm", - "", 0.0318930495498508, "contNormal", 0.210753248956182, - 2.14574849868683, -3.53013368413422, 3.37114197167675, -0.0794958562287378, - "debCollin1", "", 0.963984810214743, "contNormal", - 1.76056185477064, -0.0451536854631526, -0.120661414844858, 0.425093391238561, - 0.152215988196852, "contcor2", "", 0.274260510524872, - "contNormal", 0.139225723122533, 1.09330362797172, -3.48263391454396, - 3.12794919836105, -0.177342358091456, "facExperimexperimental", - "", 0.916248808112702, "contNormal", 1.6864042311615, - -0.105160052859517, -4.63176761902143, 5.261817523588, 0.315024952283286, - "debCollin1:facExperimexperimental", "", 0.900669428477046, - "contNormal", 2.52392013849458, 0.12481573702692, -0.610158369514213, - 0.214570474903687, -0.197793947305263, "contcor2:facExperimexperimental", - "", 0.347159776587641, "contNormal", 0.210393877367966, - -0.940112658123284, -0.0407262929552723, 0.0232049784348899, - -0.00876065726019118, "facGenderm", "", 0.591159003523362, - "debCollin1", 0.0163092974907815, -0.537157242066557, "", "", - -0.252852708806546, "facGenderm", "", "", "contcor2", - "", "", "", "", 0.59907299619515, "debCollin1", "", - "", "contcor2", "", "")) + list(0.0391546899613917, 0.865292245120805, 0.452223467541098, "facGenderm", + "", 0.031893049550177, "contNormal", 0.210753248956583, + 2.14574849868274, -3.53013370208264, 3.37114198962517, -0.0794958562287379, + "debCollin1", "", 0.963984810401948, "contNormal", + 1.76056186392816, -0.0451536852282867, -0.12066141484166, 0.425093391235363, + 0.152215988196852, "contcor2", "", 0.274260510519248, + "contNormal", 0.139225723120901, 1.09330362798454, -3.48263394322365, + 3.12794922704074, -0.177342358091456, "facExperimexperimental", + "", 0.916248808836728, "contNormal", 1.68640424579427, + -0.105160051947053, -4.63176766210737, 5.26181756667394, 0.315024952283286, + "debCollin1:facExperimexperimental", "", 0.900669429337719, + "contNormal", 2.5239201604776, 0.124815735939791, -0.610158369549902, + 0.214570474939376, -0.197793947305263, "contcor2:facExperimexperimental", + "", 0.347159776629372, "contNormal", 0.210393877386175, + -0.940112658041919, -0.0407262363947892, 0.0232049276994944, + -0.00876065434764739, "facGenderm", "", 0.59115850420057, + "debCollin1", 0.0163092701188809, -0.537157964997182, -0.641306843214591, + 0.135597595598569, -0.252854623808011, "facGenderm", "", + 0.202027488760507, "contcor2", 0.198193549713485, -1.27579643320151, + -1.77925889346895, 2.97744965785285, 0.599095382191949, "debCollin1", + "", 0.621514541050814, "contcor2", 1.21346835677648, + 0.49370498937724)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.012686454690246, 0.839952069613063, 0.413632807461409, 0, "m", - "Total", 0.0572183441354015, 0.217513824495964, 1.90163916440669, - 0.056036539039407, 0.867811048678994, 0.4619237938592, 1, "m", - "Total", 0.0257105952788403, 0.207089139403265, 2.23055537914857, - -0.135767078857546, 0.0585857586981668, -0.0385906600796896, - 0, "m", "Total indirect", 0.436368538982074, 0.049580716556208, - -0.778340103978543, -0.0748904184269535, 0.0942910710631582, - 0.00970032631810234, 1, "m", "Total indirect", 0.822168979531928, - 0.0431593363002059, 0.224756151267693)) + list(-0.0126868748685683, 0.83995184716784, 0.413632486149636, 0, "m", + "Total", 0.0572185950819444, 0.217513874939008, 1.90163724620152, + 0.0560366304890034, 0.867811150883173, 0.461923890686088, 1, + "m", "Total", 0.0257105662362813, 0.207089142146831, 2.23055581715903, + -0.135767787337, 0.0585858245540755, -0.0385909813914624, 0, + "m", "Total indirect", 0.436366547188336, 0.0495809140943692, + -0.77834348350276, -0.074890902377338, 0.0942917486673182, 0.00970042314499011, + 1, "m", "Total indirect", 0.822168434666909, 0.0431596326205857, + 0.224756851622581)) @@ -13781,120 +14118,118 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1547.00501560219, 1614.73944043788, 16, "Model 1", 100, -747.502507801093, + list(1545.00501559601, 1610.13427024572, 17, "Model 1", 100, -747.502507798007, 89)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544844678078439, 0.0642086577545825, -0.240318010161928, "contcor1", - "", 0.1219330304616, "contGamma", 0.155373603963429, - -1.54671066404878, 1.68040715070056, 2.96917808292165, 2.3247926168111, - "contGamma", "", 1.53721479989599e-12, "contGamma", - 0.328774136256266, 7.07109337517663, 0.732633700314474, 1.29452083867756, - 1.01357726949602, "contcor1", "", 1.53721479989599e-12, - "contcor1", 0.143341189632866, 7.07108174623116, -45.1053292242347, - 45.1053292386978, 7.23153422633199e-09, "contcor2", "", - 0.999999999749279, "debCollin1", 23.0133459529111, 3.14232195575943e-10, - 0.00468047475780643, 0.00827012696693146, 0.00647530086236894, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000915744431387451, 7.07107861148352, 0.716694725815303, 1.26635906193196, - 0.991526893873634, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.140223070539138, 7.07106819199829, 0.738695301391222, - 1.30523287729878, 1.021964089345, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.144527547540754, 7.07106781187737, - 0.323891076879255, 0.572296002104991, 0.448093539492123, "debCollin1:contcor1", - "", 1.53721479989599e-12, "debCollin1:contcor1", 0.0633697678082663, - 7.07109328296562, 0.784506238097034, 1.38617969704567, 1.08534296757135, - "contcor2:contcor1", "", 1.53765888910584e-12, "contcor2:contcor1", - 0.153490947714999, 7.07105522331267)) + list(-0.544849157462331, 0.0642081611439019, -0.240320498159215, "contcor1", + "", 0.121931607474119, "contGamma", 0.155374619995673, + -1.5467165626272, 1.68041117807298, 2.96919213007211, 2.32480165407254, + "contGamma", "", 1.53743684450092e-12, "contGamma", + 0.328776692369063, 7.0710658876721, 0.738695301421551, 1.30523287730611, + 1.02196408936383, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.144527547534886, 7.07106781229471, 0.00468048017896155, + 0.00827014511801224, 0.00647531264848689, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.00091574767887714, 7.07106640600685, + 0.716694798020371, 1.2663592303847, 0.991527014202537, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.140223095092567, + 7.07106781196057, 0.732634741278411, 1.2945244697728, 1.01357960552561, + "contcor1", "", 1.53743684450092e-12, "contcor1", 0.14334185039279, + 7.07106544772629, 0.323891726322524, 0.572298267455815, 0.44809499688917, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.0633701800371561, 7.07107028300118, 0.784505483232603, 1.38617706413688, + 1.08534127368474, "contcor2:contcor1", "", 1.53743684450092e-12, + "contcor2:contcor1", 0.153490468613247, 7.07106625897078)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.246047155157302, 0.136940373029214, 16, -0.054553391064044, - "contGamma", "contNormal", "", "", "", "", "", 0.576597784028966, - 0.0977026953575352, -0.558361167666974, -0.167682453675357, - 0.106696635755204, 50, -0.0304929089600768, "contGamma", "contNormal", - "", "", "", "", "", 0.663099266294185, 0.0699959518631028, - -0.435638178329433, -0.223664826118006, 0.21519692461404, 84, - -0.00423395075198271, "contGamma", "contNormal", "", "", "", - "", "", 0.969832959342186, 0.111956585476501, -0.0378177910121364, - -0.017984693132174, 0.0620772624101474, 16, 0.0220462846389867, + list(-0.246043436603419, 0.136944091652841, 16, -0.0545496724752888, + "contGamma", "contNormal", "", "", "", "", "", 0.576623768749904, + 0.0977026953753274, -0.558323107317918, -0.167680350997915, + 0.106698738298025, 50, -0.0304908063499452, "contGamma", "contNormal", + "", "", "", "", "", 0.663121064226687, 0.06999595182876, + -0.435608139518393, -0.223664486679575, 0.215197263125309, 84, + -0.00423361177713321, "contGamma", "contNormal", "", "", "", + "", "", 0.969835373334584, 0.111956585239976, -0.0378147633572297, + -0.0179846776526707, 0.0620765966473389, 16, 0.0220459594973341, "contGamma", "debCollin1", "contNormal", "", "", "", - "", 0.280404035851858, 0.0204243435526979, 1.07941215256706, - -0.0221896297815648, 0.0232898318444819, 50, 0.000550101031458564, + "", 0.280407036786815, 0.0204241697632004, 1.07940541784253, + -0.0221893293592956, 0.0232895084195343, 50, 0.000550089530119336, "contGamma", "debCollin1", "contNormal", "", "", "", - "", 0.962183389900548, 0.0116021166676487, 0.0474138510425828, - -0.0674927946776942, 0.0216722921142875, 84, -0.0229102512817034, + "", 0.962183661623387, 0.0116019575200262, 0.0474135101054995, + -0.0674920584139321, 0.0216722174449258, 84, -0.0229099204845032, "contGamma", "debCollin1", "contNormal", "", "", "", - "", 0.31384158627236, 0.0227466135845619, -1.00719393665053, - -20.0613863316434, 20.0866107122972, 16, 0.0126121903268737, + "", 0.31384417239639, 0.0227464067100657, -1.00718855406578, + -0.0308524858550939, 0.0560766044269735, 16, 0.0126120592859398, "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.999017472599222, 10.2420241801949, 0.00123141579291153, - -11.0480902272692, 11.061981648369, 50, 0.00694571054991398, + "", 0.569545769068304, 0.0221761958300645, 0.568720594938177, + -0.0181929388268225, 0.0320842089787336, 50, 0.00694563507595557, "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.999017472838851, 5.64042810226097, 0.0012314154925811, - -1.21128823585305, 1.21281117198177, 84, 0.000761468064362874, + "", 0.588144993319373, 0.0128260386930923, 0.54152612838259, + -0.0125923492211289, 0.0141152556905206, 84, 0.000761453234695846, "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.99901752997978, 0.618404069400205, 0.00123134387699199, - -20.0723520890712, 20.0755509748843, 16, 0.0015994429065537, + "", 0.911013706904634, 0.00681328971407526, 0.111759996514282, + -0.00584838189180027, 0.00904723145145404, 16, 0.00159942477982689, "contGamma", "debCollin1", "contcor2", "contNormal", "", - "", "", 0.999875398284489, 10.2420002052683, - 0.000156165092218117, -11.0541265672011, 11.0558882385972, 50, - 0.000880835698012246, "contGamma", "debCollin1", "contcor2", - "contNormal", "", "", "", 0.999875398284933, - 5.64041354336081, 0.000156165091662305, -1.21188064472963, 1.21207377925465, - 84, 9.65672625092925e-05, "contGamma", "debCollin1", "contcor2", - "contNormal", "", "", "", 0.999875398400667, - 0.618367083044415, 0.000156164946610453)) + "", "", 0.67382485624251, 0.00379997118843739, + 0.420904449142572, -0.00333485091953594, 0.00509650151128391, + 50, 0.000880825295873982, "contGamma", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.682161202226478, + 0.00215089473513934, 0.409515761735741, -0.00162371268561186, + 0.00181684326716718, 84, 9.65652907776607e-05, "contGamma", + "debCollin1", "contcor2", "contNormal", "", "", + "", 0.912393739796848, 0.000877708973205046, 0.110019714649883 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.167725293380766, 0.106559665259084, -0.030582814060841, "contGamma", - "", 0.662058728879404, "contNormal", 0.069971938465037, - -0.437072556966852, -2.55829555908254, 2.42017031067694, -0.0690626242028011, - "debCollin1", "", 0.956633767101164, "contNormal", - 1.2700401407957, -0.0543783003264232, -0.45084491736837, 0.102063643063222, - -0.174390637152574, "contcor2", "", 0.216321613663157, - "contNormal", 0.141050693990518, -1.23636851559409, -3.31235323296985, - 0.504650438661907, -1.40385139715397, "contcor1", "", - 0.149385384939897, "contNormal", 0.973743319198669, -1.44170580631994, - -0.267220548675472, 5.10203836479032, 2.41740890805743, "debCollin1:contcor1", - "", 0.0775848398341956, "contNormal", 1.36973407568145, - 1.76487462126892, -0.0582255536395088, 0.349435726306763, 0.145605086333627, - "contcor2:contcor1", "", 0.161487126526231, "contNormal", - 0.103997135447858, 1.40008747074221, -0.125416135064641, 0.17481454207794, - 0.0246992035066492, "contGamma:contcor1", "", 0.747087295897773, - "contNormal", 0.076590865829873, 0.322482364431186, -0.0194722222880337, - 0.00121562382312949, -0.00912829923245211, "contGamma", "", - 0.0836967810203684, "debCollin1", 0.00527760874035092, -1.72962788291978, - -63.6255361597198, 63.5456364105401, -0.039949874589858, "contGamma", - "", 0.999017472345373, "contcor2", 32.442221789117, - -0.00123141611106486, -6965.19575637184, 6966.30578396359, 0.555013795879158, - "debCollin1", "", 0.999875398291424, "contcor2", 3554.01978052284, - 0.000156165083526212)) + list(-0.167723184666315, 0.106561773841522, -0.0305807054123964, "contGamma", + "", 0.662080583234811, "contNormal", 0.0699719384313596, + -0.43704242154725, -2.55829511086226, 2.42017074417163, -0.0690621833453161, + "debCollin1", "", 0.956634043526249, "contNormal", + 1.2700401370391, -0.0543779533663588, -0.450845290067915, 0.102063270109864, + -0.174391009979026, "contcor2", "", 0.216320631392277, + "contNormal", 0.141050693925769, -1.23637115937056, -3.31235431142132, + 0.504649341227792, -1.40385248509676, "contcor1", "", + 0.149385067592151, "contNormal", 0.973743314356067, -1.44170693076863, + -0.267222641622682, 5.10203624624325, 2.41740680231028, "debCollin1:contcor1", + "", 0.0775850968504246, "contNormal", 1.36973406915075, + 1.76487309234347, -0.0582250885861388, 0.349436191577271, 0.145605551495566, + "contcor2:contcor1", "", 0.161485787505489, "contNormal", + 0.103997135503252, 1.40009194283061, -0.12541779371078, 0.174812882969703, + 0.0246975446294615, "contGamma:contcor1", "", 0.747103701292402, + "contNormal", 0.0765908657119886, 0.322460705984626, -0.0194721038887564, + 0.00121575589429282, -0.00912817399723177, "contGamma", "", + 0.0837012278419573, "debCollin1", 0.00527761222814102, -1.72960301034604, + -0.169849073502171, 0.0899503630911577, -0.0399493552055067, + "contGamma", "", 0.546663529124522, "contcor2", 0.0662765843256799, + -0.602767261046488, -1.87031185953766, 2.98033920200339, 0.555013671232863, + "debCollin1", "", 0.653778015091936, "contcor2", 1.23743372322205, + 0.448519917323498)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.208458027035126, 0.171867080651866, 16, -0.0182954731916299, - "Total", 0.850431843450721, 0.0970234939741109, -0.188567453533592, - -0.159923693212642, 0.115691169851259, 50, -0.022116261680692, - "Total", 0.753104731843687, 0.070311206031824, -0.314548177010103, - -0.240167588174664, 0.187595254761036, 84, -0.0262861667068139, - "Total", 0.809647459478164, 0.109125179419071, -0.240880856707395, - -0.024743901700945, 0.0972597374457733, 16, 0.0362579178724141, - "Total indirect", 0.244038280505909, 0.0311239492432176, 1.16495235193571, - -0.0250719646291536, 0.0418252591879232, 50, 0.00837664727938479, - "Total indirect", 0.623539398418186, 0.0170659319111865, 0.490840308222136, - -0.0683165385728529, 0.0242121066631905, 84, -0.0220522159548312, - "Total indirect", 0.35018491900724, 0.0236046799752183, -0.934230668578562 + list(-0.208454856847374, 0.171870399022998, 16, -0.018292228912188, + "Total", 0.850458110696716, 0.0970235317766879, -0.188533941995535, + -0.159921682269024, 0.115693169373031, 50, -0.0221142564479963, + "Total", 0.75312637890964, 0.0703112031180343, -0.314519670654365, + -0.240166989169901, 0.187595961697575, 84, -0.0262855137361629, + "Total", 0.809652144356529, 0.109125206953193, -0.240874812246061, + -0.0247441396604329, 0.0972590267866345, 16, 0.0362574435631008, + "Total indirect", 0.244042622410839, 0.0311238286543561, 1.1649416261012, + -0.0250718420061567, 0.0418249418100545, 50, 0.00837654990194888, + "Total indirect", 0.623541150896349, 0.0170658196640052, 0.490837830638542, + -0.0683157908099156, 0.0242119868918563, 84, -0.0220519019590296, + "Total indirect", 0.350187261999677, 0.0236044586613885, -0.934226125469318 )) @@ -13953,99 +14288,105 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(956.384213377462, 1024.11863821315, 16, "Model 1", 100, -452.192106688731, + list(954.384213376278, 1019.51346802598, 17, "Model 1", 100, -452.192106688139, 89)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0096223041682166, 0.0896222748241212, 0.0399999853279523, "facExperimexperimental", - "", 0.114128497832948, "facGenderm", 0.0253179598643563, - 1.5799055509313, 0.180704769378001, 0.319295053776506, 0.249999911577254, + list(-0.0096222521543371, 0.0896222657934253, 0.0400000068195441, "facExperimexperimental", + "", 0.114128080823555, "facGenderm", 0.0253179442914744, + 1.57990737158758, 0.180704732670128, 0.319294925744564, 0.249999829207346, "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.035355314049566, 7.07107031284656, 0.180704769324129, 0.31929505358854, - 0.249999911456335, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.035355314015358, 7.07107031626807, - 0.00480662970036938, 0.00849304581020884, 0.00664983775528911, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000940429553531964, 7.07106420711086, 0.707780640260258, 1.25061191267767, - 0.979196276468963, "contcor2", "", 1.53788093371077e-12, - "contcor2", 0.138479910013448, 7.07103489866418, 0.748461126017176, - 1.32248853789998, 1.03547483195858, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.146438255093118, 7.07106781148228, - 0.0796447083042608, 0.140727735194304, 0.110186221749282, "debCollin1:facExperimexperimental", + 0.0353552907521817, 7.07107264255546, 0.748461126014555, 1.3224885379026, + 1.03547483195858, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.146438255094455, 7.07106781141772, 0.00480662485273043, + 0.00849302920570184, 0.00664982702921614, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000940426554275819, 7.07107535296775, + 0.707778595985289, 1.25060480495041, 0.97919170046785, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.1384786182927, + 7.07106781205852, 0.180704732684368, 0.319294925794574, 0.249999829239471, + "facExperimexperimental", "", 1.53743684450092e-12, + "facExperimexperimental", 0.0353552907613067, 7.0710726416391, + 0.0796446308284287, 0.140727464963238, 0.110186047895833, "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, "debCollin1:facExperimexperimental", - 0.0155826911544952, 7.07106498209049, 0.319034427588959, 0.563715892790007, - 0.441375160189483, "contcor2:facExperimexperimental", "", - 1.53743684450092e-12, "contcor2:facExperimexperimental", 0.0624198881028082, - 7.07106618747088)) + 0.0155826419813381, 7.07107613893671, 0.319034369774232, 0.563715691135021, + 0.441375030454627, "contcor2:facExperimexperimental", "", + 1.53743684450092e-12, "contcor2:facExperimexperimental", 0.0624198514081902, + 7.07106826589967)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0345966303517927, 1.17847272972437, 0.606534680038083, 0, "m", - "facGender", "contNormal", "", "", "", "", "", 0.0376612569941419, - 0.291810489477187, 2.07852254086124, -0.307634497016909, 0.879612206002311, + list(0.0345966304585545, 1.17847272961761, 0.606534680038084, 0, "m", + "facGender", "contNormal", "", "", "", "", "", 0.0376612569584451, + 0.291810489422716, 2.07852254124923, -0.307634496927566, 0.879612205912968, 0.285988854492701, 1, "m", "facGender", "contNormal", "", "", - "", "", "", 0.345042766213344, 0.302874622284917, 0.944248324059545, - -0.0294004907177032, 0.0312924565970825, 0.000945982939689638, + "", "", "", 0.345042766140739, 0.302874622239333, 0.94424832420166, + -0.0294003813376653, 0.0312923401051948, 0.000945979383764772, 0, "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.951281591177144, 0.0154831792302114, 0.0610974610333129, - -0.0327013957459023, 0.030024751940398, -0.00133832190275211, + "", "", 0.95128159299803, 0.0154831216087634, 0.0610974587469075, + -0.0327012751006327, 0.0300246413565618, -0.00133831687203545, 1, "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.933346332995064, 0.0160018623252968, -0.0836353841537806, - "", "", -0.0379894197709141, 0, "m", "facGender", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", 0.0170359947330099, 1, "m", "facGender", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", -0.000788554408103652, 0, "m", "facGender", "debCollin1", - "contcor2", "contNormal", "", "", "", - "", "", "", "", "", 0.000353619740026431, 1, "m", "facGender", - "debCollin1", "contcor2", "contNormal", "", "", - "", "", "", "")) + "", "", 0.933346337825947, 0.0160018033371961, -0.0836353780779533, + -0.128216583353476, 0.0522382501555919, -0.0379891665989422, + 0, "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.409247144379498, 0.0460352422117123, -0.82521921844645, + -0.0661821119716682, 0.100253874372552, 0.0170358812004421, + 1, "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.688249395816318, 0.0424589399746746, 0.401231900999022, + -0.00527383435337883, 0.00369675411553619, -0.000788540118921318, + 0, "m", "facGender", "debCollin1", "contcor2", "contNormal", + "", "", "", 0.73041558405675, 0.00228845747668679, + -0.3445727643858, -0.00216115593581013, 0.0028683826001666, + 0.000353613332178234, 1, "m", "facGender", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.782855619620916, + 0.00128306912158822, 0.275599596489798)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0345966303517927, 1.17847272972437, 0.606534680038083, "facGenderm", - "", 0.0376612569941419, "contNormal", 0.291810489477187, - 2.07852254086124, -3.54941875243707, 3.33345905426006, -0.107979849088507, - "debCollin1", "", 0.950963762909341, "contNormal", - 1.75586843967246, -0.0614965487440789, -0.121894548029583, 0.422376825369996, - 0.150241138670206, "contcor2", "", 0.279225738067071, - "contNormal", 0.138847289463664, 1.08206029264636, -3.31646427666136, - 3.3502918883417, 0.0169138058401674, "facExperimexperimental", - "", 0.992065167581053, "contNormal", 1.70073435470998, - 0.0099450015773049, -4.67371877648675, 5.19520575433844, 0.260743488925848, - "debCollin1:facExperimexperimental", "", 0.917512913601291, - "contNormal", 2.51762905050042, 0.10356707985794, -0.631934803219635, - 0.196704100528084, -0.217615351345776, "contcor2:facExperimexperimental", - "", 0.303271561208763, "contNormal", 0.21139135981169, - -1.02944297978702, -1.14486482716546, 0.503773176074698, -0.320545825545383, - "facGenderm:facExperimexperimental", "", 0.44596791651185, - "contNormal", 0.420578647425261, -0.762154302192304, -0.040726388445126, - 0.0232049166580289, -0.00876073589354853, "facGenderm", "", - 0.591155869081097, "debCollin1", 0.0163093060911927, -0.537161780186311, - "", "", -0.252856308912198, "facGenderm", "", "", "contcor2", - "", "", "", "", 0.599103986410442, "debCollin1", "", - "", "contcor2", "", "")) + list(0.0345966304585545, 1.17847272961761, 0.606534680038084, "facGenderm", + "", 0.0376612569584451, "contNormal", 0.291810489422716, + 2.07852254124923, -3.54941874595516, 3.33345904777815, -0.107979849088507, + "debCollin1", "", 0.950963762817098, "contNormal", + 1.7558684363653, -0.0614965488599068, -0.121894548044836, 0.422376825385249, + 0.150241138670206, "contcor2", "", 0.279225738094017, + "contNormal", 0.138847289471446, 1.08206029258571, -3.31646426784851, + 3.35029187952885, 0.0169138058401675, "facExperimexperimental", + "", 0.992065167560076, "contNormal", 1.70073435021355, + 0.00994500160359774, -4.67371876279717, 5.19520574064886, 0.260743488925848, + "debCollin1:facExperimexperimental", "", 0.917512913373266, + "contNormal", 2.51762904351581, 0.103567080145265, -0.631934803263968, + 0.196704100572416, -0.217615351345776, "contcor2:facExperimexperimental", + "", 0.303271561260501, "contNormal", 0.211391359834309, + -1.02944297967687, -1.14486482690523, 0.503773175814465, -0.320545825545382, + "facGenderm:facExperimexperimental", "", 0.445967916368264, + "contNormal", 0.420578647292487, -0.762154302432911, -0.0407263324397818, + 0.0232049265154341, -0.00876070296217388, "facGenderm", "", + 0.591156995899204, "debCollin1", 0.016309294318543, -0.537160148751091, + -0.641306843220047, 0.135597595604026, -0.252854623808011, "facGenderm", + "", 0.202027488766844, "contcor2", 0.198193549716269, + -1.27579643318359, -1.77925889351801, 2.97744965790191, 0.599095382191949, + "debCollin1", "", 0.621514541058007, "contcor2", 1.21346835680151, + 0.493704989367056)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0140968406845802, 1.15150221828209, 0.568702688798755, 0, "m", - "Total", 0.0558049058515662, 0.297352162631754, 1.91255608758779, - -0.275182293872241, 0.879262587998212, 0.302040147062985, 1, - "m", "Total", 0.305089583023692, 0.294506657004049, 1.02558003318354, - -0.134388516198683, 0.0587245337200273, -0.0378319912393281, - 0, "m", "Total indirect", 0.442524539284219, 0.0492644383881443, - -0.767937126193496, -0.0718252593789773, 0.103927844519546, - 0.0160512925702843, 1, "m", "Total indirect", 0.720342038315582, - 0.0448357993526517, 0.358001704040879)) + list(-0.0140964818235747, 1.15150238723154, 0.568702952703985, 0, "m", + "Total", 0.0558047522096476, 0.29735211418404, 1.912557286719, + -0.275182478579335, 0.879262542885907, 0.302040032153286, 1, + "m", "Total", 0.305089825497417, 0.294506692615619, 1.02557951899416, + -0.1343877777707, 0.0587243231025028, -0.0378317273340988, 0, + "m", "Total indirect", 0.44252547975069, 0.0492641962802497, + -0.767935543267266, -0.0718248314696039, 0.103927186790774, + 0.0160511776605849, 1, "m", "Total indirect", 0.720342301365967, + 0.0448355223990561, 0.358001352537442)) @@ -14101,110 +14442,108 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1340.55952703635, 1400.47844131407, 10, "Model 1", 100, -647.279763518173, + list(1338.55952703713, 1395.87327112887, 11, "Model 1", 100, -647.279763518564, 88)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544847584476214, 0.064209397553947, -0.240319093461133, "contcor1", - "", 0.121933582283144, "contGamma", 0.155374534132853, - -1.54670837664845, 1.68041081892153, 2.9691908774515, 2.32480084818652, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776464439067, 7.07106833864435, 0.732634771542831, 1.29452457518102, - 1.01357967336192, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341869562477, 7.07106497533259, -100.547287609162, - 100.547287595237, -6.96251865710878e-09, "contcor2", "", - 0.999999999891711, "debCollin1", 51.3005791919157, -1.35720078930531e-10, - 0.00468048121568535, 0.00827015087672242, 0.00647531604620388, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000915748883487638, 7.07106081477554, 0.716694702349978, 1.26635927766425, - 0.991526990007114, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.140223131560059, 7.07106580045559, 0.761704002469191, - 1.34588795266934, 1.05379597756926, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.149029256355759, 7.07106781136766, - 0.784505934161184, 1.38617863694724, 1.08534228555421, "contcor2:contcor1", - "", 1.53765888910584e-12, "contcor2:contcor1", 0.153490754812838, - 7.0710596666076)) + list(-0.544847090391416, 0.0642087425050282, -0.240319173943194, "contcor1", + "", 0.121932753313035, "contGamma", 0.15537424098111, + -1.54671181288288, 1.68040767265656, 2.96917990350009, 2.32479378807832, + "contGamma", "", 1.53721479989599e-12, "contGamma", + 0.328774467543587, 7.07108981256313, 0.761704002475798, 1.34588795267359, + 1.05379597757469, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.149029256355157, 7.07106781143264, 0.00468047448413179, + 0.0082701252548089, 0.00647529986947034, "debCollin1", "", + 1.53721479989599e-12, "debCollin1", 0.000915744064429708, 7.07108036075879, + 0.716694798029275, 1.26635923038855, 0.991527014208914, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.140223095091278, + 7.07106781207107, 0.732635262741347, 1.29452628844942, 1.01358077559538, + "contcor1", "", 1.53765888910584e-12, "contcor1", 0.143342181320727, + 7.0710572858348, 0.784503605416656, 1.38617051444518, 1.08533705993092, + "contcor2:contcor1", "", 1.53721479989599e-12, "contcor2:contcor1", + 0.153489276786306, 7.07109371192077)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.199116842175987, 0.177166237014813, 16, -0.0109753025805869, - "contGamma", "contNormal", "", "", "", "", "", 0.908972091598613, - 0.0959923453080957, -0.114335185220871, -0.179138511501775, - 0.098607697784424, 50, -0.0402654068586755, "contGamma", "contNormal", - "", "", "", "", "", 0.569845153658707, 0.070854926793815, - -0.568279563337158, -0.281444323299029, 0.136980657295046, 84, - -0.0722318330019916, "contGamma", "contNormal", "", "", "", - "", "", 0.498603296030361, 0.106743027906267, -0.676689001790539, - -0.0205625411714459, 0.0257449625132249, "", 0.00259121067088947, + list(-0.199116811254838, 0.177166267920553, 16, -0.0109752716671424, + "contGamma", "contNormal", "", "", "", "", "", 0.908972346872203, + 0.0959923453041649, -0.114334863184828, -0.179138365620943, + 0.0986078436713452, 50, -0.0402652609747991, "contGamma", "contNormal", + "", "", "", "", "", 0.569846551488504, 0.0708549267953685, + -0.568277504415276, -0.281444051957346, 0.136980928672344, 84, + -0.072231561642501, "contGamma", "contNormal", "", "", "", + "", "", 0.498604909357026, 0.106743027915353, -0.676686459557628, + -0.0205627749757341, 0.0257452557328994, "", 0.00259124037858264, "contGamma", "debCollin1", "contNormal", "", "", "", - "", 0.826380641108147, 0.0118133557682535, 0.21934585918871, - -34.3628279341839, 34.3822040648791, 16, 0.00968806534759437, + "", 0.82638062678569, 0.0118134902156125, 0.219345877576308, + -0.0248854257665954, 0.0442614540261921, 16, 0.00968801412979832, "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.999559228132999, 17.5373202113189, 0.000552425640340506, - -18.9448276389096, 18.955510037518, 50, 0.00534119930417518, + "", 0.582859757736157, 0.0176398342873158, 0.54921230959435, + -0.0152509781197392, 0.0259333162145145, 50, 0.00534116904738764, "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.999559228170244, 9.66863115225091, 0.000552425593661386, - -2.11807825733242, 2.11927255231283, 84, 0.000597147490204782, + "", 0.611191534296248, 0.010506390591641, 0.508373356273003, + -0.012867404971815, 0.0140616851912029, 84, 0.000597140109693961, "contGamma", "contcor2", "contNormal", "", "", "", - "", 0.999559236810869, 1.08097670239579, 0.000552414764241736, - -34.3712708118821, 34.373727982929, 16, 0.00122858552346216, + "", 0.930733044608314, 0.00686979209195454, 0.0869225882968559, + -0.00460463366472437, 0.00706183324465064, 16, 0.00122859978996313, "contGamma", "debCollin1", "contcor2", "contNormal", "", - "", "", 0.999944103780871, 17.5373117406909, - 7.00555217143996e-05, -18.94948076916, 18.9508354503905, 50, - 0.000677340615241126, "contGamma", "debCollin1", "contcor2", - "contNormal", "", "", "", 0.999944103780947, - 9.66862567845719, 7.0055521618788e-05, -2.11855761344109, 2.11870906715976, - 84, 7.57268593382817e-05, "contGamma", "debCollin1", "contcor2", - "contNormal", "", "", "", 0.999944103798575, - 1.08095524051051, 7.00554995251403e-05)) + "", "", 0.679746548130282, 0.00297619420596465, + 0.412809012093657, -0.00268700818439527, 0.0040417046334011, + 50, 0.000677348224502915, "contGamma", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.693137436464232, + 0.00171653991371056, 0.394600917282911, -0.00164818798900273, + 0.00179964239514196, 84, 7.57272030696177e-05, "contGamma", + "debCollin1", "contcor2", "contNormal", "", "", + "", 0.931389924308472, 0.000879564729592161, 0.0860962252371479 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.178998785561597, 0.0986868643639496, -0.0401559605988235, "contGamma", - "", 0.570810316363009, "contNormal", 0.0708394776934411, - -0.566858507520327, -2.799941536247, 2.2321948493865, -0.283873343430252, - "debCollin1", "", 0.824990168966095, "contNormal", - 1.2837318505152, -0.221131339318508, -0.411130887571817, 0.142921476900977, - -0.13410470533542, "contcor2", "", 0.342726104606893, - "contNormal", 0.141342486097471, -0.9487926032583, -0.0814260556184261, - 0.649174948735238, 0.283874446558406, "contcor1", "", - 0.127737457519646, "contNormal", 0.186381232031954, 1.52308493437654, - -0.0917209679733992, 0.315114924315895, 0.111696978171248, "contcor2:contcor1", - "", 0.281829773095057, "contNormal", 0.103786573502974, - 1.07621799623289, -0.16943181474073, 0.109296507129732, -0.0300676538054988, - "contGamma:contcor1", "", 0.672397463542218, "contNormal", - 0.0711054703221681, -0.422859924409006, -0.0194719849388086, - 0.00121588072290761, -0.00912805210795051, "contGamma", "", - 0.0837054450024659, "debCollin1", 0.00527761372782854, -1.72957942333271, - -141.778400676379, 141.698501288546, -0.0399496939164097, "contGamma", - "", 0.999559228095144, "contcor2", 72.316865054908, - -0.00055242568778496, -15527.2258871998, 15528.3359145393, 0.555013669768707, - "debCollin1", "", 0.999944103780275, "contcor2", 7922.48277180127, - 7.00555224612395e-05)) + list(-0.178998640110302, 0.0986870098212044, -0.0401558151445489, "contGamma", + "", 0.570811711505013, "contNormal", 0.0708394776949617, + -0.566856454214158, -2.7999415009437, 2.23219488502501, -0.283873307959345, + "debCollin1", "", 0.824990190491494, "contNormal", + 1.28373185060072, -0.22113131167269, -0.411130846521933, 0.14292151793512, + -0.134104664293407, "contcor2", "", 0.342726252306104, + "contNormal", 0.141342486093456, -0.948792312912459, -0.0814260098060516, + 0.649174994477648, 0.283874492335798, "contcor1", "", + 0.127737396042857, "contNormal", 0.186381232014105, 1.52308518013399, + -0.091720908315036, 0.31511498397251, 0.111697037828737, "contcor2:contcor1", + "", 0.281829516080647, "contNormal", 0.103786573502528, + 1.07621857104683, -0.169431696722408, 0.109296625156398, -0.0300675357830052, + "contGamma:contcor1", "", 0.672398674634088, "contNormal", + 0.0711054703242965, -0.422858264573368, -0.0194720775844258, + 0.00121576178488789, -0.00912815789976894, "contGamma", "", + 0.0837014680363195, "debCollin1", 0.00527760702045973, -1.72960166688837, + -0.169849198233806, 0.0899502383576924, -0.0399494799380566, + "contGamma", "", 0.546662276950398, "contcor2", 0.0662765843252128, + -0.602769143051012, -1.87031188737488, 2.98033917460967, 0.555013643617394, + "debCollin1", "", 0.653778031223791, "contcor2", 1.23743372333519, + 0.448519894965764)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.185336387095277, 0.190401505017996, 16, 0.00253255896135913, - "Total", 0.978921379142012, 0.0958532644163479, 0.0264212072147977, - -0.170435627862628, 0.107124315325889, 50, -0.0316556562683697, - "Total", 0.654826681670543, 0.0708074090590118, -0.447067004555802, - -0.279136978113717, 0.141201482150599, 84, -0.068967747981559, - "Total", 0.520114543085442, 0.107231169444922, -0.643168850424445, - -0.028170341403657, 0.0551860644875491, 16, 0.013507861541946, - "Total indirect", 0.525283469383616, 0.0212647800032834, 0.635222256701471, - -0.0221597741000945, 0.0393792752807061, 50, 0.00860975059030578, - "Total indirect", 0.583399567817997, 0.0156990255602176, 0.548425796064913, - -0.0233720994240411, 0.0299002694649062, 84, 0.00326408502043254, - "Total indirect", 0.810190417797098, 0.0135901397446976, 0.240180386791539 + list(-0.185336384249364, 0.190401549511767, 16, 0.00253258263120167, + "Total", 0.978921184518404, 0.0958532750409967, 0.0264214512244728, + -0.170435463386045, 0.107124456737394, 50, -0.0316555033243259, + "Total", 0.654828214375414, 0.0708074031749553, -0.447064881706077, + -0.279136648332162, 0.141201740429852, 84, -0.0689674539511548, + "Total", 0.520116251139568, 0.107231151204203, -0.643166217807531, + -0.0281704725266115, 0.0551861811232997, 16, 0.0135078542983441, + "Total indirect", 0.525284922732125, 0.0212648432081961, 0.635220028010258, + -0.0221599393221179, 0.0393794546230643, 50, 0.00860975765047319, + "Total indirect", 0.583401367062433, 0.0156991134609098, 0.548423175099102, + -0.0233722669657686, 0.0299004823484611, 84, 0.00326410769134622, + "Total indirect", 0.810190454209999, 0.0135902367937468, 0.240180339819252 )) @@ -14261,91 +14600,97 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(887.165614276876, 947.084528554602, 10, "Model 1", 100, -420.582807138438, + list(885.165614282001, 942.479358373739, 11, "Model 1", 100, -420.582807141, 88)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962229662872982, 0.0896223777046579, 0.040000040537964, "facExperimexperimental", - "", 0.114128345999629, "facGenderm", 0.0253179841864996, - 1.57990621383251, 0.180704820447009, 0.319295231905392, 0.2500000261762, - "facGenderm", "", 1.53743684450092e-12, "facGenderm", - 0.0353553464633958, 7.0710670714267, 0.180704820148019, 0.319295230862143, - 0.250000025505081, "facExperimexperimental", "", 1.53743684450092e-12, - "facExperimexperimental", 0.0353553462735304, 7.07106709041764, - 0.00480662819870213, 0.00849304070089127, 0.0066498344497967, - "debCollin1", "", 1.53743684450092e-12, "debCollin1", - 0.000940428633196091, 7.07106761221947, 0.707778614976733, 1.25060484678541, - 0.979191730881071, "contcor2", "", 1.53743684450092e-12, - "contcor2", 0.138478624120244, 7.07106773411335, 0.748541407011771, - 1.3226303898653, 1.03558589843854, "contNormal", "", - 1.53743684450092e-12, "contNormal", 0.14645396226203, 7.07106781164246, - 0.319034396986543, 0.563715786051136, 0.44137509151884, "contcor2:facExperimexperimental", - "", 1.53743684450092e-12, "contcor2:facExperimexperimental", - 0.0624198686798859, 7.07106728760337)) + list(-0.00962111810421981, 0.0896242723649158, 0.040001577130348, "facExperimexperimental", + "", 0.114117056655144, "facGenderm", 0.0253181668775474, + 1.57995550482852, 0.18070512297288, 0.319296287112953, 0.250000705042917, + "facGenderm", "", 1.53765888910584e-12, "facGenderm", + 0.0353555384775595, 7.07104786995663, 0.748541407004253, 1.32263038987282, + 1.03558589843854, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.146453962265865, 7.07106781145726, 0.00480662664163551, + 0.00849303544528913, 0.00664983104346232, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000940427689674796, 7.07107108443591, + 0.707778595983248, 1.25060480495245, 0.97919170046785, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.138478618293741, + 7.07106781200536, 0.18070512297212, 0.319296287110397, 0.250000705041259, + "facExperimexperimental", "", 1.53765888910584e-12, + "facExperimexperimental", 0.0353555384771011, 7.0710478700014, + 0.319035326305233, 0.563719027479233, 0.441377176892233, "contcor2:facExperimexperimental", + "", 1.53788093371077e-12, "contcor2:facExperimexperimental", + 0.0624204585145527, 7.07103387888973)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0340502821340026, 1.17772587951962, 0.605888080826811, 0, "m", - "facGender", "contNormal", "", "", "", "", "", 0.037831960162346, - 0.291759340071242, 2.07667072690411, -0.308479305160905, 0.876699389365673, + list(0.0340502819808605, 1.17772587967276, 0.605888080826811, 0, "m", + "facGender", "contNormal", "", "", "", "", "", 0.0378319602137112, + 0.291759340149377, 2.07667072634797, -0.308479305219271, 0.87669938942404, 0.284110042102384, 1, "m", "facGender", "contNormal", "", "", - "", "", "", 0.347380781192489, 0.302347059403927, 0.939681843317753, - -0.0217814140140775, 0.0214511733928511, -0.000165120310613169, + "", "", "", 0.347380781239977, 0.302347059433706, 0.9396818432252, + -0.021781503313821, 0.0214512613375484, -0.000165120988136318, "", "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.988054861413639, 0.0110289239363432, -0.0149715703513971, - "", "", -0.0380394374562644, 0, "m", "facGender", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", 0.0167751172282764, 1, "m", "facGender", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", -0.000789585272359379, 0, "m", "facGender", "debCollin1", - "contcor2", "contNormal", "", "", "", - "", "", "", "", "", 0.000348201403366649, 1, "m", "facGender", - "debCollin1", "contcor2", "contNormal", "", "", - "", "", "", "")) + "", "", 0.988054861372777, 0.0110289691525926, -0.0149715704026158, + -0.128314627502162, 0.0522357520722643, -0.0380394377149488, + 0, "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.408875597120188, 0.0460596166558633, -0.8258739537318, + -0.0661751086251401, 0.0997253433098489, 0.0167751173423544, + 1, "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.69183525296606, 0.0423223215435566, 0.396365717440383, + -0.00528021462067998, 0.00370103757496002, -0.000789588522859982, + 0, "m", "facGender", "debCollin1", "contcor2", "contNormal", + "", "", "", 0.730379146898519, 0.00229117786512481, + -0.344621225125606, -0.00214247502340878, 0.00283888069703667, + 0.000348202836813943, 1, "m", "facGender", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.784078671116602, + 0.00127077736114994, 0.274007743180797)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0340502821340026, 1.17772587951962, 0.605888080826811, "facGenderm", - "", 0.037831960162346, "contNormal", 0.291759340071242, - 2.07667072690411, -2.44760379706228, 2.48529939257552, 0.0188477977566232, - "debCollin1", "", 0.988050219387122, "contNormal", - 1.25841679452988, 0.0149773889211836, -0.121684316030474, 0.422564221978579, - 0.150439952974052, "contcor2", "", 0.278569850833461, - "contNormal", 0.138841464001894, 1.08353764529593, -0.387339144367417, - 0.76811620113054, 0.190388528381561, "facExperimexperimental", - "", 0.518343721794248, "contNormal", 0.294764433074292, - 0.645900614249401, -0.630824917155351, 0.197259145394553, -0.216782885880399, - "contcor2:facExperimexperimental", "", 0.30480105892682, - "contNormal", 0.211249816088899, -1.02619206915272, -1.14581132691922, - 0.502255249470368, -0.321778038724427, "facGenderm:facExperimexperimental", - "", 0.444063526530638, "contNormal", 0.420432872590856, - -0.76534938084531, -0.0407263690024295, 0.0232049256226432, - -0.00876072168989317, "facGenderm", "", 0.591156409791536, - "debCollin1", 0.0163093034181635, -0.53716099733214, "", "", - -0.252854622088491, "facGenderm", "", "", "contcor2", - "", "", "", "", 0.599095374098292, "debCollin1", "", - "", "contcor2", "", "")) + list(0.0340502819808605, 1.17772587967276, 0.605888080826811, "facGenderm", + "", 0.0378319602137112, "contNormal", 0.291759340149377, + 2.07667072634797, -2.44760379697585, 2.4852993924891, 0.0188477977566231, + "debCollin1", "", 0.988050219386703, "contNormal", + 1.25841679448578, 0.0149773889217084, -0.12168431600339, 0.422564221951494, + 0.150439952974052, "contcor2", "", 0.27856985078562, + "contNormal", 0.138841463988075, 1.08353764540378, -0.387339144471308, + 0.768116201234431, 0.190388528381561, "facExperimexperimental", + "", 0.518343721869474, "contNormal", 0.294764433127298, + 0.645900614133251, -0.630824917127835, 0.197259145367037, -0.216782885880399, + "contcor2:facExperimexperimental", "", 0.304801058894681, + "contNormal", 0.21124981607486, -1.02619206922092, -1.14581132720213, + 0.502255249753275, -0.321778038724427, "facGenderm:facExperimexperimental", + "", 0.444063526687062, "contNormal", 0.420432872735199, + -0.76534938058255, -0.0407263967628087, 0.0232048814888776, + -0.00876075763696555, "facGenderm", "", 0.591154792430971, + "debCollin1", 0.0163092992412024, -0.537163338988417, -0.64130684322291, + 0.135597595606888, -0.252854623808011, "facGenderm", "", + 0.202027488770169, "contcor2", 0.19819354971773, -1.27579643317419, + -1.77925889341373, 2.97744965779763, 0.599095382191949, "debCollin1", + "", 0.621514541042717, "contcor2", 1.21346835674831, + 0.493704989388703)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.0149478812861399, 1.14873575686129, 0.566893937787574, 0, "m", - "Total", 0.0561832816212016, 0.296863525892929, 1.90961128041051, - -0.275863315586788, 0.877999796433617, 0.301068240423414, 1, - "m", "Total", 0.306404620873523, 0.294358243600885, 1.02279534196306, - -0.133124560458558, 0.0551362743800845, -0.038994143039237, - 0, "m", "Total indirect", 0.416832980831332, 0.0480266056732727, - -0.811927940619331, -0.0690363879840075, 0.102952784626067, - 0.0169581983210299, 1, "m", "Total indirect", 0.699121663836776, - 0.0438755951554986, 0.386506399763437)) + list(-0.0149478918297835, 1.14873575903152, 0.566893933600866, 0, "m", + "Total", 0.0561832861266909, 0.296863529136323, 1.90961124544384, + -0.27586331110253, 0.877999793689363, 0.301068241293416, 1, + "m", "Total", 0.306404616445645, 0.294358241756843, 1.02279535132608, + -0.133124590171869, 0.0551362957199784, -0.0389941472259452, + 0, "m", "Total indirect", 0.416833057155794, 0.0480266186972886, + -0.811927807612794, -0.0690364109213867, 0.102952809303451, + 0.016958199191032, 1, "m", "Total indirect", 0.699121728385883, + 0.043875607302345, 0.386506312588992)) @@ -14399,87 +14744,93 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1198.17788425222, 1255.49162834396, 5, "Model 1", 100, -577.088942126112, + list(1196.17788425501, 1250.88645816076, 6, "Model 1", 100, -577.088942127506, 91)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.54484732979759, 0.0642099222629841, -0.240318703767303, "contcor1", - "", 0.121934352780519, "contGamma", 0.155374603019428, - -1.54670518281069, 1.68041109788333, 2.96919185043939, 2.32480147416136, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776641489793, 7.07106643472886, 0.732634891008755, 1.29452499182998, - 1.01357994141937, "contcor1", "", 1.53743684450092e-12, - "contcor1", 0.143341945375869, 7.07106310551019, 0.00468047957983808, - 0.00827014235534714, 0.00647531096759261, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000915747126943113, 7.0710688322966, - 0.407127832710264, 0.719372430212084, 0.563250131461174, "contcor2", - "", 1.53765888910584e-12, "contcor2", 0.0796556977487255, - 7.07105891204357, 0.797840916249474, 1.40973983836051, 1.10379037730499, - "contNormal", "", 1.53743684450092e-12, "contNormal", - 0.156099532169372, 7.07106781144838, 0.32389187081711, 0.572298771299722, - 0.448095321058416, "debCollin1:contcor1", "", 1.53743684450092e-12, - "debCollin1:contcor1", 0.0633702717095861, 7.07106516935814 - )) + list(-0.544852013262542, 0.0642107196251062, -0.240320646818718, "contcor1", + "", 0.121934693659491, "contGamma", 0.155376001215292, + -1.54670376981658, 1.68041713323829, 2.96921290158039, 2.32481501740934, + "contGamma", "", 1.53788093371077e-12, "contGamma", + 0.328780472117844, 7.07102524196164, 0.797840916249301, 1.40973983836069, + 1.10379037730499, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.15609953216946, 7.07106781144437, 0.00468047677414749, + 0.00827013324222644, 0.00647530500818696, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000915745517875252, 7.07107474925044, + 0.407127495443814, 0.719371290564996, 0.563249393004405, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.0796554930560258, + 7.07106781208727, 0.732636244949706, 1.29452971431468, 1.01358297963219, + "contcor1", "", 1.53765888910584e-12, "contcor1", 0.143342804714044, + 7.07104191001561, 0.323891999908809, 0.572299221561111, 0.44809561073496, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.063370353642135, 7.07106059823249)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.179344122563715, 0.0952661461636739, "", -0.0420389882000205, - "contGamma", "contNormal", "", "", "", "", "", 0.54844885459787, - 0.0700549272572046, -0.600086101662423, -0.0210322722418592, - 0.0260802515606852, "", 0.00252398965941298, "contGamma", "debCollin1", - "contNormal", "", "", "", "", 0.833663901518321, - 0.0120187218168706, 0.210004832283418, "", "", "", 0.000901774986880808, - "contGamma", "contcor2", "contNormal", "", "", "", - "", "", "", "", "", "", 16, -5.850838021235e-05, "contGamma", + list(-0.179344123157373, 0.0952661455668153, "", -0.0420389887952787, + "contGamma", "contNormal", "", "", "", "", "", 0.548448848930668, + 0.0700549272563881, -0.600086110166438, -0.0210323269404873, + 0.0260803196288078, "", 0.00252399634416022, "contGamma", "debCollin1", + "contNormal", "", "", "", "", 0.833663894525401, + 0.0120187531354948, 0.210004841243153, -0.00592018113761293, + 0.00772379640103494, "", 0.000901807631711004, "contGamma", + "contcor2", "contNormal", "", "", "", "", + 0.795565640935948, 0.00348067047309793, 0.259090206522297, -0.000853133122884932, + 0.000736116252882008, 16, -5.85084350014616e-05, "contGamma", "debCollin1", "contcor2", "contNormal", "", "", - "", "", "", "", "", "", 50, -0.000159559761181443, - "contGamma", "debCollin1", "contcor2", "contNormal", "", - "", "", "", "", "", "", "", 84, -0.000269844500210012, + "", 0.885253558879347, 0.0004054282089627, -0.144312688925019, + -0.00136863021353599, 0.00104950931334832, 50, -0.000159560450093833, "contGamma", "debCollin1", "contcor2", "contNormal", "", - "", "", "", "", "")) + "", "", 0.795900935038584, 0.000616883663668896, + -0.258655658256295, -0.00227307358514916, 0.00173338182277443, + 84, -0.000269845881187366, "contGamma", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.791766034663564, + 0.00102207373184559, -0.264018018250111)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.179344122563715, 0.0952661461636739, -0.0420389882000205, "contGamma", - "", 0.54844885459787, "contNormal", 0.0700549272572046, - -0.600086101662423, -2.83802376950293, 2.28501281093068, -0.276505479286125, - "debCollin1", "", 0.832442407503821, "contNormal", - 1.30692110182725, -0.211570139084551, -0.176275917657086, 0.23731320939017, - 0.0305186458665418, "contcor2", "", 0.772389630526975, - "contNormal", 0.105509369128615, 0.289250576688975, -0.019472098347059, - 0.00121575372828799, -0.00912817230938552, "contGamma", "", - 0.0837011698095351, "debCollin1", 0.00527761026185434, -1.72960333493407, - "", "", 0.0295483289404213, "contGamma", "", "", "contcor2", - "", "", "", "", 0.571406702820995, "debCollin1", "", - "", "contcor2", "", "", -0.783450554228, 1.60752738451083, 0.412038415141417, - "contcor1", "", 0.499343459328222, "contcor2", 0.609954559777262, - 0.67552313289023, -1.42776531700975, 2.17250034790832, 0.372367515449285, - "debCollin1:contcor1", "", 0.685161844613628, "contcor2", - 0.918451995372493, 0.405429480610215)) + list(-0.179344123157373, 0.0952661455668153, -0.0420389887952787, "contGamma", + "", 0.548448848930668, "contNormal", 0.0700549272563881, + -0.600086110166438, -2.83802376975913, 2.28501281092322, -0.276505479417954, + "debCollin1", "", 0.832442407433134, "contNormal", + 1.3069211018907, -0.211570139175149, -0.176275917665457, 0.237313209385254, + 0.0305186458598983, "contcor2", "", 0.772389630577005, + "contNormal", 0.105509369129496, 0.289250576623593, -0.0194721202699128, + 0.00121572730820187, -0.00912819648085546, "contGamma", "", + 0.0837002837416636, "debCollin1", 0.00527760911458011, -1.7296082909281, + -0.0698342906299817, 0.128933087860431, 0.0295493986152244, + "contGamma", "", 0.560062203804464, "contcor2", 0.0507068956517222, + 0.582749115981838, -1.25928927164097, 2.40210458023201, 0.571407654295518, + "debCollin1", "", 0.540699713090492, "contcor2", 0.934046207163393, + 0.611755232142986, -0.78344766786551, 1.60752870529232, 0.412040518713407, + "contcor1", "", 0.499340988079294, "contcor2", 0.609954160387015, + 0.675527023952043, -1.4277627875316, 2.17250051992402, 0.37236886619621, + "debCollin1:contcor1", "", 0.685160568658898, "contcor2", + 0.918451393967961, 0.405431216765293)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.174619121175316, 0.0972756573074383, 16, -0.0386717319339391, - "Total", 0.577163087463469, 0.0693621874247247, -0.557533338692751, - -0.174642296221417, 0.0970967295916007, 50, -0.0387727833149082, - "Total", 0.575949761913256, 0.0693224538706988, -0.559310600678212, - -0.174673594228109, 0.0969074581202352, 84, -0.0388830680539368, - "Total", 0.574642280174132, 0.069282153776942, -0.561227761179641, - -0.0213007258493331, 0.028035238381496, 16, 0.00336725626608144, - "Total indirect", 0.789052513332058, 0.0125859364304612, 0.267541178575462, - -0.0212012181099782, 0.0277336278802029, 50, 0.00326620488511234, - "Total indirect", 0.793599399804135, 0.0124836084683629, 0.261639484560081, - -0.0211246183909581, 0.0274364586831256, 84, 0.00315592014608377, - "Total indirect", 0.798915475542655, 0.0123882575029764, 0.254750932108533 + list(-0.174619107140961, 0.0972757206321432, 16, -0.038671693254409, + "Total", 0.577163537389171, 0.0693621999990245, -0.557532679974869, + -0.174642281243742, 0.0970967907047394, 50, -0.0387727452695013, + "Total", 0.575950201197518, 0.069322465640166, -0.559309956901419, + -0.174673578276121, 0.0969075168749312, 84, -0.0388830307005949, + "Total", 0.574642707960793, 0.0692821646962009, -0.561227133578969, + -0.0213008060825388, 0.0280353971642783, 16, 0.00336729554086976, + "Total indirect", 0.789051108866882, 0.012585997405048, 0.267543002950185, + -0.0212012925707619, 0.0277337796223167, 50, 0.00326624352577739, + "Total indirect", 0.793597945731698, 0.0124836661742441, 0.261641370426598, + -0.021124686616786, 0.0274366028061537, 84, 0.00315595809468386, + "Total indirect", 0.798913969898013, 0.0123883116745984, 0.25475288139182 )) @@ -14534,84 +14885,90 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(746.046192402951, 803.359936494689, 5, "Model 1", 100, -351.023096201476, + list(744.046192404079, 798.754766309829, 6, "Model 1", 100, -351.023096202039, 91)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962229614274458, 0.0896222768157664, 0.0399999903365109, - "facExperimexperimental", "", 0.114128430521416, "facGenderm", - 0.0253179583250865, 1.57990584481201, 0.18070476551971, 0.3192950403187, - 0.249999902919205, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353553116006653, 7.0710705577405, 0.180704765518991, - 0.319295040326314, 0.249999902922652, "facExperimexperimental", + list(-0.00962242234117851, 0.0896221602230379, 0.0399998689409297, + "facExperimexperimental", "", 0.114129563778192, "facGenderm", + 0.0253179607755666, 1.57990089705535, 0.180704779706653, 0.319295089802131, + 0.249999934754392, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553206050367, 7.0710696573001, 0.75955781613359, + 1.34209576261861, 1.0508267893761, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.148609349732955, 7.07106781144249, + 0.00480661175863417, 0.00849298353460121, 0.00664979764661769, + "debCollin1", "", 1.53699275529107e-12, "debCollin1", + 0.00094041824366281, 7.07110659690902, 0.695096521667449, 1.22819629585022, + 0.961646408758836, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.135997339335772, 7.0710678124707, 0.180704779704687, + 0.319295089799638, 0.249999934752163, "facExperimexperimental", "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353553116027909, 7.07107055741286, 0.00480663162438963, 0.00849305228072043, - 0.00664984195255503, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000940430713372493, 7.07105994944373, 0.695096623619902, - 1.22819658718194, 0.961646605400922, "contcor2", "", - 1.53743684450092e-12, "contcor2", 0.135997387647698, 7.07106674645894, - 0.759557816134031, 1.34209576261817, 1.0508267893761, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.14860934973273, - 7.07106781145319, 0.0796446446277225, 0.140727513093434, 0.110186078860578, - "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, - "debCollin1:facExperimexperimental", 0.0155826507393824, 7.07107415185161 - )) + 0.0353553206049025, 7.07106965726388, 0.0796448023488701, 0.140728063218132, + 0.110186432783501, "debCollin1:facExperimexperimental", "", + 1.53765888910584e-12, "debCollin1:facExperimexperimental", 0.0155827508441682, + 7.07105143920966)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0761248335449216, 0.88746927376321, 0.481797053654066, "", "m", - "facGender", "contNormal", "", "", "", "", "", 0.0199252039985709, - 0.206979425800186, 2.32775335901832, -0.0215430572476432, 0.0216818835802095, - 6.94131662831716e-05, "", "m", "facGender", "debCollin1", "contNormal", - "", "", "", "", 0.994977467822495, 0.0110269732425712, - 0.00629485215536684, "", "", -0.0134206604145383, "", "m", "facGender", - "contcor2", "contNormal", "", "", "", "", - "", "", "", "", "", 0.000115245969993017, 0, "m", "facGender", - "debCollin1", "contcor2", "contNormal", "", "", - "", "", "", "", "", "", -0.00066174847420083, 1, "m", - "facGender", "debCollin1", "contcor2", "contNormal", "", - "", "", "", "", "")) + list(0.0761248335438164, 0.887469273764315, 0.481797053654066, "", + "m", "facGender", "contNormal", "", "", "", "", "", + 0.0199252039989077, 0.20697942580075, 2.32775335901198, -0.0215433314864607, + 0.0216821595865577, 6.94140500485228e-05, "", "m", "facGender", + "debCollin1", "contNormal", "", "", "", "", + 0.994977467811705, 0.0110271136138152, 0.00629485216889013, + -0.0624882140400313, 0.0356468235035538, -0.0134206952682388, + "", "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.591903770207666, 0.0250349083752716, -0.536079264483954, + -0.00184786414495915, 0.00207835959001393, 0.000115247722527392, + 0, "m", "facGender", "debCollin1", "contcor2", "contNormal", + "", "", "", 0.908395249515697, 0.00100160609224012, + 0.115062920863068, -0.00437939639268022, 0.00305588390234432, + -0.000661756245167953, 1, "m", "facGender", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.727177762323095, + 0.00189679003126412, -0.348882182139541)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0761248335449216, 0.88746927376321, 0.481797053654066, "facGenderm", - "", 0.0199252039985709, "contNormal", 0.206979425800186, - 2.32775335901832, -2.47474004311921, 2.45889351389968, -0.00792326460976673, - "debCollin1", "", 0.994977122918344, "contNormal", - 1.25860311616304, -0.00629528443717942, -0.138193827042164, - 0.267884482770353, 0.0648453278640943, "contcor2", "", - 0.531340797642188, "contNormal", 0.103593309115783, 0.625960580056565, - -0.0407263321028631, 0.0232049770297008, -0.00876067753658113, - "facGenderm", "", 0.591158363855765, "debCollin1", - 0.0163093071191221, -0.537158168191557, "", "", -0.206964184723778, - "facGenderm", "", "", "contcor2", "", "", "", "", -0.202866044824353, - "debCollin1", "", "", "contcor2", "", "", -4.31758722714955, - 2.01539050080775, -1.1510983631709, "facExperimexperimental", - "", 0.476157553644617, "contcor2", 1.61558522960397, - -0.712496216280132, -3.37392833513864, 6.10939561010979, 1.36773363748557, - "debCollin1:facExperimexperimental", "", 0.571834281408593, - "contcor2", 2.41925974662078, 0.565352124506691)) + list(0.0761248335438164, 0.887469273764315, 0.481797053654066, "facGenderm", + "", 0.0199252039989077, "contNormal", 0.20697942580075, + 2.32775335901198, -2.47474004314357, 2.45889351392404, -0.00792326460976669, + "debCollin1", "", 0.994977122918394, "contNormal", + 1.25860311617547, -0.00629528443711722, -0.13819382704205, 0.267884482770239, + 0.0648453278640943, "contcor2", "", 0.531340797641958, + "contNormal", 0.103593309115724, 0.625960580056916, -0.0407263479337902, + 0.023204769779513, -0.0087607890771386, "facGenderm", "", + 0.591152529296789, "debCollin1", 0.0163092582867807, -0.537166615617312, + -0.597637942707285, 0.183708498280187, -0.206964722213549, "facGenderm", + "", 0.299121596892632, "contcor2", 0.199326734355997, + -1.03831893339461, -3.51794949904967, 3.11221640524786, -0.202866546900905, + "debCollin1", "", 0.904530659519698, "contcor2", 1.69139993300781, + -0.119940023019954, -4.31758756714009, 2.0153891850705, -1.15109919103479, + "facExperimexperimental", "", 0.476157168489661, "contcor2", + 1.61558498068442, -0.712496838480852, -3.37392825348472, 6.10939422882653, + 1.3677329876709, "debCollin1:facExperimexperimental", "", + 0.571834404759159, "contcor2", 2.41925937341566, 0.565351943119624 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0657812516791798, 0.871340853072428, 0.468561052375804, 0, "m", - "Total", 0.0226040308144071, 0.205503674492848, 2.28006167545248, - 0.0650682579218536, 0.870499857941366, 0.46778405793161, 1, - "m", "Total", 0.0228075827146956, 0.205471020481155, 2.27664250090446, - -0.0657878805943811, 0.0393158780378568, -0.0132360012782622, - 0, "m", "Total indirect", 0.621555390944823, 0.0268126760137643, - -0.49364715672048, -0.0684184359641717, 0.0403924445192597, - -0.014012995722456, 1, "m", "Total indirect", 0.613685104664989, - 0.0277583877412335, -0.504820231386872)) + list(0.0657812218734813, 0.871340818443325, 0.468561020158403, 0, "m", + "Total", 0.0226040393015829, 0.205503673262365, 2.28006153233181, + 0.0650682188803878, 0.870499813501027, 0.467784016190708, 1, + "m", "Total", 0.0228075939436807, 0.205471019103867, 2.27664231301759, + -0.0657880951294798, 0.0393160281381541, -0.0132360334956629, + 0, "m", "Total indirect", 0.621555751914108, 0.0268127690347072, + -0.493646645690707, -0.0684186798910791, 0.0403926049643627, + -0.0140130374633582, 1, "m", "Total indirect", 0.613685366200723, + 0.0277584908992541, -0.504819859055622)) @@ -14675,119 +15032,128 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(1492.43159735727, 1573.1918731229, 11, "Model 1", 100, -715.215798678637, + list(1490.43159736364, 1568.58670294328, 12, "Model 1", 100, -715.215798681819, 92)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.544850510145751, 0.0642077173691644, -0.240321396388293, "contcor1", - "", 0.121930769680846, "contGamma", 0.155374851864394, - -1.54672003547935, 1.68041100981047, 2.96919154324147, 2.32480127652597, - "contGamma", "", 1.53743684450092e-12, "contGamma", - 0.328776585589515, 7.07106703586408, 0.732635422720608, 1.29452684567923, - 1.01358113419992, "contcor1", "", 1.53765888910584e-12, - "contcor1", 0.143342282662016, 7.07105478841732, 0.0046546858135793, - 0.00822456693311392, 0.00643962637334661, "debCollin1", "", - 1.53743684450092e-12, "debCollin1", 0.000910700693403907, 7.07106782721044, - 0.377830402832782, 0.667606761880424, 0.522718582356603, "contcor2", - "", 1.53788093371077e-12, "contcor2", 0.0739238989423684, - 7.07103642847786, 0.738695301407645, 1.30523287728181, 1.02196408934473, - "contNormal", "", 1.53743684450092e-12, "contNormal", - 0.144527547532234, 7.07106781229228, 0.32389199318924, 0.572299198195813, - 0.448095595692526, "debCollin1:contcor1", "", 1.53743684450092e-12, - "debCollin1:contcor1", 0.0633703493956973, 7.07106083468984, - 0.784504041935751, 1.38617203698335, 1.08533803945955, "contcor2:contcor1", - "", 1.53721479989599e-12, "contcor2:contcor1", 0.15348955383708, - 7.07108733022687)) + list(-0.544845414224517, 0.0642127813981578, -0.24031631641318, "contcor1", + "", 0.121938637675985, "contGamma", 0.155374843728469, + -1.54668742150534, 1.68041250288709, 2.96919675107937, 2.32480462698323, + "contGamma", "", 1.53765888910584e-12, "contGamma", + 0.328777533250112, 7.07105684503896, 0.738695301427582, 1.30523287726226, + 1.02196408934492, "contNormal", "", 1.53743684450092e-12, + "contNormal", 0.144527547522161, 7.07106781278647, 0.00465468244585314, + 0.00822455532456515, 0.00643961888520914, "debCollin1", "", + 1.53743684450092e-12, "debCollin1", 0.000910698591114611, 7.07107592790678, + 0.377829117086005, 0.66760266765775, 0.522715892371877, "contcor2", + "", 1.53743684450092e-12, "contcor2", 0.0739231824812704, + 7.07106857181529, 0.732635215491899, 1.29452612309587, 1.01358066929388, + "contcor1", "", 1.53765888910584e-12, "contcor1", 0.143342151191576, + 7.07105803051077, 0.323891627245581, 0.572297921749174, 0.448094774497378, + "debCollin1:contcor1", "", 1.53743684450092e-12, "debCollin1:contcor1", + 0.063370117120261, 7.0710737940882, 0.784506325641507, 1.38618000243142, + 1.08534316403646, "contcor2:contcor1", "", 1.53765888910584e-12, + "contcor2:contcor1", 0.153491003287773, 7.07105394315263)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.246045505467684, 0.136942023648033, 16, -0.0545517409098258, - "contGamma", "contNormal", "", "", "", "", "", 0.576609315787614, - 0.0977026955945808, -0.558344276765805, -0.167682274862759, - 0.106696814562493, 50, -0.0304927301501331, "contGamma", "contNormal", - "", "", "", "", "", 0.663101120027582, 0.0699959518617483, - -0.435635623762363, -0.223666253628972, 0.215195498174348, 84, - -0.00423537772731158, "contGamma", "contNormal", "", "", "", - "", "", 0.96982279701743, 0.111956585749791, -0.0378305367115887, - -0.0261686331115958, 0.052277744446275, 16, 0.0130545556673396, + list(-0.246046572007919, 0.136940953810542, 16, -0.0545528090986887, + "contGamma", "contNormal", "", "", "", "", "", 0.57660184827691, + 0.0977026947534286, -0.558355214627019, -0.167682190637647, + 0.106696898641721, 50, -0.0304926459979633, "contGamma", "contNormal", + "", "", "", "", "", 0.663101992273681, 0.0699959518245323, + -0.435634421750604, -0.22366490872751, 0.215196836844783, 84, + -0.0042340359413634, "contGamma", "contNormal", "", "", "", + "", "", 0.969832352299801, 0.111956584160214, -0.0378185523711973, + -0.0261685059400495, 0.0522783697417529, 16, 0.0130549319008517, "contGamma", "debCollin1", "contNormal", "", "", "", - "", 0.514188373287407, 0.0200121987385089, 0.652329903271401, - -0.0226271512921513, 0.0237490540571096, 50, 0.000560951382479116, + "", 0.51417891948777, 0.0200123258132755, 0.652344561179967, + -0.022627694238274, 0.023749622929404, 50, 0.000560964345565005, "contGamma", "debCollin1", "contNormal", "", "", "", - "", 0.962183140350926, 0.011830882025147, 0.0474141641584111, - -0.100775339306188, 0.0326689932564859, 84, -0.0340531730248512, + "", 0.962183173029298, 0.0118311656575061, 0.0474141231560825, + -0.100777088206936, 0.0326691783800381, 84, -0.034053954913449, "contGamma", "debCollin1", "contNormal", "", "", "", - "", 0.31715947576944, 0.0340425471119026, -1.00031213624861, - "", "", 16, 0.0315134126358179, "contGamma", "contcor2", "contNormal", - "", "", "", "", "", "", "", "", "", 50, -0.00735026636899437, + "", 0.317155377976575, 0.0340430404945145, -1.00032060646687, + -0.0235748154916105, 0.0866024426612249, 16, 0.0315138135848072, "contGamma", "contcor2", "contNormal", "", "", "", - "", "", "", "", "", "", 84, -0.00376186709514986, "contGamma", - "contcor2", "contNormal", "", "", "", "", - "", "", "", "", "", 16, -0.0008398491729663, "contGamma", "debCollin1", - "contcor2", "contNormal", "", "", "", - "", "", "", "", "", 50, 0.00134611421810237, "contGamma", "debCollin1", - "contcor2", "contNormal", "", "", "", - "", "", "", "", "", 84, 0.000588804505522314, "contGamma", "debCollin1", + "", 0.262198346331823, 0.0281069598783191, 1.12121032375031, + -0.0277462072739296, 0.0130459660261054, 50, -0.0073501206239121, + "contGamma", "contcor2", "contNormal", "", "", "", + "", 0.479995018014117, 0.0104063578774402, -0.706310575753531, + -0.0686530199485837, 0.0611295030193147, 84, -0.00376175846463447, + "contGamma", "contcor2", "contNormal", "", "", "", + "", 0.909539447930077, 0.0331083948459274, -0.113619475729347, + -0.00562958045857296, 0.0039497869280092, 16, -0.000839896765281883, + "contGamma", "debCollin1", "contcor2", "contNormal", "", + "", "", 0.73107927190771, 0.00244376107472969, + -0.343690213403856, -0.00253990067433596, 0.00523214599640664, + 50, 0.00134612266103534, "contGamma", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.497179915180347, + 0.00198270139962967, 0.678933631300594, -0.00960619029952168, + 0.010783786153223, 84, 0.000588797926850668, "contGamma", "debCollin1", "contcor2", "contNormal", "", "", "", - "", "", "")) + 0.909875878855725, 0.00520162018628358, 0.113195101865242)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.167725109070171, 0.106559849564113, -0.0305826297530292, "contGamma", - "", 0.662060639069211, "contNormal", 0.069971938463617, - -0.437069922951058, -2.5582955517685, 2.42017031408626, -0.0690626188411224, - "debCollin1", "", 0.956633770430606, "contNormal", - 1.27004013979957, -0.0543782961474125, -0.450845354291692, 0.102063206139582, - -0.174391074076055, "contcor2", "", 0.216320462765589, - "contNormal", 0.141050693990437, -1.2363716132292, -3.3123544137308, - 0.504649343470863, -1.40385253512997, "contcor1", "", - 0.149385064235886, "contNormal", 0.973743341028127, -1.4417069426608, - -0.125417646130409, 0.174813032337099, 0.0246976931033452, "contGamma:contcor1", - "", 0.747102234381831, "contNormal", 0.0765908661678709, - 0.322462642597789, -0.267222805898666, 5.10203622637825, 2.41740671023979, - "debCollin1:contcor1", "", 0.0775851161293934, "contNormal", - 1.36973410599096, 1.76487297765785, -0.0582256827176344, 0.349435597438954, - 0.14560495736066, "contcor2:contcor1", "", 0.161487498069034, - "contNormal", 0.103997135501511, 1.40008622986105, -0.0197475229868136, - 0.00115999568927694, -0.00929376364876832, "contGamma", "", - 0.0814248985153794, "debCollin1", 0.00533364868972246, -1.74247765262019, - -0.0185475265569587, 0.0350788335600082, 0.00826565350152473, - "contcor1", "", 0.545714157340776, "debCollin1", 0.0136804452887821, - 0.604194770494975, -0.0145562793287389, 0.00654288557714277, - -0.00400669687579805, "contGamma:contcor1", "", 0.45664183449568, - "debCollin1", 0.00538253893242661, -0.744387904314092, "", "", - 0.0417457008350374, "contGamma", "", "", "contcor2", - "", "", "", "", 0.826830001048869, "debCollin1", "", - "", "contcor2", "", "", "", "", -0.537587144643407, "contcor1", - "", "", "contcor2", "", "", "", "", 0.145869386995386, - "contGamma:contcor1", "", "", "contcor2", "", "", -0.508965114446831, - 3.22713690435113, 1.35908589495215, "debCollin1:contcor1", "", - 0.153880910168514, "contcor2", 0.953104763217043, 1.42595646082471 - )) + list(-0.167725029154556, 0.106559929341094, -0.0305825499067307, "contGamma", + "", 0.662061466449758, "contNormal", 0.0699719384282505, + -0.437068782053111, -2.55829550052727, 2.42017035676155, -0.0690625718828604, + "debCollin1", "", 0.956633799813336, "contNormal", + 1.27004013761434, -0.0543782592671348, -0.450844999534775, 0.102063560950179, + -0.174390719292298, "contcor2", "", 0.21632139734344, + "contNormal", 0.141050694004131, -1.23636909781663, -3.31235331374332, + 0.50465006406657, -1.40385162483838, "contcor1", "", + 0.149385287627976, "contNormal", 0.973743244242734, -1.44170615112214, + -0.12541646010085, 0.174814212170831, 0.0246988760349903, "contGamma:contcor1", + "", 0.747090530516903, "contNormal", 0.0765908645872737, + 0.32247809406625, -0.267220784961802, 5.10203772053223, 2.41740846778522, + "debCollin1:contcor1", "", 0.0775848713245899, "contNormal", + 1.36973397160511, 1.76487443394019, -0.0582255096744967, 0.349435769152973, + 0.145605129739238, "contcor2:contcor1", "", 0.161487000406626, + "contNormal", 0.103997135162444, 1.40008789195781, -0.0197477399995842, + 0.00115976653632148, -0.00929398673163137, "contGamma", "", + 0.0814174092690125, "debCollin1", 0.00533364559267962, -1.74252048999793, + -0.0185474623059735, 0.0350788666330777, 0.0082657021635521, + "contcor1", "", 0.545711559213373, "debCollin1", 0.013680437335086, + 0.604198678820976, -0.0145563464256446, 0.00654280632658964, + -0.00400677004952746, "contGamma:contcor1", "", 0.456633353081375, + "debCollin1", 0.00538253583194937, -0.744401927757598, -0.0543801026811009, + 0.137869996309279, 0.0417449468140892, "contGamma", "", + 0.394675884766629, "contcor2", 0.0490442937999944, 0.851168272181217, + -0.945916771267379, 2.59955068280099, 0.826816955766806, "debCollin1", + "", 0.360641909699776, "contcor2", 0.904472603077038, + 0.91414262074269, -1.86915930688467, 0.793983921499387, -0.537587692692644, + "contcor1", "", 0.428777755913428, "contcor2", 0.679385756419658, + -0.791284903477686, 0.0432011541485479, 0.248538805397686, 0.145869979773117, + "contGamma:contcor1", "", 0.00535804414792973, "contcor2", + 0.052383016440306, 2.7846807932366, -0.508958994547159, 3.22713344329519, + 1.35908722437401, "debCollin1:contcor1", "", 0.153879451921323, + "contcor2", 0.9531023190508, 1.42596151242978)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.201040262851397, 0.179393019292128, 16, -0.0108236217796346, - "Total", 0.91120005056541, 0.0970510900058203, -0.111524989353396, - -0.17168172940293, 0.0998098675658379, 50, -0.035935930918546, - "Total", 0.60385803767015, 0.069259333107715, -0.518860481412042, - -0.24585717888533, 0.16293395220175, 84, -0.0414616133417903, - "Total", 0.690940959934891, 0.104285368076039, -0.397578434124706, - -0.023139671346559, 0.110595909606941, 16, 0.0437281191301912, - "Total indirect", 0.19994217642122, 0.0341168465360562, 1.2817163240447, - -0.0361510661925322, 0.0252646646557065, 50, -0.00544320076841288, - "Total indirect", 0.728277012170607, 0.015667566172817, -0.347418399793119, - -0.125314773105385, 0.0508623018764279, 84, -0.0372262356144787, - "Total indirect", 0.407511257306866, 0.0449439572286725, -0.828281217541073 + list(-0.201040494137924, 0.179392573381301, 16, -0.0108239603783117, + "Total", 0.911197234216696, 0.0970510352537172, -0.111528541143482, + -0.171681457617047, 0.0998100983864967, 50, -0.0359356796152751, + "Total", 0.603860513538175, 0.0692593226572106, -0.518856931263011, + -0.245856362666216, 0.162934459881024, 84, -0.0414609513925962, + "Total", 0.690945418402339, 0.10428528936545, -0.39757238671797, + -0.0231392766865853, 0.110596974127339, 16, 0.0437288487203771, + "Total indirect", 0.199936924897333, 0.0341170174219576, 1.28173128909661, + -0.0361512079721022, 0.0252651407374787, 50, -0.00544303361731176, + "Total indirect", 0.728287651279385, 0.0156677237934026, -0.34740423619184, + -0.125316096440252, 0.0508622655377862, 84, -0.0372269154512328, + "Total indirect", 0.407506118790109, 0.0449442855500689, -0.828290293095463 )) @@ -14852,111 +15218,118 @@ results <- jaspTools::runAnalysis("ClassicProcess", "debug", options) table <- results[["results"]][["modelSummaryTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(961.510460989986, 1042.27073675562, 11, "Model 1", 100, -449.755230494993, + list(959.510460980064, 1037.66556655971, 12, "Model 1", 100, -449.755230490032, 92)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_covariancesTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(-0.00962089320012244, 0.0896236665515198, 0.0400013866756987, - "facExperimexperimental", "", 0.11411575067412, "facGenderm", - 0.0253179549559254, 1.57996120718813, 0.180704658341305, 0.319294666501359, - 0.249999662421332, "facGenderm", "", 1.53743684450092e-12, - "facGenderm", 0.0353552435792787, 7.07107735973437, 0.180704658352567, - 0.319294666536375, 0.249999662444471, "facExperimexperimental", + list(-0.00962196668040587, 0.0896229057349935, 0.0400004695272938, + "facExperimexperimental", "", 0.11412518736331, "facGenderm", + 0.0253180347185536, 1.5799200045326, 0.18070490373996, 0.319295522426352, + 0.250000213083156, "facGenderm", "", 1.53743684450092e-12, + "facGenderm", 0.0353553993286551, 7.07106178491198, 0.748461126016925, + 1.32248853790023, 1.03547483195858, "contNormal", "", + 1.53743684450092e-12, "contNormal", 0.146438255093246, 7.07106781147609, + 0.00474535809181169, 0.00838478730997079, 0.00656507270089124, + "debCollin1", "", 1.53765888910584e-12, "debCollin1", + 0.000928442881314772, 7.07105717865424, 0.682814779075062, 1.20649515039531, + 0.944654964735185, "contcor2", "", 1.53743684450092e-12, + "contcor2", 0.133594386287444, 7.07106781195615, 0.180704903732434, + 0.319295522401599, 0.250000213067017, "facExperimexperimental", "", 1.53743684450092e-12, "facExperimexperimental", - 0.0353552435853383, 7.07107735917694, 0.00474535632144574, 0.00838477998738914, - 0.00656506815441744, "debCollin1", "", 1.53743684450092e-12, - "debCollin1", 0.000928441464907191, 7.07106306919812, 0.682818651663708, - 1.20650753823946, 0.944663094951583, "contcor2", "", - 1.53810297831569e-12, "contcor2", 0.133596558586418, 7.07101369187232, - 0.748461126014987, 1.32248853790216, 1.03547483195858, "contNormal", - "", 1.53743684450092e-12, "contNormal", 0.146438255094234, - 7.07106781142836, 0.0796446958693566, 0.140727691822261, 0.110186193845809, - "debCollin1:facExperimexperimental", "", 1.53743684450092e-12, - "debCollin1:facExperimexperimental", 0.0155826832622231, 7.07106677275101, - 0.319035266526892, 0.563718818976572, 0.441377042751732, "contcor2:facExperimexperimental", - "", 1.53788093371077e-12, "contcor2:facExperimexperimental", - 0.0624204205739781, 7.07103602784333)) + 0.0353553993242606, 7.07106178533439, 0.0796447318984438, 0.14072781748991, + 0.110186274694177, "debCollin1:facExperimexperimental", "", + 1.53743684450092e-12, "debCollin1:facExperimexperimental", 0.0155827061296233, + 7.0710615844002, 0.319034105111151, 0.563714768007903, 0.441374436559527, + "contcor2:facExperimexperimental", "", 1.53743684450092e-12, + "contcor2:facExperimexperimental", 0.0624196834295839, 7.07107778041593 + )) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_mediationEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0345966305470954, 1.17847272952907, 0.606534680038083, 0, "m", - "facGender", "contNormal", "", "", "", "", "", 0.0376612569288406, - 0.291810489377541, 2.078522541571, -0.307634496963515, 0.879612205948917, + list(0.0345966305070722, 1.17847272956909, 0.606534680038083, 0, "m", + "facGender", "contNormal", "", "", "", "", "", 0.0376612569422228, + 0.291810489397961, 2.07852254142555, -0.30763449691844, 0.879612205903842, 0.285988854492701, 1, "m", "facGender", "contNormal", "", "", - "", "", "", 0.345042766169954, 0.302874622257675, 0.944248324144476, - -0.0184728664796388, 0.0173906661125035, -0.000541100183567682, + "", "", "", 0.345042766133323, 0.302874622234677, 0.944248324216176, + -0.0184751271373697, 0.0173927839609914, -0.000541171588189157, 0, "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.952838279795182, 0.00914902847068346, -0.05914291176397, - -0.0660869876904311, 0.0606453532764759, -0.00272081720697763, + "", "", 0.952837814722433, 0.00915014545708048, -0.0591434956665517, + -0.0660864196580941, 0.0606448326030803, -0.00272079352750691, 1, "m", "facGender", "debCollin1", "contNormal", "", "", - "", "", 0.932931644468534, 0.0323302728944398, -0.0841569514696412, - "", "", 0.00849324247555401, 0, "m", "facGender", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", 0.0318940373468568, 1, "m", "facGender", "contcor2", - "contNormal", "", "", "", "", "", "", "", - "", "", -0.000188752951889862, 0, "m", "facGender", "debCollin1", - "contcor2", "contNormal", "", "", "", - "", "", "", "", "", 0.00118397280844347, 1, "m", "facGender", - "debCollin1", "contcor2", "contNormal", "", "", - "", "", "", "")) + "", "", 0.932931651994774, 0.0323299951582821, -0.0841569420034359, + -0.0749810317426891, 0.0919666897035537, 0.00849282898043228, + 0, "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.841940948352035, 0.0425894870423909, 0.199411393989767, + -0.12055702016095, 0.18434573841041, 0.0318943591247299, 1, + "m", "facGender", "contcor2", "contNormal", "", "", + "", "", 0.681773566026288, 0.0777827452382785, 0.410044143171152, + -0.00321825621320514, 0.0028407240465813, -0.000188766083311919, + 0, "m", "facGender", "debCollin1", "contcor2", "contNormal", + "", "", "", 0.902800482324132, 0.00154568663189194, + -0.122124419929069, -0.00627221932251877, 0.00864020901780174, + 0.00118399484764149, 1, "m", "facGender", "debCollin1", "contcor2", + "contNormal", "", "", "", 0.755626825796107, + 0.00380426080732805, 0.311228621697226)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_pathCoefficientsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0345966305470954, 1.17847272952907, 0.606534680038083, "facGenderm", - "", 0.0376612569288406, "contNormal", 0.291810489377541, - 2.078522541571, -3.54941875156611, 3.3334590533891, -0.107979849088507, - "debCollin1", "", 0.950963762896946, "contNormal", - 1.75586843922809, -0.0614965487596424, -0.121894548032845, 0.422376825373257, - 0.150241138670206, "contcor2", "", 0.279225738072832, - "contNormal", 0.138847289465328, 1.08206029263339, -3.31646427455539, - 3.35029188623572, 0.0169138058401674, "facExperimexperimental", - "", 0.992065167576041, "contNormal", 1.70073435363548, - 0.009945001583588, -1.14486482679846, 0.503773175707691, -0.320545825545382, - "facGenderm:facExperimexperimental", "", 0.44596791630935, - "contNormal", 0.420578647238009, -0.762154302531633, -4.67371877405417, - 5.19520575190586, 0.260743488925848, "debCollin1:facExperimexperimental", - "", 0.917512913560772, "contNormal", 2.51762904925928, - 0.103567079908997, -0.631934803213806, 0.196704100522254, -0.217615351345776, - "contcor2:facExperimexperimental", "", 0.30327156120196, - "contNormal", 0.211391359808715, -1.0294429798015, -0.0404922985481069, - 0.0505145422933109, 0.00501112187260201, "facGenderm", "", - 0.829109724481327, "debCollin1", 0.0232164574347458, 0.215843519050514, - -0.0488497233078189, 0.0421571190914062, -0.00334630210820634, - "facExperimexperimental", "", 0.885393936704136, "debCollin1", - 0.0232164578321529, -0.14413491206966, -0.0871733115445573, - 0.0415298007246136, -0.0228217554099718, "facGenderm:facExperimexperimental", - "", 0.487001866322503, "debCollin1", 0.0328330299139078, - -0.695085268396285, "", "", 0.0565307381901404, "facGenderm", - "", "", "contcor2", "", "", "", "", -0.250708997744548, - "debCollin1", "", "", "contcor2", "", "", -2.50988647418082, - 0.907086246803143, -0.80140011368884, "facExperimexperimental", - "", 0.357906894152298, "contcor2", 0.871692732095235, - -0.919360784117773, "", "", -0.529917158309627, "facGenderm:facExperimexperimental", - "", "", "contcor2", "", "", -3.4660918490858, 5.94083500347857, - 1.23737157719639, "debCollin1:facExperimexperimental", "", - 0.606119257436946, "contcor2", 2.39977033424211, 0.515620832352346 - )) + list(0.0345966305070722, 1.17847272956909, 0.606534680038083, "facGenderm", + "", 0.0376612569422228, "contNormal", 0.291810489397961, + 2.07852254142555, -3.54941876399751, 3.3334590658205, -0.107979849088507, + "debCollin1", "", 0.950963763073855, "contNormal", + 1.75586844557075, -0.0614965485375003, -0.121894548047822, 0.422376825388235, + 0.150241138670206, "contcor2", "", 0.279225738099293, + "contNormal", 0.13884728947297, 1.08206029257384, -3.31646428942003, + 3.35029190110037, 0.0169138058401676, "facExperimexperimental", + "", 0.992065167611423, "contNormal", 1.70073436121963, + 0.00994500153924003, -1.14486482675211, 0.503773175661347, -0.320545825545382, + "facGenderm:facExperimexperimental", "", 0.445967916283779, + "contNormal", 0.420578647214363, -0.762154302574482, -4.67371879642321, + 5.19520577427491, 0.260743488925848, "debCollin1:facExperimexperimental", + "", 0.91751291393337, "contNormal", 2.51762906067227, + 0.103567079439503, -0.6319348032448, 0.196704100553248, -0.217615351345776, + "contcor2:facExperimexperimental", "", 0.303271561238132, + "contNormal", 0.211391359824529, -1.02944297972449, -0.0404916554644197, + 0.0505152217641943, 0.00501178314988734, "facGenderm", "", + 0.829087588855613, "debCollin1", 0.0232164667173644, 0.215871915864737, + -0.0488497749485977, 0.0421571022799943, -0.00334633633430171, + "facExperimexperimental", "", 0.885392816162945, "debCollin1", + 0.0232164667173587, -0.144136331123964, -0.0871738417030068, + 0.0415293183429794, -0.0228222616800137, "facGenderm:facExperimexperimental", + "", 0.486992365379827, "debCollin1", 0.0328330421020948, + -0.695100429897649, -0.489555034284806, 0.602611006245653, 0.0565279859804235, + "facGenderm", "", 0.83922382650975, "contcor2", 0.278618905537379, + 0.202886397358415, -3.53710183349557, 3.03571511863317, -0.2506933574312, + "debCollin1", "", 0.881151454365549, "contcor2", 1.67676982943929, + -0.149509701945813, -3.98113048506751, 2.37831974275646, -0.801405371155527, + "facExperimexperimental", "", 0.621319181980972, "contcor2", + 1.62233854243917, -0.493981589040362, -1.30434387560009, 0.244505511440842, + -0.529919182079625, "facGenderm:facExperimexperimental", "", + 0.17987056845759, "contcor2", 0.395121900008893, -1.34115365933323, + -3.4660603834228, 5.94082616433903, 1.23738289045811, "debCollin1:facExperimexperimental", + "", 0.606114420871309, "contcor2", 2.3997600522158, + 0.515627755914842)) table <- results[["results"]][["parEstContainer"]][["collection"]][["parEstContainer_Model 1"]][["collection"]][["parEstContainer_Model 1_totalEffectsTable"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.0369348956007287, 1.19166124315563, 0.61429806937818, 0, "m", - "Total", 0.0370378879564361, 0.294578460793983, 2.08534618492625, - -0.256320505747628, 0.889012600629675, 0.316346047441024, 1, - "m", "Total", 0.278940997336173, 0.292182181767508, 1.08270136641235, - -0.0776945037321629, 0.0932212824123558, 0.00776338934009647, - 0, "m", "Total indirect", 0.858682002697897, 0.0436017670458949, - 0.178052172333401, -0.134496895574557, 0.195211281471202, 0.0303571929483226, - 1, "m", "Total indirect", 0.7181598541883, 0.0841107743934213, - 0.360919194565126)) + list(0.0369344462075991, 1.19166069648643, 0.614297571347015, 0, "m", + "Total", 0.0370380253756422, 0.294578435978203, 2.08534466994206, + -0.256320128223737, 0.889012958098868, 0.316346414937566, 1, + "m", "Total", 0.278940430461163, 0.29218217665142, 1.08270264313546, + -0.077695001361949, 0.0932207839798114, 0.0077628913089312, + 0, "m", "Total indirect", 0.858690972379156, 0.0436017668411059, + 0.178040750899404, -0.134497758660536, 0.195212879550265, 0.0303575604448645, + 1, "m", "Total indirect", 0.718158601973748, 0.0841114022531834, + 0.3609208696044))