coins: dependence example: k-independent coin sampling

Description Usage Arguments Details Value References Examples

View source: R/multivariance-functions.R

Description

This function creates samples which are dependent but k-independent.

Usage

1
coins(N = 1000, k = 2, type = "even")

Arguments

N

number of samples

k

each k-tuple will be independent

type

one of "even" or "odd"

Details

Throw k independent fair coins. Now consider the k+1 events: The first shows head, the second shows head,... the k-th shows head, there is an even (or odd as selected via type) number of heads. Each row contains the state of these k+1 events.

Value

It returns the samples as rows of an N by k+1 matrix. The columns are dependent but k-independent.

References

For the theoretic background see the reference [3] given on the main help page of this package: multivariance-package.

Examples

1
coins(200,4)

multivariance documentation built on Oct. 6, 2021, 5:08 p.m.