Gompertz: The Gompertz distribution

Description Usage Arguments Details Value References See Also Examples

Description

Density, distribution function, quantile function and random generation for the Gompertz distribution with shape parameter alpha and scale parameter theta.

Usage

1
2
3
4
dgompertz(x, alpha, theta, log = FALSE)
pgompertz(q, alpha, theta, lower.tail = TRUE, log.p = FALSE)
qgompertz(p, alpha, theta, lower.tail = TRUE, log.p = FALSE)
rgompertz(n, alpha, theta)

Arguments

x,q

vector of quantiles.

p

vector of probabilities.

n

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

alpha

shape parameter.

theta

scale parameter.

log, log.p

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

lower.tail

logical; if TRUE (default), probabilities are P[X ≤ x] otherwise, P[X > x].

Details

The Gompertz distribution has density

f(x) = θ exp(α x) exp{θ/α (1 - exp{α x})}; x ≥ 0, θ > 0, -∞ < α < ∞.

where α and θ are the shape and scale parameters, respectively.

Value

dgompertz gives the density, pgompertz gives the distribution function, qgompertz gives the quantile function, and rgompertz generates random deviates.

References

Marshall, A. W., Olkin, I. (2007). Life Distributions: Structure of Nonparametric, Semiparametric, and Parametric Families, Springer, New York.

See Also

.Random.seed about random number; sgompertz for Gompertz survival / hazard etc. functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Load data sets
data(sys2)
## Maximum Likelihood(ML) Estimates of alpha & theta for the data(sys2)
## Estimates of alpha & theta using 'maxLik' package
## alpha.est = 0.00121307, theta.est = 0.00173329

dgompertz(sys2, 0.00121307, 0.00173329, log = FALSE)
pgompertz(sys2, 0.00121307, 0.00173329, lower.tail = TRUE, log.p = FALSE)
qgompertz(0.25, 0.00121307, 0.00173329, lower.tail=TRUE, log.p = FALSE)
rgompertz(30, 0.00121307, 0.00173329)

Example output

 [1] 0.0017289345 0.0017264843 0.0017239091 0.0017186857 0.0017086777
 [6] 0.0017062175 0.0016992678 0.0016931606 0.0016919506 0.0016901850
[11] 0.0016889647 0.0016754016 0.0016702826 0.0016571732 0.0016492381
[16] 0.0016266446 0.0016250049 0.0016216236 0.0016142719 0.0016047844
[21] 0.0015992317 0.0015700464 0.0015641630 0.0015595488 0.0015540110
[26] 0.0015466267 0.0015427729 0.0015376912 0.0015303217 0.0015215752
[31] 0.0015175903 0.0014986231 0.0014864225 0.0014832296 0.0014585805
[36] 0.0014336050 0.0014288907 0.0014149489 0.0014049886 0.0013615286
[41] 0.0013614449 0.0013589496 0.0013415140 0.0012995685 0.0012915474
[46] 0.0012816476 0.0012618906 0.0012541227 0.0012375525 0.0011562416
[51] 0.0011430259 0.0011396681 0.0011120125 0.0010978478 0.0010384541
[56] 0.0009983958 0.0009816251 0.0009429687 0.0009148921 0.0009043086
[61] 0.0008950401 0.0008838356 0.0008505120 0.0008489153 0.0007959379
[66] 0.0007919856 0.0007575520 0.0007485713 0.0007214914 0.0006445096
[71] 0.0006198986 0.0006023651 0.0005118117 0.0004878971 0.0004381570
[76] 0.0003990359 0.0003691146 0.0003236295 0.0003146511 0.0002910925
[81] 0.0002467356 0.0002353815 0.0002328765 0.0002209159 0.0002112707
[86] 0.0001761204
 [1] 0.008292057 0.012887769 0.017666569 0.027202602 0.044922361 0.049173909
 [7] 0.060974003 0.071100457 0.073080747 0.075955564 0.077932367 0.099363913
[13] 0.107209569 0.126742146 0.138198945 0.169452597 0.171647461 0.176144046
[19] 0.185787067 0.197971300 0.204972095 0.240312170 0.247160437 0.252470757
[25] 0.258775730 0.267069971 0.271348794 0.276939847 0.284947393 0.294301508
[31] 0.298510757 0.318116616 0.330370344 0.333533026 0.357362551 0.380515295
[37] 0.384780419 0.397208123 0.405921773 0.442442979 0.442511053 0.444537748
[43] 0.458499322 0.490735905 0.496695486 0.503964786 0.518196065 0.523693564
[49] 0.535242574 0.588656977 0.596865391 0.598931230 0.615650186 0.624014534
[55] 0.657705416 0.679245319 0.687997018 0.707598989 0.721356394 0.726441055
[61] 0.730849456 0.736123815 0.751463875 0.752186132 0.775508689 0.777199827
[67] 0.791656462 0.795346453 0.806276035 0.835785332 0.844749575 0.851001290
[73] 0.881556856 0.889153967 0.904338680 0.915703424 0.924054750 0.936185098
[79] 0.938498775 0.944442348 0.955127305 0.957754532 0.958328144 0.961036877
[85] 0.963184611 0.970728640
[1] 151.2168
 [1] 1035.67838  328.12155  453.27268  226.07411  821.56856  372.32670
 [7]  200.38196  772.63824  528.23641  802.95440  280.43928   56.26914
[13]  267.32123  852.51577  732.16918  212.68035  190.39219  610.50594
[19]   68.82952  622.37481  277.66247  773.01848  782.38086 1029.03440
[25]  264.18027   60.82824  129.98098  253.13899  214.43922  299.24723

reliaR documentation built on May 1, 2019, 9:51 p.m.

Related to Gompertz in reliaR...