dshift: Compute density function of a shifted distribution

Description Usage Arguments Value Examples

Description

Compute density function of a shifted distribution

Usage

1

Arguments

dist

character string indicating the distribution name. It can be set as:

  • beta Beta Distribution

  • binom Binomial Distribution

  • cauchy Cauchy Distribution

  • chisq Chi-Square Distribution

  • exp Exponential Distribution

  • f F Distribution

  • gamma Gamma Distribution

  • geom Geometric Distribution

  • hyper Hypergeometric Distribution

  • logis Logistic Distribution

  • lnorm Log Normal Distribution

  • nbinom Negative Binomial Distribution

  • norm Normal Distribution

  • pois Poisson Distribution

  • t Student t Distribution

  • unif Uniform Distribution

  • weibull Weibull Distribution

  • wilcox Wilcoxon Rank Sum Statistic Distribution

  • signrank Wilcoxon Signed Rank Statistic Distribution

Value

numeric vector of the density function of a specified distribution

Examples

 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

veronicagiro/qshift documentation built on May 3, 2019, 6:10 p.m.