Learn R Programming

CharFun: The Characteristic Functions Package

R repository of characteristic functions and tools for their combinations and numerical inversion.

For the R version of the package see the CharFun package development available at

For current status of the MATLAB toolbox (not an identical clone) see the CharFunTool development available at

About

The Characteristic Functions Package (CharFun) consists of a set of algorithms for evaluating selected characteristic funcions and algorithms for numerical inversion of the (combined and/or compound) characteristic functions, used to evaluate the probability density function (PDF) and the cumulative distribution function (CDF).

The package includes inversion algorithm, including those based on simple trapezoidal rule for computing the integrals defined by the Gil-Pelaez formulae, and/or by using the FFT algorithm for computing the Fourier transform integrals.

Installation and requirements

CharFun was developed with R version 3.3.1 (2016-06-21).

To install, you can either clone the directory with Git or download a .zip file or install package from R CRAN-repository.

Option 1: Download .zip file

Download a .zip of CharFun from

After unzipping, you will need open CharFun.Rproj.

Option 2: Clone with Git

To clone the CharFun repository, first navigate in a terminal to where you want the repository cloned, then type

git clone https://github.com/simkova/CharFun.git

and you will need open CharFun.Rproj.

Option 3: Install package

You can download package from

in installe packages in R-studio you chose Package Archive File (.tar.gz).

Getting started

We recommend taking a look at the Examples collection.

To get a taste of what computing with CharFun is like, type

   cf <- function(t) exp(-t^2/2)  # the standard normal characteristic function (CF)
   result <- cf2DistGP(cf)   # Invert the CF to get the CDF and PDF   

License

See LICENSE for CharFun licensing information.

Copy Link

Version

Install

install.packages('CharFun')

Monthly Downloads

10

Version

0.1.0

License

MIT + file LICENSE

Maintainer

c4<bd>udmila

Last Published

May 26th, 2017

Functions in CharFun (0.1.0)

cfN_Geometric

Characteristic function of Geometric distribution
cfN_Logarithmic

Characteristic function of Logarithmic distribution
cfN_Delaporte

Characteristic function of Delaporte distribution
cfN_GeneralizedPoisson

Characteristic function of Generalized Poisson distribution
cfN_NegativeBinomial

Characteristic function of Negative-Binomial distribution
cfN_Poisson

Characteristic function of Poisson distribution
cf2DistGP

Evaluating CDF/PDF/QF from CF of a continous distribution F by using the Gil-Pelaez inversion formulae.
cfC_vonMises

Characteristic function of von Mises distribution
cfE_Empirical

Characteristic function of Empirical distribution
cfN_Binomial

Characteristic function of Binomial distribution
cfS_Rectangular

Characteristic function of Rectangular distribution
cfS_StudentT

Characteristic function of Student's t-distribution
cfX_Rectangular

Characteristic function of Rectangular distribution
cfX_Triangular

Characteristic function of Triangular distribution
cfN_PolyaEggenberger

Characteristic function of Polya-Eggenberger
cfS_Arcsine

Characteristic function of symmetric zero-mean Arcsine distribution
hypergeom1F1

Confluent hypergeometric function
cfX_Beta

Characteristic function of Beta distribution
cfX_ChiSquared

Characteristic function of Noncentral Chi-Squared distribution
cfX_Normal

Characteristic function of Normal distribution
cfX_PearsonV

Characteristic function of Pearson type V distribution
interpBarycentric

Barycentric Interpolation
cfX_InverseGamma

Characteristic function of Inverse Gamma distribution
cfX_LogNormal

Characteristic function of Lognormal distribution
cfS_Beta

Characteristic function of Beta distribution
cfS_Gaussian

Characteristic function of Normal distribution N(0,1)
cfX_Exponential

Characteristic function of Exponential distribution
cfX_Gamma

Characteristic function of Gamma distribution
cfS_Trapezoidal

Characteristic function of Trapezoidal distribution
cfS_Triangular

Characteristic function of Triangular distribution
plotGraf

Plot Graf f(x)
plotPolar

Title