Statalist The Stata Listserver


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

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


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: Scoring the SF-12v2
Date   Thu, 9 Feb 2006 10:39:25 -0600

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/



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