adjwgt: Adjust survey design weights by categories
Description
Adjust initial survey design weights so that the
final weights sum to a desired frame size. Adjusted weights
proportionally scale the initial weights to sum to the desired frame size.
Separate adjustments are applied to each category specified in wgtcat.
Vector of adjusted weights, where the adjusted weight is set
to 0 for sites whose value in the sites argument was set to
FALSE.
Arguments
wgt
Vector of initial weights for each site. These equal
the reciprocal of the site's inclusion probability.
wgtcat
Vector containing each site's weight adjustment
category name. The default is NULL, which assumes every
site is in the same category.
framesize
Vector containing the known size of the frame
for each category name in wgtcat. If wgtcat is provided,
the names in framesize must match the names in wgtcat.
If wgtcat is not provided, an unnamed scalar is given to
framesize.
sites
Vector indicating site use; TRUE indicates the site
should be included in the weight adjustment and FALSE indicates
the site should not be included in the weight adjustment. The default is
NULL, which assumes every site should be included.