iArt.test
- iArt.test(*, Z, X, Y, G='bayesianridge', S=None, L=10000, threshholdForX=0.1, verbose=False, covariate_adjustment=False, random_state=None, alternative='greater', alpha=0.05)
Imputation-Assisted Randomization Tests (iArt) for testing the null hypothesis that the treatment has no effect on the outcome.
Parameters
- Zarray_like
Z is the array of observed treatment indicators
- X, Yarray_like
X is 2D array of observed covariates, Y is 2D array of observed outcomes,
- Sarray_like, default: None
S is the array of observed strata indicators
- threshholdForXfloat, default: 0.1
The threshhold for missing outcome to be imputed in advance in covariate X
- Gstr or function, default: ‘bayesianridge’
A string for the eight available choice or a function that takes (Z, M, Y_k) as input and returns the imputed complete values
- Lint, default: 10000
The number of Monte Carlo simulations
- verbosebool, default: False
A boolean indicating whether to print training start and end
- covarite_adjustmentbool, default: False
A boolean indicating whether to do covariate adjustment ()
- random_state{None, int, numpy.random.Generator,`numpy.random.RandomState`}, default: None
If seed is None (or np.random), the numpy.random.RandomState singleton is used. If seed is an int, a new
RandomStateinstance is used, seeded with seed. If seed is already aGeneratororRandomStateinstance then that instance is used.- alternative{‘greater’,’less’,’two-sided’}, default: ‘greater’
A string indicating the alternative hypothesis
- alphafloat, default: 0.05
Significance level
Returns
- p_valuesarray_like
1D array of p-values for lenY outcomes
- rejectarray_like
A boolean indicating whether the null hypothesis is rejected for each outcome