RCIT: RCIT and RCoT - tests whether x and y are conditionally...

Description Usage Arguments Value Examples

Description

RCIT and RCoT - tests whether x and y are conditionally independent given z. Calls RIT if z is empty.

Usage

1
2
RCIT(x, y, z = NULL, approx = "lpd4", corr = TRUE, num_f = 25,
  seed = NULL)

Arguments

x

Random variable x.

y

Random variable y.

z

Random variable z.

approx

Method for approximating the null distribution. Options include: "lpd4," the Lindsay-Pilla-Basak method (default), "gamma" for the Satterthwaite-Welch method, "hbe" for the Hall-Buckley-Eagleson method, "chi2" for a normalized chi-squared statistic, "perm" for permutation testing (warning: this one is slow but recommended for small samples generally <500 )

corr

TRUE corresponds to RCoT and FALSE to RCIT. Default is TRUE.

num_f

Number of features for conditioning set. Default is 25.

seed

The seed for controlling random number generation. Use if you want to replicate results exactly. Default is NULL.

Value

A list containing the p-value p and statistic Sta

Examples

1
2
3
4
5
6
RCIT(rnorm(1000),rnorm(1000),rnorm(1000));

x=rnorm(10000);
y=(x+rnorm(10000))^2;
z=rnorm(10000);
RCIT(x,y,z,seed=2);

ericstrobl/RCIT documentation built on June 5, 2019, 9:07 a.m.