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]

Re: st: Leamer's Extreme Bound Analysis and Fixed Effect

From   Maarten Buis <>
Subject   Re: st: Leamer's Extreme Bound Analysis and Fixed Effect
Date   Wed, 8 Jun 2011 14:02:00 +0200

On Wed, Jun 8, 2011 at 1:31 PM, pl344  wrote:
> I know the the built in Leamer's Extreme Bounds Analysis is designed to run
> OLS regressions. Does anyone know if there is a way to run fixed effect
> panel regression using Leamer's EBA on Stata.

There is no built in Leamer's Extreme Bounds Analysis, there is a user
written -eba- command available on SSC. I assume you mean that.

All EBA is fitting many models and finding the minimum and maximum
effect size of variable. If existing programs don't do what you want
you can easily do it yourself, by looping over all possible
combinations of a set of control variables, for each such combination
estimate your model with that combination of control variables and
store the coefficient of interest. In the example below I only focused
 on the the maximum and minimum coefficient and I used -regress-, you
can adept that in whatever way you like, e.g.  you can use -xtreg-
instead of -reg- or you can use -post- (see: help post-) to store all
coefficients and look at the complete distribution of coefficients
instead of only the min and the max(For more on examples I sent to the
Statalist see: ). To get the list all possible
combinations of control variables I used Nick Cox's -tuples- which you
can get by typing in Stata -ssc install tuples-.

*----------------- begin example ----------------
sysuse auto, clear

reg price mpg
tempname maxb maxse minb minse
scalar `maxb'  = _b[mpg]
scalar `maxse' = _se[mpg]
scalar `minb'  = _b[mpg]
scalar `minse' = _se[mpg]

tuples headroom trunk weight length turn
forvalues i = 1/`ntuples' {
	qui reg price mpg `tuple`i''
	if _b[mpg] > `maxb' {
		scalar `maxb'  = _b[mpg]
		scalar `maxse' = _se[mpg]
	if _b[mpg] < `minb' {
		scalar `minb'  = _b[mpg]
		scalar `minse' = _se[mpg]

di `maxb' " " `maxse'
di `minb' " " `minse'
*---------------- end example -----------------------
(For more on examples I sent to the Statalist see: )

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
*   For searches and help try:

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