*! version 1.0 03apr2020
help rassign

Title

rassign -

Regression-based test for random assignment to peer groups (Jochmans, 2020)

Syntax

rassign depvar indepvar [w] [if] [in] , group(varname)

where w are optional additional control variables to be included

group Specifies the urn from which peers are drawn

Description

rassign performs a regression-based test for the (conditional) random assignment of individuals in urns to peer groups (Jochmans, 2020). The dependent variable is a characteristic of the individual.
The independent variable is the average characteristic of the individual's peers. The test controls for fixed effects at the urn level by default. The optional w are additional covariates that can be controlled for. The command can equally be used to test for the presence of peer effects in the linear-in-means model without modification.

Saved results

rassign saves the following in r():

Scalars

r(t) the test statistic

r(r_pvalue) right-sided p-value

r(pvalue) two-sided p-value

r(l_pvalue) left-sided p-value

r(Ng) Number of urns

r(maxG) Size of largest urn

r(minG) Size of smallest urn

Example

. use pga_data

. rassign handicap hand_i if round==1, group(tourn)

The data set pga_data.dta of Guryan, Kroft and Notowidigo (2009) can be downloaded from https://www.aeaweb.org/articles?id=10.1257/app.1.4.34

References

Guryan, J., D. Kroft, and N. J. Notowidigdo (2009). Peer effects in the workplace: Evidence from random groupings in professional golf tournaments. American Economic Journal: Applied Economics 44, 289–302.

Jochmans, K. (2020). Testing random assignment to peer groups.
Mimeo, April 2020.

Authors

Koen Jochmans, University of Cambridge; and Vincenzo Verardi, FNRS-UNamur