| ddist {PTSR} | R 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 |
n |
sample size |
... |
for compatibility with other functions |
Details
For the reparametrized Beta-Prime distribution, the functions dbetapr and rbetapr are imported from the package
extraDistr. The following holdsshape1 = mu*varphishape2 = varphi + 1scale = 1
For the reparametrized F distribution, the functions df and rf are imported from
stats. The following holdsdf1 = varphidf2 = 2*mu/(mu - 1)so that the parameter
\mumust satisfy\mu > 1.
For the reparametrized Gamma distribution, the functions dgamma and rgamma are imported from
stats. The following holdsshape = varphirate = varphi/mu
For the reparametrized Inverse Gaussian distribution, the functions dinvGauss and rinvGauss are imported from
SuppDists. The following holdsnu = mulambda = 1/varphi
For the reparametrized Log-logistic distribution, the functions dllogis and rllogis a are imported from
actuar. The following holdsshape = varphirate = (pi/varphi)/(mu*sin(pi/varphi))
For the reparametrized Log-Normal distribution, the functions dlnorm and rlnorm are imported from
stats. The following holdsmeanlog = log(mu) - varphi^2/2sdlog = varphi
For the reparametrized Chi-squared F distribution, the functions dchisq and rchisq are imported from
stats. The following holdsdf = mu
For the reparametrized Rayleigh distribution, the functions drayleigh and rrayleigh are imported from
extraDistr. The following holdssigma = 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.