weightedMean {icarus}R Documentation

Weighted estimator for the mean

Description

Computes the weighted estimator for the mean of a column

Usage

weightedMean(var, weights, popTot = NULL)

Arguments

var

column of variable of interest

weights

column of weights matching the variable of interest

popTot

population size, used in Horvitz-Thompson-like estimation. If no value is given for popTot, default value is the sum of weights. In the context of survey sampling, this is equivalent to using an Hajek estimate.

Value

Estimated mean

See Also

HTmean


[Package icarus version 0.3.2 Index]