effect_size {epicmodel}R Documentation

Determine standardized effect size of component causes

Description

SCC models teach us that effect strength, e.g., a risk ratio, is no natural constant but depends on the prevalence of component causes and, therefore, differs between populations. However, even without any population, this function derives effect sizes for every component cause by comparing how many sets of component causes with and without a certain cause are sufficient to cause the outcome of interest.

Usage

effect_size(scc, depends = TRUE, output = c("nice", "table"))

Arguments

scc

An object of class epicmodel_scc.

depends

TRUE (default) or FALSE. If FALSE, only includes sufficient causes with suffciency status "always".

output

A single element of type character, either "nice" (default) or "table". If "table", returns a data.frame. If "nice", a nicely formated output is printed in the console.

Details

The following algorithm is used to derive effect sizes from SCC models:

Value

Either a dataframe (output = "table") with one row for every component cause and with variables id (step ID), desc (step description), suff_true, suff_false, num_combos_true, num_combos_false, and ratio, or a nicely formated output in the console (output = "nice"). See Details for more information.

Examples

# Create some SCC model
steplist_checked <- check_steplist(steplist_rain)
scc_model <- create_scc(steplist_checked)

# Use the SCC model in effect_size()
effect_size(scc_model)

[Package epicmodel version 0.1.1 Index]