create_scc {epicmodel}R Documentation

Creating SCC models

Description

Creates a sufficient-components cause (SCC) model from a steplist, which is a list of IF/THEN statements describing the causal mechanism behind an outcome of interest. The steplist needs to meet certain structural requirements. Therefore, for steplist creation, use the Steplist Creator shiny app launched by launch_steplist_creator().

Usage

create_scc(steplist)

Arguments

steplist

An object of class epicmodel_steplist_checked.

Details

The following algorithm is used to create a sufficient-component cause (SCC) model from a steplist.

Value

An object of class epicmodel_scc. If no sufficient causes are found, no object is returned but instead a corresponding message is displayed in the console.

References

Rothman KJ (1976): Causes. American Journal of Epidemiology 104 (6): 587–592.

See Also

Examples

# First, create a steplist in the shiny app
# Launch the app with launch_steplist_creator()
# Then load your steplist using readRDS()
# In this example we use the built-in steplist_rain

# Check the steplist before running create_scc()
steplist_checked <- check_steplist(steplist_rain)

# Use the checked steplist in create_scc()
scc_model <- create_scc(steplist_checked)

[Package epicmodel version 0.1.1 Index]