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

RE: st: RE: Using results from correlation matrices to pinpoint variables


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: Using results from correlation matrices to pinpoint variables
Date   Sat, 18 Jun 2005 16:49:21 +0100

My guess is that what you are getting what you 
ask for, but that it is not what you want. 

The difference between 

	if <condition> <command> 

and 

	<command> if <condition> 

is profound. For one documentation, see
http://www.stata.com/support/faqs/lang/ifqualifier.html

I am not clear what you want precisely. If you 
want to drop a variable if and only if all observations
are missing, then 

. search dropmiss 

for a convenience command. 

Nick 
n.j.cox@durham.ac.uk 

Alejandro Delafuente
> 
> Dear Nick, thanks for your advice. With some little 
> adjustments it worked out! 
> Also, taking advantage of your generosity let me ask you a 
> quick question: am 
> trying to drop some monthly variables in a time sequence 
> (from january 1961 to 
> dec 2001) with missings in them. My code looks as follows:
> foreach var of varlist jan* feb* ... dec* {
> 	if `var' ==. {
> 	drop `var' 
> 	}
> }
> But for some reason it is not working. Can you tell why?
> As always, many thanks.
> 

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index