CharFunc: Characteristic functions

Description Usage Arguments Details Value Beta distribution Binomial distribution Cauchy Distribution Chi-square Distribution Exponential Distribution F Distribution Gamma Distribution Geometric Distribution Hypergeometric Distribution Logistic Distribution Lognormal Distribution Negative Binomial Distribution Normal Distribution Poisson Distribution Wilcoxon Sign Rank Distribution Student's t Distribution Continuous Uniform Distribution Weibull Distribution Wilcoxon Rank Sum Distribution Author(s) Source References See Also

Description

The characteristic functions for selected probability distributions supported by R. All base distributions are included, with the exception of wilcox and signedrank. For more resources please see the References, and for complete details and formulas see the charfunc vignette, which can be accessed by vignette("charfunc") at the command prompt. Only the simplest formulas are listed below.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
cfbeta(t, shape1, shape2, ncp = 0)
cfbinom(t, size, prob)
cfcauchy(t, location = 0, scale = 1)
cfchisq(t, df, ncp = 0)
cfexp(t, rate = 1)
cff(t, df1, df2, ncp, kmax = 10)
cfgamma(t, shape, rate = 1, scale = 1/rate)
cfgeom(t, prob)
cfhyper(t, m, n, k)
cflnorm(t, meanlog = 0, sdlog = 1)
cflogis(t, location = 0, scale = 1)
cfnbinom(t, size, prob, mu)
cfnorm(t, mean = 0, sd = 1)
cfpois(t, lambda)
cfsignrank(t, n)
cft(t, df, ncp)
cfunif(t, min=0, max=1)
cfweibull(t, shape, scale = 1)
cfwilcox(t, m, n)

Arguments

t

numeric value. Some of the above are vectorized functions.

df

degrees of freedom (> 0, maybe non-integer)

df1, df2

degrees of freedom (> 0, maybe non-integer)

k

the number of balls drawn from the urn.

kmax

upper limit of summation.

lambda

vector of (positive) means.

location, scale

location and scale parameters; scale must be positive.

m

the number of white balls in the urn.

meanlog, sdlog

mean and standard deviation of the distribution on the log scale with default values of 0 and 1 respectively.

mean

vector of means.

min, max

(unif) lower and upper limits of the distribution. Must be finite and in the correct order.

mu

(nbinom) alternative parametrization via mean

n

the number of black balls in the urn.

ncp

non-centrality parameter δ

prob

probability of success in each trial.

rate

an alternative way to specify the scale; must be positive.

sd

vector of standard deviations.

shape

shape parameter, must be positive (gamma, weibull)

shape1, shape2

shape parameters (beta).

size

number of trials (binom) or target for number of successful trials (nbinom).

Details

The characteristic function φ of a random variable X is defined by

phi(t) = E e^(-itX)

for all -∞ < t < ∞.

Every random variable has a characteristic function, and every characteristic function uniquely determines the distribution of its associated random variable. For more details on characteristic functions and their properties, see Lukacs (1970).

Value

a complex number in rectangular (cartesian) coordinates.

Beta distribution

For the probability density function, see dbeta.

The characteristic function for central Beta is given by

phi(t) = _{1}F_{1}(shape1; shape1 + shape2, it)

where F is the confluent hypergeometric function calculated with kummerM in the fAsianOptions package.

As of the time of this writing, we must calculate the characteristic function of the noncentral Beta with numerical integration according to the definition.

Binomial distribution

For the probability mass function, see dbinom.

The characteristic function is given by

phi(t) = [pe^(it) + (1-p)]^n

Cauchy Distribution

For the probability density function, see dcauchy.

The characteristic function is given by

phi(t) = e^(i*t*theta - sigma*|t|)

Chi-square Distribution

For the probability density function, see dchisq.

The characteristic function is given by

phi(t) = \frac{\exp(\frac{iδ t}{1 - 2it})}{(1 - 2it)^{df/2}}

Exponential Distribution

For the probability density function, see dexp.

This is the special case of gamma when α = 1.

F Distribution

For the probability density function, see df.

For the central F we use confluent hypergeometric function of the second kind, also known as kummerU, from the fAsianOptions package.

For noncentral F we use confluent hypergeometric function of the first kind. See the vignette for details.

Gamma Distribution

For the probability density function, see dgamma.

The characteristic function is given by

phi(t) = (1 - beta*i*t)^(-alpha)

Geometric Distribution

For the probability mass function, see dgeom.

This is the special case of negative binomial when r = 1.

Hypergeometric Distribution

For the probability mass function, see dhyper.

The formula for the characteristic function is based on the Gaussian hypergeometric series, calculated with hypergeo in package hypergeo. It is too complicated to be included here; please see the vignette.

Logistic Distribution

For the probability density function, see dlogis.

The characteristic function is given by

phi(t) = π t \cosech π t

Lognormal Distribution

For the probability density function, see dlnorm.

This characteristic function is uniquely complicated and delicate, but there is a recent numerical algorithm for computation due to Beaulieu (2008). See the vignette and the References.

Negative Binomial Distribution

For the probability mass function, see dnbinom.

The characteristic function is given by

phi(t) = [p/(1-(1-p)*e^(it))]^r

Normal Distribution

For the probability density function, see dnorm.

The characteristic function is

phi(t) = e^(i*mu*t + t^2 * sigma^2 /2)

Poisson Distribution

For the probability mass function, see dpois.

The characteristic function is

phi(t) = e^(lambda*(e^it - 1))

Wilcoxon Sign Rank Distribution

For the probability density function, see dsignrank.

The characteristic function is calculated according to the definition.

Student's t Distribution

For the probability density function, see dt.

See the vignette for a formula for the characteristic function for central t.

As of the time of this writing, we must calculate the characteristic function of the noncentral t with numerical integration according to the definition.

Continuous Uniform Distribution

For the probability density function, see dunif.

The characteristic function is

phi(t) = \frac{e^(itb) - e^(ita)}{(b - a)it}

Weibull Distribution

For the probability density function, see dweibull.

We must at the time of this writing calculate the characteristic function with numerical integration according to the definition.

Wilcoxon Rank Sum Distribution

For the probability density function, see dwilcox.

The characteristic function is calculated according to the definition.

Author(s)

G. Jay Kerns gkerns@ysu.edu.

Source

For clnorm a fast numerical algorithm is used that originated with and was published and communicated to me by N. C. Beaulieu: see

References

Abramowitz, M. and Stegun, I. A. (1972) Handbook of Mathematical Functions. New York: Dover.

Beaulieu, N.C. (2008) Fast convenient numerical computation of lognormal characteristic functions, IEEE Transactions on Communications, Volume 56, Issue 3, 331–333.

Hurst, S. (1995) The Characteristic Function of the Student-t Distribution, Financial Mathematics Research Report No. FMRR006-95, Statistics Research Report No. SRR044-95.

Johnson, N. L., Kotz, S., and Kemp, A. W. (1992) Univariate Discrete Distributions, Second Edition. New York: Wiley.

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995) Continuous Univariate Distributions, volume 1. New York: Wiley.

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995) Continuous Univariate Distributions, volume 2. New York: Wiley.

Lukacs, E. (1970) Characteristic Functions, Second Edition. London: Griffin.

See Also

besselK kummerM kummerU hypergeo


prob documentation built on May 2, 2019, 12:20 p.m.