R/cumDistFun.R

Defines functions cumDistFun

cumDistFun = function(X, x, px){
  Px = cumsum(px)
  r = rep(0, length(X))
  r[X >= max(x)] = 1
  i = X >= min(x) & X < max(x)
  j = sapply(X[i], function(y)max(which(x <= y)))
  r[i] = Px[j]
  return(r)
}

Try the Bolstad package in your browser

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

Bolstad documentation built on Jan. 8, 2021, 2:03 a.m.