[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Capturing names of dropped variables in Probit/Logit

From   Maarten buis <>
Subject   Re: st: Capturing names of dropped variables in Probit/Logit
Date   Mon, 7 Apr 2008 09:02:02 +0100 (BST)

--- Partha Deb <> wrote:
> I'm wondering how it might be possible to capture the name of a
> variable dropped by -probit- or -logit- because it "predicts failure
> perfectly".

-indeplist-, downloadable from -ssc-, gives by default a list of
independent variables that have not been dropped. You can use that list
together with Stata's facilities of handeling list in macros, see: 
-help macrolists-, to get to the variables that have been removed. See
the example below:

*--------- begin example -----------
sysuse auto, clear
recode rep78 1/3=0 4/5 =1
gen domestic = !foreign

local rhs "foreign domestic"
logit rep78 `rhs'

indeplist, local
local removed : list rhs - X
di "`removed'"
*---------- end example -------------
(For more on how to use examples I sent to the Statalist, see )

Hope this helps,

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Yahoo! For Good helps you make a difference
*   For searches and help try:

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