plot.mediation.test | R Documentation |
function
s mediation_test_minimax
and mediation_test_Bayes
with the rejection region.Plots the output of function
s mediation_test_minimax
and mediation_test_Bayes
with the rejection region.
## S3 method for class 'mediation.test'
plot(
x,
filename = NULL,
return_fig = FALSE,
xlim = c(-4, 4),
ylim = c(-4, 4),
...
)
x |
An output of |
filename |
Either |
return_fig |
A |
xlim , ylim |
Two |
... |
Not used. |
Nothing unless 'return_fig' is set to 'TRUE', in which case the function returns the 'ggplot2' object.
n <- 10
x <- MASS::mvrnorm(n, mu = c(0, 0), Sigma = diag(c(1, 1)))
delta <- matrix(stats::runif(2 * n, min = -3, max = 3), ncol = 2)
epsilon <- stats::rbinom(n, 1, 1/2)
delta <- delta * cbind(epsilon, 1 - epsilon)
x <- x + delta
(mt <- mediation_test_minimax(x, alpha = 1/20))
plot(mt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.