rsW: Generates a random exposure vector from a template W0

Description Usage Arguments Value

View source: R/rand-mechanisms.R

Description

'rsW' draws a random permutation of 'W0'. If 'A' is null, then the permutation will be drawn uniformly at random from the symmetric group 'S'. If A is not null, then the permutation will be drawn from 'S_A', the stabilizer of 'A' in the symmetric group.

Usage

1
rsW(W0, A = NULL, n.draws = 10)

Arguments

W0

An exposure vector.

A

A vector of attributes. Should be of the same length as 'W0'.

n.draws

An integer. The number of permutations of 'W0' that should be drawn (defaults to 10).

Value

A matrix whose rows are random permutations of 'W0'.


gwb/RGroupFormation documentation built on Sept. 13, 2020, 4:41 p.m.