dtruncbeta | R Documentation |
Calculates the PDF for a given truncated distribution
dtruncbeta(y, shape1, shape2, eta, a = 0, b = 1, ...)
dtruncbinom(y, size, prob, eta, a = 0, b = attr(y, "parameters")$size, ...)
dtruncchisq(y, df, eta, a = 0, b = Inf, ...)
dtrunccontbern(y, lambda, eta, a = 0, b = 1, ...)
dtrunccontbern(y, lambda, eta, a = 0, b = 1, ...)
dtrunc(y, ...)
dtruncexp(y, rate = 1, eta, a = 0, b = Inf, ...)
dtruncgamma(y, shape, rate = 1, scale = 1/rate, eta, a = 0, b = Inf, ...)
dtruncinvgamma(y, shape, rate = 1, scale = 1/rate, eta, a = 0, b = Inf, ...)
dtruncinvgauss(y, m, s, eta, a = 0, b = Inf, ...)
dtrunclnorm(y, meanlog = 0, sdlog = 1, eta, a = 0, b = Inf, ...)
## S3 method for class 'trunc_nbinom'
dtrunc(y, size, prob, eta, a = 0, b = Inf, ...)
dtruncnbinom(y, size, prob, eta, a = 0, b = Inf, ...)
dtruncnbinom(y, size, prob, eta, a = 0, b = Inf, ...)
dtruncnorm(y, mean = 0, sd = 1, eta, a = -Inf, b = Inf, ...)
dtruncpois(y, lambda, eta, a = 0, b = Inf, ...)
y |
output from rtrunc or any valid numeric value(s). |
shape1 |
positive shape parameter alpha |
shape2 |
positive shape parameter beta |
eta |
vector of natural parameters |
a |
point of left truncation. For discrete distributions, |
b |
point of right truncation |
... |
size |
size |
target for number of successful trials, or dispersion parameter (the shape parameter of the gamma mixing distribution). Must be strictly positive, need not be integer. |
prob |
probability of success on each trial |
df |
degrees of freedom for "parent" distribution |
lambda |
mean and var of "parent" distribution |
rate |
inverse gamma rate parameter |
shape |
inverse gamma shape parameter |
scale |
inverse gamma scale parameter |
m |
vector of means |
s |
vector of dispersion parameters |
meanlog |
mean of untruncated distribution |
sdlog |
standard deviation of untruncated distribution |
mean |
mean of parent distribution |
sd |
standard deviation is parent distribution |
The density of y
for the given values of the eta
parameter.
Either the common or the natural parameters must be provided.
# Using the output of rtrunc
y <- rtrunc(50, mean = 5, sd = 2)
dtrunc(y, eta = c(0, -1))
# Directly-inputting values
dtruncnorm(y = c(5, 0, -10), eta = c(0, -0.05))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.