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 answering rates and their exacts confidence intervals are computed. Last, exact and asymptotic discrimination tests are performed. Graphical methods are also available. |
Authors: | Emmanuel Duguet [aut, cre] , David Gray [ctb] , Loïc du Parquet [dtc], Yannick L'Horty [ctb] , Rémi Le Gall [dtc] , Noam Léandri [dtc], Pascale Petit [ctb] , Florent Sari [ctb] |
Maintainer: | Emmanuel Duguet <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1 |
Built: | 2024-12-11 06:45:41 UTC |
Source: | CRAN |
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 '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.
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)
Difference of proportions plot
g_difp( data = NULL, method = "wilson", col = c("#619CFF", "#619CFF", "#F564E3"), ... )
g_difp( data = NULL, method = "wilson", col = c("#619CFF", "#619CFF", "#F564E3"), ... )
data |
A |
method |
the type of confidence interval: "cp" for Clopper-Pearson, "wilson" for Wilson (the default), "student" for Student. |
col |
A list of colors (two colors needed). |
... |
further arguments passed to or from other methods. |
A ggplot2 object
Emmanuel Duguet
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) g_difp(data=s,method="student")
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) g_difp(data=s,method="student")
Exclusive callback shares plot
g_ecs( data = NULL, method = "wilson", col = c("#F564E3", "#7CAE00", "#00BFC4"), ... )
g_ecs( data = NULL, method = "wilson", col = c("#F564E3", "#7CAE00", "#00BFC4"), ... )
data |
a |
method |
the type of confidence interval: "cp" for Clopper-Pearson, "wilson" for Wilson (the default), "student" for Student. |
col |
A list of colors (three colors needed). |
... |
further arguments passed to or from other methods. |
A ggplot2 object
Emmanuel Duguet
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_ecs(m) g_ecs(s,method="cp")
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_ecs(m) g_ecs(s,method="cp")
Proportions' comparison plot
g_prop( data = NULL, method = "wilson", col = c("#F564E3", "#7CAE00", "#00BFC4"), ... )
g_prop( data = NULL, method = "wilson", col = c("#F564E3", "#7CAE00", "#00BFC4"), ... )
data |
A |
method |
the type of confidence interval: "cp" for Clopper-Pearson, "wilson" for Wilson (the default), "student" for Student. |
col |
A list of colors (two colors needed). |
... |
further arguments passed to or from other methods. |
A ggplot2 object
Emmanuel Duguet
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) g_prop(data=s,method="student")
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) g_prop(data=s,method="student")
Total callback shares plot
g_tcs(data = NULL, col = c("gray75", "#F564E3", "#7CAE00"), ...)
g_tcs(data = NULL, col = c("gray75", "#F564E3", "#7CAE00"), ...)
data |
a |
col |
A list of colors (three colors needed). |
... |
further arguments passed to or from other methods. |
A ggplot2 object
Emmanuel Duguet
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_tcs(m) g_tcs(s)
data(origin1) 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.
Generic plot function
graph(data, method, col, ...)
graph(data, method, col, ...)
data |
A |
method |
the type of confidence interval: "cp" for Clopper-Pearson, "wilson" for Wilson (the default), "student" for Student. |
col |
A list of colors. |
... |
further arguments passed to or from other methods. |
Exclusive callback shares plots
## S3 method for class 'stat_ecs' graph( data = NULL, method = "wilson", col = c("#F564E3", "#7CAE00", "#00BFC4"), dif = TRUE, ... )
## S3 method for class 'stat_ecs' graph( data = NULL, method = "wilson", col = c("#F564E3", "#7CAE00", "#00BFC4"), dif = TRUE, ... )
data |
a |
method |
the type of confidence interval: "cp" for Clopper-Pearson, "wilson" for Wilson (the default), "student" for Student. |
col |
A list of colors (three colors needed). |
dif |
TRUE for the difference in proportions (the default), FALSE for a comparison of confidence intervals |
... |
further arguments passed to or from other methods. |
a ggplot2 object
Emmanuel Duguet
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_tcs(m) graph(data=s,method="student")
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_tcs(m) graph(data=s,method="student")
Global callback rates plot
## S3 method for class 'stat_glob' graph( data = NULL, method = "wilson", col = c("#F8766D", "#00BA38", "#619CFF"), ... )
## S3 method for class 'stat_glob' graph( data = NULL, method = "wilson", col = c("#F8766D", "#00BA38", "#619CFF"), ... )
data |
A |
method |
the type of confidence interval: "cp" for Clopper-Pearson, "wilson" for Wilson (the default), "student" for Student. |
col |
A list of colors (one colour needed). |
... |
further arguments passed to or from other methods. |
A ggplot2 object
Emmanuel Duguet
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_glob(m) graph(s)
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_glob(m) graph(s)
Matched callback rates plots
## S3 method for class 'stat_mcr' graph( data = NULL, method = "wilson", col = c("#F564E3", "#7CAE00", "#00BFC4"), dif = TRUE, ... )
## S3 method for class 'stat_mcr' graph( data = NULL, method = "wilson", col = c("#F564E3", "#7CAE00", "#00BFC4"), dif = TRUE, ... )
data |
a |
method |
the type of confidence interval: "cp" for Clopper-Pearson, "wilson" for Wilson (the default), "student" for Student. |
col |
A list of colors (three colors needed). |
dif |
TRUE for the difference in proportions (the default), FALSE for a comparison of confidence intervals |
... |
further arguments passed to or from other methods. |
a ggplot2 object
Emmanuel Duguet
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) graph(data=s,method="student")
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_mcr(m) graph(data=s,method="student")
Total callback shares plots
## S3 method for class 'stat_tcs' graph( data = NULL, method = "wilson", col = c("#F564E3", "#7CAE00", "#00BFC4"), dif = TRUE, ... )
## S3 method for class 'stat_tcs' graph( data = NULL, method = "wilson", col = c("#F564E3", "#7CAE00", "#00BFC4"), dif = TRUE, ... )
data |
a |
method |
the type of confidence interval: "wilson" for Wilson (the default), "student" for Student. |
col |
A list of colors (three colors needed). |
dif |
TRUE for the difference in proportions (the default), FALSE for a comparison of confidence intervals |
... |
further arguments passed to or from other methods. |
a ggplot2 object
Emmanuel Duguet
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_tcs(m) graph(data=s,method="student")
data(origin1) m <- callback(labour1,"offer","hist","callback","all") s <- stat_tcs(m) graph(data=s,method="student")
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.
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)
Computes the callback numbers for each candidate.
## S3 method for class 'stat_count' print(x, ...)
## S3 method for class 'stat_count' print(x, ...)
x |
a |
... |
further arguments passed to or from other methods. |
Printed output.
data(labour1) print(stat_count(callback(labour1, "offer", "hist", "callback", comp = "all")))
data(labour1) print(stat_count(callback(labour1, "offer", "hist", "callback", comp = "all")))
Prints the global callback numbers and proportions for each candidate.
## S3 method for class 'stat_glob' print(x = NULL, method = "wilson", digits = 3, ...)
## S3 method for class 'stat_glob' print(x = NULL, method = "wilson", digits = 3, ...)
x |
a |
method |
the type of confidence interval: "cp" for Clopper-Pearson, "wilson" for Wilson (the default), "student" for Student. |
digits |
minimal number of significant digits |
... |
further arguments passed to or from other methods. |
Printed output.
data(labour1) print(stat_glob(callback(labour1, "offer", "hist", "callback", comp = "all")))
data(labour1) print(stat_glob(callback(labour1, "offer", "hist", "callback", comp = "all")))
Prints the statistics about the callback rates
## S3 method for class 'stat_mcr' print(x, digits = 3, ...)
## S3 method for class 'stat_mcr' 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,level=0.90))
data(labour1) x <- callback(labour1, "offer", "hist", "callback", comp = "all") print(stat_mcr(x,level=0.90))
Prints the statistics from stat_tcs() output
Prints the statistics from stat_ecs() output
## S3 method for class 'stat_tcs' print(x, digits = 3, ...) ## S3 method for class 'stat_ecs' print(x, digits = 3, ...)
## S3 method for class 'stat_tcs' print(x, digits = 3, ...) ## S3 method for class 'stat_ecs' print(x, digits = 3, ...)
x |
a |
digits |
minimal number of significant digits. |
... |
further arguments passed to or from other methods. |
Printed output.
Printed output.
data(labour1) x <- callback(labour1, "offer", "hist", "callback", comp = "all") print(stat_tcs(x,level=0.90)) data(labour1) x <- callback(labour1, "offer", "hist", "callback", comp = "all") print(stat_ecs(x,level=0.90))
data(labour1) x <- callback(labour1, "offer", "hist", "callback", comp = "all") print(stat_tcs(x,level=0.90)) data(labour1) x <- callback(labour1, "offer", "hist", "callback", comp = "all") print(stat_ecs(x,level=0.90))
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 callback count statistics from the paired data sets.
stat_count(x)
stat_count(x)
x |
A |
A list with class "stat_count"
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.
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
calldif: difference in callback numbers.
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_count(x)
data(labour2) x <- callback(data=labour2,cluster="offer",candid="hist",callback="callback") stat_count(x)
Computes the callback shares and their confidence intervals. The analysis is restricted to the tests with discrimination cases.
stat_ecs(x, level = 0.95)
stat_ecs(x, level = 0.95)
x |
a |
level |
a number, containing the level of the confidence intervals (0.95 by default). |
A list with class "stat_ecs"
containing 8 components : level, shares,
cp, wilson, student, t.student, t.pearson and t.fisher.
level
: the level of the confidence intervals.
shares
: a data frame containing the following variables.
disc: number of discrimination cases.
c10: number of tests with the 1st candidate preferred (2nd candidate discriminated against).
c01: number of tests with the 2nd candidate preferred (1st candidate discriminated against).
cdif: net discrimination c10-c01.
p_cand1: 1st candidate callback share (c10/disc).
p_cand2: 2nd candidate callback share (c01/disc).
p_cand_dif: p_cand1-1/2.
cp
: a data frame containing the Clopper-Pearson confidence intervals,
from binom.test(), and the p-value of the Fisher test of independence between
the candidate type and the callback variable, from fisher.test().
inf_p_cand1: 1st candidate callback rate, lower bound.
sup_p_cand1: 1st candidate callback rate, upper bound.
inf_p_cand2: 2nd candidate callback rate, lower bound.
sup_p_cand2: 2nd candidate callback rate, upper bound.
wilson
: a data frame containing the Wilson confidence intervals
and the p-value of the equality test of callback shares between the two
candidates, from prop.test().
inf_p_cand1: 1st candidate callback share, lower bound.
sup_p_cand1: 1st candidate callback share, upper bound.
inf_p_cand2: 2nd candidate callback share, lower bound.
sup_p_cand2: 2nd candidate callback share, upper bound.
inf_cand_dif: p_c10-p_c01, lower bound.
sup_cand_dif: p_c10-p_c01, upper bound.
student
: a data frame containing the Student confidence intervals
and the p-value of the equality test of callback shares between the two
candidates.
inf_p_cand1: 1st candidate callback share, lower bound.
sup_p_cand1: 1st candidate callback share, upper bound.
inf_p_cand2: 2nd candidate callback share, lower bound.
sup_p_cand2: 2nd candidate callback share, upper bound.
inf_cand_dif: p_c10-p_c01, lower bound.
sup_cand_dif: p_c10-p_c01, upper bound.
t.fisher
: a data frame containing the statistics of the Fisher test.
p_cand_dif: 1st candidate callback share - 1/2.
p_Fisher: the p-value of the Fisher test.
s_Fisher: the significance code of the Fisher test.
t.pearson
: a data frame containing the statistics of the Pearson test.
p_cand_dif: 1st candidate callback share - 1/2.
Pearson: the value of Pearson's chi-squared test statistic.
p_Pearson: the p-value of the Pearson test.
s_Pearson: the significance code of the Pearson test.
t.student
: A data frame containing the statistics of the Student test.
p_cand_dif: 1st candidate callback share - 1/2.
Student: the value of Student's test statistic.
p_Student: the p-value of the Student test.
s_Student: the significance code of the Student test.
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(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_ecs(x,level=0.9))
data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_ecs(x,level=0.9))
Number and proportion of callbacks for all the candidates.
stat_glob(x, level = 0.95)
stat_glob(x, level = 0.95)
x |
A |
level |
A number, containing the level of the confidence intervals (0.95 by default). |
A stat_glob
object with 5 components : level
, props
,
cp
, wilson
and student
.
level
: the level of the confidence intervals
props
: a data frame containing the following variables.
tests: number of tests.
callback: number of callbacks.
p_callback: callback rate.
cp
, wilson
and student
are data frames containing the
following variables:
inf_p_callback: callback rate lower bound.
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_glob(x))
data(labour2) x <- callback(data=labour2,cluster="offer",candid="hist",callback="callback") str(stat_glob(x))
Computes the callback rates and their confidence intervals.
stat_mcr(x, level = 0.95)
stat_mcr(x, level = 0.95)
x |
a |
level |
a number, containing the level of the confidence intervals (0.95 by default). |
A list with class "stat_mcr"
containing 8 components: level, props, cp,
wilson, student, t.fisher, t.pearson and t.student.
level:
the level of the confidence intervals.
props
: a data frame containing the following variables:
tests: number of tests.
p_callback: overall callback rate.
p_cand1: 1st candidate callback rate.
p_cand_dif: p_cand1-p_cand2.
cp
: A data frame containing the Clopper-Pearson confidence intervals,
from binom.test().
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.
sup_cand_dif: p_cand1-p_cand2, upper bound.
wilson
: a data frame containing the Wilson confidence intervals,
from prop.test().
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.
sup_cand_dif: p_cand1-p_cand2, upper bound.
student
: a data frame containing the Student confidence intervals,
from t.test().
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.
sup_cand_dif: p_cand1-p_cand2, upper bound.
t.fisher
: a data frame containing the statistics of the Fisher test.
p_cand_dif: callback proportion difference between the candidates.
p_Fisher: the p-value of the Fisher test.
s_Fisher: the significance code of the Fisher test.
t.pearson
: a data frame containing the statistics of the Pearson test.
p_cand_dif: callback proportion difference between the candidates.
Pearson: the value of Pearson's chi-squared test statistic.
p_Pearson: the p-value of the Pearson test.
s_Pearson: the significance code of the Pearson test.
t.student
: A data frame containing the statistics of the Student test.
p_cand_dif: callback proportion difference between the candidates.
Student: the value of Student's test statistic.
p_Student: the p-value of the Student test.
s_Student: the significance code of the Student test.
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(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_mcr(x,level=0.9))
data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_mcr(x,level=0.9))
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, level = 0.95)
stat_tcs(x, level = 0.95)
x |
a |
level |
a number, containing the level of the confidence intervals (0.95 by default). |
A list with class "stat_tcs"
containing 8 components : level, props,
cp, wilson, student, t.student, t.pearson and t.fisher.
level
: the level of the confidence intervals.
props
: a data frame containing the following variables.
ncall: number of callbacks.
c10: number of tests with the 1st candidate preferred (2nd candidate discriminated against).
c01: number of tests with the 2nd candidate preferred (1st candidate discriminated against).
c11: number of tests with both candidates called back.
p_cand1: 1st candidate total callback share (c10/ncall).
p_cand2: 2nd candidate total callback share (c01/ncall).
p_equal: equal treatment callback share (c11/ncall).
p_cand_dif: p_cand1-p_cand2.
cp
: a data frame containing the Clopper-Pearson confidence intervals,
from binom.test(), and the p-value of the Fisher test of independence between
the candidate type and the callback variable, from fisher.test().
inf_p_cand1: 1st candidate total callback share, lower bound.
sup_p_cand1: 1st candidate total callback share, upper bound.
inf_p_cand2: 2nd candidate total callback share, lower bound.
sup_p_cand2: 2nd candidate total callback share, upper bound.
inf_p_equal: equal treatment total callback rate, lower bound.
sup_p_equal: equal treatment total callback rate, upper bound.
wilson
: a data frame containing the Wilson confidence intervals
and the p-value of the equality test of callback shares between the two
candidates, from prop.test().
inf_p_cand1: 1st candidate total callback share, lower bound.
sup_p_cand1: 1st candidate total callback share, upper bound.
inf_p_cand2: 2nd candidate total callback share, lower bound.
sup_p_cand2: 2nd candidate total callback share, upper bound.
inf_p_equal: equal treatment total callback rate, lower bound.
sup_p_equal: equal treatment total callback rate, upper bound.
inf_cand_dif: p_c10-p_c01, lower bound.
sup_cand_dif: p_c10-p_c01, upper bound.
student
: a data frame containing the Student confidence intervals
and the p-value of the equality test of callback shares between the two
candidates.
inf_p_cand1: 1st candidate total callback share, lower bound.
sup_p_cand1: 1st candidate total callback share, upper bound.
inf_p_cand2: 2nd candidate total callback share, lower bound.
sup_p_cand2: 2nd candidate total callback share, upper bound.
inf_p_equal: equal treatment total callback rate, lower bound.
sup_p_equal: equal treatment total callback rate, upper bound.
inf_cand_dif: p_c10-p_c01, lower bound.
sup_cand_dif: p_c10-p_c01, upper bound.
t.fisher
: a data frame containing the statistics of the Fisher test.
p_cand_dif: p_cand1-p_cand2.
p_Fisher: the p-value of the Fisher test.
s_Fisher: the significance code of the Fisher test.
t.pearson
: a data frame containing the statistics of the Pearson test.
p_cand_dif: p_cand1-p_cand2.
Pearson: the value of Pearson's chi-squared test statistic.
p_Pearson: the p-value of the Pearson test.
s_Pearson: the significance code of the Pearson test.
t.student
: A data frame containing the statistics of the Student test.
p_cand_dif: p_cand1-p_cand2.
Student: the value of Student's test statistic.
p_Student: the p-value of the Student test.
s_Student: the significance code of the Student test.
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),
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,level=0.9))
data(labour1) x <- callback(data=labour1,cluster="offer",candid="hist",callback="callback") str(stat_ecs(x,level=0.9))