Learn R Programming

speccurvieR (version 1.0.0)

plot_influence: Plots how each control influences the independent variable's coefficient.

Description

plot_influence() shows, for every control variable, the distribution of the independent variable's coefficient across the specifications that include versus exclude that control. It makes clear which modelling choices move the estimate, and by how much.

Usage

plot_influence(sca_data, title = "")

Value

A ggplot object with one facet per control comparing the coefficient when that control is excluded versus included.

Arguments

sca_data

A data frame returned by `sca()`.

title

A string to use as the plot title. Defaults to `""`.

Examples

Run this code
plot_influence(sca(y = "Salnty", x = "T_degC",
                  controls = c("ChlorA", "O2Sat", "NO2uM"),
                  data = bottles, progress_bar = FALSE));

Run the code above in your browser using DataLab