Description Usage Arguments Details Value
Density, distribution function, quantile function, and random number generation for the arrival/renewal times in a stationary gamma renewal process with parameters alpha and beta.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | dsga(x, num = 1, alpha = 1, beta = alpha, log = FALSE)
psga(x, num = 1, alpha = 1, beta = alpha, lower.tail = TRUE, log.p = FALSE)
qsga(
p,
num = 1,
alpha = 1,
beta = alpha,
lower.tail = TRUE,
log.p = FALSE,
tol = .Machine$double.eps^0.25,
max.steps = 1000
)
rsga(n, num = 1, alpha = 1, beta = alpha)
dglel(x, alpha = 1, beta = alpha, log = FALSE)
pglel(x, alpha = 1, beta = alpha, lower.tail = TRUE, log.p = FALSE)
qglel(
p,
alpha = 1,
beta = alpha,
lower.tail = TRUE,
log.p = FALSE,
tol = .Machine$double.eps^0.25,
max.steps = 1000
)
rglel(n, alpha = 1, beta = alpha)
|
x, q |
vector of quantiles |
num |
vector of positive integers for the number of the arrival in sequence. 1 is first, 2 is second, and so on. |
alpha |
vector of (positive) shape parameters |
beta |
vector of (positive) rate parameters. By default, beta = alpha so that inter-arrival times have mean 1. |
log, log.p |
logical; if TRUE, probabilities p are given as log(p) |
lower.tail |
logical; if TRUE, probabilities are P[X <= x], otherwise P[X > x] |
p |
vector of probabilities |
tol |
the tolerance for calculating quantiles |
max.steps |
the maximum number of steps used to compute the quantiles |
n |
number of random values to return |
The stationary gamma renewal process is defined as follows: the first renewal time is distributed according to the limiting excess life distribution in a gamma renewal process. The times between all subsequent renewal times are independently distributed gamma(alpha, beta).
These functions define the distribution of these arrival or renewal times, the first of which is the limiting excess life distribution.
The 'glel' functions are shorthand for the 'sga' functions with num = 1.
dsga and dglel give the (log) density, psga and plel give the (log) distribution function, qsga and qlel give the quantile function, and rsga and rlel generate random times.
Invalid alpha or beta will result in return value NaN.
The length of the result is determined by n for rsga and rlel, and the length of the longest numeric argument for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
The returned values by qsga and qlel are approximate, but are guaranteed to be within tol of the true value. A bisection search is used, so computation time increases with -log(1/tol). If max.steps is reached, the current estimate is returned with a warning.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.