t_cornish_fisher: Cornish-Fisher expansion for Welch's t-statistic

View source: R/functions.R

t_cornish_fisherR Documentation

Cornish-Fisher expansion for Welch's t-statistic

Description

This function provides approximation for the quantile function of the sampling distribution of the Welch's t-statistic using Cornish-Fisher expansion (up to second order).

Usage

t_cornish_fisher(
  p,
  order = 2,
  n1,
  n2,
  mu1,
  mu2,
  sigma1,
  sigma2,
  gamma1,
  gamma2,
  tau1,
  tau2
)

Arguments

p

a probability value.

order

the order of Cornish-Fisher expansion. Valid options are 0, 1, and 2. If set to 0, it reduces to a normal approximation and it returns the p-th percentile of standard normal distribution.

n1

sample size for the sample from the first population.

n2

sample size for the sample from the second population.

mu1

mean of the first population.

mu2

mean of the second population.

sigma1

standard deviation of the first population.

sigma2

standard deviation of the second population.

gamma1

skewness of the first population.

gamma2

skewness of the second population.

tau1

kurtosis of the first population.

tau2

kurtosis of the second population.

Value

Cornish-Fisher expansion value evaluated at p.

Examples

t_cornish_fisher(0.9, order=2,
n1=60, n2=30,
mu1=0, mu2=0,
sigma1=1, sigma2=0.5,
gamma1=1, gamma2=0,
tau1=6, tau2=0)

t_cornish_fisher(0.3, order=1,
n1=60, n2=30,
mu1=0, mu2=0,
sigma1=1, sigma2=0.5,
gamma1=1, gamma2=0,
tau1=6, tau2=0)


HuaiyuZhang/tcftt documentation built on July 9, 2023, 2:52 a.m.