perm_test: Permutation test Test the null hypothesis P(X|I=0) =...

Description Usage Arguments Value

View source: R/outputs.R

Description

Permutation test Test the null hypothesis P(X|I=0) = P(X|I=1), using permutation test.

Usage

1
2
perm_test(estimates, wgt, wgt1, X, n.quant, n.perm = 1000, Y = NULL,
  control = NULL, func = "non_parm")

Arguments

estimates

point estimates of the percentile distance between P(X|I=0) & P(X|I=1).

wgt

an optional vector of weights.

wgt1

weights under I = 1.

X

numeric data frame or matrix of factors to be considered.

n.quant

number of quantiles to use when calculating CDF distance.

n.perm

number of permutations to permute from wgt1.

Y

outcome vector (must be numeric without NA's).

control

numeric data frame or matrix of factors to control for. these are factors that we can't consider while looking for the optimal intervention (e.g. race).

func

either "non_parm" or "nn". for "nn", weights are recalculated for each permutation, and thus Y and control are needed. the default is "non_parm", and Y and control aren't needed.

Value

vector of p values.


optinterv documentation built on March 26, 2020, 7:05 p.m.