R/dbpareto2.R

dbpareto2 <-
function(x, prob, scale, shape) 
{
    if (length(prob) == 1) 
        prob <- rep(prob, length(x))
    if (length(scale) == 1) 
        scale <- rep(scale, length(x))
    if (length(shape) == 1) 
        shape <- rep(shape, length(x))
    d <- 1 - prob
    d[x > 0] <- prob[x > 0] * dpareto2(x[x > 0], scale = scale[x > 
        0], shape = shape[x > 0])
    d
}

Try the CaDENCE package in your browser

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

CaDENCE documentation built on May 2, 2019, 6:05 a.m.