[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: How to obtain standard errors for the 2SLAD model (qreg): Theory behind...
Follow the instructions given by Statacorp's Brian P. Poi in the
statalist dated 26 Sep 2003 (look below) I was wondering how
bootstrapping will actually correct the standard errors? Could anybody
briefly outline the theory or direct me to any references?
Also, is it possible to perform tests such as the exogeneity test of
instruments or a test of over-identification assumption?
Many thanks for your time!
Myself and a co-author are stuck on how to do the programming mentioned
by the Stata econometrician below... I thought this Statalist might
help. Can anybody provide some insight (or better yet, a few lines of
code as a potential guide!) on the dilemma outlined below between *****?
***** The easiest way to get standard errors for the 2SLAD model is to
use the bootstrap. Note that you will want to bootstrap both
stages of estimation, not just the second stage. Therefore, when
you use -bootstrap- or -bstrap-, you will need to write a program
that estimates your entire model.
A seminal paper in this area is Amemiya (1982, Econometrica). There,
among other things he shows that even though you use quantile regress-
ion in the second stage, you should still use OLS in the first stage;
this is what he calls the 2SLAD model. He also derives the asymptotic
standard errors for this model, though my guess is that using the
bootstrap is easier. *****
Chihmao and Sergio are referring to a method to estimate a quantile
regression that contains an endogenous variable. For concreteness,
suppose we wish to estimate the following model using least absolute
(1) mpg = a + b*foreign + c*price + error
We suspect that "price" may be correlated with the error term, and so we
need to use an instrumental variables estimator. We have two variables,
"weight" and "length", that are correlated with "price" but not the error
A simple two-stage estimator proceeds as follows:
1. Regress "price" on "weight", "length", and "foreign" using OLS
and calculate the fitted values; call them "phat"
2. Estimate equation (1) with "phat" in place of "price" using
quantile regression (-qreg-)
As is usually the case, the standard errors from the second-stage
regression are incorrect because they ignore the fact that "phat" is
itself estimated. Chihmao would like to know how to use the bootstrap to
obtain standard errors. The following code does just that:
sysuse auto, clear
// Stage 1
regress price foreign weight length
predict double phat, xb
// Stage 2
qreg mpg foreign phat
bootstrap "bootit" _b, reps(1000) dots
Whenever one bootstraps an estimator that uses iteration to find the
optimal parameters (as -qreg- does), there is a chance that for some
bootstrap samples the algorithm does not converge. If Chihmao runs into
that problem with his model, I'll be happy to help him out if he sends his
dataset and dofile to firstname.lastname@example.org or to me privately.
* For searches and help try: