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

From |
Alejandro Delafuente <alejandro.delafuente@st-antonys.oxford.ac.uk> |

To |
statalist@hsphsun2.harvard.edu |

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

Date |
Sun, 19 Jun 2005 16:37:46 +0100 (BST) |

okey, in that case the solution was: using the command dropmiss with the option any, so that all variables with missings would be dropped out. As for the if distinction between qualifier and command, that was already clear to me, or at least that is what I thought. Alex In message <031173627889364697C50B3B266CBB8A101BC6@GEOGMAIL.geog.ad.dur.ac.uk> statalist@hsphsun2.harvard.edu writes: > A thread is best closed by saying what the > solution was, not that you found a solution.... > > Nick > n.j.cox@durham.ac.uk > > Alejandro Delafuente > > > many thanks Nick. I sorted out the problem. > > > > In message > > <031173627889364697C50B3B266CBB8A101BAF@GEOGMAIL.geog.ad.dur.ac.uk> > > statalist@hsphsun2.harvard.edu writes: > > > 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/ > -- Alejandro de la Fuente QEH/Department of International Development Oxford University * * 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/

**References**:**RE: st: RE: Using results from correlation matrices to pinpoint variables***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**RE: st: RE: Using results from correlation matrices to pinpoint variables** - Next by Date:
**st:: help file for -lxpct_2-** - Previous by thread:
**RE: st: RE: Using results from correlation matrices to pinpoint variables** - Next by thread:
**RE: st: RE: Using results from correlation matrices to pinpoint variables** - Index(es):

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