Statalist The Stata Listserver


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

st: Display of missing by groups


From   Fred Wolfe <[email protected]>
To   [email protected]
Subject   st: Display of missing by groups
Date   Wed, 08 Feb 2006 07:02:20 -0600

Statalisters,

I keep thinking there must be an easy solution to this problem, but I can't find it. This code always produces a . (missing) bygroup.

. bys ranada: su haq* if full ==1 & newenc ==3 & ranada !=.

----------------------------------------------------------------------------------------------------------------------------
-> ranada = 0

Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
haq_disabi~y | 917 1.106325 .6579799 0 3
haq2 | 915 1.07224 .6258604 0 2.9

----------------------------------------------------------------------------------------------------------------------------
-> ranada = 1

Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
haq_disabi~y | 969 1.103844 .6835943 0 3
haq2 | 967 1.065047 .6345786 0 2.8

----------------------------------------------------------------------------------------------------------------------------
-> ranada = .

Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
haq_disabi~y | 0
haq2 | 0


However, I don't want to display the missing by group. I know that I can -preserve-, -drop if ranada == .-, run the code, and then -restore-.

But is there an easier way?

Thanks,

Fred

Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel (316) 263-2125 Fax (316) 263-0761
[email protected]


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