Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: lrtest for reduced set of observations???


From   [email protected] (Vince Wiggins, StataCorp)
To   [email protected]
Subject   Re: st: lrtest for reduced set of observations???
Date   Thu, 09 Oct 2003 10:18:06 -0500

Buzz Burhans <[email protected]> asks about an LR test of whether the
coefficients estimated on one subset of the data differ from those estimated
on all the data (a form of what economists often call a Chow test),

> Is it possible to test the equality of the coefficients from a model
> fit by maximum likelihood run with all available observations and
> the same model run with a subset of observations? Not the full
> against a composite set of all observations; my understanding of the
> lr version of the Chow test is that it needs to be run with a set of
> models that are in composite the same dataset in total as the
> original model.  What I am interested in is testing whether
> coefficients from modeling a single subset are equivalent to
> coefficients based on the full set of observations.

The trick is almost always to set the problem up so that we are always
estimating on the whole sample, but one of the regressions constrains the
estimates to be the same for everyone while the other allows the estimates for
the select subset to be different.  In that way the constrained estimates are
nested within the unconstrained and we can do an LR test.

Buzz may already be onto this, but the key is recognizing that nesting the
estimation on the subset within the full model is a necessary "trick" to let
us do the LR test.  Buzz specifically notes what he does not want,

>  Not the full against a composite set of all observations.

Assuming two subsets a and b let the coefficients estimates on a alone be A,
on b alone be B and on both be C.  Assuming the estimates of any ancilary
parameters are treated consistently test A != B is the same as testing A != C
or B != C.

Assume the dependent variable is y with regressors w x z and we have an
indicator variable, d, for observations in the subset.  We generate
interactions between the indicator and each regressor, then estimate the
parameters with and without the interactions.

    . gen dw = d * w
    . gen dx = d * x
    . gen dz = d * z

    . <est_cmd> y w x z
    . estimates store constrained

    . <est_cmd> y w x z dw dx dz d
                        ^^^^^^^^^^ <added regressors>
    . estimates store unconstrained

Where <est_cmd> can be any MLE.

Then just perform the LR test.

    . lrtest constrained unconstrained

Note that we have assumed that any ancillary parameters, such as the variance
of the disturbances, are NOT different for the subset.  This is typical of
"Chow" tests.  If we want to relax that assumption, we will need an estimator
that allows those parameters to be conditioned on covariates.  There is more
about ancillary parameters, Wald-based versions of Chow tests, and robust Chow
tests in the FAQs (but nothing about LR-based Chow tests).  Type -findit chow-
in Stata to find those FAQs.

 
-- Vince
   [email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index