normalize {boot}R Documentation

Normalize Weights

Description

Normalize weights to sum to one within each stratum.

Usage

normalize(wts, strata)

Arguments

wts A vector of non-negative weights. At least one of the weights in each stratum must be strictly positive.
strata A vector of the same length as wts defining the strata. It should be a vector of integers or a factor with integer levels.

Value

A vector of the same length as wts such that the sum of the output values within each stratum is 1.

Author(s)

Angelo J. Canty


[Package Contents]