Learn R Programming

KEPTED

The goal of KEPTED is to provide an implementation of a kernel-embedding of probability test for elliptical distribution, which has been derived by Tang and Li (2024). This is an asymptotic test for elliptical distribution under general alternatives, and the location and shape parameters are assumed to be unknown. Some side-products are posted, including the transformation between rectangular and polar coordinates and two product-type kernel functions.

Installation

You can install the development version of KEPTED from GitHub with:

# install.packages("devtools")
devtools::install_github("tyy20/KEPTED")

Example

This is a basic example which shows you how to solve a common problem:

library(KEPTED)

n=200
d=3

## test under a null distribution
X=matrix(rnorm(d*n),nrow=n,ncol=d)
EllKEPT(X,kerU="Gaussian",kerTheta="Gaussian")
EllKEPT(X,kerU="PIQ",kerTheta="PIQ")

## test under an alternative distribution
X=matrix(rchisq(d*n,2),nrow=n,ncol=d)
EllKEPT(X,kerU="Gaussian",kerTheta="Gaussian")
EllKEPT(X,kerU="PIQ",kerTheta="PIQ")

Reference

Tang, Y. and Li, B. (2024), “A nonparametric test for elliptical distribution based on kernel embedding of probabilities” (https://arxiv.org/abs/2306.10594)

Copy Link

Version

Install

install.packages('KEPTED')

Monthly Downloads

146

Version

0.2.0

License

BSD_3_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Yin Tang

Last Published

April 13th, 2024

Functions in KEPTED (0.2.0)

KEPTED

Provides an implementation of a kernel-embedding of probability test for elliptical distribution. This is an asymptotic test for elliptical distribution under general alternatives, and the location and shape parameters are assumed to be unknown. Some side-products are posted, including the transformation between rectangular and polar coordinates and two product-type kernel functions.
Rec2Polar

Rectangular to polar coordinates
EllKEPT

Kernel embedding of probability test for elliptical distribution
Polar2Rec

Polar to rectangular coordinates
KEPTED-package

KEPTED: Kernel-Embedding-of-Probability Test for Elliptical Distribution
PolarDerivative

Derivative of the polar coordinate transformation
kerGauss

Gaussian kernel computation
kerPIQ

Product-type Inverse-Quadratic (PIQ) kernel computation