Statalist The Stata Listserver


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

st: RE: RE: RE: RE: Scoring the SF-12v2


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: RE: Scoring the SF-12v2
Date   Thu, 9 Feb 2006 16:42:19 -0000

Presumably here the test should be !inlist(`l', 1, 2, 3, 4, 5) 
as !inrange(`l',1,5) allows non-integers through. 

Nick 
[email protected] 

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of 
> Scott Merryman
> Sent: 09 February 2006 16:39
> To: [email protected]
> Subject: st: RE: RE: RE: Scoring the SF-12v2
> 
> 
> Nick,
> 
> Thanks a lot.  I had looked at -inrange()- (I had tried 
> -replace `l' = . if
> != inlist(`l', 1, 2, 3, 4, 5) ) but I did not know about -!inrange()-
> 
> Thanks again,
> Scott
> 
> > -----Original Message-----
> > From: [email protected] [mailto:owner-
> > [email protected]] On Behalf Of Nick Cox
> > Sent: Thursday, February 09, 2006 10:09 AM
> > To: [email protected]
> > Subject: st: RE: RE: Scoring the SF-12v2
> > 
> > I just love the way that the means and
> > SDs of scores based on 1-5 ratings can
> > be quoted to up to 7 significant figures.
> > 
> > More seriously, a small point of style
> > that applies to other problems too. A line like
> > 
> > replace `l' = . if `l' != 1 & `l' != 2 &`l' != 3 &`l' != 4
> > &`l' != 5
> > 
> > can also be written
> > 
> > replace `l' = . if !inlist(`l', 1, 2, 3, 4, 5)
> > 
> > It's quite easy to miss new Stata functions, which
> > tend to be added without fanfare and documented without
> > detailed examples. -inlist()- and its sibling
> > -inrange()- have been around for a few versions now.
> > 
> > Nick
> > [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/
> 

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