Description Usage Arguments Value See Also

Computes the weighted estimator for the mean of a column

1 | ```
weightedMean(var, weights, popTot = NULL)
``` |

`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. |

Estimated mean

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.