PT.Khmaladze.fit: Non-Parametric Hypothesis Testing with a Nuisance Parameter:...

Description Usage Arguments Value Author(s) References Examples

Description

A permutation test of the two-sample goodness-of-fit hypothesis in the presence of an estimated niusance parameter. The permutation test considered here is based on the Khmaladze transformation of the empirical process (Khmaladze (1981)), and adapted by Chung and Olivares-Gonzalez (2018).

Usage

1
PT.Khmaladze.fit(y1, y0, alpha = 0.05, n.perm = 999)

Arguments

y1

Numeric. A vector containing the response variable of the treatment group.

y0

Numeric. A vector containing the response variable of the control group.

alpha

Numeric. Nominal level for the test. The default is 0.05.

n.perm

Numeric. Number of permutations needed for the stochastic approximation of the p-values. The default is n.perm=999.

Value

An object of class "PT.Khmaladze.fit" is a list containing at least the following components:

n_populations

Number of grups.

N

Sample Size.

T.obs

Observed test statistic.

shift

The estimated nuisance parameter (average treatment effect).

cv

Critical Value. This value is used in the general construction of a randomization test.

pvalue

P-value.

T.perm

Vector. Test statistic recalculated for all permutations used in the stochastic approximation.

n_perm

Number of permutations.

sample_sizes

Groups size.

Author(s)

Maurcio Olivares-Gonzalez

Ignacio Sarmiento Barbieri

References

Khmaladze, E. (1981). Martingale Approach in the Theory of Goodness-of-fit Tests. Theory of Probability and its Application, 26: 240–257. Chung, Eunyi and Mauricio Olivares (2018). Non-Parametric Hypothesis Testing with a Nuisance Parameter: A Permutation Test Approach. Working Paper.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
Y0 <- rnorm(100, 1, 1)
# Treatment Group with constant shift equals to 1
Y1 <- Y0 + 1
Tx = sample(100) <= 0.5*(100)
# Observed Outcome 
Y = ifelse( Tx, Y1, Y0 )
dta <- data.frame(Y = Y, Z = as.numeric(Tx))
pt.GoF<-PT.Khmaladze.fit(dta$Y[dta$Z==1],data$Y[dta$Z==0],n.perm = 49)
summary(pt.GoF)

## End(Not run)

ignaciomsarmiento/RATest documentation built on May 18, 2019, 9:17 p.m.