equalvar: Find two blocks with equal variance

Description Usage Arguments Details Value Author(s) References

View source: R/equalvar.r

Description

The matrix is divided in two blocks with an equal variance using the greedy implementation of the partition problem on the covariances between the columns and the total row sums.

Usage

1
equalvar(X, partition.prev = logical(ncol(X)), method = "KK")

Arguments

X

numeric array or matrix

Details

The objective is to find two block with an variance that is as close as possible to the variance of the other block without significantly impacting the performance.

The first step is to calculate the covariances between all columns and the total row sums of the matrix. Using the greedy implementation of the partition problem, we find two groups with variances that are as close as possible to eachother.

Value

numeric binary vector with the partition

Author(s)

Kris Boudt, kris.boudt@vub.ac.be

Edgars Jakobsons, edgars.jakobsons@math.ethz.ch

Steven Vanduffel, steven.vanduffel@vub.ac.be

Kristof Verbeken, kristof.verbeken@vub.ac.be

to test: d<-10; X<-matrix(runif(d^2,max=10),ncol=d); partition<-sample(c(T,F),d,replace=T); print(equalvar(X,partition,"greedy"));print(equalvar(X,partition,"KK"));

References

http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2634669


blockra documentation built on May 2, 2019, 5:19 p.m.