Statalist


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

st: RE: if qualifier


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: if qualifier
Date   Tue, 13 Nov 2007 17:45:52 -0000

!inlist(trt, 1, 5, 7, 8) 

Note the ! for negation and look up -inlist()- and -inrange()-. 
Somebody wrote an entire article on these beasts: 

SJ-6-4  dm0026  . . . . . . Stata tip 39: In a list or out? In a range
or out?
        Q4/06   SJ 6(4):593--595                                 (no
commands)
        tip for use of inlist() and inrange()


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Chris Witte
Sent: 13 November 2007 17:42
To: [email protected]
Subject: st: if qualifier

Stata 9.2 user

quick question about "if" qualifier:

I'm wanting to include observations in my anova if the variable "trt" is
not equal to 1, 5, 7, or 8.   Here's my command:

anova avegsi study / trt|study / tank|trt|study time trt*time if
sexnum==1 & ttest<10 & trt!=(1 5 7 8), repeated(time)

It's obviously not working, otherwise I wouldn't be bugging you all.
The problem is that it isn't actually taking these observations out of
the analysis.  Could someone show me how to do this correctly?...(trying
to learn Stata on the fly).

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