Learn R Programming

mistral (version 1.1-1)

MRM: MRM method

Description

Calculate failure probability by MRM method.

Usage

MRM(f, ndim, choice.law, dir.monot, N.calls, Method, ordre.p = 0, silent = TRUE)

Arguments

f
the failure fonction
ndim
dimension of the inputs
choice.law
a list of length ndim which contain name of input distribution and their parameters. For the input i, choice.law[[i]] = list(name_law,c(parameters1,..., parametersN) )
dir.monot
vector of size ndim which represent the monotonicity of the failure function. dir.monot[i] = -1 (resp. 1) if the code is decreasing (resp. increasing) in direction i.
N.calls
Number of calls to f allowed
Method
there are two methods available. "MC_monotone"" is an adapation of the Monte Carlo method under constraints of monotony. "MRM" is a sequential sampling method.
ordre.p
order of magnitude of the search probability (for ndim >= 3)
silent
if silent = TRUE, print curent number of call to f. Default: FALSE.

Value

  • UmExact lower bounds of the failure probability
  • UMExact upper bounds of the failure probability
  • MLEMaximum likelihood estimator of the failure probability
  • IC.infLower bound of the confidence interval of the failure probability based on MLE
  • IC.supUpper bound of the confidence interval of the failure probability based on MLE
  • CV.MLECoefficient of variation of the MLE
  • N.totTotal number of simulation (just for "MC_monotone")

Details

These methods compute the probability that the output of the failure function is negative ordre.p is useful to compute the bounds in dimension >= 3, its computation is a santard Monte Carlo method. For dimension 2, there is an exat computation without sampling.

References

Bousquet, N. (2012) Accelerated monte carlo estimation of exceedance probabilities under monotonicity constraints. Annales de la Faculte des Sciences de Toulouse. XXI(3), 557-592.

Examples

Run this code
choice.law <- list()
 choice.law[[1]] <- list("norm",c(4,1))
 choice.law[[2]] <- list("norm",c(0,1))

 ndim <- 2
 dir.monot <- c(1, -1)
 N.calls <- 80

  f <- function(Input){
    return(Input[1] - Input[2])
  }
  
  res.MRM <- MRM(f, ndim, choice.law, dir.monot, N.calls, Method = "MRM",
                  ordre.p = 0, silent = FALSE)

  N <- 1:dim(res.MRM)[1]
  
  plot(N, res.MRM[, 1],
        col = "blue", lwd=2, type='l', ylim=c(0,1e-2),
        xlab="Number of call to the failure function",
        ylab="")
  lines(N, res.MRM[, 2], col = "blue", lwd = 2)
  lines(N, res.MRM[, 3], col = "red", lwd = 2)
  lines(N, res.MRM[, 4], col = "orange", lwd = 2, lty = 2)
  lines(N, res.MRM[, 5], col = "orange", lwd = 2, lty = 2)
  legend("topright",
          c("Exact Bounds", "MLE", "Confidence interval"), 
          col = c("blue", "red", "orange"),
          text.col = c("blue", "red", "orange"),
          lty = c(1, 1, 2),
          merge = TRUE)


  #It can be long:
  res.MC_monotone <- MRM(f, ndim, choice.law, dir.monot, N.calls, Method = "MC_monotone",
                          ordre.p = 0, silent = FALSE)

Run the code above in your browser using DataLab