Skip to content

Commit

Permalink
Add additional hardcoded models, except for 19, 20, 69, 71, 73
Browse files Browse the repository at this point in the history
  • Loading branch information
ThijsVroegh authored and maltelueken committed Sep 19, 2023
1 parent 1c5db5b commit 7f57f57
Showing 1 changed file with 266 additions and 1 deletion.
267 changes: 266 additions & 1 deletion R/HardCodedModels.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

.HardCodedModels <- function(number) {

## TODO: Models involving moderated moderation 3,11,12,13,18,19,20,68,69,70,71,72,73
## TODO: Models involving moderated moderation 19,20,69,71,73
## TODO: Models involving flexible amount of mediators 6,80,81

if (number == 1) {
Expand Down Expand Up @@ -237,6 +237,71 @@
)
}

if (number == 12) {
processRelationships <- list(
list(
processDependent = "Y",
processIndependent = "X",
processType = "mediators",
processVariable = "M"
),
list(
processDependent = "M",
processIndependent = "X",
processType = "moderators",
processVariable = "W"
),
list(
processDependent = "Y",
processIndependent = "X",
processType = "moderators",
processVariable = "W"
),
list(
processDependent = "M",
processIndependent = "W",
processType = "moderators",
processVariable = "Z"
),
list(
processDependent = "Y",
processIndependent = "W",
processType = "moderators",
processVariable = "Z"
)
)
}

if (number == 13) {
processRelationships <- list(
list(
processDependent = "Y",
processIndependent = "X",
processType = "mediators",
processVariable = "M"
),
list(
processDependent = "M",
processIndependent = "X",
processType = "moderators",
processVariable = "W"
),
list(
processDependent = "Y",
processIndependent = "X",
processType = "moderators",
processVariable = "W"
),
list(
processDependent = "M",
processIndependent = "W",
processType = "moderators",
processVariable = "Z"
)
)
}


if (number == 14) {
processRelationships <- list(
list(
Expand Down Expand Up @@ -358,6 +423,72 @@
)
}

# Enable once multiple moderated moderation is working
#
# if (number == 19) {
# processRelationships <- list(
# list(
# processDependent = "Y",
# processIndependent = "X",
# processType = "mediators",
# processVariable = "M"
# ),
# list(
# processDependent = "Y",
# processIndependent = "M",
# processType = "moderators",
# processVariable = "W"
# ),
# list(
# processDependent = "Y",
# processIndependent = "X",
# processType = "moderators",
# processVariable = "W"
# ),
# list(
# processDependent = "Y",
# processIndependent = "W",
# processType = "moderators",
# processVariable = "Z"
# )#,
# # list(
# # processDependent = "Y",
# # processIndependent = "W",
# # processType = "moderators",
# # processVariable = "Z"
# # )
# )
# }
#
# if (number == 20) {
# processRelationships <- list(
# list(
# processDependent = "Y",
# processIndependent = "X",
# processType = "mediators",
# processVariable = "M"
# ),
# list(
# processDependent = "Y",
# processIndependent = "M",
# processType = "moderators",
# processVariable = "W"
# ),
# list(
# processDependent = "Y",
# processIndependent = "X",
# processType = "moderators",
# processVariable = "W"
# ),
# list(
# processDependent = "Y",
# processIndependent = "W",
# processType = "moderators",
# processVariable = "Z"
# )
# )
# }

if (number == 21) {
processRelationships <- list(
list(
Expand Down Expand Up @@ -806,6 +937,140 @@
)
}

if (number == 68) {
processRelationships <- list(
list(
processDependent = "Y",
processIndependent = "X",
processType = "mediators",
processVariable = "M"
),
list(
processDependent = "M",
processIndependent = "X",
processType = "moderators",
processVariable = "W"
),
list(
processDependent = "Y",
processIndependent = "M",
processType = "moderators",
processVariable = "W"
),
list(
processDependent = "M",
processIndependent = "W",
processType = "moderators",
processVariable = "Z"
)
)
}

# if (number == 69) {
# processRelationships <- list(
# list(
# processDependent = "Y",
# processIndependent = "X",
# processType = "mediators",
# processVariable = "M"
# ),
# list(
# processDependent = "M",
# processIndependent = "X",
# processType = "moderators",
# processVariable = "W"
# ),
# list(
# processDependent = "Y",
# processIndependent = "M",
# processType = "moderators",
# processVariable = "W"
# ),
# list(
# processDependent = "Y",
# processIndependent = "X",
# processType = "moderators",
# processVariable = "W"
# ),
# list(
# processDependent = "M",
# processIndependent = "W",
# processType = "moderators",
# processVariable = "Z"
# ),
# list(
# processDependent = "Y",
# processIndependent = "W",
# processType = "moderators",
# processVariable = "Z"
# )
# )
# }

if (number == 70) {
processRelationships <- list(
list(
processDependent = "Y",
processIndependent = "X",
processType = "mediators",
processVariable = "M"
),
list(
processDependent = "M",
processIndependent = "X",
processType = "moderators",
processVariable = "W"
),
list(
processDependent = "Y",
processIndependent = "M",
processType = "moderators",
processVariable = "W"
),
list(
processDependent = "Y",
processIndependent = "W",
processType = "moderators",
processVariable = "Z"
)
)
}

if (number == 72) {
processRelationships <- list(
list(
processDependent = "Y",
processIndependent = "X",
processType = "mediators",
processVariable = "M"
),
list(
processDependent = "M",
processIndependent = "X",
processType = "moderators",
processVariable = "W"
),
list(
processDependent = "Y",
processIndependent = "M",
processType = "moderators",
processVariable = "W"
),
list(
processDependent = "Y",
processIndependent = "W",
processType = "moderators",
processVariable = "Z"
),
list(
processDependent = "M",
processIndependent = "W",
processType = "moderators",
processVariable = "Z"
)
)
}

if (number == 75) {
processRelationships <- list(
list(
Expand Down

0 comments on commit 7f57f57

Please sign in to comment.