Learn R Programming

simIReff (version 1.0)

eff: Effectiveness Distributions

Description

Density, distribution function, quantile function and random generation for an effectiveness distribution.

Usage

deff(x, .eff)

peff(q, .eff)

qeff(p, .eff)

reff(n, .eff)

Arguments

x, q

vector of quantiles.

.eff

the eff object representing the effectiveness distribution.

p

vector of probabilities.

n

number of observations.

Value

deff gives the density, peff gives the distribution function, qeff gives the quantile function, and reff generates random variates.

See Also

effCont for continuous distributions, and effDisc for discrete distributions.

Examples

Run this code
# 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