*! version 1.1 June 2024
twowayjack

Title

Jackknife Inference With two-way clustering.

Syntax

twowayjack varlist, cluster(varname) [ options]

varlist the dependent variable, the independent variable of
interest, and other (binary or continuous) independent variables,

cluster the two clustering variables. Exactly two variables must be specified.

fevar(varlist) creates fixed effects for the included
variables, similar to i.varname.

sample allows for sample restrictions. For instance,
in order to restrict the analysis to individuals 25 years of age or
older based on a variable "age", sample(age>=25) should be added to
the list of options.

Description

twowayjack is a stand alone command that calculates a cluster jackknife variance estimator. MacKinnon, Nielsen, and Webb (2024) documents the procedure more fully than this help file. The command will calculate two standard errors for the coefficient of interest. Both use the max(se) procedure rather than an eigenvalue correction. The first standard error uses the conventional (non-jackknife) CRVE, referred to as CV_1. The second, and preferred, standard error is the jackknife one, CV_3. The package also calculates coefficients of variation for leverage, partial leverage, cluster sizes and omit-one-cluster coefficients in each dimension.
Finally, it calculcates the effective number of clusters in the two dimensions of clustering.

Stored results

All of the matrices displayed on screen are available in memory after twowayjack
runs.

matrix list mwcvstuff shows the two CV standard errors, p-values and confidence intervals.

matrix list summtable shows the various cluster diagnostics.

Examples

nlswork -- using regress

. webuse nlswork, clear

. keep if inrange(age,25,35)

. gen vismin = inrange(race,2,3)

. reg hours vismin south i.age i.birth_yr i.year i.ind , cluster(ind)

nlswork -- using twowayjack

. twowayjack hours vismin south , fevar(age birth_yr year ind ) cluster(age ind)

sample restrictions - using sample

. gen rndsample = runiform()

. twowayjack hours vismin south , fevar(age birth_yr year ind ) cluster(age ind) sample(rndsample<=0.5)

Author

Matthew D. Webb

matthewdwebb@gmail.com

Citation

twowayjack is not an official Stata command. It is a
free contribution to the research community.

Please cite:

James G. MacKinnon, Morten Ø. Nielsen, and Matthew D. Webb.
2024. Jackknife inference with two-way clustering. Arxiv 2406.08880.

***************************************************************