Learn R Programming

fairml (version 0.8)

obesity.levels: Obesity Levels

Description

Predict obesity levels based on eating habits and physical condition.

Usage

data(obesity.levels)

Arguments

Format

The data contains 2111 observations and 17 variables. See the UCI Machine Learning Repository for details.

References

UCI Machine Learning Repository.
https://archive-beta.ics.uci.edu/dataset/544

Examples

Run this code
data(obesity.levels)

# short-hand variable names.
r = obesity.levels[, "NObeyesdad"]
s = obesity.levels[, c("Gender", "Age")]
p = obesity.levels[, setdiff(names(obesity.levels), c("NObeyesdad", "Gender", "Age"))]

if (FALSE) {
# the lambda = 0.1 is very helpful in making model estimation succeed.
m = fgrrm(response = r, sensitive = s, predictors = p, ,
      family = "multinomial", unfairness = 0.05, lambda = 0.1)
summary(m)
}

Run the code above in your browser using DataLab