toy_example: toy_example: Creates a toy example data of multiple...

Description Usage Arguments Value

View source: R/toy_example.R

Description

Create m two-sample t-tests with correlations. Let mu be the mean under the alternative and 0 the mean under the null. The proportion of alternatives is prob. The first sample of n m-dimendional observations is drawn from a multivariate random vector with mean 0 for null and mean mu for alternatives. The second sample of n m-dimendional observations is drawn from with mean zero. The correlation matrix R is block diagonal with a given block size and with off-diagonal entries of correlation.

Usage

1
2
toy_example(m = 10000, n = 15, mu = 1, prob = 0.05,
  block_size = 100, rho = 0.8)

Arguments

m

Number of tests

n

Number of observations in each of the two samples

mu

The mean under the alternative

prob

The probability of alternatives

block_size

The size of the blocks in the block-diagonal correlation matrix R.

rho

The off-diagonal entries of th block matrices

Value

A list, with P-values (P), the pooled variance as the informative covariate (X), and the correlation matrix (Sigma).


yairgoldy/corihw documentation built on Sept. 10, 2020, 11:33 p.m.