RIT: Tests whether x and y are unconditionally independent

Description Usage Arguments Value Examples

Description

Tests whether x and y are unconditionally independent

Usage

1
RIT(x, y, approx = "lpd4", seed = NULL)

Arguments

x

Random variable x.

y

Random variable y.

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 )

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
RIT(rnorm(1000),rnorm(1000));

x=rnorm(1000);
y=(x+rnorm(1000))^2;
RIT(x,y);

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