test_by_block: Generate multivariate test statistics

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/test_by_block.R

Description

This function generate multivariate normal test statistics by block wise.

Usage

1
test_by_block(r, eVec, groupSize, Sigma)

Arguments

r

Integer, number of the test groups

eVec

A numeric vector of the means

groupSize

Integer, number of test statistics per group

Sigma

A numeric matrix correlations

Details

Generating a large number of tests statistics from the multivariate normal distribution is computionally very expensive. Therefore, it is someitme convenient to genrate parts of tests and then concatenate all the tests to obtian the desired number of the tests statistics. This is called block wise generation of the test statistics.

Value

test A numeric vector of multivariate test statistics

Author(s)

Mohamad S. Hasan, shakilmohamad7@gmail.com

See Also

rmvn

Examples

1
2
3
4
5
6
7
8
# mean vector
eVec = runif(1000, 0, 2.5)

# correaltion matrix
Sigma <- matrix(.9, 50, 50) + diag(50)*(1 - .1)

# test statistics
testsStat = test_by_block(r = 1, eVec, groupSize = 50,  Sigma)

mshasan/OPWpaper1 documentation built on Feb. 22, 2021, 10:22 a.m.