estimate_failure_probability: Estimate Failure Probability from Simulator Outputs

View source: R/failure_probability.R

estimate_failure_probabilityR Documentation

Estimate Failure Probability from Simulator Outputs

Description

Convenient helper to compute the reliability-related probabilities described in Lebrun et al. (2021). The failure domain is controlled by a threshold and an inequality direction.

Usage

estimate_failure_probability(response, threshold, less = TRUE, weights = NULL)

Arguments

response

Numeric vector of simulator evaluations.

threshold

Numeric scalar defining the failure boundary.

less

Logical, failure is defined as response <= threshold when TRUE and response >= threshold otherwise.

weights

Optional numeric vector of non-negative weights. The vector is normalised internally when supplied.

Value

A list containing the estimated probability and its variance.

Examples

y <- rnorm(1000)
estimate_failure_probability(y, threshold = -1)

Sobol4R documentation built on Dec. 2, 2025, 5:06 p.m.