Date: Fri, 14 Jan 2005 06:50:04 -0500
Reply-To: Richard Ristow <wrristow@mindspring.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <wrristow@mindspring.com>
Subject: Re: truncating/rounding strange result
In-Reply-To: <000a01c4f97e$ba9a81e0$6700000a@erc.ie>
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 09:46 AM 1/13/2005, David Millar wrote:
>I'm trying to look at differences between two standardised
>variables. When I use the following code the frequency table for the
>variable "diff" gives me multiple rows for what appears to be the same
>value (so for the value -.31 for example I get four rows for 1, 9, 7
>and 2 cases respectively).
>
>compute docsls=(trunc(docsls*100))/100.
>compute t98docss=(trunc(t98docss*100))/100.
>compute diff=docsls-t98docss.
>freq vars=diff.
And, At 05:48 AM 1/14/2005,
>I expanded the number of decimal places SPSS displayed, and the
>differences between the values displayed in the frequency table began
>to show at the 16th place of decimals
Of course! Yes, it is rounding. Try rounding AFTER differencing:
compute diff=docsls-t98docss.
compute diff=(trunc(diff*100))/100.
freq vars=diff.
|