[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: st Variable dropped from regression: how to capture event?
- --- Friedrich Huebler <firstname.lastname@example.org> wrote:
> I am running a loop of regressions that should only be completed when
> all variables are included. In case a variable is dropped I want to
> skip the rest of the loop and continue with the next regression.
> The regression still runs, but with an incomplete set of variables.
> How can I check whether a variable was dropped?
As an alternative to some of the suggestions that have been offered already,
you could test the variable list without even running the regression by
using the - _rmcoll - command. or - _rmdcoll - command.
Say you want to regress Y on X1 X2 X3, but only if the X variables are
Before running the regression set up with
local depvar = "X1 X2 X3"
_rmcoll will return in r(varlist) a list of non-collinear variables found in
If `r(varlist)' and `depvar' are the same go ahead and run
reg Y `depvar'
otherwise skip it.
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.431 / Virus Database: 268.14.7/538 - Release Date: 11/18/2006
* For searches and help try: