Note that some famous non-standard
distributions (Tweedie, SHASHo, COM-Pois, Cauchy) are already
implemented in RTMB; check the distributions listed here.
bccg(mu, sigma, nu):
Box-Cox Cole and Green distribution parameterised by location
mu, scale sigma, and skewness
nu
bcpe(mu, sigma, nu, tau):
Box-Cox power exponential distribution parameterised by location
mu, scale sigma, nu, and
tau
bct(mu, sigma, nu, tau):
Box-Cox t-distribution parameterised by location mu, scale
sigma, skewness nu, and degrees of freedom
tau
betaprime(shape1, shape2):
Beta prime distribution parameterised in terms of shape1
and shape2 of the corresponding Beta distribution
beta2(mu, phi): Beta
distribution reparameterised by mean mu and precision
phi
bisa(scale, shape):
Birnbaum-Saunders (fatigue life) distribution parameterised by scale
scale (equal to the median) and shape
shape
card(mu, rho):
Cardioid distribution parameterised by mean direction mu
and concentration rho
exgauss(mu, sigma, lambda):
Exponentially modified Gaussian distribution parameterised by location
mu, scale sigma, and rate
lambda
foldnorm(mu, sigma):
Folded normal distribution parameterised by location mu and
scale sigma
frechet(mu, sigma, alpha):
Frechet distribution parameterised by location mu, scale
sigma, and shape alpha
gamma2(mean, sd): Gamma
distribution reparameterised by mean and standard deviation
gb2(scale, shape1, shape2, shape3):
Generalised beta distribution of the second kind parameterised by scale
scale and shapes shape1, shape2
and shape3
dagum(scale, shape1, shape2):
Dagum distribution, the GB2 with shape3 = 1
sinmad(scale, shape1, shape3):
Singh-Maddala (Burr XII) distribution, the GB2 with
shape2 = 1
lomax(scale, shape3):
Lomax (Pareto II) distribution, the GB2 with
shape1 = shape2 = 1
gengamma(mu, sigma, nu):
Generalised gamma distribution parameterised by location
mu, scale sigma, and skewness
nu
gev(mu, sigma, xi):
Generalised extreme value distribution parameterised by location
mu, scale sigma, and shape
xi
gpd(mu, sigma, xi):
Generalised Pareto distribution parameterised by threshold
mu, scale sigma, and shape
xi
gompertz(eta, b):
Gompertz distribution parameterised by shape eta and rate
b
gumbel(location, scale):
Gumbel distribution parameterised by location and
scale
halfcauchy(sigma):
Half-Cauchy distribution parameterised by scale sigma, a
standard weakly informative prior for hierarchical standard
deviations
halft(df, sigma): Half-t
distribution parameterised by degrees of freedom df and
scale sigma
invchisq(df, scale):
Inverse Chi-squared distribution parameterised by degrees of freedom
df and optional scale
invgamma(shape, rate, scale):
Inverse gamma distribution parameterised by shape and
either rate or scale of the corresponding
gamma distribution
invgauss(mean, shape):
Inverse Gaussian distribution parameterised by mean and shape
jsu(mu, sigma, nu, tau):
Johnson SU distribution parameterised by location mu, scale
sigma, skewness nu, and kurtosis
tau
jsu2(mu, sigma, nu, tau):
Johnson SU distribution reparameterised by mean mu,
standard deviation sigma, skewness nu, and
kurtosis tau
kumar(a, b):
Kumaraswamy distribution parameterised by shape parameters
a and b
laplace(mu, b):
Laplace distribution parameterised by location mu and scale
b
llogis(alpha, beta):
Log-logistic distribution parameterised by scale alpha
(equal to the median) and shape beta
oibeta(shape1, shape2, oneprob):
One-inflated beta distribution parameterised by shape parameters
shape1, shape2 and one-probability
oneprob
oibeta2(mu, phi, oneprob):
One-inflated beta distribution reparameterised by mean mu,
precision phi, and one-probability
oneprob
pareto(mu):
Pareto distribution parameterised by mu
powerexp(mu, sigma, nu):
Power exponential distribution parameterised by mean mu,
standard deviation sigma and shape nu
powerexp2(mu, sigma, nu):
Power exponential distribution reparameterised by location
mu, scale sigma and shape
nu
pgweibull(scale, shape, powershape):
Power generalised Weibull distribution parameterised by
scale, shape and
powershape
skewnorm(xi, omega, alpha):
Skew normal distribution parameterised by location xi,
scale omega and skewness alpha
skewnorm2(mean, sd, alpha):
Skew normal distribution reparameterised by mean, standard deviation and
skewness alpha
skewt(mu, sigma, skew, df):
Skew t-distribution parameterised by location mu, scale
sigma, skewness skew and degrees of freedom
df
skewt2(mean, sd, skew, df):
Skew t-distribution reparameterised by mean, standard deviation,
skewness skew and degrees of freedom
df
truncnorm(mean, sd, min, max):
Truncated normal distribution parameterised by mean, standard deviation,
lower bound min and upper bound max
trunct(df, min, max):
Truncated t-distribution parameterised by degrees of freedom
df, lower bound min and upper bound
max
trunct2(df, mu, sigma, min, max):
Truncated t-distribution parameterised location mu, scale
sigma, degrees of freedom df, lower bound
min and upper bound max
t2(mu, sigma, df):
Non-central and scaled t-distribution parameterised by location
mu, scale sigma and degrees of freedom
df
vm(mu, kappa):
Von Mises distribution parameterised by mean direction mu
and concentration kappa
wrpcauchy(mu, rho):
Wrapped Cauchy distribution parameterised by mean direction
mu and concentration rho
wrpnorm(mu, sigma):
Wrapped normal distribution parameterised by mean direction
mu and standard deviation sigma of the
unwrapped normal
zibeta(shape1, shape2, zeroprob):
Zero-inflated beta distribution parameterised by shape parameters
shape1, shape2 and zero-probability
zeroprob
zibeta2(mu, phi, zeroprob):
Zero-inflated beta distribution reparameterised by mean mu,
precision phi, and zero-probability
zeroprob
zigamma(shape, scale, zeroprob):
Zero-inflated gamma distribution parameterised by shape, scale, and
zero-probability zeroprob
zigamma2(mean, sd, zeroprob):
Zero-inflated gamma distribution reparameterised by mean, standard
deviation, and zero-probability zeroprob
ziinvgauss(mean, shape, zeroprob):
Zero-inflated inverse Gaussian distribution parameterised by mean,
shape, and zero-probability zeroprob
zilnorm(meanlog, sdlog, zeroprob):
Zero-inflated log normal distribution parameterised by meanlog, sdlog,
and zero-probability zeroprob
ziweibull(shape, scale, zeroprob):
Zero-inflated Weibull distribution parameterised by shape, scale, and
zero-probability zeroprob
zoibeta(shape1, shape2, zeroprob, oneprob):
Zero- and one-inflated beta distribution parameterised by shape
parameters shape1, shape2, zero-probability
zeroprob and one-probability oneprob
zoibeta2(mu, phi, zeroprob, oneprob):
Zero- and one-inflated beta distribution reparameterised by mean
mu, precision phi, zero-probability
zeroprob and one-probability oneprob
bell(theta):
Bell distribution for overdispersed counts, parameterised by
theta
bell2(mu):
Bell distribution reparameterised by mean mu
betabinom(size, shape1, shape2):
Beta-binomial distribution parameterised by size size,
shape parameters shape1 and shape2
bnbinom(size, shape1, shape2):
Beta-negative binomial distribution parameterised by size
and the shape parameters shape1 and shape2 of
the beta prior
bnbinom2(mu, sigma, nu):
Beta-negative binomial distribution reparameterised by mean
mu and dispersion parameters sigma and
nu
waring(mu, sigma):
Waring (beta-geometric) distribution parameterised by mean
mu and dispersion sigma
yules(shape):
Yule-Simon distribution parameterised by shape, supported
on the positive integers
combinom(size, prob, nu):
Conway-Maxwell-binomial distribution parameterised by size
size, success probability prob and dispersion
nu
genpois(lambda, phi):
Generalised Poisson distribution parameterised by mean
lambda and dispersion phi
nbinom2(mu, size):
Negative binomial distribution reparameterised by mean mu
and size size
pig(mu, sigma):
Poisson-inverse Gaussian distribution parameterised by mean
mu and dispersion sigma
sichel(mu, sigma, nu):
Sichel distribution parameterised by mean mu, dispersion
sigma and shape nu
skellam(mu1, mu2):
Skellam distribution parameterised by Poisson means mu1 and
mu2
zibinom(size, prob, zeroprob):
Zero-inflated binomial distribution parameterised by size
size, success probability prob and
zero-probability zeroprob
zinbinom(size, prob, zeroprob):
Zero-inflated negative binomial distribution parameterised by size
size, success probability prob and
zero-probability zeroprob
zinbinom2(mu, size, zeroprob):
Zero-inflated negative binomial distribution reparameterised by mean
mu, size size and zero-probability
zeroprob
hbetabinom(size, shape1, shape2, zeroprob):
Hurdle (zero-altered) beta-binomial distribution
hbinom(size, prob, zeroprob):
Hurdle (zero-altered) binomial distribution parameterised by
size, prob and the probability of a zero
zeroprob
hnbinom(size, prob, zeroprob):
Hurdle (zero-altered) negative binomial distribution parameterised by
size, prob and the probability of a zero
zeroprob
hnbinom2(mu, size, zeroprob):
Hurdle (zero-altered) negative binomial distribution reparameterised by
the untruncated mean mu, size and the
probability of a zero zeroprob
hgeom(prob, zeroprob):
Hurdle (zero-altered) geometric distribution
hpois(lambda, zeroprob):
Hurdle (zero-altered) Poisson distribution parameterised by the Poisson
mean lambda and the probability of a zero
zeroprob
zibetabinom(size, shape1, shape2, zeroprob):
Zero-inflated beta-binomial distribution
geom.ad(prob):
AD-compatible geometric density and distribution function
(dgeom.ad(), pgeom.ad()); stats’
own dgeom()/pgeom() are left
untouched
zigeom(prob, zeroprob):
Zero-inflated geometric distribution
zipois(lambda, zeroprob):
Zero-inflated Poisson distribution parameterised by rate
lambda and zero-probability zeroprob
ztbetabinom(size, shape1, shape2):
Zero-truncated beta-binomial distribution
ztgeom(prob):
Zero-truncated geometric distribution
ztbinom(size, prob):
Zero-truncated binomial distribution parameterised by size
size and success probability prob
ztnbinom(size, prob):
Zero-truncated negative binomial distribution parameterised by size
size and success probability prob
ztnbinom2(mu, size):
Zero-truncated negative binomial distribution reparameterised by mean
mu and size size
ztpois(lambda):
Zero-truncated Poisson distribution parameterised by rate
lambda
dirichlet(alpha):
Dirichlet distribution parameterised by concentration parameter vector
alpha
dirmult(size, alpha):
Dirichlet-multinomial distribution parameterised by size
and concentration parameters alpha
mvt(mu, Sigma, df):
Multivariate t-distribution parameterised by location mu,
scale matrix Sigma and degrees of freedom
df
vmf(mu, kappa):
Multivariate von Mises-Fisher distribution parameterised by unit mean
vector mu and concentration kappa
vmf2(theta):
Multivariate von Mises-Fisher distribution parameterised by parameter
theta equal to unit mean vector mu times
concentration scalar kappa
wishart(nu, Sigma):
Wishart distribution parameterised by degrees of freedom nu
and scale matrix Sigma
Bivariate copulas can be implemented in a modular way using the dcopula function
together with one of the copula constructors below. Available copula
constructors are:
cgaussian(rho)
(Gaussian copula)cclayton(theta)
(Clayton copula)cgumbel(theta)
(Gumbel copula)cfrank(theta)
(Frank copula)For a circular and a linear margin, such as turning angles and step
lengths, there are two circular-linear copula constructors. The circular
margin has to be the first one in dcopula.
cjw(g, ...)
(Johnson-Wehrly copula with circular binding density g,
e.g. dvm, dwrpcauchy or dwrpnorm)cfold(copula)
(folds one of the copulas above into a circular-linear copula that is
symmetric in the sign of the angle)For bivariate copulas with discrete margins, use the ddcopula function
instead. In this case, instead of copula densities, copula
CDFs are needed. The available constructors for this are:
Multivariate copulas are also possible using the dmvcopula function
together with one of the multivariate copula constructors below.
Currently, only the multivariate Gaussian copula is implemented in two
ways:
cmvgauss(R)
(multivariate Gaussian copula parameterised by a correlation
matrix)cgmrf(Q)
(multivariate Gaussian copula parameterised by an inverse correlation
matrix)