shape1, shape2, shape3 and
scale.
dtrbeta(x, shape1, shape2, shape3, rate = 1, scale = 1/rate, log = FALSE)
ptrbeta(q, shape1, shape2, shape3, rate = 1, scale = 1/rate, lower.tail = TRUE, log.p = FALSE)
qtrbeta(p, shape1, shape2, shape3, rate = 1, scale = 1/rate, lower.tail = TRUE, log.p = FALSE)
rtrbeta(n, shape1, shape2, shape3, rate = 1, scale = 1/rate)
mtrbeta(order, shape1, shape2, shape3, rate = 1, scale = 1/rate)
levtrbeta(limit, shape1, shape2, shape3, rate = 1, scale = 1/rate, order = 1)length(n) > 1, the length is
taken to be the number required.TRUE, probabilities/densities
$p$ are returned as $log(p)$.TRUE (default), probabilities are
$P[X <= x]$,="" otherwise,="" $p[x=""> x]$.=>dtrbeta gives the density,
ptrbeta gives the distribution function,
qtrbeta gives the quantile function,
rtrbeta generates random deviates,
mtrbeta gives the $k$th raw moment, and
levtrbeta gives the $k$th moment of the limited loss
variable.Invalid arguments will result in return value NaN, with a warning.
shape1 $= a$, shape2 $= b$, shape3
$= c$ and scale $= s$, has
density:
$$f(x) = \frac{\Gamma(\alpha + \tau)}{\Gamma(\alpha)\Gamma(\tau)}
\frac{\gamma (x/\theta)^{\gamma \tau}}{%
x [1 + (x/\theta)^\gamma]^{\alpha + \tau}}$$
for $x > 0$, $a > 0$, $b > 0$,
$c > 0$ and $s > 0$.
(Here $Gamma(a)$ is the function implemented
by R's gamma() and defined in its help.)The transformed beta is the distribution of the random variable $$\theta \left(\frac{X}{1 - X}\right)^{1/\gamma},$$ where $X$ has a beta distribution with parameters $c$ and $a$.
The transformed beta distribution defines a family of distributions with the following special cases:
shape3 == 1;
shape1
== shape3 == 1;
shape3 == 1 and shape2 == shape1;
shape2 == 1;
shape2 ==
shape3 == 1;
shape1 == 1;
shape2 == shape1 == 1;
shape1 == 1 and shape3 == shape2.
The $k$th raw moment of the random variable $X$ is $E[X^k]$, $-shape3 * shape2 < k < shape1 * shape2$.
The $k$th limited moment at some limit $d$ is $E[min(X, d)^k]$, $k > -shape3 * shape2$ and $shape1 - k/shape2$ not a negative integer.
Klugman, S. A., Panjer, H. H. and Willmot, G. E. (2012), Loss Models, From Data to Decisions, Fourth Edition, Wiley.
exp(dtrbeta(2, 2, 3, 4, 5, log = TRUE))
p <- (1:10)/10
ptrbeta(qtrbeta(p, 2, 3, 4, 5), 2, 3, 4, 5)
qpearson6(0.3, 2, 3, 4, 5, lower.tail = FALSE)
## variance
mtrbeta(2, 2, 3, 4, 5) - mtrbeta(1, 2, 3, 4, 5)^2
## case with shape1 - order/shape2 > 0
levtrbeta(10, 2, 3, 4, scale = 1, order = 2)
## case with shape1 - order/shape2 < 0
levtrbeta(10, 1/3, 0.75, 4, scale = 0.5, order = 2)
Run the code above in your browser using DataLab