Run_KMT: Implementing Khmaladze Martingale Transformation.

View source: R/RFuncLib.R

Run_KMTR Documentation

Implementing Khmaladze Martingale Transformation.

Description

Performs goodness-of-fit test through Khmaladze matringale transformation

Usage

Run_KMT(
  X,
  strDistr = "Normal",
  bEstimation = FALSE,
  bFast_Estimation = FALSE,
  bParallel = FALSE,
  nThreads = 16
)

Arguments

X

a random sample of n observations

strDistr

a null distribution for the hypothesis test: Normal, Cauchy, Logistic, or Gumbel.

bEstimation

a logical value which specifies whether or not to estimate parameters. The default value is TRUE. For FALSE, (\mu) and (\sigma) will be set as 0 and 1, respectively.

bFast_Estimation

a logical value which specifies whether or not to use the maximum likelihood estimator (\hat{\theta}) for the location and scale parameters The default value is FALSE.

bParallel

a logical value which specifies whether or not to use the parallel computing. The default value is FALSE.

nThreads

the number of threads when bParallel is TRUE. The default value is 16.

Value

A list of the following values:

opt_x

opt.x is the value of x where the optimum of the objective function - which is also the test statistic - occurs.

test_stat

test.stat is the test statistic obtained through Khmaladze martingale transformation.

mu

the point estimate for the location parameter mu

sigma

the point estimate for the scale parameter sigma

References

[1] Khmaladze, E.V., Koul, H.L. (2004). Martingale transforms goodness-of-fit tests in regression models. Ann. Statist., 32. 995-1034

[2] E.V. Khmaladze, H.L. Koul (2009). Goodness-of-fit problem for errors in nonparametric regression: distribution free approach. Ann. Statist., 37(6A) 3165-3185.

[3] Kim, Jiwoong (2020). Implementation of a goodness-of-fit test through Khmaladze martingale transformation. Comp. Stat., 35(4): 1993-2017

Examples

####################
n=20
mu0=2; sigma0=1
X = rnorm(n, mu0, sigma0)


Run_KMT(X, strDistr="Normal")


GofKmt documentation built on Dec. 19, 2025, 1:06 a.m.

Related to Run_KMT in GofKmt...