R/buscar.R

buscar <-
function (x, lambda, lambdacum) 
{
    posNHi <- sum(lambdacum <= x) 
    if (posNHi>0)    posNH<-(posNHi+(x-lambdacum[posNHi])/lambda[posNHi+1])
    else posNH<-x/lambda[posNHi+1]
	
    return(posNH)
}

Try the IndTestPP package in your browser

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

IndTestPP documentation built on Aug. 29, 2020, 1:06 a.m.