R/lastbin.R

`lastbin` <-
function(p,bw=.2,trunc=TRUE){
    p=p[!is.na(p)]
    if(trunc)max(min(1,mean(p>=1-bw)/bw),0) else mean(p>=1-bw)/bw
}

Try the pi0 package in your browser

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

pi0 documentation built on July 9, 2017, 9:01 a.m.