Heteroscedasticity Consistent Standard Errors
Papers
There are two versions of the paper on the small sample properties on
heteroscedasticity consistent covariance matrix tests.
Longer Version: This draft contains details on the simulations and
tables with many results:
Shorter Version: This draft removes many of the technical details:
This paper is a followup to an earlier paper:
 Long, J.S. and Pravin Trivedi, 1992, "Some Specification Tests for
the Linear Regression Model." Sociological Methods and Research 21:161204.
Reprinted in Bollen, Kenneth A. and J.S. Long (editors), 1993, Testing Structural
Equation Models. Beverly Hills:Sage University Press.
Software Used in Monte Carlo Simulations
The simulations were run using Stata 6.0. There are three zip files which
contain the key files used for the simulations:
 hcado.zip: contains the ado files used
by Stata to run the simulations. These files must be put on the adopath so
that Stata can load them as needed.
 hcpop.zip: contains programs used to
generate the population data sets
 hcdo.zip: contains the Stata programs
(.do files) and output logs (.log files) used to run the simulations and
summarize the results.
The contents of these files are now described.
hcado.zip: ado files for generating x's and error structures, running
simulations, and evaluating results. These ado files generate the x variables:
 hcbase.adopopulation used for all populations except several experiments
with different data structures.
 hcbased2.adopopulation where x2 is a dummy variable.
 hcbaseq.adopopulation where all variables have the same variance
 hcbasebi.adopopulation where one of the x’s is bimodal.
These files generate the error structures. R2=.4 unless noted otherwise:
 hc123c.adohet on x1,x2 & x3, chisquare errors.
 hc123n.adohet on x1,x2 & x3, normal errors.
 hc1c4.adohet on x1, chisquare errors.
 hc1n4.adohet on x1, normal errors.
 hc2dbg.adohet on binary x2 with large amount of
het.
 hc2dsm.adohet on binary x2 with small amount of
het.
 hc34c.adohet on x3 & x4, chisquare errors.
 hc34cb.adohet on x3 & x4, chisquare errors with bimodal x.
 hc34n.adohet on x3 & x4, normal errors.
 hc3c3.adohet on x3, chisquare errors, R2=.26.
 hc3c4.adohet on x3, chisquare errors.
 hc3cb.adohet on x3, chisquare errors with bimodal x.
 hc3eqc.adohet on x3, chisquare errors, equal variances for x’s.
 hc3n2.adohet on x3, normal errors, R2=.2.
 hc3n4.adohet on x3, normal errors.
 hc3n7.adohet on x3, normal errors, R2=.7.
 hc3na.adohet on x3, normal errors, R2 =.2, revised method to generate
errors.
 hc3nn.adohet on x3, normal errors, R2 =.4, revised method to generate
errors.
 hc3nz.adohet on x3, normal errors, R2 =.8, revised method to generate
errors.
 hcc4.adochisquared errors.
 hccb.adochisquared errors with bimodal x.
 hcn2.adonormal errors, R2=.2.
 hcn4.adonormal errors, R2=.4.
 hcn7.adonormal errors, R2=.7.
 hcneq4.adonormal errors, with standardized variance for x1,x2,x3,x4.
 hct4.adot 5df errors, R2=.4.
 hchet.adocomputes ratio of standard deviations of residuals in 515
percentile and 8595 percentile.
These ado files control the simulations and summarize results:
 hcmonte.adocontrol program for simulations.
 hcscrn.adosimulations with screening tests.
 hctest.adocompute heteroscedasticity tests.
 hcresult.adocreate file merging results
 hcsum.ado,hcsum2.ado,hcsum3.ado,hcsum4.adosummarize results in various
ways.
 hcplt.adoplot results.
 hcpltall.adoplot all results.
 hcpltht.adoplot results of het tests.
 hcpltim.adoplot IM test.
 hcpltpw.adoplot power.
 hcpltpw2.adoplot power with screening.
 hcpltsc.adoplot results with screening.
 hcpltsz.adoplot size.
 hcpltsz2.adoplot size with screening.
 hcpower.adocompute power curves.
hcpop.zip: do files for creating the population files.
 jslhc1.dogenerate population data used for standard simulations.
 jslhc2.dogenerate population data with bimodal x.
 jslhc3.dogenerate population data with equal variances for x’s.
 jslhc4.dogenerate population data with binary x2.
hcdo.zip: do files for running the simulations and summarizing the results.
These do files have the commands for each set of simulations. In general
there will be 4 do files for each data structure:
 : ...sim: run simulations
 : ...sum: create a summary file of all results
 : ...res: list key results
 : ...plot: plot key results
The do files for different data structures are:
 123c_.dohet on x1,x2 & x3, chisquare errors.
 123n_.dohet on x1,x2 & x3, normal errors.
 1c4_.dohet on x1, chisquare errors.
 1n4_.dohet on x1, normal errors.
 2dbg_.dohet on binary x2 with large amount of
het.
 2dsm_.dohet on binary x2 with small amount of
het.
 34c_.dohet on x3 & x4, chisquare errors.
 34n_.dohet on x3 & x4, normal errors.
 3c4_.do het on x3, chisquare errors.
 3eqc_.dohet on x3, chisquare errors, equal variances for x’s.
 3n4_.dohet on x3, normal errors.
 3na_.dohet on x3, normal errors, R2 =.2, revised method to generate
errors.
 3nn_.dohet on x3, normal errors, R2 =.4, revised method to generate
errors.
 3nz_.dohet on x3, normal errors, R2 =.8, revised method to generate
errors.
 c4_.dochisquared errors.
 n4_.donormal errors.
 t4_.dot 5df errors.
