dsldML | R Documentation |
Nonparametric comparison of sensitive groups.
dsldML(data,yName,sName,qeMLftnName,sComparisonPts="rand5",
opts=NULL,holdout=NULL)
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 |
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 |
holdout |
The size of holdout set. |
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
.
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.
N. Matloff
data(svcensus)
w <- dsldML(svcensus,'wageinc','gender',qeMLftnName='qeKNN',
opts=list(k=50))
print(w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.