weightsByFactorFreq: Compute sampling weights for descret values.

Description Usage Arguments Value See Also

View source: R/randomization.R

Description

Computes weights for sampling from a population according to the frequencies of a variable (factor) observed in an observed set.

Usage

1
weightsByFactorFreq(obs, population)

Arguments

obs

vector with values (e.g. factor) as observed set.

population

vector with values (e.g. factor) in the population.

Value

numeric vector with sampling weights to sample from population with probabilities observed in obs.

See Also

weightsByBin


ibn-salem/genepair documentation built on May 18, 2019, 1:30 a.m.