Description Usage Arguments Value Examples
Compute density function of a shifted distribution
1 |
dist |
character string indicating the distribution name. It can be set as:
|
numeric vector of the density function of a specified distribution
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Binomial distribution
db <- dshift("binom")
zero_shift <- db(x = c(1,2,3,4,5), size = 6, prob = 0.5, shift = 0)
zero_shift
one_shift <- db(x = c(1,2,3,4,5), size = 6, prob = 0.5, shift = 1)
one_shift
two_shift <- db(x = c(1,2,3,4,5), size = 6, prob = 0.5, shift = 2)
two_shift
# Normal Distribution
dn <- dshift("norm")
zero_shift <- dn(x = c(1,2,3,4,5), mean = 2, sd = 1, shift = 0)
zero_shift
one_shift <- dn(x = c(1,2,3,4,5), mean = 2, sd = 1, shift = 1)
one_shift
two_shift <- dn(x = c(1,2,3,4,5), mean = 2, sd = 1, shift = 2)
two_shift
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.