Statalist The Stata Listserver


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

st: check if variable is constant within id


From   "Mak, Timothy" <[email protected]>
To   <[email protected]>
Subject   st: check if variable is constant within id
Date   Wed, 16 May 2007 13:28:56 +0100

Dear Statalisters, 

I'm looking for an easy way to check if all the observations for a
particular variable (say var1) within id (a subject identifying
variable) are constant a) for the case where missings can be excluded,
and b) for the case where missings cannot be excluded. The best answer
would be a one-liner, with a short display. I don't want a program to do
this.  

Thanks! 

Tim 

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