sgamma: The Gamma Distribution

Description Usage Arguments Value See Also Examples

View source: R/gamma.R

Description

Descriptive statistics for the Gamma distribution with parameters shape and rate.

Usage

1
2
sgamma(shape, rate = 1, statistic = c("all", "mean", "median", "sd",
  "var", "skew", "kurt"))

Arguments

shape

shape parameter. Must be positive

rate

rate parameter. Must be positive

statistic

desired descriptive statistic

Value

named numeric vector

See Also

GammaDist

https://en.wikipedia.org/wiki/Gamma_distribution

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
curve(dgamma(x, 1, 1/2), xlim = c(0, 20))
sgamma(1, 1/2)

curve(dgamma(x, 2, 1/2), xlim = c(0, 20))
sgamma(2, 1/2)

curve(dgamma(x, 3, 1/2), xlim = c(0, 20))
sgamma(3, 1/2)

curve(dgamma(x, 5, 1), xlim = c(0, 20))
sgamma(5, 1)

curve(dgamma(x, 9, 2), xlim = c(0, 20))
sgamma(9, 2)

curve(dgamma(x, 7.5, 1), xlim = c(0, 20))
sgamma(7.5, 1)

curve(dgamma(x, 0.5, 1), xlim = c(0, 20))
sgamma(0.5, 1)

schuelkem/sdist documentation built on Nov. 5, 2019, 8:45 a.m.