| Title: | Computes Statistics from Discrimination Experimental Data |
|---|---|
| Description: | In discrimination experiments candidates are sent on the same test (e.g. job, house rental) and one examines whether they receive the same outcome. The number of non negative answers are first examined in details looking for outcome differences. Then various statistics are computed. This package can also be used for analyzing the results from random experiments. |
| Authors: | Emmanuel Duguet [aut, cre]
|
| Maintainer: | Emmanuel Duguet <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.3 |
| Built: | 2026-06-04 10:37:16 UTC |
| Source: | https://github.com/cran/callback |
The data were collected by the TEPP team (FR CNRS 2042) between December 2008 and January 2009. A candidate is defined by the variables ("gender","origin", "mediaexp"). The variable "reput" creates a sample separation.
offer: add number
date: date of the application
sentorder: order in which the application was sent
callback: TRUE if there was a non negative callback
fname: first name (forename)
lname: last name (family name, surname)
origin: all the candidates are French, the origin is suggested by the name, F = France, M = Morocco
gender: Woman or Man
city: candidate location
reput: reputation of the city, P = privileged, U = Unprivileged
mediaexp: strong negative mediatic exposure, Yes or No
data(address1)data(address1)
A data frame with 3684 rows and 11 variables
Duguet E., Gray D., L'Horty Y., Du Parquet L, Petit P., 2020. Labor market effects of urban riots: an experimental assessment. Papers in Regional Science, 99:787-806.
Creates the data set used in the callback package.
callback(data, cluster, candid, callback, comp = "ref")callback(data, cluster, candid, callback, comp = "ref")
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. |
A list with class 'callback' 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
Emmanuel Duguet
data(inter1) m <- callback(data=subset(origin1,reput=="U"),cluster="offer",candid="origin", callback="callback",comp = "ref") str(m)data(inter1) m <- callback(data=subset(origin1,reput=="U"),cluster="offer",candid="origin", callback="callback",comp = "ref") str(m)
Creates the estimation data for a component model
callback_comp( data = NULL, cluster = NULL, candid = NULL, callback = NULL, model = NULL )callback_comp( data = NULL, cluster = NULL, candid = NULL, callback = NULL, model = NULL )
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. |
model |
a list of string lists, defining the components of the model, in difference from the reference candidate. |
a list with class callback_comp containing:
aux_cand: list of the candidates.
aux_model: summary of the components model.
aux_boole: Boole matrix of the components model.
aux_det: determinant of t(aux_boole)%*%aux_boole.
aux_coef: auxilliary parameters.
aux_vcov: covariance matrix of the auxilliary parameters.
aux_cor: correlation matrix of the auxilliary parameters.
Emmanuel Duguet
data(mobility1) model <- list(c("license"),c("woman"),c("woman","license","inter")) callback_comp(data = mobility1, cluster = "offer", candid = c("gender","licenses"), callback = "callback", model = model)data(mobility1) model <- list(c("license"),c("woman"),c("woman","license","inter")) callback_comp(data = mobility1, cluster = "offer", candid = c("gender","licenses"), callback = "callback", model = model)
Difference of proportions plot
g_difp(data = NULL, col = NULL, ...)g_difp(data = NULL, col = NULL, ...)
data |
A |
col |
A list of three colors. |
... |
further arguments passed to or from other methods. |
A ggplot2 object
Emmanuel Duguet
data(labour1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) g_difp(s)data(labour1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) g_difp(s)
Exclusive callback shares plot
g_ecs(data = NULL, col = NULL, ...)g_ecs(data = NULL, col = NULL, ...)
data |
a |
col |
A list of four colors. |
... |
further arguments passed to or from other methods. |
A ggplot2 object
Emmanuel Duguet
data(labour1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_ecs(m) g_ecs(s)data(labour1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_ecs(m) g_ecs(s)
Proportions' comparison plot
g_mcr(data = NULL, col = NULL, ...)g_mcr(data = NULL, col = NULL, ...)
data |
A |
col |
A list of three colors. |
... |
further arguments passed to or from other methods. |
A ggplot2 object
Emmanuel Duguet
data(labour1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) g_mcr(data = s)data(labour1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) g_mcr(data = s)
Raw callback rates plot
g_raw(data = NULL, col = NULL, ...)g_raw(data = NULL, col = NULL, ...)
data |
A |
col |
A list of two colors. |
... |
further arguments passed to or from other methods. |
A ggplot2 object
Emmanuel Duguet
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_raw(m) g_raw(s)data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_raw(m) g_raw(s)
Total callback shares plot
g_tcs(data = NULL, col = NULL, ...)g_tcs(data = NULL, col = NULL, ...)
data |
a |
col |
A list of three colors. |
... |
further arguments passed to or from other methods. |
A ggplot2 object
Emmanuel Duguet
data(labour1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_tcs(m) g_tcs(s)data(labour1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_tcs(m) g_tcs(s)
The data were collected in January-March 2002 by Pascale Petit for her PhD thesis (University of Paris I-Panthéon-Sorbonne, 2004). A candidate is defined by the variables ("gender","age","child").
offer: add number
gender: Woman or Man
age: 25 or 37 years old
child: number of children, 0 or 3
educ: education, BAC = Baccalauréat = A-level, BTS = 2 years of vocational training after the A-level
qual: qualification required by the offer, Administrative or Commercial
date: January 2002, February 2002 or March 2002
cv: CV template, A or B
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
popp: promotion opportunity, Yes or No
train: training included, Yes or No
negow: negotiable wage, Yes or No
incent: wage depending on output, Yes or No
callback: TRUE if there was a non negative callback
data(gender1)data(gender1)
A data frame with 942 rows and 14 variables
Duguet E., Petit P., 2005. Hiring discrimination in the French financial sector: an econometric analysis on field experiment data. Annals of Economics and Statistics, 78: 79-102.
Petit P., 2007. The effects of age and family constraints on gender hiring discrimination: A field experiment in the French financial sector. Labor Economics, 14: 371-391.
The data were collected by the TEPP team (FR CNRS 2042) between February and July 2015. A candidate is defined by the variables ("gender","educ").
offer: add number
gender: Woman or Man
age: 23 or 24 years old
fname: first name (forename)
lname: last name (family name, surname)
educ: education, CAP = vocational training certificate before the A level, MAF = CAP + "One of the best French apprentice", OLY = CAP + participation to the Worldskills Competition
zip: ZIP code
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
recgender: gender of the recruiter
cv: CV template, A or B
ansmode: answering channel, email or ordinary mail ("omail")
sentorder: order in which the application was sent
hours: weekly work time
callback: TRUE if there was a non negative callback
date: between February and July 2015
data(gender2)data(gender2)
A data frame with 564 rows and 15 variables
Duguet E., du Parquet L., Petit P. (2022). Extracting the discrimination
components from the callback rates". TEPP Working Paper 2022-15.
Duguet, E., du Parquet, L. & Petit, P. (2022). Révéler les composantes de la discrimination à partir des taux de rappel. Revue française d'économie, XXXVII, 233-268.
The data were collected by the TEPP team (FR CNRS 2042) between February and July 2015. A candidate is defined by the variables ("gender","educ").
offer: add number
gender: Woman or Man
age: 23 or 24 years old
fname: first name (forename)
lname: last name (family name, surname)
educ: education, CAP = vocational training certificate before the A level, MAF = CAP + "One of the best French apprentice", OLY = CAP + participation to the Worldskills Competition
zip: ZIP code
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
recgender: gender of the recruiter
cv: CV template, A or B
ansmode: answering channel, email or ordinary mail ("omail")
sentorder: order in which the application was sent
hours: weekly work time
callback: TRUE if there was a non negative callback
date: between February and July 2015
data(gender3)data(gender3)
A data frame with 532 rows and 15 variables
Duguet E., du Parquet L., Petit P. (2022). Extracting the discrimination components from the callback rates". TEPP Working Paper 2022-15.
Duguet, E., du Parquet, L. & Petit, P. (2022). Révéler les composantes de la discrimination à partir des taux de rappel. Revue française d'économie, XXXVII, 233-268.
The data were collected by the TEPP team (FR CNRS 2042) between February and July 2015. A candidate is defined by the variables ("gender","educ").
offer: add number
gender: Woman or Man
age: 23 or 24 years old
fname: first name (forename)
lname: last name (family name, surname)
educ: education, CAP = vocational training certificate before the A level, MAF = CAP + "One of the best French apprentice", OLY = CAP + participation to the Worldskills Competition
zip: ZIP code
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
recgender: gender of the recruiter
cv: CV template, A or B
ansmode: answering channel, email or ordinary mail ("omail")
sentorder: order in which the application was sent
hours: weekly work time
callback: TRUE if there was a non negative callback
date: between February and July 2015
data(gender4)data(gender4)
A data frame with 1152 rows and 15 variables
Duguet E., du Parquet L., Petit P. (2022). Extracting the discrimination components from the callback rates". TEPP Working Paper 2022-15.
Duguet, E., du Parquet, L. & Petit, P. (2022). Révéler les composantes de la discrimination à partir des taux de rappel. Revue française d'économie, XXXVII, 233-268.
The data were collected by the TEPP team (FR CNRS 2042) between February and April 2009. A candidate is defined by the variables ("gender","origin").
offer: add number
fname: first name (forename)
lname: last name (family name, surname)
gender: Woman or Man
origin: all candidates are French, the origin is suggested by the name. F = French, S = Senegal, M = Morocco, V = Vietnam
date: date of the application
sentorder: order in which the application was sent
callback: TRUE if there was a non negative callback
ansorder: order in which the answer was received when positive, 9 otherwise
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
paris: job located inside Paris, Yes or No
data(inter1)data(inter1)
A data frame with 2480 rows and 11 variables
Petit P., Duguet E., L'Horty Y., Du Parquet L., Sari F., 2013. Discrimination à l'embauche : les effets du genre et de l'origine se cumulent-ils systématiquement ? Economie et Statistique, 464-465-466: 141-153.
Duguet E., Du Parquet L, L'Horty Y., Petit P., 2015. New Evidence of Ethnic and Gender discriminations in the French Labor Market using experimental data: A ranking extension of responses from correspondence tests. Annals of Economics and Statistics, 117-118: 21-39.
Computational compatibility
is.calc(x)is.calc(x)
x |
A variable name |
A logical variable indicating whether the variable can be used for computations (TRUE) or not (FALSE).
data(origin1) is.calc(origin1$cartime) is.calc(origin1$callback) is.calc(origin1$origin)data(origin1) is.calc(origin1$cartime) is.calc(origin1$callback) is.calc(origin1$origin)
The data were collected by the TEPP team (FR CNRS 2042) between February and April 2015. A candidate is defined by the variable "hist".
offer: add number
date: date of the application
sentorder: order in which the application was sent
callback: TRUE if there was a non negative callback
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
paris: job located inside Paris, Yes or No
hist: history in the labour market, LTC = Long term contract, LTU = Long term unemployment, STU = Short term unemployment, STC = Short term contract, PTC = Part time contract
data(labour1)data(labour1)
A data frame with 1475 rows and 7 variables
Duguet E., Le Gall R., L’Horty Y., Petit P., 2018. How does labour market history influence the access to hiring interviews? International Journal of Manpower, 39(4), 519-533.
The data were collected by the TEPP team (FR CNRS 2042) between January and April 2015. A candidate is defined by the variable "hist".
offer: add number
date: date of the application
sentorder: order in which the application was sent
callback: TRUE if there was a non negative callback
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
paris: job located inside Paris, Yes or No
hist: history in the labour market, LTC = Long term contract, LTU = Long term unemployment, STU = Short term unemployment, STC = Short term contract, PTC = Part time contract
data(labour2)data(labour2)
A data frame with 1470 rows and 7 variables
Duguet E., Le Gall R., L’Horty Y., Petit P., 2018. How does labour market history influence the access to hiring interviews? International Journal of Manpower, 39(4), 519-533.
The data were collected by the TEPP team (FR CNRS 2042) between October 2008 and March 2009. A candidate is defined by the variables ("gender", "licenses").
offer: add number
date: date of the application
sentorder: order in which the application was sent
callback: TRUE if there was a non negative callback
ansorder: order in which the answer was received when positive, 5 otherwise
fname: first name (forename)
lname: last name (family name, surname)
gender: Woman or Man
licenses: both moto and car licenses, Yes or No
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
paris: job located inside Paris, Yes or No
cv: CV template, A or B
data(mobility1)data(mobility1)
A data frame with 1200 rows and 12 variables
Duguet E., du Parquet L., L'Horty Y., Petit P., 2018. Counterproductive hiring discrimination against women: evidence from a French correspondence test. International Journal of Manpower, 39(1): 37-50.
The data were collected by the TEPP team (FR CNRS 2042) between September and November 2006. A candidate is defined by the variables ("nation","lnation", "fnation"). The variables "educ" and "reput" create sample separations.
offer: add number
date: September 2006, October 2006 or November 2006
callback: TRUE if there was a non negative callback
fname: first name (forename)
lname: last name (family name, surname)
educ: education, BAC = Baccalauréat = A-level, BTS = 2 years of vocational training after the A-level
cartime: commuting time by car (minutes)
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
paris: job located inside Paris, Yes or No
nation: nationality, M = Moroccan, F = French
fnation: first name sounding, M = Moroccan, F = French
lnation: last name sounding, M = Moroccan, F = French
origin: summary variable made from nation, lnation and fnation. Example: FMF = French nationality, Moroccan family name and French first name
city: candidate location
reput: reputation of the city, P = privileged, U = Unprivileged
cv: CV template, A or B
natemp: add obtained from the national employment agency (ANPE at the time of the test, France Travail today)
subsid: the firm is a subsidiary of a large corporation, Yes or No
ansmode: answering channel, email or ordinary mail for all the applications to the same add. M = email, P = postage prepaid envelope, R = Marianne stamp, C = Cubitus stamp (comics character)
email: answered by email by all the candidates, 1 = yes, 0 = No
data(origin1)data(origin1)
A data frame with 1097 rows and 20 variables
Duguet E., Leandri N., L'Horty Y., Petit P., 2010. Are young French jobseekers of ethnic immigrant origin discriminated against? A controlled experiment in the Paris area. Annals of Economics and Statistics, 99-100: 187-215.
The data were collected by the TEPP team (FR CNRS 2042) between September and November 2006. A candidate is defined by the variables ("nation","lnation", "fnation"). The variables "educ" and "reput" create sample separations.
offer: add number
date: September 2006, October 2006 or November 2006
callback: TRUE if there was a non negative callback
fname: first name (forename)
lname: last name (family name, surname)
educ: education, BAC = Baccalauréat = A-level, BTS = 2 years of vocational training after the A-level
cartime: commuting time by car (minutes)
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
paris: job located inside Paris, Yes or No
nation: nationality, M = Moroccan, F = French
fnation: first name sounding, M = Moroccan, F = French
lnation: last name sounding, M = Moroccan, F = French
origin: summary variable made from nation, lnation and fnation. Example: FMF = French nationality, Moroccan family name and French first name
city: candidate location
reput: reputation of the city, P = privileged, U = Unprivileged
cv: CV template, A or B
natemp: add obtained from the national employment agency (ANPE at the time of the test, France Travail today)
subsid: the firm is a subsidiary of a large corporation, Yes or No
ansmode: answering channel, email or ordinary mail for all the applications to the same add. M = email, P = postage prepaid envelope, R = Marianne stamp, C = Cubitus stamp (comics character)
email: answered by email by all the candidates, 1 = yes, 0 = No
data(origin2)data(origin2)
A data frame with 936 rows and 20 variables
Petit P., Duguet E., L'Horty Y., 2015. Discrimination résidentielle et origine ethnique: une étude expérimentale sur les serveurs en Ile de France. Economie et Prevision, 206-207: 55-69.
Plots for callback rates and shares
## S3 method for class 'callback_stat' plot(x, col = NULL, dif = TRUE, ...)## S3 method for class 'callback_stat' plot(x, col = NULL, dif = TRUE, ...)
x |
a |
col |
A list of four colors. |
dif |
FALSE for the confidence intervals (the default), TRUE for the difference in proportions |
... |
further arguments passed to or from other methods. |
a ggplot2 object
Emmanuel Duguet
data(labour1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) plot(s)data(labour1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) plot(s)
Computes the number of tests available for each pair of candidates
## S3 method for class 'callback' print(x, ...)## S3 method for class 'callback' print(x, ...)
x |
a |
... |
further arguments passed to or from other methods. |
Printed output.
data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback", comp = "all") print(x)data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback", comp = "all") print(x)
Prints the structure of a component model
## S3 method for class 'callback_comp' print(x, ...)## S3 method for class 'callback_comp' print(x, ...)
x |
a list with class |
... |
further arguments passed to or from other methods. |
Printed output.
Emmanuel Duguet
model <- list(c("license"),c("woman"),c("woman","license","inter")) print(callback_comp(mobility1,"offer",c("gender","licenses"),"callback",model))model <- list(c("license"),c("woman"),c("woman","license","inter")) print(callback_comp(mobility1,"offer",c("gender","licenses"),"callback",model))
Prints the components of a component model
## S3 method for class 'callback_reg' print(x, ...)## S3 method for class 'callback_reg' print(x, ...)
x |
a list with class |
... |
further arguments passed to or from other methods. |
Printed output.
Emmanuel Duguet
model <- list(c("license"),c("woman"),c("woman","license","inter")) z <- reg(callback_comp(mobility1,"offer",c("gender","licenses"),"callback",model)) print(z)model <- list(c("license"),c("woman"),c("woman","license","inter")) z <- reg(callback_comp(mobility1,"offer",c("gender","licenses"),"callback",model)) print(z)
Prints the statistics about the callback rates or shares.
## S3 method for class 'callback_stat' print(x, digits = 3, ...)## S3 method for class 'callback_stat' print(x, digits = 3, ...)
x |
a |
digits |
minimal number of significant digits. |
... |
further arguments passed to or from other methods. |
Printed output.
data(labour1) x <- callback(labour1, "offer", "hist", "callback", comp = "all") print(stat_mcr(x))data(labour1) x <- callback(labour1, "offer", "hist", "callback", comp = "all") print(stat_mcr(x))
Computes the callback numbers for each candidate.
## S3 method for class 'stat_paired' print(x, ...)## S3 method for class 'stat_paired' print(x, ...)
x |
a |
... |
further arguments passed to or from other methods. |
Printed output.
data(labour1) print(stat_paired(callback(labour1, "offer", "hist", "callback", comp = "all")))data(labour1) print(stat_paired(callback(labour1, "offer", "hist", "callback", comp = "all")))
Generic regression function
reg(x, ...)reg(x, ...)
x |
A |
... |
further arguments passed to or from other methods. |
Asymptotic least squares estimation
reg_als(x, y, omega, ols = FALSE)reg_als(x, y, omega, ols = FALSE)
x |
the matrix of the right-hand variables (incl. the constant term when needed). |
y |
the vector of the left-hand variable. |
omega |
the covariance matrix of the disturbances. |
ols |
logical indicating whether to perform OLS (TRUE) or FGLS (FALSE). The default is FALSE. |
a list with class reg_als containing "config"
for the definition of the estimation method and "reg" for the
estimation output.
The "config" data frame includes the following elements:
family: "als" (for Asymptotic least squares).
method: "ols" for Ordinary least square, or "fgls" for Feasible generalized least squares.
The list "reg" includes the following elements (when relevant):
estim:a data frame with c_names for the component names,
coef, the estimated coefficients, std_coef, the estimated
standard errors, studentthe Student statistics for the equality of the
coefficient to 0, p_value, the p-values of the asymptotic Student test.
cova: the estimated covariance matrix of the estimator.
over_test:a data frame with the output of the overidentification
test (FGLS only). The statistic is given by stat, the degrees of
freedom by df and the p-value by p_value
Chamberlain, G. (1982). Multivariate regression models for panel data. Journal of econometrics, 18(1), 5-46. Gourieroux, C., Monfort, A., & Trognon, A. (1985). Moindres carrés asymptotiques. Annales de l'INSEE, 91-122. Kodde, D. A., Plam, F. C., & Pfann, G. A. (1990). Asymptotic least‐squares estimation efficiency considerations and applications. Journal of Applied Econometrics, 5(3), 229-243.
model <- list(c("license"),c("woman"),c("woman","license","inter")) comp <- callback_comp(mobility1,"offer",c("gender","licenses"),"callback",model) x <- comp$aux_boole y <- comp$aux_coef omega <- comp$aux_vcov str(reg_als(x,y,omega))model <- list(c("license"),c("woman"),c("woman","license","inter")) comp <- callback_comp(mobility1,"offer",c("gender","licenses"),"callback",model) x <- comp$aux_boole y <- comp$aux_coef omega <- comp$aux_vcov str(reg_als(x,y,omega))
Component model estimation
## S3 method for class 'callback_comp' reg(x, method = "fgls", ...)## S3 method for class 'callback_comp' reg(x, method = "fgls", ...)
x |
a |
method |
estimation method, "ols" or "fgls" (the default). |
... |
further arguments passed to or from other methods. |
a list with class callback_reg containing "config"
for the definition of the estimation method and "reg" for the
estimation output.
The "config" data frame includes the following elements:
family: "als" (for Asymptotic least squares).
method: "ols" for Ordinary least square, or "fgls" for Feasible generalized least squares.
model:a components model.
The list "reg" includes the following elements (when relevant):
estim:a data frame with c_names for the component names,
coef, the estimated coefficients, std_coef, the estimated
standard errors, studentthe Student statistics for the equality of the
coefficient to 0, p_value, the p-values of the asymptotic Student test.
cova: the estimated covariance matrix of the estimator.
over_test:a data frame with the output of the overidentification
test (FGLS only). The statistic is given by stat, the degrees of
freedom by df and the p-value by p_value.
Duguet E., Le Gall R., L'Horty Y., Petit P. (2018). How does the labour market history influence the access to hiring interviews? International Journal of Manpower, 39(4), 519-533, doi: 10.1108/IJM-09-2017-0231.
model <- list(c("license"),c("woman"),c("woman","license","inter")) comp <- callback_comp(data = mobility1, cluster = "offer", candid = c("gender","licenses"), callback = "callback", model = model) reg(comp) summary(reg(comp))model <- list(c("license"),c("woman"),c("woman","license","inter")) comp <- callback_comp(data = mobility1, cluster = "offer", candid = c("gender","licenses"), callback = "callback", model = model) reg(comp) summary(reg(comp))
Sums the numeric or logical columns in a data frame.
stat_colsums(x)stat_colsums(x)
x |
A data frame |
A data frame with the column sums, under their original names.
data(labour1) s <- callback(labour1,"offer","hist","callback","all") stat_colsums(s$pfds[["LTC vs STC"]])data(labour1) s <- callback(labour1,"offer","hist","callback","all") stat_colsums(s$pfds[["LTC vs STC"]])
Computes the exclusive callback shares and their confidence intervals. The analysis is restricted to the tests with discrimination cases.
stat_ecs(x, method = "student", level = 0.95)stat_ecs(x, method = "student", level = 0.95)
x |
a |
method |
estimation method, "cp" for Clopper-Pearson, "wilson" for Wilson and "student" for Student (the default). |
level |
the level of the confidence intervals (0.95 by default). |
A list with class "callback_stat" containing 4 components: specif,
counts, props and stats
specif: A list containing
convention: string "exclusive callback shares".
cid: convention on 3 characters.
method: the estimation method, "cp" for Clopper-Pearson, "wilson" for Wilson and "student" for "Student" (the default).
level: the level of the confidence intervals (0.95 by default).
source: the R stats function used to compute the statistics (binom.test, prop.test or t.test).
name: the name of the statistic (Fisher, Pearson or Student).
counts: a data frame with the callback counts.
tests: number of tests.
callback: number of tests with at least one callback for either candidate.
disc: number of discrimination cases.
c00: number of test without a callback.
c10: number of tests with callbacks for candidate 1 only.
c01: number of tests with callbacks for candidate 2 only.
c11: number of tests with callbacks for both candidates.
props: A data frame containing the following proportions and their
confidence intervals (when relevant)
inf_p_cand1: 1st candidate exclusive callback share, lower bound.
p_cand1: 1st candidate exclusive callback share.
sup_p_cand1: 1st candidate exclusive callback share, upper bound.
inf_p_cand2: 2nd candidate exclusive callback share, lower bound.
p_cand2: 2nd candidate exclusive callback share.
sup_p_cand2: 2nd candidate exclusive callback share, upper bound.
inf_cand_dif: p_cand1-p_cand2, lower bound.
p_cand_dif: exclusive callback share difference between the candidates.
sup_cand_dif: p_cand1-p_cand2, upper bound.
stats: a data frame containing the statistics for testing the equality
of proportions.
statistic: the value of the test statistic.
p_stat: the p-value of the test statistic.
c_stat: the significance code of the test statistic.
Emmanuel Duguet
Clopper, C. J. & Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26, 404–413. doi:10.2307/2331986.
Student. (1908). The Probable Error of a Mean. Biometrika, 6(1), 1–25. doi:10.2307/2331554.
Wilson, E.B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209–212. doi:10.2307/2276774.
data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_ecs(x))data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_ecs(x))
Computes the matched callback rates, their confidence intervals and performs the equality tests between the candidates.
stat_mcr(x, method = "student", level = 0.95)stat_mcr(x, method = "student", level = 0.95)
x |
a |
method |
estimation method, "cp" for Clopper-Pearson, "wilson" for Wilson and "student" for Student (the default). |
level |
the level of the confidence intervals (0.95 by default). |
A list with class "callback_stat" containing 4 components: specif,
counts, props and stats
specif: A list containing
convention: string "matched callback rates".
cid: convention on 3 characters.
method: the estimation method, "cp" for Clopper-Pearson, "wilson" for Wilson and "student" for "Student" (the default).
level: the level of the confidence intervals (0.95 by default).
source: the R stats function used to compute the statistics (binom.test, prop.test or t.test).
name: the name of the statistic (Fisher, Pearson or Student).
counts: a data frame with the callback counts.
tests: number of tests.
callback: number of tests with at least one callback for either candidate.
disc: number of discrimination cases.
c00: number of test without a callback.
c10: number of tests with callbacks for candidate 1 only.
c01: number of tests with callbacks for candidate 2 only.
c11: number of tests with callbacks for both candidates.
props: A data frame containing the following proportions and their
confidence intervals (when relevant)
inf_p_callback: overall callback rate, lower bound.
p_callback: overall callback rate.
sup_p_callback: overall callback rate, upper bound.
inf_p_cand1: 1st candidate callback rate, lower bound.
p_cand1: 1st candidate callback rate.
sup_p_cand1: 1st candidate callback rate, upper bound.
inf_p_cand2: 2nd candidate callback rate, lower bound.
p_cand2: 2nd candidate callback rate.
sup_p_cand2: 2nd candidate callback rate, upper bound.
inf_cand_dif: p_cand1-p_cand2, lower bound.
p_cand_dif: callback proportion difference between the candidates.
sup_cand_dif: p_cand1-p_cand2, upper bound.
stats: a data frame containing the statistics for testing the equality
of proportions.
statistic: the value of the test statistic.
p_stat: the p-value of the test statistic.
c_stat: the significance code of the test statistic.
Emmanuel Duguet
Clopper, C. J. & Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26, 404–413. doi:10.2307/2331986.
Student. (1908). The Probable Error of a Mean. Biometrika, 6(1), 1–25. doi:10.2307/2331554.
Wilson, E.B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209–212. doi:10.2307/2276774.
data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_mcr(x))data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_mcr(x))
Computes the callback count statistics from the paired data sets.
stat_paired(x)stat_paired(x)
x |
A |
A list with class "stat_paired" containing two data frames: counts and
props.
counts: a data frame with the callback counts.
tests: number of tests.
callback: number of tests with at least one callback for either candidate.
callback1: number of callbacks for candidate 1.
callback2: number of callbacks for candidate 2.
calldif: difference in callback numbers.
disc: number of discrimination cases.
c00: number of test without a callback.
c10: number of tests with callbacks for candidate 1 only.
c01: number of tests with callbacks for candidate 2 only.
c11: number of tests with callbacks for both candidates.
props: a data frame with the following variables.
p_callback: callback/tests.
p_cand1: callback1/tests.
p_cand2: callback2/tests.
p_c00: c00/tests.
p_c10: c10/tests.
p_c01: c01/tests.
p_c11: c11/tests.
p_cand_dif: calldif/tests.
Emmanuel Duguet
data(labour2) x <- callback(data=labour2,cluster="offer",candid="hist",callback="callback") stat_paired(x)data(labour2) x <- callback(data=labour2,cluster="offer",candid="hist",callback="callback") stat_paired(x)
Number and proportion of callbacks for all the candidates.
stat_raw(x, method = "student", level = 0.95)stat_raw(x, method = "student", level = 0.95)
x |
A |
method |
estimation method, "cp" for Clopper-Pearson, "wilson" for Wilson and "student" for Student (the default). |
level |
A number, containing the level of the confidence intervals (0.95 by default). |
A callback_stat object with 2 components: specif and props.
specif: A list containing
convention: string "raw callback rates".
cid: convention on 3 characters.
method: the estimation method, "cp" for Clopper-Pearson, "wilson" for Wilson and "student" for "Student" (the default).
level: the level of the confidence intervals (0.95 by default).
source: the R stats function used to compute the statistics (binom.test, prop.test or t.test).
name: the name of the statistic (Fisher, Pearson or Student).
props: a data frame containing the following variables.
tests: number of tests
callback: number of callbacks
inf_p_callback: callback rate lower bound
p_callback: callback rate
sup_p_callback: callback rate upper bound
Emmanuel Duguet
Clopper, C. J. & Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26, 404–413. doi:10.2307/2331986.
Wilson, E.B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209–212. doi:10.2307/2276774.
data(labour2) x <- callback(data=labour2,cluster="offer",candid="hist",callback="callback") str(stat_raw(x))data(labour2) x <- callback(data=labour2,cluster="offer",candid="hist",callback="callback") str(stat_raw(x))
Significance code of a p-value
stat_signif(p)stat_signif(p)
p |
A number between 0 and 1 |
A character string
stat_signif(0.045)stat_signif(0.045)
Computes the callback shares and their confidence intervals. The analysis is restricted to the tests with at least one callback. It is the definition used in Riach and Rich (2006).
stat_tcs(x, method = "student", level = 0.95)stat_tcs(x, method = "student", level = 0.95)
x |
a |
method |
estimation method, "cp" for Clopper-Pearson, "wilson" for Wilson and "student" for Student (the default). |
level |
the level of the confidence intervals (0.95 by default). |
A list with class "callback_stat" containing 4 components: specif,
counts, props and stats
specif: A list containing
convention: string "total callback shares".
cid: convention on 3 characters.
method: the estimation method, "cp" for Clopper-Pearson, "wilson" for Wilson and "student" for "Student" (the default).
level: the level of the confidence intervals (0.95 by default).
source: the R stats function used to compute the statistics (binom.test, prop.test or t.test).
name: the name of the statistic (Fisher, Pearson or Student).
counts: a data frame with the callback counts.
tests: number of tests.
callback: number of tests with at least one callback for either candidate.
disc: number of discrimination cases.
c00: number of test without a callback.
c10: number of tests with callbacks for candidate 1 only.
c01: number of tests with callbacks for candidate 2 only.
c11: number of tests with callbacks for both candidates.
props: A data frame containing the following proportions and their
confidence intervals (when relevant)
inf_p_cand1: 1st candidate total callback share, lower bound.
p_cand1: 1st candidate total callback share.
sup_p_cand1: 1st candidate total callback share, upper bound.
inf_p_cand2: 2nd candidate total callback share, lower bound.
p_cand2: 2nd candidate total callback share.
sup_p_cand2: 2nd candidate total callback share, upper bound.
inf_p_equal: equal treatment total callback share, lower bound.
p_equal: equal treatment total callback share.
sup_p_equal: equal treatment total callback share, upper bound.
inf_cand_dif: p_cand1-p_cand2, lower bound.
p_cand_dif: total callback share difference between the candidates.
sup_cand_dif: p_cand1-p_cand2, upper bound.
stats: a data frame containing the statistics for testing the equality
of proportions.
statistic: the value of the test statistic.
p_stat: the p-value of the test statistic.
c_stat: the significance code of the test statistic.
Emmanuel Duguet
Clopper, C. J. & Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26, 404–413. doi:10.2307/2331986.
Riach, P. A., & Rich, J. (2006). An experimental investigation of sexual discrimination in hiring in the English labor market. The BE Journal of Economic Analysis & Policy, 6(2),
Student. (1908). The Probable Error of a Mean. Biometrika, 6(1), 1–25. doi:10.2307/2331554.
Wilson, E.B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22, 209–212. doi:10.2307/2276774.
data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_tcs(x))data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_tcs(x))
Prints the regression table of a component model
## S3 method for class 'callback_reg' summary(object, ...)## S3 method for class 'callback_reg' summary(object, ...)
object |
a list with class |
... |
further arguments passed to or from other methods. |
Printed output.
Emmanuel Duguet
model <- list(c("license"),c("woman"),c("woman","license","inter")) comp <- callback_comp(data = mobility1, cluster = "offer", candid = c("gender","licenses"), callback = "callback", model = model) z <- reg(comp) summary(z)model <- list(c("license"),c("woman"),c("woman","license","inter")) comp <- callback_comp(data = mobility1, cluster = "offer", candid = c("gender","licenses"), callback = "callback", model = model) z <- reg(comp) summary(z)
The data were collected by the TEPP team (FR CNRS 2042) in 2011. A candidate is defined by the variables "fname","lname","educ" and "educ_qual" (giving 10 possible cases).
offer: add number
fname: first name (forename)
lname: last name (family name, surname)
age: between 21 and 24 years old
coop: TRUE if the candidate got the diploma in co-op.
educ: education, CAP = vocational training certificate before the A level, BAC = A-level, CAP+BAC = both diploma, None = Failed at CAP exam
educ_qual: Failed = no diploma, GRETA = in-service training, Diploma = standard case, MAF = "One of the best French apprentices"
esp: email service provider
cvq: qualification indcated on the CV (heating or sanitary plumbing)
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
negow: negotiable wage, TRUE or FALSE
hours: weekly work time
woffer: wage offer (in Euros)
jobzip: job location in the Paris area
recgender: gender of the recruiter
date: sending date
ansmode: answering channel, email or ordinary mail ("omail")
sentorder: order in which the application was sent
callback: TRUE if there was a non negative callback
cdate: callback date
chour: callback hour
ansorder: order in which the answer was received when positive, missing otherwise
data(train1)data(train1)
A data frame with 2167 rows and 22 variables
Fremigacci F., L'Horty Y., du Parquet L., Petit P. (2013).L'accès à l'emploi après un CAP ou un baccalauréat professionnel: une évaluation expérimentale dans deux secteurs d'activité. Revue d'économie politique, Vol. 123, No. 3, pp. 353-375. https://www.jstor.org/stable/43860017.
The data were collected by the TEPP team (FR CNRS 2042) in 2011. A candidate is defined by the variables "fname","lname","educ" and "educ_qual" (giving 10 possible cases).
offer: add number
fname: first name (forename)
lname: last name (family name, surname)
age: between 21 and 24 years old
coop: TRUE if the candidate obtained the diploma in co-op.
adsrc: Ad sources (ANPE, the national employment agency, "L'hôtel- lerie-Restauration" journal, other)
educ: education, CAP = vocational training certificate before the A level, BAC = A-level, CAP+BAC = both diploma, None = Failed at CAP exam
educ_qual: Failed = no diploma, GRETA = in-service training, Diploma = standard case, MAF = "One of the best French apprentices"
esp: email service provider
jobtype: job qualification required in the ad
hcrtype: type of restaurant
chain: TRUE if the restaurant belongs to a chain
hstars: number of stars, for the hotels
quality: TRUE if the restaurant has a quality label (Michelin, Bottin Gourmand, Gault et Millau, etc.)
cont: length of labour contract, STC = short term contract (<=1 year), LTC = long term contract (>1 year with no ending date)
hours: weekly work time
english: TRUE if some knowledge of English is required
photo: TRUE if a photograph is required (none is sent by our candidates)
negow: negotiable wage, TRUE or FALSE
woffer: wage offer (in Euros)
jobzip: job location in the Paris area
recgender: gender of the recruiter
date: application sending date
ansmode: answering channel, email or ordinary mail ("omail")
sentorder: order in which the application was sent
callback: TRUE if there was a non negative callback
cdate: callback date
chour: callback hour
ansorder: order in which the answer was received when positive, missing otherwise
data(train2)data(train2)
A data frame with 3552 rows and 29 variables
Fremigacci F., L'Horty Y., du Parquet L., Petit P. (2013).L'accès à l'emploi après un CAP ou un baccalauréat professionnel: une évaluation expérimentale dans deux secteurs d'activité. Revue d'économie politique, Vol. 123, No. 3, pp. 353-375. https://www.jstor.org/stable/43860017.