Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: avar question (was: new on ssc - avar)

From   "Schaffer, Mark E" <>
To   "" <>
Subject   st: avar question (was: new on ssc - avar)
Date   Thu, 10 Oct 2013 22:11:33 +0000

Dear Statalisters:

Last month, Kit Baum and I made available a new Stata package, -avar-, and announced it on Statalist in the usual way (see below).

As you can see from the description, -avar- is basically a utility.  If you wanted to roll your own sandwich variance-covariance estimator, -avar- would be a convenient program for generating different sandwich fillings (robust, HAC, 2-way clustering, etc.).

To our surprise, in September, the first month up on SSC, -avar- was downloaded almost 3 thousand times (!), putting it at number 5 in the monthly list of top packages:

> Top 25 packages at SSC
>         Sep 2013
>   Rank   # hits    Package       Author(s)
>   ----------------------------------------------------------------------
>   ...
>      5   2840.0    avar          Christopher F Baum, Mark E Schaffer

and we can't work out why.

Are there that many people out there who are rolling their own VCEs?  Is -avar- a useful teaching tool?  Did the description lead people to conclude (mistakenly) that -avar- would do all the work in generating a robust VCE of their choice?

Would be helpful to know where this unexpected demand is coming from - could influence how we and others think about what are useful Stata programs to develop in the future.

Kit & Mark

> -----Original Message-----
> From: [mailto:owner-
>] On Behalf Of Schaffer, Mark E
> Sent: 04 September 2013 22:24
> To:
> Subject: st: new on ssc - avar
> A new package, avar, is now available from SSC. avar is part of the ivreg2 suite
> of IV/GMM routines.
> avar estimates the asymptotic variance S of (1/N)*Z'e, where Z is an NxL
> matrix of L variables, e is an Nxp matrix of p variables, and N is the sample
> size. Typically, S would be used to form a sandwich-type estimate of the
> variance of an estimator, where Z is a varlist of regressors or instruments, e is
> a varlist of residuals from one or more equations, and S is the "filling" of the
> sandwich variance estimator.
> avar uses the same Mata library as ivreg2, ranktest, et al., and in effect
> provides a user-friendly front-end to the Mata routines used by these programs
> to calculate variants of S for single and multiple equations that are robust to
> various violations of the iid assumption, including heteroskedasticity,
> autocorrelation, 1- and 2-way clustering, common cross-panel disturbances,
> etc.  avar supports time-series and panel data.
> Note: in its current implementation, avar uses listwise deletion.  This means it
> will use only observations for which there are no missing values in any of the
> variables in Z or e (similar to the behaviour of Stata's sureg).
> Kit Baum
> Mark Schaffer

Sunday Times Scottish University of the Year 2011-2013
Top in the UK for student experience
Fourth university in the UK and top in Scotland (National Student Survey 2012)

We invite research leaders and ambitious early career researchers to 
join us in leading and driving research in key inter-disciplinary themes. 
Please see for further information and how
to apply.

Heriot-Watt University is a Scottish charity
registered under charity number SC000278.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index