File: imr.Rl_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 (10 lines) | stat: -rw-r--r-- 262 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
imr.Rl_Mgiven <- function(M, L0, N=30, qm=30) {
  M0 <- qnorm( 1-1/(2*L0) )
  if ( M > M0 ) {
    zero <- function(x) imr.arl(M, 3*M, 0, 1, vsided="two", Rl=x, N=N, qm=qm) - L0
    Rl <- uniroot(zero, c(1e-6, 1), tol=1e-9)$root
  } else {
    Rl <- 0
  }
  Rl
}