scc_cause_sets | R Documentation |
Extracting component causes by sufficient cause from an epicmodel_scc
object.
scc_cause_sets(
scc,
output = c("id", "desc", "desc_no_start", "all"),
depends = TRUE,
unknown = FALSE
)
scc |
An object of class |
output |
A single element of type character, which determines the type of output. Options are "id", "desc", "desc_no_start", and "all". See returns-part below for description. |
depends |
TRUE (default) or FALSE. If FALSE, only includes sufficient causes with sc_status "always". |
unknown |
TRUE or FALSE (default). If TRUE, unknown causes are added to the SCC model: every sufficient cause gets an additional individual unknown component cause representing additional unknown components; an unknown sufficient cause is added to the model consisting of a single unknown component cause and representing all unknown sufficient causes. |
A named list but its content depends on parameter "output". The names correspond to the component cause set IDs, i.e., cc[[:digit:]]+
.
id: Returns a named list of character vectors. Each vector contains the step IDs of its component causes.
desc: Returns a named list of character vectors. Each vector contains the step descriptions of its component causes.
desc_no_start: Returns a named list of character vectors. Each vector contains the step descriptions of its component causes, but with the "Start: " in the beginning removed.
all: A named list of the three lists above. The names correspond to the corresponding option for parameter "output".
# Create some SCC model
steplist_checked <- check_steplist(steplist_rain)
scc_model <- create_scc(steplist_checked)
# Get sets of component causes that form the sufficient causes
scc_cause_sets(scc_model, output = "all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.