reduce_matrix {bigstep}R Documentation

Reducing number of variables

Description

Perform the Pearson correlation tests between a vector y and every variable from a matrix X (separately) and remove uncorrelated variables. The function is much faster when you do not have any missing values (set na = FALSE in prepare_data in that case).

Usage

reduce_matrix(data, minpv = 0.15)

Arguments

data

an object of class big.

minpv

a numeric. Variables with p-values for the Pearson correlation tests larger than minpv will be removed from candidates.

Details

Type browseVignettes("bigstep") for more details.

Value

An object of class big.

Examples

set.seed(1)
n <- 30
p <- 10
X <- matrix(rnorm(n * p), ncol = p)
y <- X[, 2] + 2*X[, 3] - X[, 6] + rnorm(n)
d <- prepare_data(y, X)
reduce_matrix(d)


[Package bigstep version 1.1.1 Index]