R/mmf.r

Defines functions mmf

Documented in mmf

mmf <- function(ob, max.pr){

# 0.999999 could have one more 9 (or add 1e-06) but then it would probably be too close
 
  sob   <- sign(ob)
  ob    <- abs(ob)

  res <- ifelse(ob > max.pr, max.pr, ob) 
  res <- res*sob

  res
      
}

Try the GJRM package in your browser

Any scripts or data that you put into this service are public.

GJRM documentation built on May 29, 2024, 6:34 a.m.