r_test_c: Residual randomization test

Description Usage Arguments Details Value

View source: R/RcppExports.R

Description

Implements the residual randomization test. The hypothesis tested is

Usage

1
r_test_c(y, X, lam, lam0, cluster_eps_r, use_perm, use_sign, num_R)

Arguments

y

Vector of outcomes (n x 1).

X

Matrix of covariates (n x p). First column should be 1's.

lam

Vector of coefficients in linear H0 (p x 1).

lam0

Scalar value for linear H0.

cluster_eps_r

A List with restricted residuals. See get_clustered_eps.

use_perm

Boolean flag whether to use permutations within clusters.

use_sign

Boolean flag whether to use sign flips across clusters.

num_R

Integer of how many randomization values to calculate.

Details

H0: lam' beta = lam[1] * beta[1] + ... + lam[p] * beta[p] = lam0.

Value

A List with the observed test statistic value (tobs), and the randomization values (tvals)


RRI documentation built on Dec. 19, 2019, 9:06 a.m.

Related to r_test_c in RRI...