dsldML: dsldML

View source: R/dsldML.R

dsldMLR Documentation

dsldML

Description

Nonparametric comparison of sensitive groups.

Usage

dsldML(data,yName,sName,qeMLftnName,sComparisonPts="rand5",
    opts=NULL,holdout=NULL)

Arguments

data

A data frame.

yName

Name of the response variable column.

sName

Name(s) of the sensitive attribute column(s).

qeMLftnName

Quoted name of a prediction function in the qeML package.

sComparisonPts

Data frame of one or more data points at which the regression function is to be estimated for each level of S. If this is 'rand5', then the said data points will consist of five randomly chosen rows in the original dataset.

opts

An R list specifying arguments for the above qeML function.

holdout

The size of holdout set.

Details

In a linear model with no interactions, one can speak of "the" difference in mean Y given X across treatments, independent of X. In a nonparametric analysis, there is interaction by definition, and one can only speak of differences across treatments for a specific X value. Hence the need for the argument sComparisonPts.

The specified qeML function will be called on the indicated data once for each level of the sensitive variable. For each such level, estimated regression function values will be obtained for each row in sComparisonPts.

Value

An R list. The first component consists of the holdout-set prediction accuracies, while the second is a data frame predicted values for each sensitive group.

Author(s)

N. Matloff

Examples

  
data(svcensus) 
w <- dsldML(svcensus,'wageinc','gender',qeMLftnName='qeKNN',
   opts=list(k=50))
print(w)

dsld documentation built on Sept. 14, 2024, 1:08 a.m.