confint: Confidence Intervals for Fair Models

confint.fair.modelR Documentation

Confidence Intervals for Fair Models

Description

Confidence intervals for the parameters of the models in the fairml package.

Usage

## S3 method for class 'fair.model'
confint(object, parm, level = 0.95, method = "boot",
  method.args = list(), ...)

## S3 method for class 'fair.confint'
plot(x, support = FALSE, ...)

Arguments

object

an object of class fair.model.

parm

a character vector, the names of the parameters to compute the confidence intervals for. The default is to do that for all parameters.

level

a number between 0 and 1, the coverage of the confidence intervals.

method

a character string, the method used to compute the confidence intervals. See below for details.

method.args

optional arguments passed to the method.

...

additional arguments (unused).

x

an object of class fair.confint.

support

a logical value, whether to draw a vertical line at zero.

Details

The only available method is "boot", which implements nonparametric bootstrap with observation resampling. It has the following optional arguments:

  • response, predictors, sensitive: the data the model was fitted from.

  • R: a positive integer number, the number of bootstrap samples. The default value is 200.

  • m: a positive integer number, the size of bootstrap samples. The default value is the size of the original sample.

Value

confint() returns an object of class fair.confint which wraps a two- or three-dimensinal matrix. The upper and lower bounds of the confidence intervals in the columns, the variables are in the rows.

Author(s)

Marco Scutari

Examples

mgaus = fgrrm(response = vu.test$gaussian, predictors = vu.test$X,
          sensitive = vu.test$S, unfairness = 0.05, family = "gaussian")
ci = confint(mgaus, method = "boot",
       method.args = list(response = vu.test$gaussian, predictors = vu.test$X,
                          sensitive = vu.test$S, R = 20))
ci
plot(ci)

fairml documentation built on June 8, 2025, 11:38 a.m.