plot_sca_test: Plot the null distribution of a joint-inference test
Description
`plot_sca_test()` visualises the output of [sca_test()]. For each test
statistic it draws the permutation null distribution with the observed value
marked and the permutation p-value annotated, making it easy to see how
extreme the observed specification curve is relative to the sharp null.
Usage
plot_sca_test(test_result, type = "histogram", title = "")
Value
A ggplot object with one facet per test statistic.
Arguments
test_result
An object of class `"sca_test"` returned by [sca_test()].
type
A string, `"histogram"` (default) or `"density"`, selecting how
the null distribution is drawn.
title
A string used as the plot title. Defaults to `""`.