CARS: The CARS procedure for controlling the false discovery rate

Description Usage Arguments Value Examples

Description

This function runs the CARS procedure, constructing the auxiliary variables, computing the test statistics, choosing the cutoff and selecting the locations.

Usage

1
CARS(X, Y, alpha, tau = 0.9, variance, option = c("sparse", "regular"))

Arguments

X

the first matrix or data frame of observation

Y

the second matrix or date frame of observation

alpha

targeted FDR (false discovery rate) level

tau

the threshold for choosing interesting locations for density estimation, default is 0.5

variance

for X and Y, default is NULL. If provided, in the form of a m*2 matrix, the columns are representing x and y's variance for each location

option

sparse case for FDR control or regular for FDR control. Sparse case has more stability when it comes to controlling FDR, power is slightly compromised

Value

A list containing the following components:

de

decision for each location (0 or 1)

cars

estimated CARS statistics

th

threshold for CARS procedure

Examples

1
2
3
X <- matrix(rnorm(1000),ncol=5,nrow=200);
Y <- matrix(rep(c(0,3),c(800,200))+rnorm(1000),ncol=5,nrow=200);
CARS(X,Y,0.05,tau=0.9,option='regular');

CARS documentation built on May 2, 2019, 2:57 p.m.