R/truncquant.R

Defines functions truncquant

truncquant <- function(prop,q=0.9){
  qmax <- stats::quantile(prop,q)
  qmin <- stats::quantile(prop,1-q)
  prop[prop >= qmax] <- qmax
  prop[prop<=qmin] <- qmin
  return(prop)
}

Try the CERFIT package in your browser

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

CERFIT documentation built on June 1, 2022, 5:07 p.m.