callback: Data formatting

View source: R/callback.R

callbackR 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 sets (fds), the list of the paired formatted data sets (pfds), the list of the clusters retained in the paired formatted data sets (cfds), 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 variables.

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 (callback1-callback2).

cfds data frames containing the cluster variable.

Examples

data(inter1)
callback(data=inter1,cluster="offer",candid=c("gender","origin"), callback="callback",comp = "ref")

callback documentation built on May 29, 2024, 4:57 a.m.