tbeta: Truncated beta distribution functions

Description Usage Arguments Value Examples

Description

pdf, cdf, inverse cdf, and random deviates of the truncated beta distribution.

Usage

1
2
3
4
5
6
7
rtbeta(n, alpha, beta, a = 0, b = 1)

dtbeta(x, alpha, beta, a = 0, b = 1)

ptbeta(q, alpha, beta, a = 0, b = 1)

qtbeta(p, alpha, beta, a = 0, b = 1)

Arguments

n

number of observations. If length(n) > 1, the length is taken to be the number required.

alpha

vector of alpha parameters.

beta

vector of beta parameters.

a

vector of lower truncation limits

b

vector of upper truncation limits

x, q

vector of quantiles.

p

vector of probabilities.

Value

dtbeta gives the density, ptbeta gives the distribution function, qtbeta gives the quantile function, and rtbeta generates random deviates.

Examples

1
2
3
4
5
6
7
8
9
set.seed(1976)
rtbeta(10, 3, 4, 0.2, 0.8)
dtbeta(0.5, 3, 4, 0.2, 0.7)
qtbeta(0.1, 3, 4, 0.2, 0.9)
ptbeta(0.3, 3, 4, 0.2, 0.9)
rtbeta(5, 1, 2, a=0.5, b=0.9)
dtbeta(seq(0, 1, by=0.1), 1, 2, a=0.5, b=0.9)
ptbeta(seq(0, 1, by=0.1), 1, 2, a=0.5, b=0.9)
qtbeta(seq(0, 1, by=0.1), 1, 2, a=0.5, b=0.9)

bertcarnell/truncateddist documentation built on May 11, 2021, 11:07 a.m.