plot_effect {cacc}R Documentation

Density Plot for the Main Effect

Description

Plots an annotated boxplot and kernel density estimate to visualize the distribution of the main effect that a specific value of a variable produces on the outcome probability in a cacc_matrix.

Usage

plot_effect(cacc_matrix, iv, value)

Arguments

cacc_matrix

A tibble. The output of the cacc function.

iv

A single variable name contained in a cacc_matrix.

value

A single numeric or character value the iv specified can take.

Value

Returns a ggplot object.

References

Hart, T. C., Rennison, C. M., & Miethe, T. D. (2017). Identifying Patterns of Situational Clustering and Contextual Variability in Criminological Data: An Overview of Conjunctive Analysis of Case Configurations. Journal of Contemporary Criminal Justice, 33(2), 112–120. https://doi.org/10.1177/1043986216689746

Examples

plot_effect(
  cacc_matrix = cacc(onharassment, ivs = sex:privacy, dv = rep_victim),
  iv = age,
  value = "15-17"
)

[Package cacc version 0.1.0 Index]