plot_scatter: Scatter plots of the model output against the model inputs.

View source: R/plot_sobol.R

plot_scatterR Documentation

Scatter plots of the model output against the model inputs.

Description

It creates scatter plots of the model output against the model inputs.

Usage

plot_scatter(data, N, Y, params, method = "point", size = 0.7, alpha = 0.2)

Arguments

data

The matrix created with sobol_matrices.

N

Positive integer, the initial sample size of the base sample matrix created with sobol_matrices.

Y

A numeric vector with the model output obtained from the matrix created with sobol_matrices.

params

Character vector with the name of the model inputs.

method

The type of plot. If method = "point" (the default), each simulation is a point. If method = "bin", bins are used to aggregate simulations.

size

Number between 0 and 1, argument of geom_point(). Default is 0.7.

alpha

Number between 0 and 1, transparency scale of geom_point(). Default is 0.2.

Value

A ggplot2 object.

Examples

# Define settings
N <- 1000; params <- paste("X", 1:3, sep = ""); R <- 10

# Create sample matrix
mat <- sobol_matrices(N = N, params = params)

# Compute Ishigami function
Y <- ishigami_Fun(mat)

# Plot scatter
plot_scatter(data = mat, Y = Y, N = N, params = params)

sensobol documentation built on May 29, 2024, 10:05 a.m.