Distributions {dwp} | R Documentation |
Probability Distributions for Carcasses Versus Distance from Turbine
Description
PDFs and CDFs that are required by ddd
, pdd
and
qdd
but are not included among the standard R distributions. Relying on
custom code and included here are the Maxwell-Boltzmann (pmb
and
dmb
), xep0 (Pareto), xep1, xepi0 (inverse gamma), xep2 (Rayleigh),
xep02, xep12, xep012, xep123, and xep0123. Not included here are the
distributions that can be calculated using standard probability functions from
base R, namely the exponential, truncated normal, lognormal, gamma (xep01), and
chisquared distributions and the inverse gaussian, which is calculated using
statmod::dinvgauss
and statmod::dinvgauss
. The functions are
designed for vector x
or q
and scalar parameters.
Usage
dmb(x, a)
pmb(q, a)
dxep1(x, b1)
pxep1(q, b1)
pxep02(q, b0, b2)
dxep02(x, b0, b2)
dxep12(x, b1, b2)
pxep12(x, b1, b2)
dxep123(x, b1, b2, b3, const = NULL)
pxep123(x, b1, b2, b3, const = NULL)
dxepi0(x, shape, scale)
pxepi0(x, shape, scale)
dxep0123(x, b0, b1, b2, b3, const = NULL)
pxep0123(x, b0, b1, b2, b3, const = NULL)
dxep012(x, b0, b1, b2, const = NULL)
pxep012(x, b0, b1, b2, const = NULL)
dxep2(x, s2)
pxep2(x, s2)
dxep0(x, a)
pxep0(x, a)
Arguments
x , q |
vector of distances |
a , b0 , b1 , b2 , b3 , shape , scale , s2 |
parameters used in the respective distributions. |
const |
(optional) scalar normalizing constant for distributions that are
numerically integrated using |
Details
An xep distribution is calculated by dividing its kernel (for the
densities) or the integral of its kernel (for the cumulative distributions)
by the normalizing constant, which is the integral of the kernel from 0 to Inf.
The kernel of an xep distribution is defined as x e^{P(x)}
,
where P(x)
is a polynomial with terms defined by the suffix on xep. For
example, the kernel of xep12 would be x e^{b_1*x + b_2*x^2}
. A 0
in the suffix indicates a log(X)
term and an i
indicates a 1/x
term. The parameters of the xep
distributions are some combination of b_0, b_1, b_2, b_3
. The parameterizations of the
inverse gamma (xepi0), Rayleigh (xep2), and Pareto (xep0) follow the standard
conventions of shape
and scale
for the inverse gamma, s2
=
s^2
for the Rayleigh, and a
= a
for the Pareto (with
a scale or location parameter of 1 and PDF = a/x^(x + 1)
with support (1, Inf).
The Maxwell-Boltzmann is a one-parameter family with parameter a
and PDF
f(a) = \sqrt{2/\pi}\frac{x^2 e^{-x^2/(2a^2)}}{a^3}
. The kernel is
f(a) = x^2 e^{-x^2}
, which has a simple closed-form
integral that involves the error function (pracma::erf
).
Value
vector of probability densities or cumulative probabilities