callback {callback} | R Documentation |
Data formatting
Description
Creates the data set used in the callback package.
Usage
callback(data, cluster, candid, callback, comp = "ref")
Arguments
data |
A data frame. |
cluster |
A variable name, identifying the test (e.g., a job offer number). |
candid |
A list of factor names defining the candidates (e.g., gender, origin). |
callback |
A Boolean variable, equal to TRUE for non negative callbacks. |
comp |
An option, equal to "all" or "ref" (the default). "ref" give the comparisons with the reference candidate, and "all" the pairwise comparisons. |
Value
A 'callback' object containing the formatted data set (fds
), the
averaged formatted data set (afds
, for multiple tests), the list of the
paired formatted data sets (pfds
), the offer-level formatted data set
(ofds
), the names of the candidate variables (candid
) and the
name of the callback variable (callback
).
fds
contains the following variables:
-
cluster: the cluster variable.
-
candid: the concatenation of the candidate variables.
-
callback: the callback variable.
afds
contains the following variables:
-
cluster: the cluster variable.
-
candid: the concatenation of the candidate variables.
-
callback: the aggregated callback dummy.
pfds
data frames containing the following variables:
-
callback1: TRUE if candidate 1 had a callback.
-
callback2: TRUE if candidate 2 had a callback.
-
c00: TRUE if neither candidate was called back.
-
c10: TRUE if candidate 1 was the only one called back.
-
c01: TRUE if candidate 2 was the only one called back.
-
c11: TRUE if both candidates were called back.
-
callback: TRUE if either candidate was called back.
-
calldif: callback difference.
ofds
contains variables corresponding to the candidates' codes and the
following variables:
-
cluster: the cluster variable.
-
ncall: the number of callback for the current offer.
Author(s)
Emmanuel Duguet
Examples
data(inter1)
m <- callback(data=subset(origin1,reput=="U"),cluster="offer",candid="origin",
callback="callback",comp = "ref")
str(m)