generate_random_weights: generate_random_weights

Description Usage Arguments Value

View source: R/generate_random_weights.R

Description

Generating random weights to use in matching procedures, each summing to one.

Usage

1
2
3
4
5
6
generate_random_weights(
  prior_weights,
  number_vectors,
  minimum_weights = NULL,
  hierarchical_list = NULL
)

Arguments

prior_weights

Must be equal to the length of your columns, i.e. the length of the weight vectors this function will produce.

number_vectors

How many weight vectors to generate.

minimum_weights

If you want to set minimums weights.

hierarchical_list

List per group / category of variable:

"index"

Vector of indices that this group corresponds with

"weight"

Weight for this group

"variance"

(Optional) how much variance this group will havve

Value

list of weight vectors


rzgross/uRbanmatching documentation built on Dec. 22, 2021, 8:20 p.m.