Statalist


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

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


From   Partha Deb <[email protected]>
To   [email protected]
Subject   Re: st: Capturing names of dropped variables in Probit/Logit
Date   Mon, 07 Apr 2008 14:15:24 -0400

Maarten,

Thanks a lot.  That was just what I was looking for.

Best.

Partha


Maarten buis wrote:
--- Partha Deb <[email protected]> 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
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )

Hope this helps,
Maarten

-----------------------------------------
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

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


___________________________________________________________ Yahoo! For Good helps you make a difference
http://uk.promotions.yahoo.com/forgood/
*
* 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/
--
Partha Deb
Department of Economics
Hunter College
ph:  (212) 772-5435
fax: (212) 772-5398
http://urban.hunter.cuny.edu/~deb/

Emancipate yourselves from mental slavery
None but ourselves can free our minds.
	- Bob Marley

*
*   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