Learn R Programming

argminCS (version 1.1.0)

get.difference.matrix: Construct a difference matrix for argmin hypothesis testing

Description

Given a data matrix and a reference column index, construct the difference matrix used in hypothesis testing procedures. Each column represents the difference between the reference dimension and one of the remaining dimensions.

Usage

get.difference.matrix(data, r)

Value

A n by (p-1) matrix where each row is the difference between the r-th column and the remaining columns.

Arguments

data

A n by p data matrix; each row is a p-dimensional sample.

r

An integer between 1 and p, indicating the reference column (dimension).

Examples

Run this code
set.seed(1)
data <- matrix(rnorm(50), nrow = 10)
diff.mat <- get.difference.matrix(data, r = 2)

Run the code above in your browser using DataLab