sc_contain_steps | R Documentation |
Extracts from a SCC model, if certain steps are part of the mechanism of sufficient causes. If you want a list of all steps, ignore argument
steps
.
sc_contain_steps(scc, steps = NULL, output = c("nice", "table"))
scc |
An object of class |
steps |
A character vector containing step IDs. IF NULL (default), provides a list of all steps. |
output |
A single element of type character, either "nice" (default) or "table". If "table", returns a list (or data.frame if steps = NULL). If "nice", a nicely formated output is printed in the console. |
Either a list (output
= "table") with length equal to the number of sufficient causes and each element being a named vector of
TRUE/FALSE with the variables in steps
as names and TRUE indicating that the step appears in the corresponding sufficient cause, or a nicely
formated output in the console (output
= "nice"). If steps = NULL and output = "table", returns a data.frame, which contains variables
id_step
and desc_step
from the epicmodel_steplist_checked
data.frame step
.
# Create some SCC model
steplist_checked <- check_steplist(steplist_rain)
scc_model <- create_scc(steplist_checked)
# Check if one or more steps are part of the mechanism for each sufficient cause
sc_contain_steps(scc_model, c("THENa1","THENa5"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.