Statalist The Stata Listserver

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

st: RE: detecting a dropped variable programatically

From   "Maarten Buis" <>
To   <>
Subject   st: RE: detecting a dropped variable programatically
Date   Fri, 19 May 2006 10:11:56 +0200

--- Mark wrote:
>I am writing a program that runs through potentially tens of thousands
> of regressions.  During this evaluation, I sometimes end up with
> collinear variables.   I know that I can look thru the e(V) matrix looking
>  for a value of zero on the diagonal.  But doing this for every regression 
> means another loop inside the main loop that may run tens of thousands
> of times.
> Does anyone know of a way to detect a dropped variable without a loop?

There is the matrix function -diag0cnt- that counts the number of  0s on the


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

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214 

+31 20 5986715

*   For searches and help try:

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