Density, distribution function, quantile function and random generation for an effectiveness distribution.
deff(x, .eff)peff(q, .eff)
qeff(p, .eff)
reff(n, .eff)
vector of quantiles.
the eff
object representing the effectiveness distribution.
vector of probabilities.
number of observations.
deff
gives the density, peff
gives the distribution function, qeff
gives the quantile function, and reff
generates random variates.
effCont
for continuous distributions, and effDisc
for
discrete distributions.
# NOT RUN {
# sample distribution from AP scores
e <- effCont_beta(web2010ap[,1])
# pdf integrates to 1
integrate(deff, lower = 0, upper = 1, .eff = e)
# qeff (quantile) is the inverse of peff (cumulative)
qeff(peff(.2, e), e)
# random generation of 100 scores
r <- reff(100, e)
# }
Run the code above in your browser using DataLab