find.good.L0: Finds an initial room-assignment vector

Description Usage Arguments Value

View source: R/rand-mechanisms.R

Description

Here, a ‘good’ room-assignment vector is one whose corresponding exposure vector is approximately balanced. The function generates 'n.draws' potential room assignment vectors and selects the one that is most balanced.

Usage

1
find.good.L0(N, M, A, n.draws = 10)

Arguments

N

An integer. The number of units in the population.

M

An integer. The number of units per room. 'M' must be a divisor of 'N'.

A

A numeric vector. The vector of attributes (must be of length 'N').

n.draws

An integer. The number of potential room assignment vector to draw, and from which to choose the best one.

Value

A numeric vector, representing the 'best' room assignment vector among those randomly generated.


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