## ----------------------------------------------------------------------------- # give the function a name that will not conflict with others in the namespace punif.ord <- function(q,theta,j,n) { sum(choose(n,j:n)*(q/theta)^(j:n)*(1-q/theta)^(n-j:n)) } ## ----------------------------------------------------------------------------- require(cdfinv) cdfinv("unif.ord","theta",0.45,bound="upper",lpb=0.45,j=10,n=16)