Date: Wed, 14 Mar 2001 17:47:40 -0500
Reply-To: "M. Justice" <crimdoc@HOTMAIL.COM>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "M. Justice" <crimdoc@HOTMAIL.COM>
Subject: More about rounding.......
Content-Type: text/plain; charset="iso-8859-1"
Thank you for the quick responses. As noted below by Sally's response, both
COMPUTE variable2 = RND(variable1*2)/2 .
or alternatively,
COMPUTE var2 = .5*(rnd(2*var1)) .
create a range where values:
1.00 to 1.24 = 1.0
1.25 to 1.74 = 1.5
1.75 to 1.99 = 2.0
Are there any suggestions on how to get values such as 1.67 to round up to
2.0? Mathematically the method seems "sound," however, I can't help but
feel that, subjectively, 1.67 should be 2.0 rather than 1.5. I'm not sure
if anyone else agrees or what the exact "stand" on rounding really is. .
Thanks in advance,
M. Justice
"S. Zitzer" <sallyz@U.WASHINGTON.EDU> wrote in message
news:Pine.A41.4.33.0103141423140.30584-100000@mead5.u.washington.edu...
> Tom, I thought about that too, but the writer wants to round UP. One
> example was 1.67 *up* to 2.0. RND(1.67*2)/2 = 1.5 so that doesn't
> work.
>
> Sally
>
> > > I am looking to round values up to the nearest .5.
> >
> > Give this a whirl:
> >
> > COMPUTE variable2 = RND(variable1*2)/2 .
> >
> > Regards. --Tom
> >