Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

incMean

Weighted mean income


Description

Compute the weighted mean income.

Usage

incMean(inc, weights = NULL, years = NULL, data = NULL,
  na.rm = FALSE)

Arguments

inc

either a numeric vector giving the (equivalized disposable) income, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of data.

weights

optional; either a numeric vector giving the personal sample weights, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of data.

years

optional; either a numeric vector giving the different years of the survey, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of data. If supplied, values are computed for each year.

data

an optional data.frame.

na.rm

a logical indicating whether missing values should be removed.

Value

A numeric vector containing the value(s) of the weighted mean income is returned.

Author(s)

Andreas Alfons

See Also

Examples

data(eusilc)
incMean("eqIncome", weights = "rb050", data = eusilc)

laeken

Estimation of Indicators on Social Exclusion and Poverty

v0.5.1
GPL (>= 2)
Authors
Andreas Alfons [aut, cre], Josef Holzer [aut], Matthias Templ [aut], Alexander Haider [ctb]
Initial release
2020-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.