View source: R/plot_functions.R
plot_inner_stats | R Documentation |
Plot Optimal Transport based inner statistics for each partition using
ggplot2
package. If provided, it plots also the uncertainty estimates.
plot_inner_stats(x, ranking = NULL, wb_all = FALSE, ...)
x |
An object generated by |
ranking |
An integer with absolute value less or equal than the number
of inputs. If positive, select the first |
wb_all |
(default |
... |
Further arguments passed to or from other methods. |
A patchwork
object that, if called, will print.
N <- 1000
mx <- c(1, 1, 1)
Sigmax <- matrix(data = c(1, 0.5, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 1), nrow = 3)
x1 <- rnorm(N)
x2 <- rnorm(N)
x3 <- rnorm(N)
x <- cbind(x1, x2, x3)
x <- mx + x %*% chol(Sigmax)
A <- matrix(data = c(4, -2, 1, 2, 5, -1), nrow = 2, byrow = TRUE)
y <- t(A %*% t(x))
x <- data.frame(x)
M <- 25
# Get sensitivity indices
sensitivity_indices <- ot_indices(x, y, M)
plot_inner_stats(sensitivity_indices)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.