File: imr.Ru_Mgiven.R

package info (click to toggle)
r-cran-spc 1%3A0.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,888 kB
  • sloc: ansic: 22,279; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 242 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11

imr.Ru_Mgiven <- function(M, L0, N=30, qm=30) {
  M0 <- qnorm( 1-1/(2*L0) )
  if ( M > M0 ) {
    zero <- function(x) imr.arl(M, x, 0, 1, N=N, qm=qm) - L0
    Ru <- uniroot(zero, c(M0, 10), tol=1e-9)$root
  } else {
    Ru <- Inf
  }
  Ru
}