ddist: Reparametrized Distributions

ddistR Documentation

Reparametrized Distributions

Description

Density function and random numbers generation for models with support on the positive real line.

Usage

d.betap(x, mu, varphi, log = FALSE)

r.betap(n, mu, varphi)

d.F(x, mu, varphi, log = FALSE)

r.F(n, mu, varphi)

d.gamma(x, mu, varphi, log = FALSE)

r.gamma(n, mu, varphi)

d.invGauss(x, mu, varphi, log = FALSE)

r.invGauss(n, mu, varphi)

d.logLogis(x, mu, varphi, log = FALSE)

r.logLogis(n, mu, varphi)

d.logNorm(x, mu, varphi, log = FALSE)

r.logNorm(n, mu, varphi)

d.chi(x, mu, log = FALSE, ...)

r.chi(n, mu, ...)

d.ray(x, mu, log = FALSE, ...)

r.ray(n, mu, ...)

Arguments

x

vector of real values

mu

non-negative parameter (the distribution's mean. See ‘Details’)

varphi

non-negative parameter

log

logical; if TRUE, probabilities p are given as log(p).

n

sample size

...

for compatibility with other functions

Details

  • For the reparametrized Beta-Prime distribution, the functions dbetapr and rbetapr are imported from the extraDistr package. The following holds

    shape1 = mu*varphi

    shape2 = varphi + 1

    scale = 1

  • For the reparametrized F distribution, the functions df and rf are imported from stats. The following holds

    df1 = varphi

    df2 = 2*mu/(mu - 1)

    so that the parameter \mu must satisfy \mu > 1.

  • For the reparametrized Gamma distribution, the functions dgamma and rgamma are imported from stats. The following holds

    shape = varphi

    rate = varphi/mu

  • For the reparametrized Inverse Gaussian distribution, the functions dinvGauss and rinvGauss are imported from the SuppDists package. The following holds

    nu = mu

    lambda = 1/varphi

  • For the reparametrized Log-logistic distribution, the functions dllogis and rllogis a are imported from the actuar package. The following holds

    shape = varphi

    rate = (pi/varphi)/(mu*sin(pi/varphi))

  • For the reparametrized Log-Normal distribution, the functions dlnorm and rlnorm are imported from stats. The following holds

    meanlog = log(mu) - varphi^2/2

    sdlog = varphi

  • For the reparametrized Chi-squared F distribution, the functions dchisq and rchisq are imported from stats. The following holds

    df = mu

  • For the reparametrized Rayleigh distribution, the functions drayleigh and rrayleigh are imported from extraDistr package. The following holds

    sigma = mu/sqrt(pi/2)

Value

For any avaliable dist, ddist gives the density and rdist generates random deviates.

The length of the result is determined by n for rdist, and is the maximum of the lengths of the numerical arguments for rdist.

The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.


PTSR documentation built on June 8, 2025, 11:11 a.m.

Related to ddist in PTSR...