R/bhadjustment.r

Defines functions bh.adjust

Documented in bh.adjust

bh.adjust=function(sorted,m,m0,constant=1){
  adjusted=rep(NA,m)
  temp.min=sorted[m]
  min.ind=rep(0,m)    
  for (i in m:1) {
      temp= min(m0*sorted[i]*constant / i,1)
      if  ( temp <= temp.min  ) {
      temp.min = temp
      min.ind[i]=1
      }
     adjusted[i]=temp.min
     }
  return(adjusted)
}
    

Try the mcp.project package in your browser

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

mcp.project documentation built on May 2, 2019, 4:52 p.m.