Type: | Package |
Title: | Evaluates the Empirical Characteristic Function for Multivariate Samples |
Version: | 1.0.1 |
Description: | Evaluates the empirical characteristic function of univariate and multivariate samples. This package uses 'RcppArmadillo' for fast evaluation. It is also possible to export the code to be used in other packages at 'C++' level. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
LinkingTo: | Rcpp, RcppArmadillo |
Imports: | Rcpp |
Suggests: | testthat (≥ 2.1.0), spelling, covr |
Language: | en-US |
URL: | https://github.com/gbasulto/empichar |
BugReports: | https://github.com/gbasulto/empichar/issues |
NeedsCompilation: | yes |
Packaged: | 2023-12-08 19:57:15 UTC; basulto |
Author: | Guillermo Basulto-Elias [aut, cre] |
Maintainer: | Guillermo Basulto-Elias <guillermobasulto@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2023-12-08 20:50:02 UTC |
Empirical characteristic function
Description
Empirical characteristic function of a d-dimensional random variable. This function is evaluated at m vectors of size d.
Usage
ecf(t, smp)
Arguments
t |
m x d matrix where the function will be evaluated. |
smp |
n x d matrix with sample size if size n. |
Details
This function must receive matrices or vectors. It is a wrapper function that allows more general inputs.
Value
A complex vector of size m with the empirical characteristic function.
Examples
library(empichar)
t <- seq(-10, 10, 0.05)
X <- rnorm(150, mean = 1)
vals <- ecf(t, X)
plot(t, Re(vals), type = "l", main = "real part")
plot(t, Im(vals), type = "l", main = "imaginary part")
Imaginary part of empirical characteristic function
Description
Imaginary part of empirical characteristic function of a d-dimensional random variable. This function is evaluated at m vectors of size d.
Usage
ecf_imag(t, smp)
Arguments
t |
m x d matrix where the function will be evaluated. |
smp |
n x d matrix with sample size if size n. |
Details
This function must receive matrices or vectors. It is a wrapper function that allows more general inputs.
Value
A vector of size m with the imaginary part of the empirical characteristic function.
Examples
library(empichar)
t <- seq(-10, 10, 0.05)
X <- rnorm(150, mean = 1)
vals <- ecf_imag(t, X)
plot(t, vals, type = "l")
Modulus of empirical characteristic function
Description
Modulus of empirical characteristic function of a d-dimensional random variable. This function is evaluated at m vectors of size d.
Usage
ecf_mod(t, smp)
Arguments
t |
m x d matrix where the function will be evaluated. |
smp |
n x d matrix with sample size if size n. |
Details
This function must receive matrices or vectors. It is a wrapper function that allows more general inputs.
Value
A vector of size m with the modulus of the empirical characteristic function.
Examples
library(empichar)
t <- seq(-10, 10, 0.05)
X <- rnorm(150)
vals <- ecf_mod(t, X)
plot(t, vals, type = "l")
Real part of empirical characteristic function
Description
Real part of empirical characteristic function of a d-dimensional random variable. This function is evaluated at m vectors of size d.
Usage
ecf_real(t, smp)
Arguments
t |
m x d matrix where the function will be evaluated. |
smp |
n x d matrix with sample size if size n. |
Details
This function must receive matrices or vectors. It is a wrapper function that allows more general inputs.
Value
A vector of size m with the real part of the empirical characteristic function.
Examples
library(empichar)
t <- seq(-10, 10, 0.05)
X <- rnorm(150)
vals <- ecf_real(t, X)
plot(t, vals, type = "l")